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
已提問 2 個月前檢視次數 263 次
2 個答案
0
已接受的答案

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
已回答 2 個月前
profile picture
專家
已審閱 2 個月前
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
專家
已回答 2 個月前
profile picture
專家
已審閱 2 個月前
  • 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)?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南