Why AWS lambda functions In a VPC sometimes timeout and sometimes work fine?

£可爱£侵袭症+ 提交于 2019-12-23 19:44:22

问题


I have some lambda functions in a VPC, some of them need Internet to work so I added a NAT instance (t2.micro) and the problem is that I have some functions sometimes work and sometimes timeout. For example a function that call FB API 80% of the time work and 20% timeout. Another function is using boto3 to create a spot instance 50% of the time timeout and the logs give me.

2018-07-16T06:35:55.909Z 421f98dd-88c2-11e8-913a-63c8d6f276f3 Task timed out after 100.10 seconds

Whenever I redeploy my serverless project I face this problem.

I increased the timeout limit and the memory but I have the same problem I'm sure that there is access to Internet but some of the lambda functions timeout.

What do you think the problem is ? Thanks

来源:https://stackoverflow.com/questions/51373609/why-aws-lambda-functions-in-a-vpc-sometimes-timeout-and-sometimes-work-fine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!