(Almost) free image processing with imgproxy and AWS Lambda

  • tutorial
Multiple space shuttles flying up above clouds

What is AWS Lambda?

Prerequisites

Deploying imgproxy on AWS Lambda

Step 1: Push the imgproxy Docker image to the ECR repository

# Replace region and account ID (123456789) with your actual region and account ID
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 123456789.dkr.ecr.us-east-1.amazonaws.com
docker pull ghcr.io/imgproxy/imgproxy:latest-arm64
# Replace region and account ID (123456789) with your actual region and account ID
docker tag ghcr.io/imgproxy/imgproxy:latest-arm64 123456789.dkr.ecr.us-east-1.amazonaws.com/imgproxy:latest
docker push 123456789.dkr.ecr.us-east-1.amazonaws.com/imgproxy:latest
Note

Step 2: Deploy imgproxy on AWS Lambda

Testing the setup

https://<your-function-url>/unsafe/rs:fill:500:400/g:sm/f:avif/plain/https://assets.imgproxy.net/sample-corgi.jpg
Photo of a corgi resized with imgproxy
The result of resizing

The cost of imgproxy on AWS Lambda

Conclusion

Start your free trial today

Or get imgproxy Pro on Cloud Marketplace

Get in touch

919 North Market Street,
Suite 950
Wilmington, DE
19801

Join newsletter