us-west-2
) region. The layer ARN will be:arn:aws:lambda:us-west-2:269863060030:layer:thundra-lambda-python-layer:${layer-version}
thundra.handler.wrapper
. Set the thundra_agent_lambda_handler
environment variable value to your original handler (e.g., handler.handle
).thundra
component to customthundra
component under custom with apiKey under that, as seen below:thundra_apiKey
to Environment Variables under the Provider Section in serverless.ymlthundra_apiKey
environment variable along with your Thundra API key.ThundraAWSAccountNo
and ThundraPythonLayerVersion
parameters are defined in the Parameters section in the following configuration:handler
of functions to be wrapped to thundra.handler.wrapper
. Alternatively, if you want to wrap all the functions in your SAM configuration file, you can set the handler in the Globals
section.thundra_agent_lambda_handler
environment variable with the value set to the handler path of your function.thundra_apiKey
environment variable with your Thundra API key.thundra.handler.wrapper
, and add the environment variable thundra_agent_lambda_handler
with your handler.thundra_apiKey
environment variable with your Thundra API key.pip
command and another way is adding Thundra to your "requirements.txt".pip
${LAMBDA_TASK_ROOT}
is "/var/task"
where your handler should be located according to AWS documentation. Check the "To create an image from an AWS base image for Lambda" section from the AWS documentation link.WORKDIR
is ${LAMBDA_TASK_ROOT}
in which both Thundra and your lambda handler are located.