Least privilege for Amazon DynamoDB is a table-scoped action list plus LeadingKeys and Attributes conditions
Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.
Amazon DynamoDB access is granted per table and per action, and AWS documentation read on 16 Nov 2026 adds condition keys for item and attribute level control. This guide shows a read-only table grant, the managed policies to replace, the dynamodb:LeadingKeys pattern and how to check use.
Open the calculator ยท All services
DynamoDB permissions attach to table and index ARNs
AWS documentation says users and roles have no permission to create or modify DynamoDB resources by default, and an administrator writes IAM policies to grant it. A statement names actions, a Resource ARN for a table in a Region and account, and optional conditions.
AWS advises starting with AWS managed policies and then defining customer managed policies specific to the use case, and it lists more than 100 Access Analyzer policy checks as a validation step.
The identities that call this service (people, services, workloads, third parties) are covered in the AWS service identities guide and the workload identities guide.
The full-access managed policy grants more than most workloads need
- AmazonDynamoDBFullAccess. AWS describes it as full access to DynamoDB resources through the console, and it has a read-only counterpart for viewing. A workload that touches one table does not need either; AWS shows a customer managed policy for that table instead.
- A Resource of "" on data actions. AWS example policies name a table ARN, and an index needs its own ARN in the form table/Books/index/.
- Granting Scan to callers that only need keyed reads. The AWS conditions page notes that Scan carries no LeadingKeys value, so a LeadingKeys condition needs a Null check to be effective.
A read-only grant for one table lists three actions
AWS publishes this statement for a Books table in us-west-2. For writes, AWS gives a separate policy that covers table Books and all its indexes with PutItem, UpdateItem, DeleteItem, BatchWriteItem, GetItem, BatchGetItem, Scan, Query and ConditionCheckItem.
| Sid | Actions | Resource |
|---|---|---|
| DescribeQueryScanBooksTable | dynamodb:DescribeTable, dynamodb:Query, dynamodb:Scan | arn:aws:dynamodb:us-west-2:111122223333:table/Books |
| AccessTableAllIndexesOnBooks (write policy) | nine data actions listed above | arn:aws:dynamodb:us-west-2:123456789012:table/Books and table/Books/index/* |
Condition keys limit access to items and attributes
- dynamodb:LeadingKeys holds the partition key value of a request. AWS says to use the ForAllValues modifier and shows a policy tying it to the caller identity, for example
${www.amazon.com:user_id}. - dynamodb:Attributes lists the attributes in a request, which restricts which columns can be read or written. AWS describes this as attribute-level control, alongside item-level control through key values and operation-specific rules.
- dynamodb:Select represents the Select parameter of a request.
- For BatchGetItem and BatchWriteItem, LeadingKeys contains the partition key of every item. For transactions, AWS says each item is authorized separately, using the action for that item such as dynamodb:PutItem or dynamodb:ConditionCheckItem.
Check use with policy generation and CloudTrail
IAM Access Analyzer can generate a policy from CloudTrail activity for up to 90 days. AWS says generated policies omit action-level activity for data events, so item reads and writes need CloudTrail data event logging or application logs to confirm.
AWS also recommends MFA conditions on API calls where IAM users or the root user are required, and Access Analyzer validation before a policy ships. Compare the actions a role is granted against the table names and operations that appear in CloudTrail, and remove grants for tables the application no longer reads.
Related pages
Sources
- Identity-based policy examples for DynamoDB, read 16 Nov 2026
- Using identity-based policies with DynamoDB, read 16 Nov 2026
- Policy for a table and its indexes, read 16 Nov 2026
- IAM policy conditions for fine-grained access control, read 16 Nov 2026
- IAM Access Analyzer policy generation, read 16 Nov 2026
Last reviewed 16 Nov 2026.