I have a very basic lambda function to send email
The Code hangs on creating SES Client .i put logs before and after this statement of creating client .
AmazonSimpleEmailService client = AmazonSimpleEmailServiceClientBuilder.standard().withRegion(Regions.EU_WEST_1)
.withCredentials(new InstanceProfileCredentialsProvider(false)).build();
i also tried
AmazonSimpleEmailService client = AmazonSimpleEmailServiceClientBuilder.standard().withRegion(Regions.EU_WEST_1).build();
The lambda function assumes IAM role with AmazonSESFullAccess , any one could point to resolution why do i get timeout here trying to initiate client ?
To fix the issue of Credentials creation times out as suggested in reply i tried
NO VPC , increased timeout from default 3 to 10 seconds, and increased mem to 960MB
Creating Service sdk client in java use EnvironmentVariableCredentialsProvider() for LAMBDA that fixed the Client Initialisation problem of for EC2 use InstanceProfileCredentialsProvider(true)
Unable to load credentials from service endpoint
AmazonSimpleEmailService client =
AmazonSimpleEmailServiceClientBuilder.standard().withRegion(Regions.EU_WEST_1) .withCredentials(new EnvironmentVariableCredentialsProvider()).build();
thanks a lot for help ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With