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

Remiby
preguntada hace 2 meses252 visualizaciones
2 Respuestas
0
Respuesta aceptada

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
respondido hace 2 meses
profile picture
EXPERTO
revisado hace 2 meses
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
EXPERTO
respondido hace 2 meses
profile picture
EXPERTO
revisado hace 2 meses
  • 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)?

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas