How much it Costs to Run a Mass Emailing Platform built using AWS Lambda?
Jay Sitapara Sep 25 Updated on Oct 20, 2018
New York Times sends out 4 Billion emails per year. That's a huge number! Although we don't send out these many emails, we send out half a million emails per year which are mostly transactional emails and newsletter.
Last year, we built an emailing platform for our internal use. What we wanted was an easy-to-use platform with minimal UI. We were successful for almost a half year.
But then came,
And so, we jumped to AWS Lambda and took an oath not to use any traditional servers. As of today, we are fully event-driven using AWS Lambda as our computing service, using Serverless Framework and written in Node.Js. Since we all know how performance and scalability are accelerated with AWS Lambda, in this post, I am going to talk about how we are saving money as well.
Before moving to AWS Lambda, we were fully operational on EC2. We were using t2.small instance which costed us
$0.023 * 24 hours * 30 days * 12 months = $198.72
With AWS Lambda and Simple Email Service SES, we built an in-house and cost-effective solution. Here's how it works,
- With S3, we store our CSV files, where you can quickly send HTML or text-based emails to a large number of recipients.
- We've integrated CloudWatch with AWS Lambda, which sends out periodic newsletters based on the pre-set triggers.
- Or whenever a user uploads a CSV file in S3, it triggers our Lambda function which sends email through SES.
How much it costs?
- $0 for Lambda since 1M req/month are free.
- $4.10 for SES
- $0.02 for standard 1GB S3 storage.
Which sums up to $49.44/year. Sounds too good to be true, right? But it's not. This was just the tip of the serverless cost-berg. We've compiled a detailed analysis on AWS Lambda Pricing: How Much it Costs to Run a Serverless Application?
Also, AWS Lambda empowers you to do some of the exception stuff. If you're wondering where to get started, we have got a detailed list for you: 10 AWS Lambda Use Cases to Start Your Serverless Journey
Feel free to share your experience and suggestions. Connect with on Twitter @jsitapara to talk anything about serverless, AWS Lambda and anything in-between.
I've dealt with anxiety and depression for most of my life. Its been a constant battle, both personally and professionally as a software developer. Here's a look into my journey and some things I've taken away from it so far.