https://github.com/rokumatsumoto/aws-node-dynamic-image-resizer
Bucket event-driven image resizing built with cloud functions
https://github.com/rokumatsumoto/aws-node-dynamic-image-resizer
aws-lambda event-driven image-resizer resize resize-images s3-bucket serverless
Last synced: about 2 months ago
JSON representation
Bucket event-driven image resizing built with cloud functions
- Host: GitHub
- URL: https://github.com/rokumatsumoto/aws-node-dynamic-image-resizer
- Owner: rokumatsumoto
- License: mit
- Created: 2019-08-27T09:22:10.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T22:35:44.000Z (over 2 years ago)
- Last Synced: 2025-02-12T22:22:22.497Z (4 months ago)
- Topics: aws-lambda, event-driven, image-resizer, resize, resize-images, s3-bucket, serverless
- Language: JavaScript
- Homepage:
- Size: 2.39 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# aws-node-dynamic-image-resizer
Bucket event-driven image resizing built with cloud functions.
In this example, we set up a image resizing solution with AWS S3 and a Serverless framework function written in Node.js. We use [the `sharp` package](https://www.npmjs.com/package/sharp) for image resizing.
`sharp` includes native dependencies, so in this example we are building and deploying the Serverless function from a Docker container that’s based on Amazon Linux.
## Pre-requisites
In order to deploy the function, you will need the following:
- Two S3 bucket in your AWS account.
- Serverless framework installed locally via `yarn global add serverless`.
- `Node.js` and `yarn` installed locally.
- Docker and docker-compose installed locally.## Deploying the Serverless project
1. Clone the repository
```sh
git clone https://github.com/rokumatsumoto/aws-node-dynamic-image-resizer.git
```2. Install the dependencies
```sh
yarn install
```3. Add your AWS credentials into the `secrets/secrets.env` file. (See [this](doc/development/environment_variables.md) for documentation)
4. Add your env variables into the `.env` file
5. Deploy the Serverless project```sh
docker-compose up --build
```