Creekside
Home
Blog
Plantation One HOA
Log in
A Site Email "Gotcha"
Grey Brinson
March 02, 2022
<p>I ran into an issue when trying to set up email for the site. My specific task was setting up the password reset functionality but it affects email in general. </p><p>My goal was to use AWS Simple Email Services aka SES. I found a module called "Django-SES" which which was claimed by several bloggers to be the easiest way to add email to a Django site. In fact it was very easy and it worked out of the box on my dev site. When I deployed to the "serverless" lambda environment, I ran into an issue. When I tried to send an email, I got a an endpoint timeout.</p><p>So, I'm trying to figure out why this is happening. Its pretty obvious that I'm not reaching the email server. Without getting into specifics of my network topology, my application is running on a lambda behind a VPC. Most of my searches are saying that I need a NAT gateway. The problem with that is they are relatively expensive. The other option is a relatively new feature that AWS has set up that provides Endpoints for common AWS services. It just so happens there is one for email-smtp.us.-east-1.amazonaws.com. After setting this up and changing a few security rules I should be good to go, but still no joy. After looking through the logs I realize my problem. Django-SES wants an endpoint of email.us-east-1.amazonaws.com for my region. There is no Endpoint service provided for this. So back to the original SMTP Django email backend and all is well.</p><p>The moral of this story is that just because some bloggers claim something is the "easiest way" or whatever, doesn't mean its going to be the best solution for your situation.</p>
Back to List