Skip to content

Commit 79adc5b

Browse files
author
Graham Krizek
committed
Add ARN
1 parent 0cf3f11 commit 79adc5b

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Run Bash in [AWS Lambda](https://aws.amazon.com/lambda/) via [Layers](https://do
44

55
See the [How To](#how-to) section to understand how to use these layers. Also see the [example.sh](example.sh) file for an example of how to write a Bash script compatible with this Layer.
66

7+
### ARN
8+
9+
```
10+
arn:aws:lambda:<region>:744348701589:layer:bash:1
11+
```
12+
713
## How To
814

915
### Getting Started
@@ -15,14 +21,14 @@ See the [How To](#how-to) section to understand how to use these layers. Also se
1521
3. For the "Runtime" selection, select `Use custom runtime in function code or layer`.
1622
4. In the "Designer" section of your function dashboard, select the `Layers` box.
1723
5. Scroll down to the "Referenced Layers" section and click `Add a layer`.
18-
6. Select the `Provide a layer version ARN` option, then copy/paste the [Layer ARN](#ARNs) for your region.
24+
6. Select the `Provide a layer version ARN` option, then copy/paste the [Layer ARN](#ARN) for your region.
1925
7. Click the `Add` button.
2026
8. Click `Save` in the upper right.
2127
9. Upload your code and start using Bash in AWS Lambda!
2228

2329
#### AWS CLI
2430

25-
1. Create a function that uses the `provided` runtime and the [Layer ARN](#ARNs) for your region.
31+
1. Create a function that uses the `provided` runtime and the [Layer ARN](#ARN) for your region.
2632

2733
```
2834
$ aws lambda create-function \
@@ -41,15 +47,15 @@ $ aws lambda create-function \
4147

4248
1. In the "Designer" section of your function dashboard, select the `Layers` box.
4349
2. Scroll down to the "Referenced Layers" section and click `Add a layer`.
44-
3. Select the `Provide a layer version ARN` option, then copy/paste the [Layer ARN](README.md#ARNs) for your region.
50+
3. Select the `Provide a layer version ARN` option, then copy/paste the [Layer ARN](#ARN) for your region.
4551
4. Click the `Add` button.
4652
5. Still under the "Referenced Layers" section, select the previous version and click `Remove`.
4753
6. Click `Save` in the upper right.
4854

4955

5056
#### AWS CLI
5157

52-
1. Update your function's configration and add the [Layer ARN](README.md#ARNs) for your region.
58+
1. Update your function's configration and add the [Layer ARN](#ARN) for your region.
5359

5460
```
5561
$ aws lambda update-function-configuration \
@@ -121,6 +127,8 @@ Bash behaves in ways unlike other programming languages. As such, there are some
121127

122128
- The AWS CLI appears to be much slower than most of the AWS SDKs. Take this into consideration when comparing Bash with another language and evaluating execution times.
123129

130+
- If a command is logging unwanted messages to `stderr` that are being picked up in your response, you can see if there is something similiar to a `--silent` flag. If there is not, you can remove the messages to `stderr` by redirecting to /dev/null (`2>/dev/null`) or redirecting `stderr` to `stdout` for that command (`2>&1`) to send them to CloudWatch.
131+
124132
- With this method there is no `context` in the function, only `event` data. The `event` data is sent to your function as the first parameter. So to access the `event` data, use `$1`, for example `EVENT_DATA=$1`. In order to give some details that were availabe in the `context`, I export a few additional variables.
125133

126134
`AWS_LAMBDA_REQUEST_ID` - AWS Lambda Request ID
@@ -131,13 +139,6 @@ Bash behaves in ways unlike other programming languages. As such, there are some
131139

132140
`AWS_LAMBDA_TRACE_ID` - The sampling decision, trace ID, and parent segment ID of AWS XRay
133141

134-
### ARNs
135-
136-
**us-east-1**
137-
138-
`arn`
139-
140-
141142
### Included Executables
142143

143144
- `$ aws`

0 commit comments

Comments
 (0)