Skip to content

Commit 4cfcd24

Browse files
authored
docs: lambda layer version may not be 1 (#2430)
Don't hardcode the apm layer version as 1, in 6.24.0 it's 3. While at it fix vars substitution.
1 parent 183ebc5 commit 4cfcd24

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

docs/reference/lambda-support.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ applies_to:
88
product:
99
apm_agent_python: ga
1010
sub:
11-
apm-lambda-ext-v: ver-1-5-7
12-
apm-python-v: ver-6-23-0
11+
apm-lambda-ext-v: ver-1-6-0
12+
apm-python-v: ver-6-24-0
13+
apm-python-layer-v: 3
1314
---
1415

1516
# Monitoring AWS Lambda Python Functions [lambda-support]
@@ -39,14 +40,14 @@ To add the layers to your Lambda function through the AWS Management Console:
3940
3. Choose the *Specify an ARN* radio button
4041
4. Copy and paste the following ARNs of the {{apm-lambda-ext}} layer and the APM agent layer in the *Specify an ARN* text input:
4142
* APM Extension layer:
42-
```
43+
```bash subs=true
4344
arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-extension-{{apm-lambda-ext-v}}-{ARCHITECTURE}:1 <1>
4445
```
4546
1. Replace `{AWS_REGION}` with the AWS region of your Lambda function and `{ARCHITECTURE}` with its architecture.
4647

4748
* APM agent layer:
48-
```
49-
arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:1 <1>
49+
```bash subs=true
50+
arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:{{apm-python-layer-v}} <1>
5051
```
5152
1. Replace `{AWS_REGION}` with the AWS region of your Lambda function.
5253

@@ -57,10 +58,10 @@ To add the layers to your Lambda function through the AWS Management Console:
5758
::::::{tab-item} AWS CLI
5859
To add the Layer ARNs of the {{apm-lambda-ext}} and the APM agent through the AWS command line interface execute the following command:
5960

60-
```bash
61+
```bash subs=true
6162
aws lambda update-function-configuration --function-name yourLambdaFunctionName \
6263
--layers arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-extension-{{apm-lambda-ext-v}}-{ARCHITECTURE}:1 \ <1>
63-
arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:1 <2>
64+
arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:{{apm-python-layer-v}} <2>
6465
```
6566
1. Replace `{AWS_REGION}` with the AWS region of your Lambda function and `{ARCHITECTURE}` with its architecture.
6667
2. Replace `{AWS_REGION}` with the AWS region of your Lambda function.
@@ -69,7 +70,7 @@ arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v
6970
::::::{tab-item} SAM
7071
In your SAM `template.yml` file add the Layer ARNs of the {{apm-lambda-ext}} and the APM agent as follows:
7172

72-
```yaml
73+
```yaml subs=true
7374
...
7475
Resources:
7576
yourLambdaFunction:
@@ -78,7 +79,7 @@ Resources:
7879
...
7980
Layers:
8081
- arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-extension-{{apm-lambda-ext-v}}-{ARCHITECTURE}:1 <1>
81-
- arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:1 <2>
82+
- arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:{{apm-python-layer-v}} <2>
8283
...
8384
```
8485
1. Replace `{AWS_REGION}` with the AWS region of your Lambda function and `{ARCHITECTURE}` with its architecture.
@@ -88,14 +89,14 @@ Resources:
8889
::::::{tab-item} Serverless
8990
In your `serverless.yml` file add the Layer ARNs of the {{apm-lambda-ext}} and the APM agent to your function as follows:
9091

91-
```yaml
92+
```yaml subs=true
9293
...
9394
functions:
9495
yourLambdaFunction:
9596
handler: ...
9697
layers:
9798
- arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-extension-{{apm-lambda-ext-v}}-{ARCHITECTURE}:1 <1>
98-
- arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:1 <2>
99+
- arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:{{apm-python-layer-v}} <2>
99100
...
100101
```
101102
1. Replace `{AWS_REGION}` with the AWS region of your Lambda function and `{ARCHITECTURE}` with its architecture.
@@ -105,11 +106,11 @@ functions:
105106
::::::{tab-item} Terraform
106107
To add the{{apm-lambda-ext}} and the APM agent to your function add the ARNs to the `layers` property in your Terraform file:
107108

108-
```yaml
109+
```yaml subs=true
109110
...
110111
resource "aws_lambda_function" "your_lambda_function" {
111112
...
112-
layers = ["arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-extension-{{apm-lambda-ext-v}}-{ARCHITECTURE}:1", "arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:1"] <1>
113+
layers = ["arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-extension-{{apm-lambda-ext-v}}-{ARCHITECTURE}:1", "arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:{{apm-python-layer-v}}"] <1>
113114
}
114115
...
115116
```

0 commit comments

Comments
 (0)