2

This is the error I get when I try to invoke my lambda function as a ZIP file.

"The file lambda_function.py could not be found. Make sure your handler upholds the format: file-name.method."

What am I doing wrong?

3 Answers 3

3

Mostly it is because of the way zipping the files making the problem. Instead of zipping the root folder you have to select all files and zip it like below,

Please upload all files and subfolders. My example is using node.js but you can do the same for python

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

0

Just to clarify: If I want to invoke Keras all I have to do is download the Keras directories and put my lambda code and Keras directories as a zip folder and upload it directly from my desktop right?

Just wanted to know if this is the right method to invoke Keras.

Comments

0

Whenever getting these kind of messages, if you see all files and handlers have the right name, format, location, etc., check also if other parts of the Lambda configuration are set up properly for what the code is trying to do.

For example, you might receive that unrelated error if your code is trying to execute against an RDS database that is in a private subnet and you are missing the correct VPC configuration that allows connectivity to that database.

Missing VPC configuration for Lambda

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.