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:
| Service | Description |
|---|---|
| EventBridge rules | Filter CloudTrail events to those Guardrails needs based on installed mods. |
| EventBridge targets | Route matched events from EventBridge to SNS. |
| SNS topic | Where filtered events are published. |
| SNS subscription | Forwards events via HTTPS to the Guardrails event ingestion endpoint. |
Prerequisites
- An AWS account connected to Guardrails in All Resources mode.
Turbot/Ownerpermissions at the Turbot resource level.- The Guardrails IAM role must have permissions for EventBridge rules and SNS topics (included in the ReadOnly + Event Handlers CloudFormation template).
- Required mods installed and in
okstate. - CloudTrail active in the account.
- Workspace policies configured (including Enterprise API Gateway if applicable).
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
- Check that all
AWS > Turbot > Event Handlerscontrols are inokstate. - 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]
- Deleting an AWS account from Guardrails does not automatically decommission event handlers. You must explicitly set them to
Not configuredfirst.- Setting the policy to
Skip(instead ofNot configured) leaves the infrastructure deployed. UseNot configuredto trigger cleanup.
Decommission event handlers before:
- Destroying the AWS account.
- Removing the account from Guardrails.
- Switching to Global Event Handlers or Event Pollers.
Troubleshooting
For errors related to CloudTrail, workspace policies, bulk changes, or the event flow path, see the shared Event Handlers page.
| Issue | Solution |
|---|---|
| Access Denied errors | Check 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 confirm | Verify workspace policies. For Enterprise, ensure the ALB hostname is resolvable and the API Gateway is configured. |
| Controls in error after bulk change | Guardrails retries automatically. If errors persist, check IAM permissions and Terraform container availability. See Event Handler Errors. |
| Further assistance | Open a Support Ticket |