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

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

Allows a principal to read items from one DynamoDB table, Orders, and its indexes. The original reads every table with the Get, BatchGet, Describe and List wildcards plus Query and Scan. The rewrite names one table, three read actions and drops Scan.

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "ReadTables",
      "Effect": "Allow",
      "Action": [
        "dynamodb:Get*",
        "dynamodb:Query",
        "dynamodb:Scan",
        "dynamodb:BatchGet*",
        "dynamodb:Describe*",
        "dynamodb:List*"
      ],
      "Resource": "*"
    }
  ]
}
```

## What it allows

- Allows reading items, listing and describing every table in every Region.

- Allows 34 actions (dynamodb:Get*, dynamodb:Query, dynamodb:Scan, dynamodb:BatchGet*, dynamodb:Describe*, dynamodb:List*) on every resource.

Checks:
- No flags.

The wildcards expand to 5, 1, 17 and 9 actions on all tables.

## Least privilege rewrite

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "ReadOrders",
      "Effect": "Allow",
      "Action": [
        "dynamodb:GetItem",
        "dynamodb:BatchGetItem",
        "dynamodb:Query"
      ],
      "Resource": [
        "arn:aws:dynamodb:us-east-1:111122223333:table/Orders",
        "arn:aws:dynamodb:us-east-1:111122223333:table/Orders/index/*"
      ]
    }
  ]
}
```

The rewrite names one table and its indexes and drops Scan, which reads the entire table.

- Allows 3 actions (dynamodb:GetItem, dynamodb:BatchGetItem, dynamodb:Query) on arn:aws:dynamodb:us-east-1:111122223333:table/Orders, arn:aws:dynamodb:us-east-1:111122223333:table/Orders/index/*.

Checks:
- No flags.

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

## Related pages

- [IAM policy example: read and write one DynamoDB table](/examples/dynamodb-crud-one-table/)
- [IAM policy example: limit DynamoDB items to the caller](/examples/dynamodb-leading-keys-per-user/)
- [IAM policy example: read a DynamoDB stream](/examples/dynamodb-read-streams-for-consumer/)
- [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-one-table/

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