kymy86 / sam_resizer

Lambda function with Pillow and Zappa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lambda Thumbnailer

This is a Lambda function that creates a thumbnail when a JPG image is put on a S3 bucket and save it in another bucket.

Quick start

  • Install Zappa and the aws cli command
  • Add the source and destination bucket name to the parameters.json file.
  • Create the CloudFormation stack by using the sam_resizer.yml template with the parameters.json file input.
  • Customize the zappa_settings.yml file by initializing the DEST_BUCKET_NAME environment with the name of the destination bucket
  • Execute Zappa with the command zappa deploy.

Configuration

You can configure:

  • DEST_BUCKET_NAME: the name of S3 bucket where the thumbnail will be saved.
  • THUMB_SIZE: the thumbnail size.

About

Lambda function with Pillow and Zappa

License:Other


Languages

Language:Python 100.0%