Amazon S3 to AWS Lambda with Amazon SQS queue

Amazon S3 bucket → Amazon SQS queue → AWS Lambda

Create a Lambda function triggered for every image file stored to S3 via SQS.

The terraform manifest deploys a Lambda function, an SQS queue, one S3 bucket and the IAM resources required to run the application.
An SQS queue consumes ObjectCreated events from an Amazon S3 bucket if the file has .jpg extension. The SQS triggers a Lambda function.
The Lambda function serve as a pre-configured template, providing a starting point for developing your application.

< 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-sqs-lambda-terraform

Deploy

<code>terraform init</code><code>terraform apply</code>


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

terraform destroy

Created by:

Oriol Matavacas

Oriol Matavacas

Oriol Matavacas is a Sr. Solutions Architect at AWS based in Barcelona. Oriol primarily supporting customers on the journey to the Cloud. He enjoys building new solutions with scalability, availability and easy to maintain by using serverless.

Follow on LinkedIn