我目前有一个Lambda函数。我想在VPC下运行它。我按照这个github repo的说明开始使用 - https://gist.github.com/reggi/dc5f2620b7b4f515e68e46255ac042a7
以下是我遵循的以下步骤:
创建了一个默认安全组并将其分配给VPC - 我没有更改任何传入或传出规则。
分配在上面步骤中创建的vpc,在上面步骤中创建的两个子网以及我拥有的lambda函数的安全组。
我不断得到AmazonSDK超时连接到SQS的异常:
com.amazonaws.SdkClientException: Unable to execute HTTP request: Connect to sqs.us-east-1.amazonaws.com:443 [sqs.us-east-1.amazonaws.com/54.239.28.81] failed: connect timed out
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleRetryableException(AmazonHttpClient.java:1113)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1063)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:743)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:717)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667)
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513)
at com.amazonaws.services.sqs.AmazonSQSClient.doInvoke(AmazonSQSClient.java:1740)
at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:1716)
at com.amazonaws.services.sqs.AmazonSQSClient.executeReceiveMessage(AmazonSQSClient.java:1380)
at com.amazonaws.services.sqs.AmazonSQSClient.receiveMessage(AmazonSQSClient.java:1356)
我做错了什么?