Set Up Inbound Emails With AWS SES
First you have to add the domain or subdomain to SES Identity Configuration. Therefore, go to SES -> Configuration -> Identities
Create Identity -> Select identity type as domain and type your domain or sub domain. You can keep default values for the other values and hit Create identity
Next, you have add 3 CNAME records and a TXT record to your DNS Registrar. If you have purchased your domain from AWS Route53, you can use Push DNS records to Route53 option.
After that you have to wait until you get your identity record verified. If you have purchased your domain from AWS Route53, it will be few minutes, otherwise it may take longer time.
-
Add a MX record to your DNS Registrar. The value is
10 inbound-smtp.region.amazonaws.com
Here, region must be replaced with the correct region value.
For my case, it's us-east-1 Next, go to, SES -> Configuration -> Email receiving
-
Then, create a rule set, adding a name. Then, enable the result set
-
Then, create a rule, adding a name, keep the default values on the step 2. In the step 3, select Deliver to S3
-
Next, create a new S3 bucket using Create S3 bucket option given here or select an existing bucket. You can keep the other values as it is and hit Next. If you select an existing S3 bucket, you may have to update the bucket policies.
Example Bucket Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowSESPuts-1721471495367",
"Effect": "Allow",
"Principal": {
"Service": "ses.amazonaws.com"
},
"Action": "s3:PutObject", "Resource":
"arn:aws:s3:::bucket-name/*",
"Condition": {
"StringEquals": { "AWS:SourceAccount": "your-aws-accout-id" }, "StringLike": { "AWS:SourceArn": "arn:aws:ses:" }
}
} ]
} Next, review and hit Create rule
-
Next, go to the S3 bucket and see. I should have an object as shown
-
Now send an email for your personal email setting to email as test@yourdomain
In my case, it's test@mytuber.net. Then there should be another record on your S3 bucket. If not, refresh and see.
-
After receiving it to the S3 bucket, you can process the file and do anything that you want to do, according to your requirement
Subscribe to my newsletter
Read articles from Dixon Gunasekara directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Dixon Gunasekara
Dixon Gunasekara
An enthusiastic and dedicated Associate Tech Lead in Software Engineering with over 9 years of experience in enterprise software development. I hold a BSc degree in Computer Science and am an AWS Certified Solutions Architect - Associate (2024). I possess comprehensive expertise in designing, developing, testing, and deploying web-based applications on cloud platforms. A strong team player, I am committed to fostering engineering excellence within an organization. Professional Overview Over 9 years of experience in enterprise software development, covering the entire software lifecycle. Proficient in requirement gathering, architectural design, technology selection, software development, code reviews, test strategy definition, writing unit and integration tests, CI/CD pipeline deployments, and troubleshooting/maintenance. In-depth knowledge of OOP concepts, ORM, RESTful services, MVC patterns, cloud platforms, and industry best practices. Experienced in architecting and designing highly secure and resilient web applications using AWS cloud services. Certified AWS Solutions Architect - Associate (2024). Skilled in Agile methodologies for requirement gathering, planning, estimation, development, testing, and maintenance. Held roles such as Lead Developer, Team Lead, Code Reviewer, Mentor, and Scrum Master across multiple teams. Proficient in direct client communication and management with US-based clients. Technical Expertise Programming Languages & Frameworks: Node.js, JavaScript Frontend Technologies: Angular, CSS, HTML Architectural Patterns: Serverless, MVC Databases: MongoDB, DynamoDB, MySQL, SQL Server, Redis Cloud & DevOps: AWS, Docker, Jenkins Messaging & Servers: RabbitMQ, Nginx, Linux