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

Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.

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.

```json
{
  "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.

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

Checks:
- No flags.

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

## Least privilege rewrite

```json
{
  "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.

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

Checks:
- No flags.

- [Paste it into the workbench](/)
- [Every DynamoDB action and its access level](/actions/dynamodb/)

## Related pages

- [IAM policy example: let users manage their own MFA device](/examples/iam-manage-own-mfa-device/)
- [IAM policy example: change your own password and keys](/examples/iam-manage-own-credentials/)
- [IAM policy example: let a user pass one role to Lambda](/examples/iam-pass-one-role-to-lambda/)
- [All of them](/examples/)

## Sources

- Amazon DynamoDB Developer Guide: identity-based policies: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/using-identity-based-policies.html (read 16 Nov 2026)
- AWS Service Authorization Reference, programmatic access (fetched 16 Nov 2026): https://docs.aws.amazon.com/service-authorization/latest/reference/service-reference.html (read 16 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://iampolicygenerator.com/examples/dynamodb-read-streams-for-consumer/

This site is not affiliated with Amazon Web Services. AWS service and product names are used only to describe AWS services.
