- Newest
- Most votes
- Most comments
There's not a lot to go on here - for example, it's impossible to tell whether there is a library missing or it's some other dependency so I can only give generic advice.
If you are using Python packages in your Lambda the best thing you can do is package them (those packages/dependencies) in the function. There are a couple of ways of doing this: Using a ZIP file or using a container image - use whichever is most comfortable for you - if you haven't had experience with containers then the ZIP file is probably the way to go.
Note that you should create the ZIP on an Amazon Linux 2 instance in order to get package for the appropriate architecture that is compatible with Lambda. And with some careful coding (or by creating a separate Python utility) you will be able to test that your packaging is working correctly prior to putting it into a ZIP and uploading to Lambda.
In my experience, ensuring that all the packages are included with your function handler is the best way to avoid the issue you're having.
Relevant content
- Accepted Answerasked 3 years ago
- asked 7 months ago
- Accepted Answerasked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 5 months ago