AWS Event Collection
Heeler event collection allows near real-time updates, analysis, and notification of meaningful changes in your environment. Heeler harvests events from AWS using logging at the organization level, routing via a Lambda function, and an SQS queue.
AWS Prerequisite
As noted above, Heeler harvests events from AWS at the organization level using a resource that most AWS Organizations already have in place. Doing so simplifies event collection and ensures complete visibility as your cloud footprint grows. The required resource is an organization-wide CloudTrail. It must have the following settings:
Enabled for all accounts in my organization
Multi-region trail
All management events
CloudWatch Logs enabled
The last requirement may be new to your organization. If so, enable CloudWatch Logs to create a Log Group. Then, edit the Log Group retention setting to `1 day` to allow events to expire. Doing so reduces costs and Heeler does not need the events retained as it harvests events every 60 seconds.
Terraform Implementation
To deploy the resources required for Event Collection, you will need Terraform configured to deploy resources in the account hosting the organization-wide CloudTrail.
Executing the Terraform plan creates the following:
CloudWatch subscription filter. This filter excludes events from processing that are not security-relevant, e.g..,
PutObject.Lambda function. The Lambda function reads events from the CloudWatch log group, processes the events, and sends the events to an SQS queue.
SQS queue. The SQS queue holds the processed events until they are harvested by Heeler.
IAM role and policy. The role that Heeler assumes and the policy that allows Heeler to harvest events from the SQS queue.
Supporting resources. The Terraform plan also deploys supporting resources such as:
Dead Letter Queue to capture failed deliveries to the SQS queue
KMS key to encrypt SQS queue
IAM role, policy, and permission for the Lambda function to assume and use to read CloudWatch log groups and send encrypted messages to SQS
Terraform Steps
Download and unzip the files to an appropriate location for your environment.
The zip file contains:
main.tf. Defines the resources to be deployed
output.tf. Defines the values displayed after the process completes so they can be used to configure Event Collection in the Heeler application
lambda/heeler_event_collection.py. The code for the Lambda function that reads events from the CloudWatch Log Group, processes the events, and sends them to the SQS queue
filter_pattern.json. The definition of the filter pattern to use for the CloudWatch log subscription filter
variables.tf. The variable definitions to populated by var.auto.tfvars
var.auto.tfvars. The inputs required to deploy resources to your account hosting your organization-wide CloudTrail.
Update the
var.auto.tfvarsfile
You will need to update the input variable values as indicated.
account ID should be the account ID where the organization-wide CloudTrail is located.
log_group_name should be the name of the CloudWatch Log Group that is receiving events from the organization-wide CloutTrail.
heeler_external_id is a security feature to create a secret to be shared between your Heeler installation and the Event Collection IAM role it assumes in your account
heeler_security_role_arn is not an input from you, but provided by Heeler. It is the ARN of the role Heeler will use harvest events from the SQS queue in your account.
Initialize and plan the deployment
You should see a response like the following:
Apply the deployment
You should see a response like the one from terraform apply, but also includes
enter yes
Once complete, you should see something like this
You will need each of these output values when configuring Event Collection in Heeler.
Heeler Steps
Once the resources are created and configured in AWS, you need to add their information to Heeler. Open the URL https://app.heeler.com/administration/connections/organizations or just click on the settings icon at the top right and then click on Connections.

Then select the ellipsis to the right of the desired AWS organization in order to edit its Event Collection Settings

Then paste the output values provided by Terraform at the completion of the
terraform applystep.

Finally, confirm that event collection is enabled in the updated Cloud Organization listing

At this point, it may take some time for the initial harvest of events, but afterwards, events should harvest every 60 seconds.
Last updated
Was this helpful?
