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 Respostas
0
Resposta aceita

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 há 2 meses
profile picture
ESPECIALISTA
avaliado há 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
ESPECIALISTA
respondido há 2 meses
profile picture
ESPECIALISTA
avaliado há 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)?

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas