Many Amazon Web Services (AWS) customers use images on their websites and mobile applications to drive user engagement. Websites with large image files can experience high load times, so in order to ensure a great user experience across different devices, developers often provide multiple versions of each image to accommodate different bandwidth and layout constraints. This process can be difficult to manage and cause time delays, as it often requires version control, increased storage and compute costs for file reprocessing, and coordination with application teams and web developers to update image files.

To help customers provide a low-latency website response, and decrease the cost of image optimization, manipulation, and processing, AWS offers the Serverless Image Handler, a solution that combines highly available, trusted AWS Services and the open source image processing suite Thumbor to enable fast and cost-effective image manipulation on the AWS Cloud.

The following sections describe key considerations and recommendations for implementing the Serverless Image Handler and assumes basic knowledge of architecting web applications on the AWS Cloud.


Dynamically manipulating your images can help you provide low latency website response, and decrease the cost of image optimization, manipulation, and processing. With this in mind, consider the following image management best practices:

  • Understand the security requirements of your image management solution and implement appropriate authentication mechanisms to control user access to your images. Note that this solution is intended for helping customers with public-facing content to more easily perform image manipulation.
  • Where appropriate, leverage caching services like Amazon CloudFront to reduce latency and API load for previously modified images.
  • Understand the implications of image manipulation that you want to perform and determine the appropriate trade-offs between dynamic manipulation verses preprocessing images in batches and storing multiple image versions.

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.


  1. Amazon CloudFront provides a caching layer to reduce the cost of image processing.
  2. Amazon API Gateway provides API endpoint powered by AWS Lambda functions to dynamically make image modifications.
  3. AWS Lambda retrieves the image from the existing Amazon Simple Storage Service (Amazon S3) bucket and uses Thumbor to return a modified version of the image to the API Gateway.
  4. The API Gateway returns the new image to CloudFront for delivery to end-users.
Deploy Solution
Implementation Guide

What you'll accomplish:

Deploy the Serverless Image Handler using AWS CloudFormation. The CloudFormation template will automatically launch and configure the components necessary to dynamically manipulate images.

Dynamically resize images using a serverless architecture, and deploy an optional user interface.

What you'll need before starting:

An AWS Account: You will need an AWS account to begin provisioning resources. Sign up for AWS.

Skill level: This solution is intended for IT infrastructure and networking professionals who have practical experience architecting web applications on the AWS Cloud.

Q: Can I deploy the Serverless Image Handler in any AWS Region?

Customers can deploy this solution in any AWS Region that supports AWS Lambda and Amazon API Gateway. Once deployed, developers in any AWS Region can use the Serverless Image Handler to dynamically manipulate images.

Q: What is required before deploying the AWS CloudFormation template?

Before you launch the solution’s AWS CloudFormation template, you must specify an existing Amazon S3 Bucket. Use this bucket to store the images you want to manipulate.

Q: What filters for image manipulation are supported by the Serverless Image Handler?

The solution has a selection of Thumbor image filters that are supported for image manipulation. See the implementation guide for details.  

Need more resources to get started with AWS? Visit the Getting Started Resource Center to find tutorials, projects and videos to get started with AWS.

Tell us what you think