AWS Lambda import module error in python

后端 未结 21 1484
醉话见心
醉话见心 2020-12-07 19:56

I am creating a AWS Lambda python deployment package. I am using one external dependency requests . I installed the external dependency using the AWS documentation http://do

21条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-07 20:21

    In lambda_handler the format must be lambda_filename.lambda_functionName. Supposing you want to run the lambda_handler function and it's in lambda_fuction.py, then your handler format is lambda_function.lambda_handler.

    Another reason for getting this error is module dependencies.

    Your lambda_fuction.py must be in the root directory of the zip file.

提交回复
热议问题