Running python with boto2 as an AWS Lambda function

十年热恋 提交于 2021-01-28 07:29:02

问题


I am using a python script from github to run on AWS lambda. I realized that the import boto statements are not working while running inside lambda. Is there way to instruct lambda to load boto2 as well?


回答1:


OK, all I had to do was install boto using "pip install module-name -t /path/to/project-dir" per the docs: http://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html

Then zipped the files needed for lambda and uploaded.



来源:https://stackoverflow.com/questions/44138775/running-python-with-boto2-as-an-aws-lambda-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!