Amazon S3 to AWS Lambda to SES

S3 → AWS Lambda → SES

Create a Lambda function that sends emails via SES for S3 events.

This template deploys a AWS Lambda Function and Amazon S3 bucket with the required IAM resources to run the application
The Lambda Function consumes **ObjectCreated** events from an Amazon S3 bucket
Further, Lambda code checks the object size if the uploded file size is <= 25MB then the object will be attached to the email for higher payloads Lambda generates a presigned URL and generates short URL which will be attached to the email

< 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/s3-lambda-ses-terraform

Deploy

terraform initterraform deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Delete the stack: terraform destroy.
2. Confirm the stack has been deleted: terraform show.

Created by:

Akhil Deshneni

I am a Cloud Support Associate at AWS