muriloamendola / serverless-image-resize

This is a sample project illustrating how you can handle with S3 trigger events using AWS lambda functions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

serverless-image-resize

This project was created for study purposes. The main idea here is:

  • Build a lambda function that is triggered everytime a new file is uploaded to an specifc bucket and if this file is an image then resize it.

Flow

Other technologies was used in this project like:

Prerequisites

This project have been developed using Serverless Architecture and to help us to deploy and operating the resources in to the Cloud we decided to use Serverless Framework. For use of Serverless Framework we need to install serverless cli running the following command:

npm install -g serverless

Deploy to AWS

I am using sharp library to resize images and before follow this instructions to deploy the application to AWS you must read sharp installation steps for AWS Lambda.

After configure your aws credentials just run the following command:

sls deploy --stage dev

As I've said above you can see a sample github actions workflow to deploy project to AWS after a push at branch master. The workflow file configuration is .github/workflows/sls-deploy.yaml.

Authors

See also the list of contributors who participated in this project.

About

This is a sample project illustrating how you can handle with S3 trigger events using AWS lambda functions.


Languages

Language:TypeScript 78.7%Language:JavaScript 21.3%