Epsagon now supports AWS Lambda Extensions. Lambda Extensions enable users to integrate complex tools without complex installation. This greatly simplifies the integration of Epsagon in Lambda environments, thus reducing operational overheads.
Using Epsagon’s Layers for Lambda Functions
cURL https://layers.epsagon.com/production with the following query parameters to fetch the latest layer ARN:
- region=REGION #Choices for REGION include all AWS regions.
- name=epsagon-LANGUAGE-layer #Choices for LANGUAGE include python and node.
For example, to get the latest layer for Node.js in us-east-1, the endpoint would become:
fetch('https://layers.epsagon.com/production?region=us-east-1&name=epsagon-node-layer&max_items=1') .then(r => r.json()) .then(r => r.LayerVersions.LayerVersionArn)
import requests r = requests.get('https://layers.epsagon.com/production?region=us-east-1&name=epsagon-node-layer&max_items=1') arn = r.json()['LayerVersions']['LayerVersionArn']
The ARN has a format of
Add this layer to your function, and finalize tracing with environment variables.
Configure Environment Vars for auto-tracing
export EPSAGON_TOKEN=<EPSAGON-TOKEN> export EPSAGON_APP_NAME=<APP-NAME-STAGE> export AUTOWRAPT_BOOTSTRAP=epsagon # copy exact
export EPSAGON_TOKEN=<EPSAGON-TOKEN> export EPSAGON_APP_NAME=<APP-NAME-STAGE> export NODE_OPTIONS='-r epsagon-frameworks' # copy exact
With the support for AWS Lambda Extensions, developers can improve their development efficiency by focussing on what is important for them – coding and deploying their code – without spending too much time worrying about operational overheads.