My Lambda function is unable to download objects from within Lambda, I get the below exception.
My bucket name and key name are both correct. I tested them out by running the Lambda function from my local machine with a dummy main and the bucket/key it's attempting to download and it downloaded the object just fine.
The role the Lambda function is executing with has S3 Read-Only privileges.
I've tried increasing the socket timeout to 25 seconds, increased the max connections to 10 and still no luck.
Below is the top portion of the stacktrace (can't seem to copy/paste in a pretty format from AWS Cloudwatch). The only reference within my code stops at the
s3Client.getObject(bucket, key);
My s3Client object is created as follows:
private final AmazonS3Client s3Client = new AmazonS3Client();
Searches have come up with similar issues from years ago, which seemed to have something to do with a specific issue or incorrect authentication.
Any thoughts?
Below is the stacktrace:
com.amazonaws.http.AmazonHttpClient executeHelper INFO: Unable to execute HTTP request: Connect to <>:443 http://<>/54.231.112.64 failed: connect timed out
org.apache.http.conn.ConnectTimeoutException: Connect to <>:443 http://<>/54.231.112.64 failed: connect timed out at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:150) at