Document toolboxDocument toolbox

cloud.aws.cloudwatch.events

The cloud.aws.cloudwatch.events tag identifies log events generated by the Amazon CloudWatch Events service. For more information about CloudWatch and this kind of information it makes available to you, consult the vendor documentation.

Tag structure

The tag has four levels which are fixed as cloud.aws.cloudwatch.events. All events sent with this tag are saved in a Devo data table of the same name.

For more information, read more about Devo tags.

Forwarding the events

To collect and forward data from CloudWatch Events to Devo, you will create an AWS Lambda function designed to receive data from a CloudWatch rule and forward them securely to Devo. We provide the source code and files required to create the function. You only need to use these files to create the function, customize a few environment variables, and set up the CloudWatch rule that will start forwarding data.

This article takes you step-by-step through the configuration process.

Download the source code files

Download the cloudwatch-to-devo zip file. It contains two folders and three files at the root level.

Download your Devo domain certificate files

Log into the Devo web application, go to Administration → Credentials → X.509 Certificates and download the X.509 Certificate and Private Key to the /certs folder of the source code files.

Prepare the ZIP file for upload

Having added the certificate files, your source code is complete.

Tip

For troubleshooting the initial setup, you can enable the logging of additional events related to the Lambda function's activity. These will appear in the function's log file available in CloudWatch - Logs. To enable this logging, open the index.js file and uncomment the lines that start with console.log. Later, when you have confirmed that events are being correctly streamed to your Devo domain, you can edit the file and recomment the console.log lines.

Create a .zip file containing the certs and node_modules folders, index.js, and package.json. You can name it anything you like.

Create the Lambda function

This procedure guides you through creating the new Lambda function that will receive the CloudWatch events. 

Set up the CloudWatch rule

  1. Log into your AWS Console, go to CloudWatch → Rules. Click Create rule. This launches a wizard.

  2. In Step 1, under Event Source, select Event Pattern and Build event pattern to match all events. Under Targets, select Lambda function, then select the name and version of the function you just created. Click Configure details.

  3. In Step 2, under Rule definition, enter a Name for the new rule, for example, SendCloudWatchEventstoLambdaFunction. You may optionally enter a description but be sure to select the State checkbox to enable the rule. Click Create rule.

With both the rule and the Lambda function enabled, events should begin to flow to your Devo domain. Look out for the cloud.aws.cloudwatch.events table to appear in your Finder.

If the table doesn't appear in your domain's Finder after 10 minutes, here are some things you can do to troubleshoot the problem:

  • Go to CloudWatch - Logs and open the Log Group for the Lambda function you created. If there are errors, they will appear here.

  • Make sure the Lambda function's environment variable definitions match the certificate file names in the .zip that you uploaded.

  • Select your Lambda function and click Test to make sure the function is working properly. We recommend that you copy the JSON of an existing event from the function's CloudWatch log to use in the test event.

  • Go to CloudWatch - Rules and make sure that your rule Status is active.