Amazon DynamoDB

2026/11/04 - Amazon DynamoDB - 4 new api methods

Changes  Adds StartBulkPutItems, DescribeBulkOperation, ListBulkOperations, and CancelBulkOperation for asynchronously loading Amazon S3 datasets into existing DynamoDB tables.

CancelBulkOperation (new) Link ¶

Cancels an in-progress bulk operation asynchronously. Cancellation doesn't remove items that the operation has already written. Use DescribeBulkOperation to monitor the operation until it reaches a terminal status.

See also: AWS API Documentation

Request Syntax

client.cancel_bulk_operation(
    BulkOperationArn='string'
)
type BulkOperationArn:

string

param BulkOperationArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the bulk operation to cancel.

rtype:

dict

returns:

Response Syntax

{
    'BulkOperationArn': 'string',
    'BulkOperationStatus': 'IN_PROGRESS'|'COMPLETED'|'COMPLETED_WITH_ERRORS'|'CANCELLING'|'CANCELLED'|'FAILED'
}

Response Structure

  • (dict) --

    • BulkOperationArn (string) --

      The Amazon Resource Name (ARN) of the bulk operation for which DynamoDB accepted the cancellation request.

    • BulkOperationStatus (string) --

      The status returned after DynamoDB accepts the cancellation request. This value is CANCELLING. Use DescribeBulkOperation to determine when the operation reaches CANCELLED.

DescribeBulkOperation (new) Link ¶

Describes the specified bulk operation.

See also: AWS API Documentation

Request Syntax

client.describe_bulk_operation(
    BulkOperationArn='string'
)
type BulkOperationArn:

string

param BulkOperationArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the bulk operation to describe.

rtype:

dict

returns:

Response Syntax

{
    'BulkOperationDescription': {
        'BulkOperationArn': 'string',
        'BulkOperationStatus': 'IN_PROGRESS'|'COMPLETED'|'COMPLETED_WITH_ERRORS'|'CANCELLING'|'CANCELLED'|'FAILED',
        'TableDetails': [
            {
                'TableName': 'string',
                'TableId': 'string'
            },
        ],
        'ClientToken': 'string',
        'InputS3Configuration': {
            'S3BucketOwner': 'string',
            'S3Bucket': 'string',
            'S3KeyPrefix': 'string',
            'InputFormat': 'DYNAMODB_JSON'|'ION',
            'InputCompressionType': 'GZIP'|'ZSTD'|'NONE'
        },
        'OutputS3Configuration': {
            'S3BucketOwner': 'string',
            'S3Bucket': 'string',
            'S3KeyPrefix': 'string',
            'S3SseAlgorithm': 'AES256'|'KMS',
            'S3SseKmsKeyId': 'string',
            'OutputType': [
                'ERROR'|'CONDITION_CHECK_FAILURE',
            ]
        },
        'StartTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1),
        'ProcessedItemCount': 123,
        'ProcessedInputBytes': 123,
        'TotalInputBytes': 123,
        'BulkOperationUsage': [
            {
                'TableName': 'string',
                'BulkPutBytes': 123,
                'Table': {
                    'BulkPutBytes': 123
                },
                'LocalSecondaryIndexes': {
                    'string': {
                        'BulkPutBytes': 123
                    }
                },
                'GlobalSecondaryIndexes': {
                    'string': {
                        'BulkPutBytes': 123
                    }
                },
                'VectorIndexes': {
                    'string': {
                        'BulkPutVectorBytes': 123
                    }
                }
            },
        ],
        'FailedItemCount': 123,
        'FailureCode': 'string',
        'FailureMessage': 'string',
        'MaxWriteRequestUnits': 123,
        'PerformanceTier': 'STANDARD'|'ACCELERATED'
    }
}

