Skip to content

This application consists of a Lambda function for forwarding e-mails on S3 buckets. It is intended to be used in the scenario where AWS SES stores raw emails on S3 buckets. You can launch the stack with just one click.

Notifications You must be signed in to change notification settings

jankammerath/aws-ses-email-forward

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AWS SES E-Mail Forwarding

This application consists of a Lambda function for forwarding e-mails on an S3 buckets. It is intended to be used in the scenario where AWS SES stores raw emails on S3 buckets. The CloudFormation template is built to be deployed with just one click. It creates the s3 bucket, the lambda script with the code as well as the required policies and permission.

Deploy Template

Once the CloudFormation stack is installed, you can assign the newly created s3 bucket to the SES Rule Set. SES will then store the e-mails on the s3 bucket and once new files are stored on that bucket, the Lambda function will get invoked, parse and rewrite the e-mail. Afterwards it will send the e-mail through SES.

Configure target addresses

You can configure a default target and the sender address through the CloudFormation template. The original sender will be kept in the 'Reply-To' header of the forwarded message. If you wish to define further source e-mail addresses and their individual destinations you can create environment variables for the Lambda script. You can add as many environment variables with forward rules as you wish as long as it starts with "FORWARD_RULE_".

Environment variable Value Description
FORWARD_RULE_1 user@domain.com;user@target.com Forwards from user@domain.com to user@target.com
FORWARD_RULE_2 group@domain.com;user1@target.com,user2@target.com Forwards from group@domain.com to user1@target.com and user2@target.com

If none of the environment variables match the original target e-mail address, then the message will be forwarded to the destination e-mail address defined in the CloudFormation template.

About

This application consists of a Lambda function for forwarding e-mails on S3 buckets. It is intended to be used in the scenario where AWS SES stores raw emails on S3 buckets. You can launch the stack with just one click.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published