Skip to content
IAM Policy Generator

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

Allows an application to put, update, delete and read items in the Orders table and its indexes. Table creation, deletion and settings changes are not allowed in the rewrite. The original uses dynamodb:* on the table, which includes DeleteTable. The names and the account ID 111122223333 are AWS documentation placeholders.

Open the workbench ยท All examples

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

What it allows

  • Allows every DynamoDB action on the Orders table.

What it allows

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

    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, including deleting the table and changing its capacity and backups.

Least privilege rewrite

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "OrdersItems",
      "Effect": "Allow",
      "Action": [
        "dynamodb:GetItem",
        "dynamodb:PutItem",
        "dynamodb:UpdateItem",
        "dynamodb:DeleteItem",
        "dynamodb:Query",
        "dynamodb:BatchWriteItem"
      ],
      "Resource": [
        "arn:aws:dynamodb:us-east-1:111122223333:table/Orders",
        "arn:aws:dynamodb:us-east-1:111122223333:table/Orders/index/*"
      ]
    }
  ]
}

The rewrite lists six item-level actions on the table and its indexes. Table deletion, capacity changes and backups are removed.

What it allows

  1. Allow 6 actions (dynamodb:GetItem, dynamodb:PutItem, dynamodb:UpdateItem, dynamodb:DeleteItem, dynamodb:Query, dynamodb:BatchWriteItem) on arn:aws:dynamodb:us-east-1:111122223333:table/Orders, arn:aws:dynamodb:us-east-1:111122223333:table/Orders/index/*.

    Action or patternActionsAccess levels
    dynamodb:GetItem1Read 1
    dynamodb:PutItem1Write 1
    dynamodb:UpdateItem1Write 1
    dynamodb:DeleteItem1Write 1
    dynamodb:Query1Read 1
    dynamodb:BatchWriteItem1Write 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.