Response Structure

  • (dict) --

    • BulkOperationDescription (dict) --

      Contains detailed information about the bulk operation.

      • BulkOperationArn (string) --

        The Amazon Resource Name (ARN) of the bulk operation.

      • BulkOperationStatus (string) --

        The current status of the bulk operation can be one of the following values:

        IN_PROGRESS

        DynamoDB is processing the input.

        COMPLETED

        The bulk operation finished without parsing or validation errors. Condition-check failures do not cause the operation to complete with errors.

        COMPLETED_WITH_ERRORS

        The bulk operation finished, but DynamoDB couldn't process at least one input item because of a parsing or validation error. When you enable ERROR output, DynamoDB writes the details to the configured Amazon S3 output location.

        CANCELLING

        DynamoDB accepted a cancellation request and is stopping the operation.

        CANCELLED

        DynamoDB stopped the operation after a cancellation request.

        FAILED

        The bulk operation failed. DynamoDB might write some items before the operation reaches this status. See FailureCode and FailureMessage for details.

      • TableDetails (list) --

        A list containing identifying information for the table targeted by the bulk operation.

        • (dict) --

          Contains identifying information for a table associated with a bulk operation.

          • TableName (string) --

            The name or ARN of the table associated with the bulk operation.

          • TableId (string) --

            The unique identifier of the table associated with the bulk operation.

      • ClientToken (string) --

        The idempotency token associated with the start request.

      • InputS3Configuration (dict) --

        The Amazon S3 input configuration associated with the bulk operation.

        • S3BucketOwner (string) --

          The Amazon Web Services account ID of the input bucket owner. If you omit this value, DynamoDB uses the Amazon Web Services account ID of the requester.

        • S3Bucket (string) --

          The name of the Amazon S3 bucket that contains the input objects.

        • S3KeyPrefix (string) --

          An optional key prefix that limits the input to matching objects in the Amazon S3 bucket.

        • InputFormat (string) --

          The format of the input objects. DYNAMODB_JSON uses JSON Lines, with one JSON record per line. ION uses a sequence of Ion structs.

        • InputCompressionType (string) --

          The compression type of the input objects. Valid values are GZIP, ZSTD, and NONE. If you don't specify a value, DynamoDB uses NONE.

      • OutputS3Configuration (dict) --

        The Amazon S3 output configuration associated with the bulk operation.

        • S3BucketOwner (string) --

          The Amazon Web Services account ID of the output bucket owner. If you omit this value, DynamoDB uses the Amazon Web Services account ID of the requester.

        • S3Bucket (string) --

          The name of the Amazon S3 bucket where DynamoDB writes output records.

        • S3KeyPrefix (string) --

          An optional key prefix under which DynamoDB writes the output records.

        • S3SseAlgorithm (string) --

          The server-side encryption algorithm for the output objects. Valid values are AES256 and KMS. If you don't specify a value, Amazon S3 applies the destination bucket's default encryption settings.

        • S3SseKmsKeyId (string) --

          The identifier of the KMS key that encrypts the output objects. Specify this value when S3SseAlgorithm is KMS. Don't specify it when the algorithm is AES256.

        • OutputType (list) --

          The following values describe the types of output that DynamoDB writes for individual input items. Include one or both values.

          ERROR

          Reports input records or input objects that DynamoDB couldn't process. This includes malformed input and item validation failures, such as a missing or incorrectly typed primary key attribute or an item that exceeds a DynamoDB limit.

          CONDITION_CHECK_FAILURE

          Reports the attempted item and, when present, the existing item for a write whose condition expression evaluates to false.

          • (string) --

      • StartTime (datetime) --

        The time when DynamoDB accepted the start request.

      • EndTime (datetime) --

        The time when the operation reached a terminal status. DynamoDB omits this value while the operation remains in progress.

      • ProcessedItemCount (integer) --

        The number of input items that DynamoDB has processed. This count includes successful writes, parsing or validation failures, and condition-check failures.

      • ProcessedInputBytes (integer) --

        The number of bytes that DynamoDB has read from the Amazon S3 input objects.

      • TotalInputBytes (integer) --

        The total size, in bytes, of the Amazon S3 input objects. DynamoDB omits this value until the initial input-size calculation completes.

      • BulkOperationUsage (list) --

        Usage information for the table and its indexes.

        • (dict) --

          Contains the bytes used during a bulk operation, including a breakdown for the table and its indexes.

          • TableName (string) --

            The name or ARN of the table associated with the reported usage.

          • BulkPutBytes (integer) --

            The total number of bulk put bytes used by the operation. This value excludes bulk put vector bytes.

          • Table (dict) --

            The number of bulk put bytes for the table, excluding its indexes.

            • BulkPutBytes (integer) --

              The number of bulk put bytes.

          • LocalSecondaryIndexes (dict) --

            The bulk put bytes used on each local secondary index affected by the operation, keyed by index name.

            • (string) --

              • (dict) --

                Contains the bulk put bytes used during a bulk operation.

                • BulkPutBytes (integer) --

                  The number of bulk put bytes.

          • GlobalSecondaryIndexes (dict) --

            The bulk put bytes used on each global secondary index affected by the operation, keyed by index name.

            • (string) --

              • (dict) --

                Contains the bulk put bytes used during a bulk operation.

                • BulkPutBytes (integer) --

                  The number of bulk put bytes.

          • VectorIndexes (dict) --

            The bulk put vector bytes used on each vector index affected by the operation, keyed by index name.

            • (string) --

              • (dict) --

                Contains the bulk put vector bytes used by a vector index during a bulk operation.

                • BulkPutVectorBytes (integer) --

                  The number of bulk put vector bytes used on the vector index.

      • FailedItemCount (integer) --

        The number of processed input items that failed because of parsing or validation errors. This count is included in ProcessedItemCount. Condition-check failures do not increase this count.

      • FailureCode (string) --

        A code that identifies why the bulk operation failed or was cancelled. DynamoDB returns this value only when BulkOperationStatus is FAILED or CANCELLED.

      • FailureMessage (string) --

        A message that describes why the bulk operation failed or was cancelled. DynamoDB returns this value only when BulkOperationStatus is FAILED or CANCELLED.

      • MaxWriteRequestUnits (integer) --

        The maximum write request unit rate configured for the bulk operation.

      • PerformanceTier (string) --

        The performance tier selected for the bulk operation. Valid values are STANDARD and ACCELERATED. If the start request omitted this value, DynamoDB uses STANDARD.

