- Newest
- Most votes
- Most comments
The error message you shared is talking about the module named index
this is unlikely to be related to the layer you are specifying. The Handler you have specified is index.lambda_handler
can you double check that the code you have put in thatr S3 location does indeed have an index.py
in the root of the zip file? You would get that error message if either this file does not exist in that zip OR the zip file does not contain index.py at it's root.
Hi,
I think that the issue come from the fact that you don't specifcy "Handler" in your CFN def.
Doc at https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-handler says that it is required to specify handler when deploy from a zip.
Handler: the name of the method within your code that Lambda calls to run your
function. Handler is required if the deployment package is a .zip file archive. The
format includes the file name. It can also include namespaces and other qualifiers,
depending on the runtime
Best,
Didier
Hi, thanks for a quick reaction. Unfortunately I don't understand your answer. My resource contains "Handler: index.lambda_handler". I have added markdown to make my question better readable. Also, I do not use a zip file. The pandas layer is an AWS managed layer which is available via Arn, ref. https://aws-sdk-pandas.readthedocs.io/en/stable/layers.html. If this turns out to be a bug, what is the best way to raise it? Via this forum or is another route preferred?
I've used this lambda layer: "arn:aws:lambda:eu-west-1:336392948345:layer:AWSSDKPandas-Python38:12", try & see if this solves your error
Relevant content
- Accepted Answerasked 3 years ago
- Accepted Answer
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 9 months ago
Thanks Danj. Indeed I figured out meanwhile what the problem was. I used the wrong function handler in the cloudformation template. Instead of the convention required for python I took the one for nodejs.