Alexa Log Integration via CloudWatch Logs

Deploy CloudFormation Stack

Clone this repository down and navigate to the cloned project directory via the command line. Deploy the CloudFormation stack via the aws-cli command below – remember to replace the YOUR_DASHBOT_API_KEY and the YOUR_LOG_GROUP with your Dashbot API Key and Log Group name respectively. You may optionally alter the –stack-name parameter and the NodeEnvironment parameter to the CloudFormation template.

aws cloudformation deploy --template-file ./cloudformation/serverless.yml
--stack-name testing-dashbot-log-integration-deployment
--capabilities CAPABILITY_IAM

Take note of the YOUR_LOG_GROUP you specified. You will need to refer to this
name later. The stack will fail to create if the CloudWatch Logs Log Group you specified
already exists.

Configure Dashbot Client Library

In your lambda function that handles Alexa Skills requests, call the logIntegration method
on the dashbot alexa object giving configuration options as specified by the dashbot-logger library. The minimum parameter to set is the logGroupName that you have specified above when creating your CloudFormation stack.

const dashbot = require("dashbot")(
).alexa.logIntegration({ logGroupName: "YOUR_LOG_GROUP_NAME" })

Remember to replace the YOUR_DASHBOT_API_KEY and YOUR_LOG_GROUP_NAME with your API key from Dashbot and your custom Log Group name specified above.