Gautam Gupta

Starting with Amazon SES (Simple Email Service)

We have been using Amazon EC2 (Elastic Compute Cloud) as the deployment platform for a client. EC2 is part of the Amazon AWS cloud computing platform.

We had problems sending bulk email notifications using Gmail for this particular application. Gmail has restrictions on bulk emailing, and as far as I know, Google does not support or host a service for sending emails in bulk, as of now. Google prefers we use Google Groups for bulk emailing.

Anyway, since we were already on AWS and SES was made available this year, we decided to use it.

I began by reading up the ‘Getting Started’ and other Development related documents, available here.

The basic high level steps of getting started with SES are:

  1. Signing up for SES. An existing AWS subscriber already has SES enabled.
  2. Registering the email ids from which we want to send emails. This is basically similar to an email verification process. I believe one can register/verify up to a 100 email addresses.
  3. Test sending emails. Amazon provides a set of Perl scripts for testing the API from the command line. And it provides SDKs for Java, .Net, Python, Ruby, etc.
  4. Applying for production access. Before getting production access there is a 2,000 emails per day limit during the testing phase.

Pricing – It costs $0.10 per 1,000 emails, but the first 2,000 emails for an EC2 customer are free. Data or bandwidth cost is separate, which starts at $0.12 per 1 GB for the first 10 GBs, and then gradually decreases per GB of use. More details available here.

Sending Limits – After getting production access we can immediately send up to 10,000 emails per day. Amazon gradually increases our sending limit based on our usage and the quality of the emails sent. There should not be too many bounces or complaints on the emails sent. More details here.

The sending limit can go up to 1,000,000 emails per day. In case one needs the limits to be increased immediately or requires to send more than 1,000,000 emails per day, they can contact AWS support directly and present their case. AWS may increase the limits for such customers.

Sending Rate – Starts at 1 email per second and goes up to 90 emails per second, again depending upon the usage pattern.

Usage Statistics – Amazon provides usage statistics of the previous 2 week period, it does not store statistics beyond that period. The statistics can be retrieved using an API call, or by using the Perl scripts provided by Amazon, or may be viewed on a web-based SES dashboard.

AWS .Net SDK – We are using SES from a .Net based app, and integrating the SDK provided by Amazon was quite painless. Code samples are also available on the .Net SDK website.

An interesting undocumented feature of the AWS .Net SDK is, in case your application is using Log4net for logging, it automatically picks up the log4net library and starts logging to your log file. And it can also be configured along with your existing log4net configuration section by adding a new logger named – ‘Amazon’. Although, some people might have preferred a more pluggable logging approach, where one could have plugged-in a different logging library.

Trouble-shooting – Amazon SES has been around now for almost a year, so there is plenty of reference material which can be found on the web. The AWS forums is also a good starting point. Most of the issues faced by us were found solved on the forums.

Email Authentication – Sender Policy Framework (SPF) and Sender Id email authentication mechanisms can easily be used with SES. These mechanisms basically involve setting up a DNS TXT record which specifies ‘’ as a sending domain. Amazon recommends setting up these records as a minimum.

For those who need to implement DomainKeys Identified Mail (DKIM) authentication, it is not offered out of the box by SES, instead has to be implemented manually, by creating/formatting raw email headers as per the DKIM specification.

So, that was a brief introduction to Amazon SES. Hopefully, it will save some time for those who are looking to understand and use SES.

AWS has turned out to be an impressive suite of cloud based offerings, looks like the promises made on “Cloud Computing” in the dotcom era, are now finally coming true.


Related Articles


NHibernate, Linq and Lazy Collections

For the past few months we have been busy building a services framework for one of our clients so that they can build all of their enterprise web services without ever having to worry about the cross cutting concerns and... Read more

Page Redirects using Spring.NET

Who is responsible for page redirects in ASPNET MVP – The View or the Presenter None of the above, it is you :) On a serious note, it is the View as one shouldn’t pollute the Presenter with the page navigation... Read more