Skip to content

Springboot Java application SES is not working

0

A Spring boot Java based application is deployed in APPRUNNER. To enable the SES service for the above application, in I AM service role is created with SES full access policy and in VPC an endpoint created with security groups with outbound rule https 443 port enabled. With below error Request processing failed: software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: Connect to email.ap-south-1.amazonaws.com:443 [email.ap-south-1.amazonaws.com/<IP address>, email.ap-south-1.amazonaws.com/<IP address>, email.ap-south-1.amazonaws.com/<IP address>] failed: Connect timed out

3 Answers
2

Hello,

Have you allowed inbound traffic in the security group assigned to the SES endpoint for your application to access it?

In the security group for the SES endpoint, try configuring the inbound rules to allow your application.

For more information, check out this AWS documentation below:

https://docs.aws.amazon.com/ses/latest/dg/send-email-set-up-vpc-endpoints.html#send-email-set-up-vpc-endpoints-walkthrough

answered a year ago
EXPERT
reviewed a year ago
0

Hi Vijay

check these steps to troubleshoot issue:

  1. Verify Security Group rules:
    • Ensure the security group associated with the VPC Endpoint allows outbound traffic to SES on port 443.
    • Check if there are any inbound rules that might be blocking the connection.
  2. Check VPC Endpoint configuration:
    • Verify that the VPC Endpoint is correctly configured and enabled for SES.
    • Ensure the VPC Endpoint is associated with the correct security group.
  3. App Runner service configuration:
    • Check the App Runner service configuration to ensure it's using the correct VPC Endpoint and security group.
  4. Network connectivity:
    • Verify network connectivity between App Runner and the VPC Endpoint using tools like telnet or curl.
  5. Increase timeout:
    • If the issue persists, try increasing the timeout value in your SES client configuration to see if it resolves the issue.
  6. AWS Support:
    • If none of the above steps resolve the issue, reach out to AWS Support for further assistance.

Additionally, you can try to:

  • Check the App Runner service logs for more detailed error messages.
  • Use the AWS CLI or SDKs to test the connection to SES from within the App Runner service.
  • Verify that the SES endpoint is correct and functional.
EXPERT
answered a year ago
0

Hello, vijay

It looks like the issue is caused by a timeout when your application tries to connect to the SES service. The most common cause is that the security group attached to the VPC endpoint doesn't allow inbound traffic from your application.

To fix this, check the security group associated with your SES VPC endpoint. Make sure it allows inbound traffic on port 443 (HTTPS) from the security group attached to your application. Once you allow this traffic, your application should be able to connect to SES successfully.

https://docs.aws.amazon.com/ses/latest/dg/send-email-set-up-vpc-endpoints.html#send-email-set-up-vpc-endpoints-walkthrough

EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.