AWS CloudWatch
We support sending messages to the Amazon CloudWatch Service - a monitoring and observability service designed for DevOps engineers, developers, site reliability engineers (SREs), and IT managers.
CloudWatch Log Group
Follow the Working with log groups and log streams article on the AWS support site to set up a new CloudWatch Log Group. Once configured, copy the ARN of the new Log Group to set up a new Contact.
The log group ARN has this form, with your own region, account number, and log group name:
arn:aws:logs:us-east-1:123456789012:log-group:rbl-alerts
The CloudWatch console shows the log group ARN with a trailing :* (for example arn:aws:logs:us-east-1:123456789012:log-group:rbl-alerts:*). Remove the :* before using the ARN below.
IAM Role
The AWS CloudWatch integration authenticates by assuming an IAM role that you create in your AWS account. No IAM access keys are stored with Generator Labs, so there are no long-lived credentials to protect or rotate, and you can revoke access at any time by deleting the role or its trust policy.
You can create the role with AWS CloudFormation (recommended), or set it up yourself.
Create the Role with CloudFormation
The Add Contact form can create the role for you with an AWS CloudFormation stack:
- On the Add Contact form, select AWS CloudWatch as the Contact Type and enter the Log Group ARN.
- Leave Role Setup set to CloudFormation, and click Open in AWS CloudFormation. This opens the AWS console in a new tab, on a quick-create stack with the Log Group ARN, your External ID, and the Generator Labs trusted principal already filled in. Sign in to the AWS account that owns the log group if you're asked to.
- Tick the acknowledgement that AWS CloudFormation might create IAM resources, then click Create stack.
- Wait for the stack's status to change to
CREATE_COMPLETE. - Open the stack's Outputs tab, and copy the RoleArn value. Go back to the Add Contact form and paste it into the IAM Role ARN field.
Deleting the stack deletes the role, and stops Generator Labs from sending to your log group.
Set Up the Role Yourself
To create the role yourself, select Set up the role yourself under Role Setup on the Add Contact form. The form then shows the Trusted Principal and External ID values to use in the role's trust policy.
The role needs two policies:
- A trust policy that lets the Generator Labs integrations role assume it, but only with your account's External ID.
- A permission policy that grants logs:CreateLogStream and logs:PutLogEvents on your log group and its log streams.
Trust Policy
In the AWS IAM console, create a new role, select Custom trust policy as the trusted entity type, and use this trust policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::696016272299:role/generator-labs-integrations"
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"sts:ExternalId": "your-external-id"
}
}
}
]
}
Replace the your-external-id value with the External ID shown on the Add Contact form. The Trusted Principal and External ID fields both have a copy button, so you can paste them directly into the trust policy.
Permission Policy
Attach this permission policy to the role to grant access to your CloudWatch Log Group:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Alerts",
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": [
"your-log-group-arn",
"your-log-group-arn:*"
]
}
]
}
Replace both your-log-group-arn values with the ARN of your CloudWatch Log Group, keeping the :* suffix on the second one, for example:
"Resource": [
"arn:aws:logs:us-east-1:123456789012:log-group:rbl-alerts",
"arn:aws:logs:us-east-1:123456789012:log-group:rbl-alerts:*"
]
logs:CreateLogStream is authorized against the log group, and logs:PutLogEvents against the log stream; the :* entry covers the log streams in the group.
Once the role is created, copy its ARN to set up a new Contact.
Payload
The format of the body of the message delivered to your CloudWatch log stream uses JSON. The exact set of fields depends on the event_type. For a regular alert (RBL listing event, certificate event, etc.):
{
"event_sid": "TAdde245352fc842d68c63f6693981be30",
"event_type": "contact.trigger",
"title": "RBL Listing Event",
"message": "1 hosts listed, 0 hosts delisted. See link for more details.",
"url": "https:\/\/rbltrack.com\/fFMa1S"
}
When a new contact is added, a success message is sent to your log group, with an event_type of contact.success:
{
"event_sid": "",
"event_type": "contact.success",
"title": "Successful Registration",
"message": "This contact has been successfully configured with your Generator Labs account.",
"url": "https:\/\/generatorlabs.com"
}
Adding a Contact
You can add an AWS CloudWatch contact from the Contacts ➡️ Manage ➡️ Contacts section of the Portal.

Select AWS CloudWatch from the Contact Type drop-down, and enter the Log Group ARN of the CloudWatch Log Group. Under Role Setup, create the role with CloudFormation, or select Set up the role yourself to create it yourself with the Trusted Principal and External ID values. Enter the IAM Role ARN of the role, then select a Frequency, and one or more Contact Groups to associate with this new contact.
After clicking Add Contact, the contact is active right away: there is no confirmation link to click. A success message is written to your log group so you can verify that the role and permissions are set up correctly.
The Frequency setting only applies to RBL Monitoring and will be removed in a future update. Other products such as Certificate Monitoring have their own alerting options.