Setting up email receiving on AWS using SES

Email Receiving using AWS SES

We completed a project where it receives an email and forward it to a mobile number as a sms. We decided to use AWS SES (Amazon Simple Email Service), and here are the steps that we followed setting it up.

Supported regions

Currently there are only few AWS regions that supports receiving email. If your region doesn’t support email receiving, the email receiving section under SES Configurations on the SES console would not be visible. Before proceeding further, make sure your region supports receiving email. You can find supported regions on AWS docs:

Domain name verification

Once we confirm that we can receive email in our region, we need to verify a domain through SES console. The purpose of this is to confirm that we own the said domain. You can also verify an email address if you like, but in our case we had a domain name to verify.

The process can be found on the AWS docs here:

However, the process is much easier if your domain is registered on Route53, as SES can automatically see that and add required routing rules. I tried verifying a domain name that was set up in a different AWS account that we owned, however after three days it came up as verifcation failed. Then I tried with a new domain name in the same AWS account, the domain name was verified after couple of hours.

Publish MX records

Once you verified the domain and added routes, you can continue to set up the rest of the SES configurations. The next step is to publish MX records on your domain. With SES this is not so difficult. Follow this instructions on AWS docs to configure MX records for your domain on Route 53.

Configuring SES rules set and rules

Once you have that, head to Email receiving under SES configuration on the console and set up a rule set. Then you can add rules to handle emails. For testing purposes I set up the email to be delivered to a S3 bucket. The bucket can be set up during the rule creation and the permission will be added automatically if you do it through here. Once you have set up everything, make sure the rule set is activated. Then you can send an email to a matching address and it should be ended up in the S3 bucket. In my case, any email sent to the configured domain ended up in the S3 bucket for now.

Initially, I set up a Mandrill account to handle email receiving. However once I tried SES I decided to stick with it as SES gives more control. Plus it is economically the right choice for us. Having everything lives inside the same infrastructure makes it easier for us to manage the end to end solution.

Hope this helps.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store