This is a simple, serverless email marketing system built using AWS and Terraform. It automatically sends bulk HTML emails (like a newsletter) using SES, triggered by EventBridge on a schedule. Email templates and contact lists are stored in Amazon S3, and email sending is handled by a Lambda function.
I built this for my food blog to send out a weekly newsletter to my subscribers with recipe ideas and seasonal cooking tips. Instead of using a paid email tool, I built a cost-effective and automated solution using AWS.
For more details click on Full blog post
- AWS Lambda – Send emails using SES
- Amazon S3 – Store email template and recipient list
- Amazon SES – Send bulk HTML emails
- Amazon EventBridge – Schedule the email campaign
- AWS IAM – Manage secure permissions
- Terraform – Infrastructure as Code (IaC)
| Name | Version |
|---|---|
| terraform | >= 1.2.0 |
| aws | ~> 4.16 |
| Name | Source | Version |
|---|---|---|
| eventbridge | ./modules/eventbridge | n/a |
| lambda_email | ./modules/lambda_email | n/a |
| s3_bucket | ./modules/s3_bucket | n/a |
| ses | ./modules/ses | n/a |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| bucket_name | The name of the Bucket in S3 | string |
n/a | yes |
| csv_key | Contact csv file name | string |
n/a | yes |
| email_subject | Subject of my marketing email | string |
n/a | yes |
| source_email | Source email Id | string |
n/a | yes |
| template_key | Email template file name | string |
n/a | yes |