Packaging and uploading the function

With the log server set up along with the Kinesis Stream and the SNS based email notification, we can now move on to packaging and deploying the function using APEX.

Like always, we first start off by creating a directory for our code:

# mkdir ~/workdir/apex/event_driven/functions/mykinesisToLambdaFunc  

Next, we create the function.dev.json file that contains few descriptive elements with respect to the function code:

{   "description": "Node.js lambda function using Kinesis streams as   a trigger to send an sns for error messages received from the   stream",   "role": "arn:aws:iam::<account_id>:role/myLambdaKinesisFuncRole",   "handler": "index.handler",   "environment": {} } 

Don't forget to create the associated ...

Get Mastering AWS Lambda now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.