This is a POC to try the serverless framework.
The goal is:
- Create a
index.js
file with a simple function within it; - Configurate a
yaml
file mapping the provider and the lambda function that was created; - Deploy the lambda function using the Serverless framework;
-
Make sure that you have a AWS account and AWS CLI configured as well.
-
Make sure you have installed all of the following prerequisites on your development machine:
- Git;
- Node.js and the npm package manager;
- Serverless framework;
npm i -g serverless
Once the repo is properly cloned/forked into your machine, open the terminal on the project root and run:
npm install
sls deploy --verbose
By running this command, we can see at the logs that:
- the serverless framework will automagically create a S3 Bucket on AWS
- upload a CloudFormation file to S3
- deploy service to stack 'sls-my-first-lambda-dev'