1. Root
Amazon DynamoDB
  • Root
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
  • Schemas
    • Schemas
      • BatchExecuteStatementOutput
      • BatchExecuteStatementInput
      • RequestLimitExceeded
      • InternalServerError
      • BatchGetItemOutput
      • BatchGetItemInput
      • ProvisionedThroughputExceededException
      • ResourceNotFoundException
      • BatchWriteItemOutput
      • BatchWriteItemInput
      • ItemCollectionSizeLimitExceededException
      • CreateBackupOutput
      • CreateBackupInput
      • TableNotFoundException
      • TableInUseException
      • ContinuousBackupsUnavailableException
      • BackupInUseException
      • LimitExceededException
      • CreateGlobalTableOutput
      • CreateGlobalTableInput
      • GlobalTableAlreadyExistsException
      • CreateTableOutput
      • CreateTableInput
      • ResourceInUseException
      • DeleteBackupOutput
      • DeleteBackupInput
      • BackupNotFoundException
      • DeleteItemOutput
      • DeleteItemInput
      • ConditionalCheckFailedException
      • TransactionConflictException
      • DeleteTableOutput
      • DeleteTableInput
      • DescribeBackupOutput
      • DescribeBackupInput
      • DescribeContinuousBackupsOutput
      • DescribeContinuousBackupsInput
      • DescribeContributorInsightsOutput
      • DescribeContributorInsightsInput
      • DescribeEndpointsResponse
      • DescribeEndpointsRequest
      • DescribeExportOutput
      • DescribeExportInput
      • ExportNotFoundException
      • DescribeGlobalTableOutput
      • DescribeGlobalTableInput
      • GlobalTableNotFoundException
      • DescribeGlobalTableSettingsOutput
      • DescribeGlobalTableSettingsInput
      • DescribeKinesisStreamingDestinationOutput
      • DescribeImportOutput
      • DescribeKinesisStreamingDestinationInput
      • DescribeImportInput
      • DescribeLimitsOutput
      • ImportNotFoundException
      • DescribeLimitsInput
      • DescribeTableOutput
      • DescribeTableInput
      • DescribeTableReplicaAutoScalingOutput
      • DescribeTableReplicaAutoScalingInput
      • DescribeTimeToLiveOutput
      • DescribeTimeToLiveInput
      • KinesisStreamingDestinationOutput
      • KinesisStreamingDestinationInput
      • ExecuteStatementOutput
      • ExecuteStatementInput
      • DuplicateItemException
      • ExecuteTransactionOutput
      • ExecuteTransactionInput
      • TransactionCanceledException
      • TransactionInProgressException
      • IdempotentParameterMismatchException
      • ExportTableToPointInTimeOutput
      • ExportTableToPointInTimeInput
      • PointInTimeRecoveryUnavailableException
      • InvalidExportTimeException
      • ExportConflictException
      • GetItemOutput
      • GetItemInput
      • ListBackupsOutput
      • ListBackupsInput
      • ListContributorInsightsOutput
      • ListContributorInsightsInput
      • ImportTableOutput
      • ListExportsOutput
      • ImportTableInput
      • ListExportsInput
      • ImportConflictException
      • ListGlobalTablesOutput
      • ListGlobalTablesInput
      • ListTablesOutput
      • ListTablesInput
      • ListTagsOfResourceOutput
      • ListTagsOfResourceInput
      • PutItemOutput
      • PutItemInput
      • QueryOutput
      • ListImportsOutput
      • QueryInput
      • ListImportsInput
      • RestoreTableFromBackupOutput
      • RestoreTableFromBackupInput
      • TableAlreadyExistsException
      • RestoreTableToPointInTimeOutput
      • RestoreTableToPointInTimeInput
      • InvalidRestoreTimeException
      • ScanOutput
      • ScanInput
      • TagResourceInput
      • TransactGetItemsOutput
      • TransactGetItemsInput
      • TransactWriteItemsOutput
      • TransactWriteItemsInput
      • UntagResourceInput
      • UpdateContinuousBackupsOutput
      • UpdateContinuousBackupsInput
      • UpdateContributorInsightsOutput
      • UpdateContributorInsightsInput
      • UpdateGlobalTableOutput
      • UpdateGlobalTableInput
      • ReplicaAlreadyExistsException
      • ReplicaNotFoundException
      • UpdateGlobalTableSettingsOutput
      • UpdateGlobalTableSettingsInput
      • IndexNotFoundException
      • UpdateItemOutput
      • UpdateItemInput
      • UpdateTableOutput
      • UpdateTableInput
      • UpdateTableReplicaAutoScalingOutput
      • UpdateTableReplicaAutoScalingInput
      • UpdateTimeToLiveOutput
      • UpdateTimeToLiveInput
      • ArchivalReason
      • Date
      • BackupArn
      • ArchivalSummary
      • AttributeAction
      • KeySchemaAttributeName
      • ScalarAttributeType
      • AttributeDefinition
      • AttributeDefinitions
      • AttributeValue
      • AttributeMap
      • AttributeName
      • AttributeNameList
      • AttributeValueUpdate
      • AttributeUpdates
      • StringAttributeValue
      • NumberAttributeValue
      • BinaryAttributeValue
      • StringSetAttributeValue
      • NumberSetAttributeValue
      • BinarySetAttributeValue
      • MapAttributeValue
      • ListAttributeValue
      • NullAttributeValue
      • BooleanAttributeValue
      • AttributeValueList
      • AutoScalingPolicyName
      • AutoScalingTargetTrackingScalingPolicyConfigurationDescription
      • AutoScalingPolicyDescription
      • AutoScalingPolicyDescriptionList
      • AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
      • AutoScalingPolicyUpdate
      • AutoScalingRoleArn
      • PositiveLongObject
      • BooleanObject
      • String
      • AutoScalingSettingsDescription
      • AutoScalingSettingsUpdate
      • IntegerObject
      • Double
      • Backfilling
      • BackupCreationDateTime
      • BackupDetails
      • SourceTableDetails
      • SourceTableFeatureDetails
      • BackupDescription
      • BackupName
      • BackupSizeBytes
      • DoubleObject
      • BackupStatus
      • BackupType
      • BackupSummary
      • BackupSummaries
      • TableName
      • TableId
      • TableArn
      • BackupTypeFilter
      • BackupsInputLimit
      • PartiQLBatchRequest
      • PartiQLBatchResponse
      • BatchGetRequestMap
      • ReturnConsumedCapacity
      • BatchGetResponseMap
      • ConsumedCapacityMultiple
      • KeysAndAttributes
      • ItemList
      • BatchStatementErrorCodeEnum
      • BatchStatementError
      • PartiQLStatement
      • PreparedStatementParameters
      • ConsistentRead
      • BatchStatementRequest
      • BatchStatementResponse
      • BatchWriteItemRequestMap
      • ReturnItemCollectionMetrics
      • ItemCollectionMetricsPerTable
      • WriteRequests
      • BilledSizeBytes
      • BillingMode
      • BillingModeSummary
      • ConsumedCapacityUnits
      • Capacity
      • ClientRequestToken
      • ClientToken
      • ComparisonOperator
      • Condition
      • Key
      • ConditionExpression
      • ExpressionAttributeNameMap
      • ExpressionAttributeValueMap
      • ReturnValuesOnConditionCheckFailure
      • ConditionCheck
      • ConditionalOperator
      • CloudWatchLogGroupArn
      • SecondaryIndexesCapacityMap
      • ConsumedCapacity
      • ContinuousBackupsStatus
      • PointInTimeRecoveryDescription
      • ContinuousBackupsDescription
      • ContributorInsightsAction
      • ContributorInsightsRule
      • ContributorInsightsRuleList
      • ContributorInsightsStatus
      • ContributorInsightsSummary
      • ContributorInsightsSummaries
      • IndexName
      • KeySchema
      • Projection
      • ProvisionedThroughput
      • CreateGlobalSecondaryIndexAction
      • ReplicaList
      • GlobalTableDescription
      • RegionName
      • CreateReplicaAction
      • KMSMasterKeyId
      • ProvisionedThroughputOverride
      • ReplicaGlobalSecondaryIndexList
      • CreateReplicationGroupMemberAction
      • LocalSecondaryIndexList
      • GlobalSecondaryIndexList
      • StreamSpecification
      • SSESpecification
      • TagList
      • TableDescription
      • Delete
      • DeleteGlobalSecondaryIndexAction
      • ExpectedAttributeMap
      • TableClass
      • ReturnValue
      • ItemCollectionMetrics
      • DeleteReplicaAction
      • DeleteReplicationGroupMemberAction
      • DeleteRequest
      • LastUpdateDateTime
      • FailureException
      • DeletionProtectionEnabled
      • Endpoints
      • ExportArn
      • CsvDelimiter
      • ExportDescription
      • CsvHeader
      • ReplicaSettingsDescriptionList
      • CsvHeaderList
      • KinesisDataStreamDestinations
      • CsvOptions
      • TableAutoScalingDescription
      • TimeToLiveDescription
      • DestinationStatus
      • Long
      • Endpoint
      • ExceptionDescription
      • ExceptionName
      • PartiQLNextToken
      • ParameterizedStatements
      • ItemResponseList
      • ExpectedAttributeValue
      • ExportStatus
      • ExportStartTime
      • ExportEndTime
      • ExportManifest
      • ImportArn
      • ExportTime
      • ImportTableDescription
      • S3Bucket
      • S3BucketOwner
      • S3Prefix
      • S3SseAlgorithm
      • S3SseKmsKeyId
      • FailureCode
      • FailureMessage
      • ErrorCount
      • ExportFormat
      • ItemCount
      • ExportNextToken
      • ExportSummary
      • ExportSummaries
      • ExpressionAttributeNameVariable
      • ExpressionAttributeValueVariable
      • FilterConditionMap
      • ProjectionExpression
      • Get
      • GlobalSecondaryIndex
      • GlobalSecondaryIndexAutoScalingUpdate
      • GlobalSecondaryIndexAutoScalingUpdateList
      • IndexStatus
      • ProvisionedThroughputDescription
      • GlobalSecondaryIndexDescription
      • GlobalSecondaryIndexDescriptionList
      • GlobalSecondaryIndexInfo
      • UpdateGlobalSecondaryIndexAction
      • GlobalSecondaryIndexUpdate
      • GlobalSecondaryIndexUpdateList
      • GlobalSecondaryIndexes
      • GlobalTable
      • GlobalTableArnString
      • ReplicaDescriptionList
      • GlobalTableStatus
      • GlobalTableGlobalSecondaryIndexSettingsUpdate
      • GlobalTableGlobalSecondaryIndexSettingsUpdateList
      • GlobalTableList
      • Integer
      • ItemCollectionKeyAttributeMap
      • ItemCollectionSizeEstimateRange
      • ItemCollectionMetricsMultiple
      • ItemCollectionSizeEstimateBound
      • ItemResponse
      • LongObject
      • KMSMasterKeyArn
      • KeyConditions
      • KeyExpression
      • KeyList
      • KeySchemaElement
      • KeyType
      • StreamArn
      • KinesisDataStreamDestination
      • TimeRangeLowerBound
      • TimeRangeUpperBound
      • NextTokenString
      • ListContributorInsightsLimit
      • ListExportsMaxLimit
      • PositiveIntegerObject
      • ListTablesInputLimit
      • ImportEndTime
      • TableNameList
      • ImportNextToken
      • ResourceArnString
      • ImportStartTime
      • LocalSecondaryIndex
      • ImportStatus
      • LocalSecondaryIndexDescription
      • S3BucketSource
      • LocalSecondaryIndexDescriptionList
      • InputFormat
      • LocalSecondaryIndexInfo
      • ImportSummary
      • LocalSecondaryIndexes
      • ImportSummaryList
      • NonKeyAttributeName
      • InputFormatOptions
      • NonKeyAttributeNameList
      • InputCompressionType
      • NonNegativeLongObject
      • TableCreationParameters
      • ParameterizedStatement
      • ProcessedItemCount
      • PointInTimeRecoveryStatus
      • ImportedItemCount
      • PointInTimeRecoverySpecification
      • ProjectionType
      • PutItemInputAttributeMap
      • Put
      • PutRequest
      • Select
      • Replica
      • ReplicaGlobalSecondaryIndexAutoScalingDescriptionList
      • ReplicaStatus
      • ReplicaAutoScalingDescription
      • ReplicaAutoScalingDescriptionList
      • ReplicaGlobalSecondaryIndexAutoScalingUpdateList
      • ReplicaAutoScalingUpdate
      • ReplicaAutoScalingUpdateList
      • ReplicaStatusDescription
      • ReplicaStatusPercentProgress
      • ReplicaGlobalSecondaryIndexDescriptionList
      • ReplicaDescription
      • ReplicaGlobalSecondaryIndex
      • ReplicaGlobalSecondaryIndexAutoScalingDescription
      • ListImportsMaxLimit
      • ReplicaGlobalSecondaryIndexAutoScalingUpdate
      • ReplicaGlobalSecondaryIndexDescription
      • ReplicaGlobalSecondaryIndexSettingsDescription
      • ReplicaGlobalSecondaryIndexSettingsDescriptionList
      • ReplicaGlobalSecondaryIndexSettingsUpdate
      • ReplicaGlobalSecondaryIndexSettingsUpdateList
      • ReplicaSettingsDescription
      • ReplicaSettingsUpdate
      • ReplicaSettingsUpdateList
      • ReplicaUpdate
      • ReplicaUpdateList
      • UpdateReplicationGroupMemberAction
      • ReplicationGroupUpdate
      • ReplicationGroupUpdateList
      • RestoreInProgress
      • RestoreSummary
      • SSEStatus
      • SSEType
      • SSEDescription
      • SSEEnabled
      • ScanTotalSegments
      • ScanSegment
      • TableCreationDateTime
      • StreamEnabled
      • StreamViewType
      • TableStatus
      • TagKeyString
      • TagValueString
      • Tag
      • TagKeyList
      • TimeToLiveAttributeName
      • TableClassSummary
      • TimeToLiveStatus
      • TimeToLiveEnabled
      • TimeToLiveSpecification
      • TransactGetItem
      • TransactGetItemList
      • Update
      • TransactWriteItem
      • TransactWriteItemList
      • UpdateExpression
      • WriteRequest
  1. Root

