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.
Other technologies was used in this project like:
- Serverless Framework an easy way to configure AWS (or other cloud) resources for a serverless archtecture.
- I am using aws-nodejs-typescript template for this project.
- Github Actions to deploy a serverless project to an AWS account. You can see the workflow file .github/workflows/sls-deploy.yaml.
- Jest for tests.
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
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.
See also the list of contributors who participated in this project.