Friday, March 3, 2017

Amazon SES Cross-Region Resiliency

With the recent outage of AWS in the east-1 region, it took down not only the Simple Storage Service (S3) but also others services including the Amazon Simple Email Service. SES can be a critical piece in applications as they won't be able to send any notifications to the users.

To avoid outage or  just improving theway to distribute the emails delivery, I highly recommend set up the service in more than one region.

SES is region based. You have to verify your domains or email addresses on each region.

 As of 3/3/2017, it is only availble on the following regions


Region nameAPI (HTTPS) endpointSMTP endpoint
US East (N. Virginia)
email.us-east-1.amazonaws.com
email-smtp.us-east-1.amazonaws.com
US West (Oregon)
email.us-west-2.amazonaws.com
email-smtp.us-west-2.amazonaws.com
EU (Ireland)
email.eu-west-1.amazonaws.com
email-smtp.eu-west-1.amazonaws.com


These are the steps to enable SES on another region on domain level

  1. Log into AWS Console
  2. Type SES on the dashboard search and select the first result
  3. Now, on the top-right side of the page, click on the regions menu and select the region that you will want to use SES. It should show only the regions that have SES available
  4. Select "Domains" on the left menu, you will see that the domain that you have verified in your main region is not in the new region, that's where most of us think it should be available without doing anything, but that is not the case, we have to verify the domain on each region. 
  5. Now select "Verify a New Domain" and type your domain name, you can also check the Generate DKIM Settings if you want your emails to comply with DMARC.
  6. After clicking on "Verify This Domain", you should get the TXT record that have to be added on the DNS.
  7. Log into your DNS provider where you have your domain and proceed to add the txt record.
  8. It takes AWS up to 72 hours to verify the domain.
  9.  Once AWS has verified the domain, you should receive an email with a subject like "Amazon SES Domain Verification SUCCESS for {Your domain} in region US West (Oregon)"
  10. You can now check and confirm on AWS console.
    1.  
  11. AWS by default will put the new domain under the "Sandbox" mode, thus, you won't be able to send emails to reciepients without confirming. You will have to create a support ticket and ensure you select the option "Service Limit Increase" and Limit type to "Limit Type".
  12. Once AWS approves the request, you should be able to send emails without confirming the recipients.


Note: These steps work also when you are setting up the SES for the first time.

I would also recommend set up another email service as backup like SendGrid or Mandrill. The chance that SES goes down on two regions is very low, but if it happens we'll face the same situation we did on Feb 28th 2017. 






No comments:

Post a Comment