ListBulkOperations (new) Link ¶

Lists bulk operations that started within the past 90 days for the current Amazon Web Services account and Amazon Web Services Region, with the most recent operations first. Results are paginated. Use the NextToken parameter to retrieve additional results.

See also: AWS API Documentation

Request Syntax

client.list_bulk_operations(
    MaxResults=123,
    NextToken='string'
)
type MaxResults:

integer

param MaxResults:

The maximum number of bulk operation summaries to return in one page. If you don't specify a value, DynamoDB uses 10.

type NextToken:

string

param NextToken:

An optional string that, if supplied, must be copied from the output of a previous call to ListBulkOperations. When provided in this manner, the API fetches the next page of results.

rtype:

dict

returns:

Response Syntax

{
    'BulkOperationsSummaryList': [
        {
            'BulkOperationArn': 'string',
            'BulkOperationStatus': 'IN_PROGRESS'|'COMPLETED'|'COMPLETED_WITH_ERRORS'|'CANCELLING'|'CANCELLED'|'FAILED',
            'StartTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • BulkOperationsSummaryList (list) --

      A list of bulk operation summaries for the current Amazon Web Services account and Amazon Web Services Region.

      • (dict) --

        Contains summary information about a bulk operation.

        • BulkOperationArn (string) --

          The Amazon Resource Name (ARN) of the bulk operation.

        • BulkOperationStatus (string) --

          The current status of the bulk operation.

        • StartTime (datetime) --

          The time when DynamoDB accepted the start request.

        • EndTime (datetime) --

          The time when the operation reached a terminal status. DynamoDB omits this value while the operation remains in progress.

    • NextToken (string) --

      If this value is returned, there are additional results to be displayed. To retrieve them, call ListBulkOperations again, with NextToken set to this value.

StartBulkPutItems (new) Link ¶

Starts an asynchronous bulk operation that reads items from Amazon S3 and writes them to an existing DynamoDB table, so you can efficiently load or migrate large datasets.

See also: AWS API Documentation

Request Syntax

client.start_bulk_put_items(
    ClientToken='string',
    InputS3Configuration={
        'S3BucketOwner': 'string',
        'S3Bucket': 'string',
        'S3KeyPrefix': 'string',
        'InputFormat': 'DYNAMODB_JSON'|'ION',
        'InputCompressionType': 'GZIP'|'ZSTD'|'NONE'
    },
    OutputS3Configuration={
        'S3BucketOwner': 'string',
        'S3Bucket': 'string',
        'S3KeyPrefix': 'string',
        'S3SseAlgorithm': 'AES256'|'KMS',
        'S3SseKmsKeyId': 'string',
        'OutputType': [
            'ERROR'|'CONDITION_CHECK_FAILURE',
        ]
    },
    TableName='string',
    MaxWriteRequestUnits=123,
    PerformanceTier='STANDARD'|'ACCELERATED'
)
type ClientToken:

string

param ClientToken:

A unique, case-sensitive identifier that ensures the bulk operation starts no more than one time. During the 8 hours after the initial request, repeated requests that use the same token and parameters return the same bulk operation. If a request reuses the token with different parameters, DynamoDB returns an IdempotentParameterMismatchException. If you omit the token, an Amazon Web Services SDK automatically generates one.

This field is autopopulated if not provided.

type InputS3Configuration:

dict

param InputS3Configuration:

[REQUIRED]

The Amazon S3 location, data format, and compression settings for the input objects.

  • S3BucketOwner (string) --

    The Amazon Web Services account ID of the input bucket owner. If you omit this value, DynamoDB uses the Amazon Web Services account ID of the requester.

  • S3Bucket (string) -- [REQUIRED]

    The name of the Amazon S3 bucket that contains the input objects.

  • S3KeyPrefix (string) --

    An optional key prefix that limits the input to matching objects in the Amazon S3 bucket.

  • InputFormat (string) -- [REQUIRED]

    The format of the input objects. DYNAMODB_JSON uses JSON Lines, with one JSON record per line. ION uses a sequence of Ion structs.

  • InputCompressionType (string) --

    The compression type of the input objects. Valid values are GZIP, ZSTD, and NONE. If you don't specify a value, DynamoDB uses NONE.

type OutputS3Configuration:

dict

param OutputS3Configuration:

[REQUIRED]

The Amazon S3 location, encryption settings, and output types for the bulk operation.

  • S3BucketOwner (string) --

    The Amazon Web Services account ID of the output bucket owner. If you omit this value, DynamoDB uses the Amazon Web Services account ID of the requester.

  • S3Bucket (string) --

    The name of the Amazon S3 bucket where DynamoDB writes output records.

  • S3KeyPrefix (string) --

    An optional key prefix under which DynamoDB writes the output records.

  • S3SseAlgorithm (string) --

    The server-side encryption algorithm for the output objects. Valid values are AES256 and KMS. If you don't specify a value, Amazon S3 applies the destination bucket's default encryption settings.

  • S3SseKmsKeyId (string) --

    The identifier of the KMS key that encrypts the output objects. Specify this value when S3SseAlgorithm is KMS. Don't specify it when the algorithm is AES256.

  • OutputType (list) -- [REQUIRED]

    The following values describe the types of output that DynamoDB writes for individual input items. Include one or both values.

    ERROR

    Reports input records or input objects that DynamoDB couldn't process. This includes malformed input and item validation failures, such as a missing or incorrectly typed primary key attribute or an item that exceeds a DynamoDB limit.

    CONDITION_CHECK_FAILURE

    Reports the attempted item and, when present, the existing item for a write whose condition expression evaluates to false.

    • (string) --

type TableName:

string

param TableName:

[REQUIRED]

The name or ARN of the existing DynamoDB table that receives the items.

type MaxWriteRequestUnits:

integer

param MaxWriteRequestUnits:

The maximum rate, in write request units per second, at which the bulk operation attempts to write. The value must be at least 1,024. With this setting, you limit only the bulk operation; the table's provisioned or on-demand capacity settings don't change. The actual write rate can be lower.

type PerformanceTier:

string

param PerformanceTier:

The performance tier for the bulk operation. Valid values are STANDARD and ACCELERATED. If you don't specify a value, the operation uses STANDARD.

rtype:

dict

returns:

Response Syntax

{
    'BulkOperationDescription': {
        'BulkOperationArn': 'string',
        'BulkOperationStatus': 'IN_PROGRESS'|'COMPLETED'|'COMPLETED_WITH_ERRORS'|'CANCELLING'|'CANCELLED'|'FAILED',
        'TableDetails': [
            {
                'TableName': 'string',
                'TableId': 'string'
            },
        ],
        'ClientToken': 'string',
        'InputS3Configuration': {
            'S3BucketOwner': 'string',
            'S3Bucket': 'string',
            'S3KeyPrefix': 'string',
            'InputFormat': 'DYNAMODB_JSON'|'ION',
            'InputCompressionType': 'GZIP'|'ZSTD'|'NONE'
        },
        'OutputS3Configuration': {
            'S3BucketOwner': 'string',
            'S3Bucket': 'string',
            'S3KeyPrefix': 'string',
            'S3SseAlgorithm': 'AES256'|'KMS',
            'S3SseKmsKeyId': 'string',
            'OutputType': [
                'ERROR'|'CONDITION_CHECK_FAILURE',
            ]
        },
        'StartTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1),
        'ProcessedItemCount': 123,
        'ProcessedInputBytes': 123,
        'TotalInputBytes': 123,
        'BulkOperationUsage': [
            {
                'TableName': 'string',
                'BulkPutBytes': 123,
                'Table': {
                    'BulkPutBytes': 123
                },
                'LocalSecondaryIndexes': {
                    'string': {
                        'BulkPutBytes': 123
                    }
                },
                'GlobalSecondaryIndexes': {
                    'string': {
                        'BulkPutBytes': 123
                    }
                },
                'VectorIndexes': {
                    'string': {
                        'BulkPutVectorBytes': 123
                    }
                }
            },
        ],
        'FailedItemCount': 123,
        'FailureCode': 'string',
        'FailureMessage': 'string',
        'MaxWriteRequestUnits': 123,
        'PerformanceTier': 'STANDARD'|'ACCELERATED'
    }
}

Response Structure

  • (dict) --

    • BulkOperationDescription (dict) --

      Contains detailed information about a bulk operation.

      • BulkOperationArn (string) --

        The Amazon Resource Name (ARN) of the bulk operation.

      • BulkOperationStatus (string) --

        The current status of the bulk operation can be one of the following values:

        IN_PROGRESS

        DynamoDB is processing the input.

        COMPLETED

        The bulk operation finished without parsing or validation errors. Condition-check failures do not cause the operation to complete with errors.

        COMPLETED_WITH_ERRORS

        The bulk operation finished, but DynamoDB couldn't process at least one input item because of a parsing or validation error. When you enable ERROR output, DynamoDB writes the details to the configured Amazon S3 output location.

        CANCELLING

        DynamoDB accepted a cancellation request and is stopping the operation.

        CANCELLED

        DynamoDB stopped the operation after a cancellation request.

        FAILED

        The bulk operation failed. DynamoDB might write some items before the operation reaches this status. See FailureCode and FailureMessage for details.

      • TableDetails (list) --

        A list containing identifying information for the table targeted by the bulk operation.

        • (dict) --

          Contains identifying information for a table associated with a bulk operation.

          • TableName (string) --

            The name or ARN of the table associated with the bulk operation.

          • TableId (string) --

            The unique identifier of the table associated with the bulk operation.

      • ClientToken (string) --

        The idempotency token associated with the start request.

      • InputS3Configuration (dict) --

        The Amazon S3 input configuration associated with the bulk operation.

        • S3BucketOwner (string) --

          The Amazon Web Services account ID of the input bucket owner. If you omit this value, DynamoDB uses the Amazon Web Services account ID of the requester.

        • S3Bucket (string) --

          The name of the Amazon S3 bucket that contains the input objects.

        • S3KeyPrefix (string) --

          An optional key prefix that limits the input to matching objects in the Amazon S3 bucket.

        • InputFormat (string) --

          The format of the input objects. DYNAMODB_JSON uses JSON Lines, with one JSON record per line. ION uses a sequence of Ion structs.

        • InputCompressionType (string) --

          The compression type of the input objects. Valid values are GZIP, ZSTD, and NONE. If you don't specify a value, DynamoDB uses NONE.

      • OutputS3Configuration (dict) --

        The Amazon S3 output configuration associated with the bulk operation.

        • S3BucketOwner (string) --

          The Amazon Web Services account ID of the output bucket owner. If you omit this value, DynamoDB uses the Amazon Web Services account ID of the requester.

        • S3Bucket (string) --

          The name of the Amazon S3 bucket where DynamoDB writes output records.

        • S3KeyPrefix (string) --

          An optional key prefix under which DynamoDB writes the output records.

        • S3SseAlgorithm (string) --

          The server-side encryption algorithm for the output objects. Valid values are AES256 and KMS. If you don't specify a value, Amazon S3 applies the destination bucket's default encryption settings.

        • S3SseKmsKeyId (string) --

          The identifier of the KMS key that encrypts the output objects. Specify this value when S3SseAlgorithm is KMS. Don't specify it when the algorithm is AES256.

        • OutputType (list) --

          The following values describe the types of output that DynamoDB writes for individual input items. Include one or both values.

          ERROR

          Reports input records or input objects that DynamoDB couldn't process. This includes malformed input and item validation failures, such as a missing or incorrectly typed primary key attribute or an item that exceeds a DynamoDB limit.

          CONDITION_CHECK_FAILURE

          Reports the attempted item and, when present, the existing item for a write whose condition expression evaluates to false.

          • (string) --

      • StartTime (datetime) --

        The time when DynamoDB accepted the start request.

      • EndTime (datetime) --

        The time when the operation reached a terminal status. DynamoDB omits this value while the operation remains in progress.

      • ProcessedItemCount (integer) --

        The number of input items that DynamoDB has processed. This count includes successful writes, parsing or validation failures, and condition-check failures.

      • ProcessedInputBytes (integer) --

        The number of bytes that DynamoDB has read from the Amazon S3 input objects.

      • TotalInputBytes (integer) --

        The total size, in bytes, of the Amazon S3 input objects. DynamoDB omits this value until the initial input-size calculation completes.

      • BulkOperationUsage (list) --

        Usage information for the table and its indexes.

        • (dict) --

          Contains the bytes used during a bulk operation, including a breakdown for the table and its indexes.

          • TableName (string) --

            The name or ARN of the table associated with the reported usage.

          • BulkPutBytes (integer) --

            The total number of bulk put bytes used by the operation. This value excludes bulk put vector bytes.

          • Table (dict) --

            The number of bulk put bytes for the table, excluding its indexes.

            • BulkPutBytes (integer) --

              The number of bulk put bytes.

          • LocalSecondaryIndexes (dict) --

            The bulk put bytes used on each local secondary index affected by the operation, keyed by index name.

            • (string) --

              • (dict) --

                Contains the bulk put bytes used during a bulk operation.

                • BulkPutBytes (integer) --

                  The number of bulk put bytes.

          • GlobalSecondaryIndexes (dict) --

            The bulk put bytes used on each global secondary index affected by the operation, keyed by index name.

            • (string) --

              • (dict) --

                Contains the bulk put bytes used during a bulk operation.

                • BulkPutBytes (integer) --

                  The number of bulk put bytes.

          • VectorIndexes (dict) --

            The bulk put vector bytes used on each vector index affected by the operation, keyed by index name.

            • (string) --

              • (dict) --

                Contains the bulk put vector bytes used by a vector index during a bulk operation.

                • BulkPutVectorBytes (integer) --

                  The number of bulk put vector bytes used on the vector index.

      • FailedItemCount (integer) --

        The number of processed input items that failed because of parsing or validation errors. This count is included in ProcessedItemCount. Condition-check failures do not increase this count.

      • FailureCode (string) --

        A code that identifies why the bulk operation failed or was cancelled. DynamoDB returns this value only when BulkOperationStatus is FAILED or CANCELLED.

      • FailureMessage (string) --

        A message that describes why the bulk operation failed or was cancelled. DynamoDB returns this value only when BulkOperationStatus is FAILED or CANCELLED.

      • MaxWriteRequestUnits (integer) --

        The maximum write request unit rate configured for the bulk operation.

      • PerformanceTier (string) --

        The performance tier selected for the bulk operation. Valid values are STANDARD and ACCELERATED. If the start request omitted this value, DynamoDB uses STANDARD.