IAM policy example: read one CloudWatch Logs group, with a least privilege rewrite
Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.
Allows a principal to find log streams and read events in one log group, /app/orders, and run queries over it. The original allows the Get and Describe wildcards on every log group. The rewrite names the group and five actions.
Open the workbench ยท All examples
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ReadLogs",
"Effect": "Allow",
"Action": [
"logs:Get*",
"logs:Describe*",
"logs:FilterLogEvents",
"logs:StartQuery"
],
"Resource": "*"
}
]
}
What it allows
- Allows reading, searching and querying every log group in the account.
What it allows
Allow 39 actions (logs:Get*, logs:Describe*, logs:FilterLogEvents, logs:StartQuery) on every resource.
Action or pattern Actions Access levels logs:Get*18 Read 18 logs:Describe*19 List 19 logs:FilterLogEvents1 Read 1 logs:StartQuery1 Read 1
Checks
No flags from the six checks.
Log data often holds tokens and personal data. The wildcards cover 18 and 19 actions across all groups.
Least privilege rewrite
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ReadOneGroup",
"Effect": "Allow",
"Action": [
"logs:DescribeLogStreams",
"logs:GetLogEvents",
"logs:FilterLogEvents",
"logs:StartQuery"
],
"Resource": [
"arn:aws:logs:us-east-1:111122223333:log-group:/app/orders",
"arn:aws:logs:us-east-1:111122223333:log-group:/app/orders:*"
]
},
{
"Sid": "QueryResults",
"Effect": "Allow",
"Action": [
"logs:GetQueryResults",
"logs:StopQuery"
],
"Resource": "*"
}
]
}
The rewrite names one log group and four actions. GetQueryResults and StopQuery keep a wildcard resource because they do not take a log group.
What it allows
Allow 4 actions (logs:DescribeLogStreams, logs:GetLogEvents, logs:FilterLogEvents, logs:StartQuery) on arn:aws:logs:us-east-1:111122223333:log-group:/app/orders, arn:aws:logs:us-east-1:111122223333:log-group:/app/orders:*.
Action or pattern Actions Access levels logs:DescribeLogStreams1 List 1 logs:GetLogEvents1 Read 1 logs:FilterLogEvents1 Read 1 logs:StartQuery1 Read 1 Allow 2 actions (logs:GetQueryResults, logs:StopQuery) on every resource.
Action or pattern Actions Access levels logs:GetQueryResults1 Read 1 logs:StopQuery1 Read 1
Checks
No flags from the six checks.
Related pages
Sources
- Amazon CloudWatch Logs User Guide: managing access, read 16 Nov 2026
- AWS Service Authorization Reference, programmatic access (fetched 16 Nov 2026), read 16 Nov 2026
Last reviewed 16 Nov 2026.