2

I am attempting to upload a .zip file from S3 to run on a lambda function. When doing so, I get the following error:

START RequestId: 578fc1bb-9c82-11e7-b2c9-91da0a832381 Version: $LATEST Unable to import module 'create_heatmap': No module named create_heatmap END RequestId: 578fc1bb-9c82-11e7-b2c9-91da0a832381 REPORT RequestId: 578fc1bb-9c82-11e7-b2c9-91da0a832381 Duration: 0.31 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 18 MB 

enter image description here

Above is the folder which I zipped up and uploaded to lambda. You can see there is a create_heatmap.py file in this top level directory.

The handler configuration I have laid out can be seen below: enter image description here

And last, here is the lambda_handler function in create_heatmap.py.

def lambda_handler(event,context): hm = Heatmap(course_name=event.get('course_name',None),horizontal=event.get('horizontal',[]),num_topics=event.get('num_topics',10)) hm.run() 

I cannot figure out why this is not working at the moment. Any suggestions would be greatly appreciated.

1
  • I would remove dependencies and do a quick test with a minimal Python source file that simply includes a lambda_handler(event, context) handler that prints "Hello World!". Commented Sep 18, 2017 at 15:36

1 Answer 1

0

Make sure the permissions on the files in the archive are at least 444 -- this tripped me up for awhile. If that doesn't work, check out the other answers on this post.

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

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.