Regional Event Handlers

Regional Event Handlers deploy EventBridge rules, SNS topics, and subscriptions independently in every active region. This was the original real-time event mechanism in Guardrails.

[!NOTE] Regional Event Handlers have been superseded by Global Event Handlers, which centralize event handling in a single primary region with lower cost and operational overhead. For new deployments, use Global Event Handlers. To migrate, see Migrate to Global Event Handlers.

Infrastructure

Regional Event Handlers deploy the following AWS resources in each active region:

ServiceDescription
EventBridge rulesFilter CloudTrail events to those Guardrails needs based on installed mods.
EventBridge targetsRoute matched events from EventBridge to SNS.
SNS topicWhere filtered events are published.
SNS subscriptionForwards events via HTTPS to the Guardrails event ingestion endpoint.

Prerequisites

Step 1: Enable Event Handlers

Set AWS > Turbot > Event Handlers to Enforce: Configured:

resource "turbot_policy_setting" "eventHandlers" {
  resource = "id-of-parent-folder"
  type     = "tmod:@turbot/aws#/policy/types/eventHandlers"
  value    = "Enforce: Configured"
}

This deploys event handling infrastructure in all enabled regions. Deployment takes 1-2 minutes per region. Verify that AWS > Turbot > Event Handlers controls reach ok state for each region.

Step 2: Verify

  1. Check that all AWS > Turbot > Event Handlers controls are in ok state.
  2. Create a resource in any monitored region and verify Guardrails detects it within seconds.

The Event Poller automatically disables when Event Handlers are set to Enforce: Configured. Verify that AWS > Turbot > Event Poller shows Disabled.

Decommissioning

Set AWS > Turbot > Event Handlers to Enforce: Not configured. Guardrails runs Terraform to destroy the event handler infrastructure.

[!IMPORTANT]

Decommission event handlers before:

Troubleshooting

For errors related to CloudTrail, workspace policies, bulk changes, or the event flow path, see the shared Event Handlers page.

IssueSolution
Access Denied errorsCheck the Guardrails IAM role permissions. Check for SCP restrictions on EventBridge or SNS. Update AWS > Account > Regions to match permitted regions.
SNS subscription won't confirmVerify workspace policies. For Enterprise, ensure the ALB hostname is resolvable and the API Gateway is configured.
Controls in error after bulk changeGuardrails retries automatically. If errors persist, check IAM permissions and Terraform container availability. See Event Handler Errors.
Further assistanceOpen a Support Ticket