You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Python APM Agent can be used with AWS Lambda to monitor the execution of your AWS Lambda functions.
9
12
10
-
```
11
-
Note: The Centralized Agent Configuration on the Elasticsearch APM currently does NOT support AWS Lambda.
12
-
```
13
+
:::{note}
14
+
The Centralized Agent Configuration on the Elasticsearch APM currently does NOT support AWS Lambda.
15
+
:::
13
16
14
17
15
18
## Prerequisites [_prerequisites]
16
19
17
20
You need an APM Server to send APM data to. Follow the [APM Quick start](docs-content://solutions/observability/apps/application-performance-monitoring-apm.md) if you have not set one up yet. For the best-possible performance, we recommend setting up APM on {{ecloud}} in the same AWS region as your AWS Lambda functions.
18
21
22
+
## Step 1: Add the APM Layers to your Lambda function [add_the_apm_layers_to_your_lambda_function]
19
23
20
-
## Step 1: Select the AWS Region and Architecture [_step_1_select_the_aws_region_and_architecture]
<pid="fallback-extension-arn-selector-section">Pick the right ARN from <atarget="_blank"href="RELEASE_LINK">this release table for the APM Lambda Extension Layer</a>.</p>
158
-
<pid="fallback-agent-arn-selector-section">In addition, pick the right ARN from <atarget="_blank"href="RELEASE_LINK">this release table for the APM Agent Layer</a>.</p>
<divrole="lambda-selector-header">Select the AWS region and architecture of your Lambda function. This documentation will update based on your selections.</div>
Both the [{{apm-lambda-ext}}](apm-aws-lambda://reference/index.md) and the Python APM Agent are added to your Lambda function as [AWS Lambda Layers](https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.html). Therefore, you need to add the corresponding Layer ARNs (identifiers) to your Lambda function.
219
25
220
26
:::::::{tab-set}
@@ -225,7 +31,20 @@ To add the layers to your Lambda function through the AWS Management Console:
225
31
1. Navigate to your function in the AWS Management Console
226
32
2. Scroll to the Layers section and click the *Add a layer* button 
227
33
3. Choose the *Specify an ARN* radio button
228
-
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:<br> APM Extension layer:<br> <spanstyle="font-size:10pt"><b>EXTENSION_ARN</b></span><br> APM agent layer:<br> <spanstyle="font-size:10pt"><b>AGENT_ARN</b></span> 
34
+
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:
## Step 3: Configure APM on AWS Lambda [_step_3_configure_apm_on_aws_lambda]
131
+
## Step 2: Configure APM on AWS Lambda [configure_apm_on_aws_lambda]
306
132
307
133
The {{apm-lambda-ext}} and the APM Python agent are configured through environment variables on the AWS Lambda function.
308
134
309
-
For the minimal configuration, you will need the *APM Server URL* to set the destination for APM data and an *{{apm-guide-ref}}/secret-token.html[APM Secret Token]*. If you prefer to use an [APM API key](docs-content://solutions/observability/apps/api-keys.md) instead of the APM secret token, use the `ELASTIC_APM_API_KEY` environment variable instead of `ELASTIC_APM_SECRET_TOKEN` in the following configuration.
135
+
For the minimal configuration, you will need the *APM Server URL* to set the destination for APM data and an [APM Secret Token](docs-content://solutions/observability/apps/secret-token.md). If you prefer to use an [APM API key](docs-content://solutions/observability/apps/api-keys.md) instead of the APM secret token, use the `ELASTIC_APM_API_KEY` environment variable instead of `ELASTIC_APM_SECRET_TOKEN` in the following configuration.
310
136
311
137
For production environments, we recommend [using the AWS Secrets Manager to store your APM authentication key](apm-aws-lambda://reference/aws-lambda-secrets-manager.md) instead of providing the secret value as plaintext in the environment variables.
0 commit comments