Receive email with Amazon SES and process using an AWS Lambda function

Amazon SES → AWS Lambda

This shows how to receive email with Amazon SES and process them using AWS Lambda.

User sends email to the configured domain in Amazon SES.
Amazon SES receives the email and then applies the rule set to trigger an AWS Lambda function.
The AWS Lambda function processes the information from the SES event.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/ses-lambda-sam

Deploy

sam deploy -gaws ses set-active-receipt-rule-set --rule-set-name {EmailReceiptRuleSet} --region {your-region}


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Disable the Amazon SES rule set using the following CLI command: aws ses set-active-receipt-rule-set --region {your-region}
Delete the resources deployed to your AWS account via AWS SAM: sam delete

Created by:

Biswanath Mukherjee

Biswanath Mukherjee

Sr. Solutions Architect working at AWS India.

Follow on LinkedIn