I\'ve got a Python script for an AWS Lambda function that does HTTP POST requests to another endpoint. Since Python\'s urllib2.request
, https://docs.python.org/2/li
Answer 2020-06-18
I found a nice and easy way to use requests
inside AWS Lambda functions!
Open this link and find the region that your function is using:
https://github.com/keithrozario/Klayers/tree/master/deployments/python3.8/arns
Open the .csv
related to your region and search for the requests
row.
This is the ARN
related to requests
library:
arn:aws:lambda:us-east-1:770693421928:layer:Klayers-python38-requests:6
So now in your lambda function, add a layer using the ARN found.
Obs.: make sure your Python lambda function runtime is python3.8.