Closed abusutil closed 1 year ago
Assuming you're working from an arm64 computer, you are calling pip3 install
locally before zipping. You will need to tell pip to use amd64. This can be done in docker using --platform=linux/amd64
or using the --platform
option on pip install directly.
Thanks for your answer.
So, the issue was not my build agent architecture, but the python version used to build the plugins.
I'm using CircleCI to do that, and the CircleCI executor using python3.8 and my Lambda is with python3.10. So I changed the executor to use an image with python3.10 and working good.
Thanks again :)
Expected Behavior
Lambda executions logs sent to Datadog. And Lambda run without issue.
Actual Behavior
Lambda show only this error (in Datadog) :
Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'ddtrace.internal._encoding'
And it's blocking the execution.Steps to Reproduce the Problem
I'm build the lambda with some different layers and the lambda working good with CloudWatch.
requirements.txt
Building .zip archives for layers
I want to send logs directly from Datadog, so, I fellow this page : https://docs.datadoghq.com/serverless/installation/python/?tab=custom#using-the-package
(Option B)
I added those lines into my
function_handler.py
: https://docs.datadoghq.com/serverless/guide/handler_wrapper/Specifications
I don't understand why I have this error. I saw that this method need to compile
ddtrace
with the correct architecture, and I think, it's done by enter architecture value in my TF. I missed something ?Thanks for your advices.
Best,