How to send email from AWS AppRunner using Amazon SES?

0

I am trying to send mails from my application running in AppRunner (containerized) with SMTP endpoint. I tried my SMTP configuration and credentials from outside AWS and I manage sending emails with SES successfully. Also I can access my web application without any issue. AppRunner is configured with public access inbound and outbound.

But when my application tries to send email it fails with error Couldn't connect to host, port: email-smtp.eu-west-3.amazonaws.com, 587; timeout -1;

Any idea? Thank you

2 Answers
0
Accepted Answer

I fixed my problem with 2 configurations: 1- In SMTP configuration I put SSL disabled smtp ssl since starttls enable is true:

smtp:
          ssl:
            enable: false
          auth: true
          starttls:
            enable: true
            required: true

2- I send emails only from a SES verified domains or emails

Remiby
answered a month ago
profile picture
EXPERT
reviewed a month ago
0

Hello.

Does AppRunner connect to RDS?
In that case, communication will be via VPC, so you will need to create a communication route to NAT Gateway in the VPC subnet to which AppRunner is connected and communicate with the SES SMTP endpoint.
https://aws.amazon.com/jp/blogs/aws/new-for-app-runner-vpc-support/

When connected to a VPC, all outbound traffic from your AppRunner service will be routed based on the VPC routing rules. Services will not have access to the public internet (including AWS APIs) unless allowed by a route to a NAT Gateway. You can also set up VPC endpoints to connect to AWS APIs such as Amazon Simple Storage Service (Amazon S3) and Amazon DynamoDB to avoid NAT traffic.

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
  • But if my Incoming network traffic is configured as "Public endpoint" and my Outgoing network traffic as "Public Access" isn't it supposed to work with SES (not considering RDS here)?

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.

Guidelines for Answering Questions