/

POST
/
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.
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 iteration would check for unprocessed items and submit a new BatchWriteItem request with those unprocessed items until all items have been processed.
If none of the items can be processed due to insufficient provisioned throughput on all of the tables in the request, then BatchWriteItem returns a ProvisionedThroughputExceededException.
With BatchWriteItem, you can efficiently write or delete large amounts of data, such as from Amazon EMR, or copy data from another database into DynamoDB. In order to improve performance with these large-scale operations, BatchWriteItem does not behave in the same way as individual PutItem and DeleteItem calls would. For example, you cannot specify conditions on individual put and delete requests, and BatchWriteItem does not return deleted items in the response.
If you use a programming language that supports concurrency, you can use threads to write items in parallel. Your application must include the necessary logic to manage the threads. With languages that don't support threading, you must update or delete the specified items one at a time. In both situations, BatchWriteItem performs the specified put and delete operations in parallel, giving you the power of the thread pool approach without having to introduce complexity into your application.
Parallel processing reduces latency, but each specified put and delete request consumes the same number of write capacity units whether it is processed in parallel or not. Delete operations on nonexistent items consume one write capacity unit.
If one or more of the following is true, DynamoDB rejects the entire batch write operation:
  • One or more tables specified in the BatchWriteItem request does not exist.
  • Primary key attributes specified on an item in the request do not match those in the corresponding table's primary key schema.
  • You try to perform multiple operations on the same item in the same BatchWriteItem request. For example, you cannot put and delete the same item in the same BatchWriteItem request.
  • Your request contains at least two items with identical hash and range keys (which essentially is two put operations).
  • There are more than 25 requests in the batch.
  • Any individual item in a batch exceeds 400 KB.
  • The total request size exceeds 16 MB.

Request

Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Body

🟠480ProvisionedThroughputExceededException
🟠481ResourceNotFoundException
🟠482ItemCollectionSizeLimitExceededException
🟠483RequestLimitExceeded
🟠484InternalServerError
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/' \
--header 'X-Amz-Target;' \
--header 'Content-Type: application/json' \
--data-raw ''
Response Response Example
200 - Example 1
{}
Modified at 2023-08-22 09:04:07
Previous
/
Next
/
Built with