dynamodb:Query

Read

dynamodb:Query is a Read access-level action in the dynamodb service. Grants permission to use the primary key of a table or a secondary index to directly access items from that table or index

Resource types

ARNs that dynamodb:Query can be scoped to in an IAM policy.

arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/index/${IndexName}
index
arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName} required
table

Condition keys

Keys you can use in the Condition block of a policy that grants dynamodb:Query.

dynamodb:Attributes ArrayOfString

Filters access by attribute (field or column) names of the table

dynamodb:LeadingKeys ArrayOfString

Filters access by the first partition key of the table

dynamodb:ReturnConsumedCapacity String

Filters access by the ReturnConsumedCapacity parameter of a request. Contains either "TOTAL" or "NONE"

dynamodb:ReturnValues String

Filters access by the ReturnValues parameter of request. Contains one of the following: "ALL_OLD", "UPDATED_OLD","ALL_NEW","UPDATED_NEW", or "NONE"

dynamodb:Select String

Filters access by the Select parameter of a Query or Scan request

aws:ResourceTag/${TagKey} String

Filters access by the tags associated with the resource

Example IAM policy

A minimal policy that allows dynamodb:Query. Replace "Resource": "*" with a specific ARN to follow least privilege.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowDynamodbQuery",
      "Effect": "Allow",
      "Action": "dynamodb:Query",
      "Resource": "*"
    }
  ]
}

Related actions in dynamodb

View all dynamodb actions →