diff --git a/docs/reference/lambda-support.md b/docs/reference/lambda-support.md index ada302cd6..354556870 100644 --- a/docs/reference/lambda-support.md +++ b/docs/reference/lambda-support.md @@ -8,8 +8,9 @@ applies_to: product: apm_agent_python: ga sub: - apm-lambda-ext-v: ver-1-5-7 - apm-python-v: ver-6-23-0 + apm-lambda-ext-v: ver-1-6-0 + apm-python-v: ver-6-24-0 + apm-python-layer-v: 3 --- # Monitoring AWS Lambda Python Functions [lambda-support] @@ -39,14 +40,14 @@ To add the layers to your Lambda function through the AWS Management Console: 3. Choose the *Specify an ARN* radio button 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: * APM Extension layer: - ``` + ```bash subs=true arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-extension-{{apm-lambda-ext-v}}-{ARCHITECTURE}:1 <1> ``` 1. Replace `{AWS_REGION}` with the AWS region of your Lambda function and `{ARCHITECTURE}` with its architecture. * APM agent layer: - ``` - arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:1 <1> + ```bash subs=true + arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:{{apm-python-layer-v}} <1> ``` 1. Replace `{AWS_REGION}` with the AWS region of your Lambda function. @@ -57,10 +58,10 @@ To add the layers to your Lambda function through the AWS Management Console: ::::::{tab-item} AWS CLI To add the Layer ARNs of the {{apm-lambda-ext}} and the APM agent through the AWS command line interface execute the following command: -```bash +```bash subs=true aws lambda update-function-configuration --function-name yourLambdaFunctionName \ --layers arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-extension-{{apm-lambda-ext-v}}-{ARCHITECTURE}:1 \ <1> -arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:1 <2> +arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:{{apm-python-layer-v}} <2> ``` 1. Replace `{AWS_REGION}` with the AWS region of your Lambda function and `{ARCHITECTURE}` with its architecture. 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 ::::::{tab-item} SAM In your SAM `template.yml` file add the Layer ARNs of the {{apm-lambda-ext}} and the APM agent as follows: -```yaml +```yaml subs=true ... Resources: yourLambdaFunction: @@ -78,7 +79,7 @@ Resources: ... Layers: - arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-extension-{{apm-lambda-ext-v}}-{ARCHITECTURE}:1 <1> - - arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:1 <2> + - arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:{{apm-python-layer-v}} <2> ... ``` 1. Replace `{AWS_REGION}` with the AWS region of your Lambda function and `{ARCHITECTURE}` with its architecture. @@ -88,14 +89,14 @@ Resources: ::::::{tab-item} Serverless In your `serverless.yml` file add the Layer ARNs of the {{apm-lambda-ext}} and the APM agent to your function as follows: -```yaml +```yaml subs=true ... functions: yourLambdaFunction: handler: ... layers: - arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-extension-{{apm-lambda-ext-v}}-{ARCHITECTURE}:1 <1> - - arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:1 <2> + - arn:aws:lambda:{AWS_REGION}:267093732750:layer:elastic-apm-python-{{apm-python-v}}:{{apm-python-layer-v}} <2> ... ``` 1. Replace `{AWS_REGION}` with the AWS region of your Lambda function and `{ARCHITECTURE}` with its architecture. @@ -105,11 +106,11 @@ functions: ::::::{tab-item} Terraform To add the{{apm-lambda-ext}} and the APM agent to your function add the ARNs to the `layers` property in your Terraform file: -```yaml +```yaml subs=true ... resource "aws_lambda_function" "your_lambda_function" { ... - 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> + 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> } ... ```