Skip to content

API Gateway backed by a Lambda for dynamically rendering & caching thumbnails.

License

Notifications You must be signed in to change notification settings

ebridges/thumbnailer

Repository files navigation

Thumbnailer

latest release thumbnailer

Configuration

Environment

Environment Variable Description
MEDIA_UPLOAD_BUCKET_NAME Bucket to read originals from, that would get resized.
MEDIA_THUMBS_BUCKET_NAME Bucket to write resized versions to.

Configuration File

This uses lgw to generate a deployable archive in zipfile format. It comes configured in lgw.cfg with the following defaults:

AWS_LAMBDA_ARCHIVE_CONTEXT_DIR='.'
AWS_LAMBDA_ARCHIVE_ADDL_FILES='requirements.txt,$wkdir;./src/,$wkdir'
AWS_LAMBDA_ARCHIVE_BUNDLE_DIR='./build'
AWS_LAMBDA_ARCHIVE_BUNDLE_NAME='thumbnailer-bundle.zip'

Configuration Keys

See the lgw configuration parameters for full details

Configuration Key Description
AWS_LAMBDA_ARCHIVE_CONTEXT_DIR Root directory from which to pull files for
the archive.
AWS_LAMBDA_ARCHIVE_BUNDLE_DIR Directory where the archive is written.
AWS_LAMBDA_ARCHIVE_BUNDLE_NAME Name of the archive that's written to
AWS_LAMBDA_ARCHIVE_BUNDLE_DIR
AWS_LAMBDA_ARCHIVE_ADDL_FILES List of additional files to copy into the context
directory from the local working directory.

License

thumbnailer © 2020 Edward Bridges ◆ CC BY-NC-SA 4.0

Gratitude

Thank you!