As you may be well aware of, AWS provides a rich and easy to use CLI as well for managing your cloud resources. In this section, we will be using the AWS CLI to create, package, and invoke a simple Lambda function:
- To begin with, make sure your AWS CLI is set up and ready for use. You can install the CLI on most major Linux OSes, as well as macOS, and Windows. You can go through the following guide for the installation, as well as the configuration steps: http://docs.aws.amazon.com/cli/latest/userguide/installing.html.
- Next, create a new folder (in this case, I created a folder named lambda) and copy the following contents into a new file:
console.log('Loading function'); exports.handler = function(event, context) { var date ...