- Newest
- Most votes
- Most comments
Have you tried to follow this KB article https://aws.amazon.com/premiumsupport/knowledge-center/lambda-python-package-compatible/ ?
The provided link really helped Maciej
Thank you very much. Hope in future people could check this post.
I still had to do 2 actions:
-
Had to change my Lambda from x86_64 to arm64, For some reason i kept on getting a variation of the initial error I did used this command: pip install
--platform **manylinux2014_aarch64 **
--target=./python/lib/python3.9/site-packages
--implementation cp
--python 3.9
--only-binary=:all: --upgrade
pandas The manylinux2014_aarch64 as platform did the trick. -
Now that my lambda has a different chipset i had to do the same for ALL my other python packages that where based on x86. I only had 1 which was orjson... so i just applied the same pip install command.
It seems like you have resolved your problem but have the added hassle of switching your lambda console settings for the lambda chipset type. The answer you gave makes it sound like you are manually packaging your lambda code.
Deployment frameworks like SAM Cli, Serverless Framework, AWS CDK, SST, etc can help with packaging binary python packages which is the cause of the error that brought you to ask this question.
I have experience with Serverless Framework, AWS CDK and SAM CLI for packaging python lambda code, and all 3 enable packaging of your python dependencies using docker so that the correct binary version is packaged. I would take a look at these tools and choose one that feels right to you. If you are new to Lambda deployments, I recommend SAM Cli as a great way to get started. You can find more details here:
Relevant content
- asked 3 years ago
- asked 7 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 17 days ago
- AWS OFFICIALUpdated 2 years ago