AWS Lambda function that hooks into an SES Receipt Rule and forwards emails to an external address.
315
If you have AWS SES setup to deliver mail to an S3 bucket, you can use this image to setup an email forwarding scheme to forward emails in the bucket to an external address. First, deploy this image to an AWS Lambda function,
aws lambda create-function --function name <name> \
--role <role>
--code docker.io/chinchalinchin/lambda-forward-email:latest
Lambda's assumed role passed in through the previous command's --role argument will require the following IAM permissions,
{
"Sid": "SESPermissions",
"Effect": "Allow",
"Action": [
"ses:SendEmail",
"ses:SendRawEmail",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::<email-bucket>/*
"arn:aws:ses:<region>:<account-id>:identity/*
]
}
The Lambda will require the following variables delivered to its environment:
After the Lambda is deployed and configured, you will need to add the function to the list of SES receipt rule actions. Refer to official documentation for more information on setting up a Lambda SES receipt rule.
Content type
Image
Digest
Size
186.9 MB
Last updated
over 4 years ago
docker pull chinchalinchin/lambda-forward-email