- 최신
- 최다 투표
- 가장 많은 댓글
Given that the function runs correctly under Python 3.7 but doesn't when you change the runtime I suspect that there are some components in the ZIP which are not compatible with Python 3.9. Rebuild the entire ZIP from scratch using Python 3.9 on your source machine and then upload the new ZIP to Lambda.
I did build the package using python 3.9.
What platform did you build it on?
I built it on an ec2 instance running ubuntu (x86)
Please try building it using an Amazon Linux instance - that's the same platform that Lambda runs on.
Has anyone found a working lambda layer of python-magic or could someone share theirs? @adam or @Brettski-AWS
Convert you lambda in SAM template. and test it on you system. SAM local invoke <Lambda_NAM> --events <EVENT FILE>
This is a good idea, this is to focus on mapping yes?
Some have found success here: https://stackoverflow.com/questions/61921935/aws-lambda-failed-to-find-libmagic . I found it working switching to the 3.7 runtime
Python 3.7 is leaving, have there been any other findings?
관련 콘텐츠
- AWS 공식업데이트됨 일 년 전
Better convert you lambda code in SAM. and test it on local with both runtime.
you might need to add dependency in requriements.txt