Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

squadrun/lambda-image-compression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Compression on AWS Lambda using Python 3.6

Highlights

  1. Pillow==4.1.1 compiled to be usable with AWS Lambda
  2. Python scripts for the actual compression

How to use

  1. Understand what is Lambda and how to use it: Getting Started with AWS Lambda. Also check out how to work with Python on AWS Lambda: Packaging for Lambda
  2. Go through the architecture in the accompanying blog: Leveraging AWS Lambda for Image Compression at scale
  3. Deploy orchestrator.py and image_compress.py using AWS Lambda.
  4. Invoke the lambda for orchestrator with a payload like:
{
    "key_urls_map": {
    		"image1.jpg": "https://media.licdn.com/media/p/8/005/05b/1fb/0cf50ca.png",
    		"image2.jpg": "https://media.licdn.com/media/p/8/005/05b/1fb/0cf50ca.png"
    	},
    "quality": 90,
    "bucket_name": "compression-test-bucket"
}
  1. Check your S3 bucket for the compressed images^

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages