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.
- 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
.
You can configure:
- DEST_BUCKET_NAME: the name of S3 bucket where the thumbnail will be saved.
- THUMB_SIZE: the thumbnail size.