question

kensanderson avatar image
kensanderson asked

Can't run zipped python script as Lambda function

Inline code works fine, but when I zip my "skill.py" to "skill.zip", I get "errorMessage": "Unable to import module 'lambda_function' Any thoughts? Do I need the name the file some in particular?
alexa skills kitsubmission testing certification
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

memo@amazon avatar image
memo@amazon answered
Hi kensanderson , Zipped python code should work fine, but you have to make sure your file and function [b]match the Handler[/b] for your Lambda function. By default the Handler is set to, [i]lambda_function.lambda_handler[/i], you can check what your Handler is under the Configuration tab. if you were to stick with the default, your file should be named [b]lambda_function.py[/b] and your Python function should be named [b]lambda_handler[/b].
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kensanderson avatar image
kensanderson answered
Thank you!!! This is just what I needed to know!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.