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 Antworten
0
Akzeptierte Antwort

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
beantwortet vor 2 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten
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
EXPERTE
beantwortet vor 2 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten
  • 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)?

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen