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!

Splunk Observability Cloud's AI Assistant in Action Series: Auditing Compliance and ...

This is the third post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...