aws lambda Unable to import module 'lambda_function': No module named 'requests'

后端 未结 4 1043
北恋
北恋 2020-12-28 17:50

I have recently started to use AWS Lambda to use triggers against some python code I have written. I currently have 2 lambda functions, both of which have been created with

4条回答
  •  春和景丽
    2020-12-28 18:18

    https://aws.amazon.com/blogs/developer/removing-the-vendored-version-of-requests-from-botocore/

    AWS removed the vendored version of requests from Botocore.

    Steps:

    1. cmd >> pip install requests

    2. Python code:

      import requests
      response = requests.get('https://...') 
      

提交回复
热议问题