IAM policy example: read CloudTrail events, with a least privilege rewrite
Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.
Allows a responder to look up management events from the last 90 days and to see which trails exist and whether they are logging. The original uses cloudtrail:* on all resources, which includes stopping and deleting trails. The names and the account ID 111122223333 are AWS documentation placeholders.
Open the workbench ยท All examples
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Trail",
"Effect": "Allow",
"Action": "cloudtrail:*",
"Resource": "*"
}
]
}
What it allows
- Allows every CloudTrail action, including stopping logging and deleting trails.
What it allows
Allow 66 actions (cloudtrail:*) on every resource.
Action or pattern Actions Access levels cloudtrail:*66 List 8, Read 21, Write 35, Tagging 2
Checks
- Medium Allows 35 write or permissions-management actions on every resource ("Resource": "*"). AWS documentation for this check
The action cloudtrail:* covers 66 actions, among them StopLogging and DeleteTrail, which hide activity.
Least privilege rewrite
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ReadEvents",
"Effect": "Allow",
"Action": [
"cloudtrail:LookupEvents",
"cloudtrail:DescribeTrails",
"cloudtrail:GetTrailStatus",
"cloudtrail:GetEventSelectors"
],
"Resource": "*"
}
]
}
The rewrite lists four read actions. Stopping logging, deleting trails and editing selectors are removed.
What it allows
Allow 4 actions (cloudtrail:LookupEvents, cloudtrail:DescribeTrails, cloudtrail:GetTrailStatus, cloudtrail:GetEventSelectors) on every resource.
Action or pattern Actions Access levels cloudtrail:LookupEvents1 Read 1 cloudtrail:DescribeTrails1 Read 1 cloudtrail:GetTrailStatus1 Read 1 cloudtrail:GetEventSelectors1 Read 1
Checks
No flags from the six checks.
Related pages
Sources
- AWS CloudTrail User Guide: identity-based policy examples, read 16 Nov 2026
- AWS Service Authorization Reference, programmatic access (fetched 16 Nov 2026), read 16 Nov 2026
Last reviewed 16 Nov 2026.