https://github.com/yagoluiz/image-optimizer-lambda
Image optimizer using Serverless Framework and AWS Lambda
https://github.com/yagoluiz/image-optimizer-lambda
aws aws-lambda serverless-framework
Last synced: about 2 months ago
JSON representation
Image optimizer using Serverless Framework and AWS Lambda
- Host: GitHub
- URL: https://github.com/yagoluiz/image-optimizer-lambda
- Owner: yagoluiz
- Created: 2021-02-23T15:12:56.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-23T20:50:40.000Z (over 4 years ago)
- Last Synced: 2025-06-26T08:02:30.803Z (3 months ago)
- Topics: aws, aws-lambda, serverless-framework
- Language: JavaScript
- Homepage:
- Size: 154 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image Optimizer - Lambda
Image optimizer using [Serverless Framework](https://www.serverless.com/) and [AWS Lambda](https://aws.amazon.com/lambda/).
## Setup project
Install [Serverless Framework CLI](https://www.serverless.com/framework/docs/providers/aws/cli-reference/).
Install and configure access credentials via [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html):
```bash
aws configure
```
Create unique bucket in AWS account:```bash
sh setup/aws.hs
```Update environment bucket name in **serverless.yml** file:
```yaml
environment:
BUCKET_NAME: images-optmized-upload
```
## Run projectExecute localhost:
```bash
npm run start:local
```Deploy for AWS account:
```bash
npm run deploy
```## Endpoint
```curl
curl --location --request POST 'http://localhost:3000/dev/upload' image-optimizer-lambda \
--form 'file=@"{YOUR_PATH}/Photo.jpg"'
```