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
gefragt vor 4 Jahren1178 Aufrufe
1 Antwort
0
Akzeptierte Antwort

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
beantwortet vor 4 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen