Skip to content Skip to sidebar Skip to footer

Travis Ci Adds "index" Before Handler_name During Deployment To Aws Lambda

I'm using Travis-ci to deploy lambda function. I've created .travis.yml file according to Lambda deployment, see file content below. language: generic deploy: provider: lambda

Solution 1:

handler_name needs to be the function name. You should also set module_name (see docs).

module_name: Optional. The name of the module that exports the handler. Defaults to index.

So try something like:

module_name: lambda/testfilehandler_name: lambda_handler

If that doesn't work, try creating __init__.py in lambda folder. And if that doesn't work, try moving lambda_handler.py to the root folder. You can make it import files from your folder to keep an organized file structure.

Post a Comment for "Travis Ci Adds "index" Before Handler_name During Deployment To Aws Lambda"