lambda layer using colander

Viewed 32

I'm trying to create a colander layer from AWS Lambda Functions but unable to do so. I have created the python zip file containing the unpack wheel file from PyPI-colander and then uploading it to as a file but the response is "errorMessage": "Unable to import module 'lambda_function': No module named 'colander'"

1 Answers

Have a look at the python documentation here. In particular make sure you are downloading a binary that matches the environment you are choosing for your lambda (e.g. x86_64 or arm64). Also note the directory path of the target inside the zip -> /python/lib/python3.9/site-packages.

You can also deploy that package/zip as a layer, if you plan on reusing it across lambda functions.

Related