An open API service indexing awesome lists of open source software.

https://github.com/mbuczko/lambda-image-resize-rust

Rust based AWS lambda imager resizer
https://github.com/mbuczko/lambda-image-resize-rust

aws-lambda image-processing

Last synced: 10 months ago
JSON representation

Rust based AWS lambda imager resizer

Awesome Lists containing this project

README

          

* 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. As for now resizes the width of an image, keeping still the image ratio.

** Configure

This binary relies on following environmental variable:

- =THUMB= destination size, like "500x200"

Resized image will be PUT back into same bucket as =filename-thumb.png=

** Compile

Use [[https://hub.docker.com/r/softprops/lambda-rust/][Lambda-Rust docker image]] to compile this binary. With Docker running run the following command to build a release.

#+begin_src shell
make build
#+end_src

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