Install node js:
https://nodejs.org/en/download/
Install Serverless:
npm install -g serverless
Create new serverless project:
serverless create --template aws-nodejs --path my-service
cd my-service
inside my-service you will see 3 files
Then you need to edit serverless.yml
where you need to edit aws-nodejs with you own service name
you can also give same or different name to your functions
create events with http endpoint
include serverless-offline plugin and also install it by running the following line
npm install serverless-offline --save-dev
you also need to install babel transplier :
npm install --save-dev babel-preset-es2015
npm install --save-dev babel-preset-stage-2
once you are done with it run following cmd
sls offline -r us-west-2 where -r is to change the region.
then hit localhost:3000/sqlToCass in the browser
to run it locally :
serverless invoke local --function sqlToCass