Install serverless globally
npm install serverless -g
Create an AWS Lamdba function in Node.js
serverless create --template aws-nodejs
Example of a handler.js
'use strict'; // Your first function handler module.exports.hello = (event, context, cb) => cb(null, { message: 'Go Serverless v1.0! Your function executed successfully!', event } ); // You can add more handlers here, and reference them in serverless.yml
Deploy to live AWS account
serverless deploy