- Create the project from the following template:
$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch1/create-function --path cncb-create-function
- Navigate to the cncb-create-function directory with cd cncb-create-function.
- Review the file named serverless.yml with the following content:
service: cncb-create-functionprovider: name: aws runtime: nodejs8.10 environment: V1: value1functions: hello: handler: handler.hello
- Review the file named handler.js with the following content:
module.exports.hello = (event, context, callback) => { console.log('event: %j', event); console.log('context: %j', context); console.log('env: %j', process.env); callback(null, 'success');};
- Install ...