我正在尝试从我的AWS Lambda发出http请求,但是超时。
我的代码与此类似:
import requests
def lambda_handler(event, context):
print('Im making the request')
request.get('http://www.google.com')
print('I recieved the response')
但是,当我对此进行测试时,我会超时。
输出是
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
所以我知道问题不是它没有找到请求包,而是在运行我的python代码。我只是想知道为什么该请求超时。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句