Why it matters
Data events are often enabled for every bucket and function by an organization-wide template, so busy non-production accounts pay for audit detail nobody reviews.How nOps finds it
nOps reads the last 7 complete days of CloudTrail data-event charges for each account. An account is flagged when at least 90% of that cost belongs to non-production, judged by the environment tag, then the nOps environment, then the account name. Accounts whose names suggest security, audit, logging, compliance, management, organization or payer use are skipped. The saving is the full data-event cost, scaled to a month, and must be at least $20 a month. Narrowing the events instead of turning them off saves part of that.Before you start
Permission to update trails (cloudtrail:PutEventSelectors) in the account, or in the management account for an organization trail. Confirm with your security team that data events are not required in this account.
How to implement
- Find the trails that record data events for the account:
aws cloudtrail get-event-selectors --trail-name TRAILfor each trail listed byaws cloudtrail describe-trails. Check organization trails in the management account too. - Confirm no audit, compliance or incident-response process depends on data events from this account.
- In the CloudTrail console, open the trail, edit Data events, and remove them, or limit them with advanced event selectors (for example write-only events, or only the buckets and functions that matter).
- If the trail is managed by CloudFormation, Terraform or AWS Control Tower, change it there so it is not re-enabled.
Risks and considerations
- Without data events you lose the record of who read or wrote individual objects and invoked functions in this account.
- If the events come from an organization trail, changing it affects every account it covers. Use advanced event selectors to exclude this account instead.
- To roll back, add the data-event selectors back to the trail. Events from the time they were off are not recorded.
FAQs
Why is this shown for the whole account rather than a trail?
Why is this shown for the whole account rather than a trail?
Billing reports data events per account, not per trail, so nOps cannot tell which trail recorded them. Check every trail that covers the account.
How does nOps decide an account is non-production?
How does nOps decide an account is non-production?
From the environment tag on the charges, then the environment nOps assigned, then the account name. At least 90% of the data-event cost must be non-production.
Related
- Remove Duplicate CloudTrail Trail
- Reduce AWS Config Recording in Non-Production Accounts
- Supported recommendations