Workaround after removal of vendored version of botocore

0

Customer uses botocore.vendored that are impacted by the upcoming changes:

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

In their words: The main problem is that when using python in a Lambda, you were not able to import requests, hence us using botocore.vendored.

Do you know how to use requests now when in a Lambda function?

AWS
質問済み 4年前1178ビュー
1回答
0
承認された回答

You can create a Lambda Layer for the requests library:

https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html

or you can include your dependencies within your Lambda artifact upon upload, which would look something like:

https://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html#python-package-dependencies

In the second route, you would just include the version of requests in the requirement file before you run pip.

AWS
回答済み 4年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