Python request in AWS Lambda timing out
I'm trying to make a http request from my AWS Lambda but it times out.
My code looks similiar to this:
import requests def lambda_handler(event, context): print('Im making the request') request.get('http://www.google.com') print('I recieved the response')
But when I test this, I get a timeout.
The output is
Im making the request END RequestId: id REPORT RequestId: id Duration: 15003.25 ms Billed Duration: 15000 ms Memory Size: 128 MB Max Memory Used: 18 MB 2016-04-08T20:33:49.951Z id Task timed out after 15.00 seconds
So I know the issue isn't it not finding the request package, and it's running my python code. I just figure out why it times out on that request.