Event Poller
The Event Poller is the simplest mechanism for detecting AWS resource changes. Guardrails periodically queries the CloudTrail LookupEvents API to find recent API activity, then processes those events to update the CMDB and trigger controls.
The Event Poller is enabled by default on newly imported accounts and requires no AWS infrastructure. It works immediately using the existing IAM role credentials.
When to Use the Event Poller
The Event Poller is appropriate for:
- Development and test environments with low activity.
- Proof-of-concept evaluations.
- Accounts where deploying AWS infrastructure (EventBridge rules, SNS topics) is not permitted.
For production environments, Global Event Handlers are recommended. They provide near real-time event delivery without the scalability limitations of CloudTrail polling.
Prerequisites
- An AWS account connected to Guardrails with a valid IAM role.
Turbot/AdminorTurbot/Ownerpermissions.
Configure the Event Poller
The Event Poller is controlled by three policies. Navigate to Policies > Actions > New Policy Setting to configure them.
Enable or Disable
Set AWS > Turbot > Event Poller to Enabled or Disabled.
| Value | Description |
|---|---|
Enabled | Guardrails polls CloudTrail on a regular interval. |
Disabled | Polling is stopped. Use this when switching to event handlers. |
[!IMPORTANT] The Event Poller automatically disables itself when Event Handlers (global or regional) are set to
Enforce: Configured. Never run both simultaneously. This wastes API calls and can cause duplicate event processing.
Polling Interval
Set AWS > Turbot > Event Poller > Interval to control how frequently Guardrails polls.
| Value | Description |
|---|---|
Every 1 minute | Lowest latency, highest API usage. |
Every 2 minutes | Default. Good balance for most environments. |
Every 5 minutes | Reduced API usage for low-activity accounts. |
Every 10 minutes | Minimum API usage. Acceptable for development environments. |
Polling Window
Set AWS > Turbot > Event Poller > Window to control how far back each poll looks for events.
| Value | Default | Description |
|---|---|---|
15 minutes | Yes | Must be greater than the interval. Recommended: at least 2x the interval. |
20 minutes | Provides more overlap to catch delayed CloudTrail events. | |
30 minutes | Maximum window. Use for accounts with high CloudTrail latency. |
[!NOTE] The window must always be greater than the interval. A wider window means more overlap between polls, reducing the chance of missing events that arrive late in CloudTrail.
Limitations
- CloudTrail API rate limits: The
LookupEventsAPI has strict throttling (2 transactions per second per account). In large, busy environments with many concurrent API calls, polls may be throttled and events delayed. - Latency: Events are only detected at the next poll interval, not in real time.
- Scaling: As the number of accounts grows, the cumulative API load from polling can become significant.
For environments where these limitations matter, upgrade to Global Event Handlers.
Troubleshooting
| Issue | Solution |
|---|---|
| Events not being detected | Verify CloudTrail is active in the account. Check that the Event Poller policy is Enabled and the AWS > Turbot > Event Poller control is in ok state. |
| High latency between change and detection | Reduce the polling interval. Consider upgrading to event handlers for near real-time detection. |
| API throttling errors | Increase the polling interval or reduce the number of polled accounts. Consider upgrading to event handlers. |
| Duplicate events | Ensure Event Handlers are not also enabled on the same account. Only one mechanism should be active. |
| Further assistance | Open a Support Ticket |