Skip to content

matsimitsu/lambda-image-resize-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lambda Image Resize

A simple image resize lambda function, written in Rust.

This binary responds to Amazon S3 events and triggers a resize on the uploaded image with the sizes specified. Right now you can only resize on the width of an image.

Configure

This binary relies on two env vars:

  • SIZES, an array if sizes (export SIZES=200,300,400)
  • REPLACEMENTS, an array of replacements for the path (export REPLACEMENTS="original:resized")

Compile

Use Lambda-Rust docker image to compile this binary. With Docker running run the following command to build a release.

make build

You can find the (zipped) bootstrap ready for upload to AWS Lambda in target/lambda/release/bootstrap.zip

About

A simple image resize lambda function, written in Rust.

Resources

License

Stars

Watchers

Forks

Packages

No packages published