AWS Lambda - Buffered reader

后端 未结 3 913
野的像风
野的像风 2021-01-27 21:31

I am using Java on AWS Lambda to get the URL source code of the site. I have the following code:

URL yahoo = new URL(url);
URLConnection yc = yahoo.openConnectio         


        
相关标签:
3条回答
  • 2021-01-27 21:42

    I would guess it is related to this bug https://bugs.openjdk.java.net/browse/JDK-8149169

    Try the same URL (that causes timeout of the Lambda function) from your local system and see if you can find the root cause.

    0 讨论(0)
  • 2021-01-27 21:51

    This is the point at which the connection is made, the request sent, and the first part of the response read. Evidently the server is slow at one or more of those things.

    0 讨论(0)
  • 2021-01-27 21:53

    The simple solution for making this work - is putting your Lambda out of the VPC it's in right now.

    Read my answer on this thread for detailed explanation on why this happens to you.

    AWS lambda invoke not calling another lambda function - Node.js

    (note: the answer is not related to NodeJS)

    0 讨论(0)
提交回复
热议问题