Please read deploy.sh
before execution no make sure that this sample does not conflict with any existing functions.
- Install the AWS CLI.
- Setup your credentials.
- Clone the repository containing the code of the Elastic APM Extension for AWS Lambda.
- Create an empty Lambda function with the name of your choice in AWS.
- Set the environment variables required by the extension.
- In
deploy.sh
, set the following environment variables:
EXTENSION_PATH=<Path to extension codebase>
LAMBDA_NAME=<Your lambda function name>
AWS_REGION=<AWS Region>
EXTENSION_NAME=<The name you wish to give to the extension layer>
- Run the script :
./deploy.sh
The script :
- Installs the dependencies featured in
requirements.txt
- Packages the Lambda function and its dependencies into a .zip file
- Updates the Lambda function using the previously created deployment package
- Builds the extension and packages it into a .zip
- Publishes the extension as a layer
After executing the script, the last manual action is to either attach your newly uploaded layer to the lambda function to manually bump the version of the layer used by the Lambda function.