Splunk AppDynamics

APM Serverless Lambda. Python extension crash. AWS_Execution_Env not supported

Alejandro_Checa
New Member

Hello,

I'm trying to implement APM Serverless for AWS Lambda in a Python function. The function is deployed via a container image, so the extension is built as a layer in the Dockerfile.

Firstly, in case someone is trying to auto instrument this process; The extension must be unzipped into /opt/extensions/ not to /opt/ like suggested in the docs. Otherwise, the Lambda won't see the extension.

However, when executing the function, I get the following error:

AWS_Execution_Env is not supported, running lambda with default arguments.

EXTENSION Name: appdynamics-extension-script State: Started Events: []

Start RequestId

End RequestId

Error: exit code 0 Extension.Crash

Without more information. Any idea what could be causing said crash?

Thanks!

Labels (1)
0 Karma

Kenji_Kumada
Path Finder
Hi @Anonymous.Checa Grande,

Thank you for your post to the community!

From the given information, I see two possible issues that caused the crash.

* the environment varialbe "AWS_Execution_Env" doesn't seem correctly set
* unzipping the extension to /opt/extension

This message "AWS_Execution_Env is not supported, running lambda with default arguments." is from the appdynamics extension script. This message is shown when the execution environment is not Python or Node.js. Could you check if the environment variable "AWS_EXECUTION_ENV" is set? I wrote out the environment variable and in my environment with python 3.7, it was set as "AWS_Lambda_python3.7".

For the second issue, it is not clear whether you should unzip to /opt or /opt/extension. It doesn't seem necessary to put your extention in /opt/extension if it's internal extension. You can have a look to this link.


By the way, I followed the instructions in "Add the AWS Lambda Extension to Your Function when packaged as a container image" section in this documentation page

and it worked fine. You can have a look and see if there is any inconsistent setting in your container image. In this setting, the appdynamics extension script is located in /opt, not /opt/extension. It may be that it crashed because the extension script is executed as an external extension (as you put it in /opt/extension) but I cannot conclude with the provided information.

Hope this answer helps!

Best regards,
Kenji
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...