Skip to content
IAM Policy Generator

IAM policy example: read one CloudWatch Logs group, with a least privilege rewrite

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

  1. Allow 39 actions (logs:Get*, logs:Describe*, logs:FilterLogEvents, logs:StartQuery) on every resource.

    Action or patternActionsAccess levels
    logs:Get*18Read 18
    logs:Describe*19List 19
    logs:FilterLogEvents1Read 1
    logs:StartQuery1Read 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

  1. 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 patternActionsAccess levels
    logs:DescribeLogStreams1List 1
    logs:GetLogEvents1Read 1
    logs:FilterLogEvents1Read 1
    logs:StartQuery1Read 1
  2. Allow 2 actions (logs:GetQueryResults, logs:StopQuery) on every resource.

    Action or patternActionsAccess levels
    logs:GetQueryResults1Read 1
    logs:StopQuery1Read 1

Checks

No flags from the six checks.

Sources

  1. Amazon CloudWatch Logs User Guide: managing access, read 16 Nov 2026
  2. AWS Service Authorization Reference, programmatic access (fetched 16 Nov 2026), read 16 Nov 2026

Last reviewed 16 Nov 2026.