The Serverless Image Handler solution combines highly available, trusted Amazon Web Services services and the open source image processing suite Sharp to enable fast and cost-effective image manipulation on the Amazon Web Services (Ningxia) region operated by NWCD and Amazon Web Services (Beijing) region operated by Sinnet. The solution automatically deploys and configures a serverless architecture that is optimized for dynamic image manipulation, and uses Amazon CloudFront for global content delivery and Amazon Simple Storage Service (Amazon S3) for reliable and durable cloud storage at a low cost.
Serverless Image Handler reference implementation
Automatically build a serverless architecture that is optimized for dynamic image manipulation on the Amazon Web Services Cloud.
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.
This solution offers a simple way to 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 Amazon CloudFormation template.
Serverless Image Handler
The Amazon CloudFormation template deploys the following resources:
- An Amazon CloudFront distribution that provides a caching layer to reduce the cost of image processing and the latency of subsequent image delivery. The CloudFront domain name provides cached access to the image handler API.
- Amazon API Gateway to provide endpoint resources and initiate the Amazon Lambda function.
- A Lambda function that retrieves the image from a customer’s existing Amazon S3 bucket and uses Sharp to return a modified version of the image to the API Gateway.
- An Amazon S3 bucket for log storage, separate from your customer-created S3 bucket for storing images. If selected, the solution deploys an S3 bucket for storing the optional demo UI.
- If you activate the image URL signature feature, the Lambda function retrieves the secret value from your existing Amazon Secrets Manager secret to validate the signature.