Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.1.0
info:
title: Amazon DynamoDB Batch API
version: '2012-08-10'
description: Generated from AWS's published Smithy model for Amazon DynamoDB. 3 operation(s).
contact:
name: Amazon Web Services
url: https://aws.amazon.com/contact-us/
license:
name: Apache 2.0
identifier: Apache-2.0
url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://dynamodb.{region}.amazonaws.com
variables:
region:
default: us-east-1
security:
- sigv4: []
paths:
/#BatchExecuteStatement:
post:
operationId: BatchExecuteStatement
summary: Batch Execute Statement
description: This operation allows you to perform batch reads or writes on data stored in DynamoDB, using PartiQL. Each
read statement in a BatchExecuteStatement must specify an equality condition on all key attributes. This enforces
that each SELECT statement in a batch returns at most a single item. For more information, see Running batch operations
with PartiQL for DynamoDB . The entire batch must consist of either read statements or write statements, you cannot
mix both in one batch. A HTTP 200 response does not mean that all statements in the BatchExecuteStatement succeeded.
Error details for individual statements can be found under the Error field of the BatchStatementResponse for each
statement.
responses:
'200':
description: Success
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/BatchExecuteStatementOutput'
'500':
description: InternalServerError
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InternalServerError'
'400':
description: RequestLimitExceeded; ThrottlingException
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/RequestLimitExceeded'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- DynamoDB_20120810.BatchExecuteStatement
requestBody:
required: true
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/BatchExecuteStatementInput'
tags:
- Batch
/#BatchGetItem:
post:
operationId: BatchGetItem
summary: Batch Get Item
description: The BatchGetItem operation returns the attributes of one or more items from one or more tables. You identify
requested items by primary key. A single operation can retrieve up to 16 MB of data, which can contain as many as
100 items. BatchGetItem returns a partial result if the response size limit is exceeded, the table's provisioned throughput
is exceeded, more than 1MB per partition is requested, or an internal processing failure occurs. If a partial result
is returned, the operation returns a value for UnprocessedKeys. You can use this value to retry the operation starting
with the next item to get. If you request more than 100 items, BatchGetItem returns a ValidationException with the
message "Too many items requested for the BatchGetItem call." For example, if you ask to retrieve 100 items, but each
individual item is 300 KB in size, the system returns 52 items (so as not to exceed the 16 MB limit). It also returns
an appropriate UnprocessedKeys value so you can get the next page of results. If desired, your application can include
its own logic to assemble the pages of results into one dataset. If none of the items can be processed due to insufficient
provisioned throughput o
responses:
'200':
description: Success
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/BatchGetItemOutput'
example:
Responses:
Music:
- AlbumTitle:
S: Somewhat Famous
- AlbumTitle:
S: Blue Sky Blues
- AlbumTitle:
S: Louder Than Ever
'500':
description: InternalServerError
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InternalServerError'
'421':
description: InvalidEndpointException
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidEndpointException'
'400':
description: ProvisionedThroughputExceededException; RequestLimitExceeded; ResourceNotFoundException; ThrottlingException
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/ProvisionedThroughputExceededException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- DynamoDB_20120810.BatchGetItem
requestBody:
required: true
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/BatchGetItemInput'
example:
RequestItems:
Music:
Keys:
- Artist:
S: No One You Know
SongTitle:
S: Call Me Today
- Artist:
S: Acme Band
SongTitle:
S: Happy Day
- Artist:
S: No One You Know
SongTitle:
S: Scared of My Shadow
ProjectionExpression: AlbumTitle
tags:
- Batch
/#BatchWriteItem:
post:
operationId: BatchWriteItem
summary: Batch Write Item
description: The BatchWriteItem operation puts or deletes multiple items in one or more tables. A single call to BatchWriteItem
can transmit up to 16MB of data over the network, consisting of up to 25 item put or delete operations. While individual
items can be up to 400 KB once stored, it's important to note that an item's representation might be greater than
400KB while being sent in DynamoDB's JSON format for the API call. For more details on this distinction, see Naming
Rules and Data Types. BatchWriteItem cannot update items. If you perform a BatchWriteItem operation on an existing
item, that item's values will be overwritten by the operation and it will appear like it was updated. To update items,
we recommend you use the UpdateItem action. The individual PutItem and DeleteItem operations specified in BatchWriteItem
are atomic; however BatchWriteItem as a whole is not. If any requested operations fail because the table's provisioned
throughput is exceeded or an internal processing failure occurs, the failed operations are returned in the UnprocessedItems
response parameter. You can investigate and optionally resend the requests. Typically, you would call BatchWriteItem
in a loop. Each ite
responses:
'200':
description: Success
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/BatchWriteItemOutput'
example: {}
'500':
description: InternalServerError
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InternalServerError'
'421':
description: InvalidEndpointException
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidEndpointException'
'400':
description: ItemCollectionSizeLimitExceededException; ProvisionedThroughputExceededException; ReplicatedWriteConflictException;
RequestLimitExceeded; ResourceNotFoundException; ThrottlingException
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/ItemCollectionSizeLimitExceededException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- DynamoDB_20120810.BatchWriteItem
requestBody:
required: true
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/BatchWriteItemInput'
example:
RequestItems:
Music:
- PutRequest:
Item:
AlbumTitle:
S: Somewhat Famous
SongTitle:
S: Call Me Today
Artist:
S: No One You Know
- PutRequest:
Item:
AlbumTitle:
S: Songs About Life
SongTitle:
S: Happy Day
Artist:
S: Acme Band
- PutRequest:
Item:
AlbumTitle:
S: Blue Sky Blues
SongTitle:
S: Scared of My Shadow
Artist:
S: No One You Know
tags:
- Batch
components:
securitySchemes:
sigv4:
type: apiKey
in: header
name: Authorization
description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
x-aws-sigv4:
signingName: dynamodb
schemas:
AttributeValue:
type: object
properties:
S:
type: string
description: 'An attribute of type String. For example: "S": "Hello"'
N:
type: string
description: 'An attribute of type Number. For example: "N": "123.45" Numbers are sent across the network to DynamoDB
as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number
type attributes for mathematical operations.'
B:
type: string
format: byte
description: 'An attribute of type Binary. For example: "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"'
SS:
type: array
items:
type: string
description: 'An attribute of type String Set. For example: "SS": ["Giraffe", "Hippo" ,"Zebra"]'
NS:
type: array
items:
type: string
description: 'An attribute of type Number Set. For example: "NS": ["42.2", "-19", "7.5", "3.14"] Numbers are sent
across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However,
DynamoDB treats them as number type attributes for mathematical operations.'
BS:
type: array
items:
type: string
format: byte
description: 'An attribute of type Binary Set. For example: "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]'
M:
type: object
additionalProperties:
$ref: '#/components/schemas/AttributeValue'
description: 'An attribute of type Map. For example: "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}'
L:
type: array
items:
$ref: '#/components/schemas/AttributeValue'
description: 'An attribute of type List. For example: "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N": "3.14159"}]'
'NULL':
type: boolean
description: 'An attribute of type Null. For example: "NULL": true'
BOOL:
type: boolean
description: 'An attribute of type Boolean. For example: "BOOL": true'
description: Exactly one member is set.
BatchExecuteStatementInput:
type: object
properties:
Statements:
type: array
items:
$ref: '#/components/schemas/BatchStatementRequest'
description: The list of PartiQL statements representing the batch to run.
ReturnConsumedCapacity:
type: string
enum:
- INDEXES
- TOTAL
- NONE
required:
- Statements
BatchExecuteStatementOutput:
type: object
properties:
Responses:
type: array
items:
$ref: '#/components/schemas/BatchStatementResponse'
description: The response to each PartiQL statement in the batch. The values of the list are ordered according to
the ordering of the request statements.
ConsumedCapacity:
type: array
items:
$ref: '#/components/schemas/ConsumedCapacity'
description: The capacity units consumed by the entire operation. The values of the list are ordered according to
the ordering of the statements.
BatchGetItemInput:
type: object
properties:
RequestItems:
type: object
additionalProperties:
$ref: '#/components/schemas/KeysAndAttributes'
description: 'A map of one or more table names or table ARNs and, for each table, a map that describes one or more
items to retrieve from that table. Each table name or ARN can be used only once per BatchGetItem request. Each
element in the map of items to retrieve consists of the following: ConsistentRead - If true, a strongly consistent
read is used; if false (the default), an eventually consistent read is used. ExpressionAttributeNames - One or
more substitution tokens for attribute names in the ProjectionExpression parameter. The following are some use
cases for using ExpressionAttributeNames: To access'
ReturnConsumedCapacity:
type: string
enum:
- INDEXES
- TOTAL
- NONE
required:
- RequestItems
BatchGetItemOutput:
type: object
properties:
Responses:
type: object
additionalProperties:
type: array
items:
type: object
additionalProperties:
$ref: '#/components/schemas/AttributeValue'
description: A map of table name or table ARN to a list of items. Each object in Responses consists of a table name
or ARN, along with a map of attribute data consisting of the data type and attribute value.
UnprocessedKeys:
type: object
additionalProperties:
$ref: '#/components/schemas/KeysAndAttributes'
description: 'A map of tables and their respective keys that were not processed with the current response. The UnprocessedKeys
value is in the same form as RequestItems, so the value can be provided directly to a subsequent BatchGetItem
operation. For more information, see RequestItems in the Request Parameters section. Each element consists of:
Keys - An array of primary key attribute values that define specific items in the table. ProjectionExpression
- One or more attributes to be retrieved from the table or index. By default, all attributes are returned. If
a requested attribute is not found, it does no'
ConsumedCapacity:
type: array
items:
$ref: '#/components/schemas/ConsumedCapacity'
description: 'The read capacity units consumed by the entire BatchGetItem operation. Each element consists of: TableName
- The table that consumed the provisioned throughput. CapacityUnits - The total number of capacity units consumed.'
BatchStatementError:
type: object
properties:
Code:
type: string
enum:
- ConditionalCheckFailed
- ItemCollectionSizeLimitExceeded
- RequestLimitExceeded
- ValidationError
- ProvisionedThroughputExceeded
- TransactionConflict
- ThrottlingError
- InternalServerError
- ResourceNotFound
- AccessDenied
- DuplicateItem
description: The error code associated with the failed PartiQL batch statement.
Message:
type: string
description: The error message associated with the PartiQL batch response.
Item:
type: object
additionalProperties:
$ref: '#/components/schemas/AttributeValue'
description: The item which caused the condition check to fail. This will be set if ReturnValuesOnConditionCheckFailure
is specified as ALL_OLD.
BatchStatementRequest:
type: object
properties:
Statement:
type: string
description: A valid PartiQL statement.
Parameters:
type: array
items:
$ref: '#/components/schemas/AttributeValue'
description: The parameters associated with a PartiQL statement in the batch request.
ConsistentRead:
type: boolean
description: The read consistency of the PartiQL batch request.
ReturnValuesOnConditionCheckFailure:
type: string
enum:
- ALL_OLD
- NONE
description: An optional parameter that returns the item attributes for a PartiQL batch request operation that failed
a condition check. There is no additional cost associated with requesting a return value aside from the small
network and processing overhead of receiving a larger response. No read capacity units are consumed.
required:
- Statement
BatchStatementResponse:
type: object
properties:
Error:
$ref: '#/components/schemas/BatchStatementError'
TableName:
type: string
description: The table name associated with a failed PartiQL batch statement.
Item:
type: object
additionalProperties:
$ref: '#/components/schemas/AttributeValue'
description: A DynamoDB item associated with a BatchStatementResponse
BatchWriteItemInput:
type: object
properties:
RequestItems:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/WriteRequest'
description: 'A map of one or more table names or table ARNs and, for each table, a list of operations to be performed
(DeleteRequest or PutRequest). Each element in the map consists of the following: DeleteRequest - Perform a DeleteItem
operation on the specified item. The item to be deleted is identified by a Key subelement: Key - A map of primary
key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and
an attribute value. For each primary key, you must provide all of the key attributes. For example, with a simple
primary key, you only need to provide '
ReturnConsumedCapacity:
type: string
enum:
- INDEXES
- TOTAL
- NONE
ReturnItemCollectionMetrics:
type: string
enum:
- SIZE
- NONE
description: Determines whether item collection metrics are returned. If set to SIZE, the response includes statistics
about item collections, if any, that were modified during the operation are returned in the response. If set to
NONE (the default), no statistics are returned.
required:
- RequestItems
BatchWriteItemOutput:
type: object
properties:
UnprocessedItems:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/WriteRequest'
description: 'A map of tables and requests against those tables that were not processed. The UnprocessedItems value
is in the same form as RequestItems, so you can provide this value directly to a subsequent BatchWriteItem operation.
For more information, see RequestItems in the Request Parameters section. Each UnprocessedItems entry consists
of a table name or table ARN and, for that table, a list of operations to perform (DeleteRequest or PutRequest).
DeleteRequest - Perform a DeleteItem operation on the specified item. The item to be deleted is identified by
a Key subelement: Key - A map of primary key a'
ItemCollectionMetrics:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/ItemCollectionMetrics'
description: 'A list of tables that were processed by BatchWriteItem and, for each table, information about any
item collections that were affected by individual DeleteItem or PutItem operations. Each entry consists of the
following subelements: ItemCollectionKey - The partition key value of the item collection. This is the same as
the partition key value of the item. SizeEstimateRangeGB - An estimate of item collection size, expressed in GB.
This is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes
the size of all the items in the table, plus the size o'
ConsumedCapacity:
type: array
items:
$ref: '#/components/schemas/ConsumedCapacity'
description: 'The capacity units consumed by the entire BatchWriteItem operation. Each element consists of: TableName
- The table that consumed the provisioned throughput. CapacityUnits - The total number of capacity units consumed.
If the table has vector indexes, each element also includes a VectorIndexes field with VectorWriteRequestBytes
consumed for each affected vector index.'
Capacity:
type: object
properties:
ReadCapacityUnits:
type: number
description: The total number of read capacity units consumed on a table or an index.
WriteCapacityUnits:
type: number
description: The total number of write capacity units consumed on a table or an index.
CapacityUnits:
type: number
description: The total number of capacity units consumed on a table or an index.
ConsumedCapacity:
type: object
properties:
TableName:
type: string
description: The name of the table that was affected by the operation. If you had specified the Amazon Resource
Name (ARN) of a table in the input, you'll see the table ARN in the response.
CapacityUnits:
type: number
description: The total number of capacity units consumed by the operation.
ReadCapacityUnits:
type: number
description: The total number of read capacity units consumed by the operation.
WriteCapacityUnits:
type: number
description: The total number of write capacity units consumed by the operation.
Table:
$ref: '#/components/schemas/Capacity'
LocalSecondaryIndexes:
type: object
additionalProperties:
$ref: '#/components/schemas/Capacity'
description: The amount of throughput consumed on each local index affected by the operation.
GlobalSecondaryIndexes:
type: object
additionalProperties:
$ref: '#/components/schemas/Capacity'
description: The amount of throughput consumed on each global index affected by the operation.
VectorIndexes:
type: object
additionalProperties:
$ref: '#/components/schemas/VectorCapacity'
description: The amount of throughput consumed on each vector index affected by the operation. Each entry contains
VectorWriteRequestBytes (for write operations) or VectorSearchRequestBytes (for search operations).
DeleteRequest:
type: object
properties:
Key:
type: object
additionalProperties:
$ref: '#/components/schemas/AttributeValue'
description: A map of attribute name to attribute values, representing the primary key of the item to delete. All
of the table's primary key attributes must be specified, and their data types must match those of the table's
key schema.
required:
- Key
InternalServerError:
type: object
properties:
message:
type: string
description: The server encountered an internal error trying to fulfill the request.
InvalidEndpointException:
type: object
properties:
Message:
type: string
ItemCollectionMetrics:
type: object
properties:
ItemCollectionKey:
type: object
additionalProperties:
$ref: '#/components/schemas/AttributeValue'
description: The partition key value of the item collection. This value is the same as the partition key value of
the item.
SizeEstimateRangeGB:
type: array
items:
type: number
description: An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower
bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus
the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate
to measure whether a local secondary index is approaching its size limit. The estimate is subject to change over
time; therefore, do not rely on the precision or accuracy of the estimate.
ItemCollectionSizeLimitExceededException:
type: object
properties:
message:
type: string
description: The total size of an item collection has exceeded the maximum limit of 10 gigabytes.
KeysAndAttributes:
type: object
properties:
Keys:
type: array
items:
type: object
additionalProperties:
$ref: '#/components/schemas/AttributeValue'
description: The primary key attribute values that define the items and the attributes associated with the items.
AttributesToGet:
type: array
items:
type: string
description: This is a legacy parameter. Use ProjectionExpression instead. For more information, see Legacy Conditional
Parameters in the Amazon DynamoDB Developer Guide.
ConsistentRead:
type: boolean
description: The consistency of a read operation. If set to true, then a strongly consistent read is used; otherwise,
an eventually consistent read is used.
ProjectionExpression:
type: string
description: A string that identifies one or more attributes to retrieve from the table. These attributes can include
scalars, sets, or elements of a JSON document. The attributes in the ProjectionExpression must be separated by
commas. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes
are not found, they will not appear in the result. For more information, see Accessing Item Attributes in the
Amazon DynamoDB Developer Guide.
ExpressionAttributeNames:
type: object
additionalProperties:
type: string
description: 'One or more substitution tokens for attribute names in an expression. The following are some use cases
for using ExpressionAttributeNames: To access an attribute whose name conflicts with a DynamoDB reserved word.
To create a placeholder for repeating occurrences of an attribute name in an expression. To prevent special characters
in an attribute name from being misinterpreted in an expression. Use the # character in an expression to dereference
an attribute name. For example, consider the following attribute name: Percentile The name of this attribute conflicts
with a reserved word, so it can'
required:
- Keys
ProvisionedThroughputExceededException:
type: object
properties:
message:
type: string
description: You exceeded your maximum allowed provisioned throughput.
ThrottlingReasons:
type: array
items:
$ref: '#/components/schemas/ThrottlingReason'
description: A list of ThrottlingReason that provide detailed diagnostic information about why the request was throttled.
PutRequest:
type: object
properties:
Item:
type: object
additionalProperties:
$ref: '#/components/schemas/AttributeValue'
description: A map of attribute name to attribute values, representing the primary key of an item to be processed
by PutItem. All of the table's primary key attributes must be specified, and their data types must match those
of the table's key schema. If any attributes are present in the item that are part of an index key schema for
the table, their types must match the index key schema.
required:
- Item
RequestLimitExceeded:
type: object
properties:
message:
type: string
ThrottlingReasons:
type: array
items:
$ref: '#/components/schemas/ThrottlingReason'
description: A list of ThrottlingReason that provide detailed diagnostic information about why the request was throttled.
ThrottlingReason:
type: object
properties:
reason:
type: string
description: 'The reason for throttling. The throttling reason follows a specific format: ResourceType+OperationType+LimitType:
Resource Type (What is being throttled): Table or Index Operation Type (What kind of operation): Read or Write
Limit Type (Why the throttling occurred): ProvisionedThroughputExceeded: The request rate is exceeding the provisioned
throughput capacity (read or write capacity units) configured for a table or a global secondary index (GSI) in
provisioned capacity mode. AccountLimitExceeded: The request rate has caused a table or global secondary index
(GSI) in on-demand mode to exceed '
resource:
type: string
description: The Amazon Resource Name (ARN) of the DynamoDB table or index that experienced the throttling event.
VectorCapacity:
type: object
properties:
VectorSearchRequestBytes:
type: number
description: The number of vector search request bytes consumed by a SearchVectors operation.
VectorWriteRequestBytes:
type: number
description: The number of vector write request bytes consumed when writing to a vector index. Reported for write
operations that modify attributes indexed by a vector index.
WriteRequest:
type: object
properties:
PutRequest:
$ref: '#/components/schemas/PutRequest'
DeleteRequest:
$ref: '#/components/schemas/DeleteRequest'
x-provenance:
method: harvested
publisher: Amazon Web Services
source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/dynamodb/service/2012-08-10/dynamodb-2012-08-10.json
note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)