Skip to content
IAM Policy Generator

IAM policy example: read a DynamoDB stream, with a least privilege rewrite

Allows a consumer to read change records from the stream of one table: describe the stream, get a shard iterator and fetch records. The original allows dynamodb:* on the streams of every table. The rewrite names the Orders stream and three actions, plus ListStreams.

Open the workbench ยท All examples

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Streams",
      "Effect": "Allow",
      "Action": "dynamodb:*",
      "Resource": "arn:aws:dynamodb:us-east-1:111122223333:table/*/stream/*"
    }
  ]
}

What it allows

  • Allows every DynamoDB action on streams of all tables in one Region.

What it allows

  1. Allow 85 actions (dynamodb:*) on arn:aws:dynamodb:us-east-1:111122223333:table/*/stream/*.

    Action or patternActionsAccess levels
    dynamodb:*85List 7, Read 31, Write 42, Permissions management 3, Tagging 2

Checks

No flags from the six checks.

The action dynamodb:* covers 85 actions and every table's stream.

Least privilege rewrite

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "ReadOrdersStream",
      "Effect": "Allow",
      "Action": [
        "dynamodb:DescribeStream",
        "dynamodb:GetShardIterator",
        "dynamodb:GetRecords"
      ],
      "Resource": "arn:aws:dynamodb:us-east-1:111122223333:table/Orders/stream/*"
    },
    {
      "Sid": "ListStreams",
      "Effect": "Allow",
      "Action": "dynamodb:ListStreams",
      "Resource": "*"
    }
  ]
}

The rewrite lists the three stream-reading actions on the Orders stream and the list call that has no resource-level support.

What it allows

  1. Allow 3 actions (dynamodb:DescribeStream, dynamodb:GetShardIterator, dynamodb:GetRecords) on arn:aws:dynamodb:us-east-1:111122223333:table/Orders/stream/*.

    Action or patternActionsAccess levels
    dynamodb:DescribeStream1Read 1
    dynamodb:GetShardIterator1Read 1
    dynamodb:GetRecords1Read 1
  2. Allow 1 action (dynamodb:ListStreams) on every resource.

    Action or patternActionsAccess levels
    dynamodb:ListStreams1Read 1

Checks

No flags from the six checks.

Sources

  1. Amazon DynamoDB Developer Guide: identity-based policies, read 16 Nov 2026
  2. AWS Service Authorization Reference, programmatic access (fetched 16 Nov 2026), read 16 Nov 2026

Last reviewed 16 Nov 2026.