What does this AWS Solutions Implementation do?

The Serverless Image Handler solution provides a highly available serverless architecture that enables fast and cost-effective image processing in the AWS Cloud. The image handling architecture uses Sharp, the open source image processing software, and is optimized for dynamic image manipulation. The solution uses Amazon CloudFront for global content delivery and Amazon Simple Storage Service (Amazon S3) for reliable and durable cloud storage at a low cost.

The latest version of this solution uses the most up-to-date Node.js runtime. Version 4.0 and earlier versions use the Node.js 8.10 runtime, which reached end-of-life on December 31, 2019. To upgrade to version 5.x, you must update your AWS CloudFormation stack. For more information, refer to the implementation guide.

AWS Solutions Implementation overview

AWS offers a simple solution that automatically deploys and configures a serverless architecture that is optimized for dynamic image manipulation. The diagram below presents the Serverless Image Handler architecture you can deploy in minutes using the solution's implementation guide and accompanying AWS CloudFormation template.

Serverless Image Handler | Architecture Diagram
 Click to enlarge

Serverless Image Handler architecture

  • The AWS CloudFormation template deploys an Amazon CloudFront distribution, Amazon API Gateway, and an AWS Lambda function.
  • Amazon CloudFront provides a caching layer to reduce the cost of image processing and the latency of subsequent image delivery.
  • API Gateway provides endpoint resources and triggers the Lambda function.
  • The Lambda function retrieves the image from a customer’s Amazon S3 bucket and uses Sharp to return a modified version of the image to the API Gateway.
  • The solution generates a CloudFront domain name that provides cached access to the image handler API.

If you enable the image URL signature feature, the Lambda function retrieves the secret value from your existing AWS Secrets Manager secret to validate the signature.

Serverless Image Handler

Version 5.1.0
Last updated: 11/2020
Author: AWS

Estimated deployment time: 15 min

Use the button below to sign up for updates to this Solutions Implementation via email.
Did this Solutions Implementation help you?
Provide feedback 


Serverless Image Handler reference implementation

Automatically build a serverless architecture that is optimized for dynamic image manipulation in the AWS Cloud.

Smart cropping

Crop images using the facial recognition capabilities of Amazon Rekognition.

Web interface

Deploy a simple web interface where you can interact directly with your image handler API endpoint using image files that already exist in your account.
Solving with Solutions: Serverless Image Handler
Build icon
Deploy a Solution yourself

Browse our library of AWS Solutions Implementations to get answers to common architectural problems.

Learn more 
Find an APN partner
Find an APN Partner

Find AWS certified consulting and technology partners to help you get started.

Learn more 
Explore icon
Explore Solutions Consulting Offers

Browse our portfolio of Consulting Offers to get AWS-vetted help with solution deployment.

Learn more