- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ExportTableToPointInTimeCommand
Exports table data to an S3 bucket. The table must have point in time recovery enabled, and you can export data from any time within the point in time recovery window.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DynamoDBClient, ExportTableToPointInTimeCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import
// const { DynamoDBClient, ExportTableToPointInTimeCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import
const client = new DynamoDBClient(config);
const input = { // ExportTableToPointInTimeInput
TableArn: "STRING_VALUE", // required
ExportTime: new Date("TIMESTAMP"),
ClientToken: "STRING_VALUE",
S3Bucket: "STRING_VALUE", // required
S3BucketOwner: "STRING_VALUE",
S3Prefix: "STRING_VALUE",
S3SseAlgorithm: "AES256" || "KMS",
S3SseKmsKeyId: "STRING_VALUE",
ExportFormat: "DYNAMODB_JSON" || "ION",
ExportType: "FULL_EXPORT" || "INCREMENTAL_EXPORT",
IncrementalExportSpecification: { // IncrementalExportSpecification
ExportFromTime: new Date("TIMESTAMP"),
ExportToTime: new Date("TIMESTAMP"),
ExportViewType: "NEW_IMAGE" || "NEW_AND_OLD_IMAGES",
},
};
const command = new ExportTableToPointInTimeCommand(input);
const response = await client.send(command);
// { // ExportTableToPointInTimeOutput
// ExportDescription: { // ExportDescription
// ExportArn: "STRING_VALUE",
// ExportStatus: "IN_PROGRESS" || "COMPLETED" || "FAILED",
// StartTime: new Date("TIMESTAMP"),
// EndTime: new Date("TIMESTAMP"),
// ExportManifest: "STRING_VALUE",
// TableArn: "STRING_VALUE",
// TableId: "STRING_VALUE",
// ExportTime: new Date("TIMESTAMP"),
// ClientToken: "STRING_VALUE",
// S3Bucket: "STRING_VALUE",
// S3BucketOwner: "STRING_VALUE",
// S3Prefix: "STRING_VALUE",
// S3SseAlgorithm: "AES256" || "KMS",
// S3SseKmsKeyId: "STRING_VALUE",
// FailureCode: "STRING_VALUE",
// FailureMessage: "STRING_VALUE",
// ExportFormat: "DYNAMODB_JSON" || "ION",
// BilledSizeBytes: Number("long"),
// ItemCount: Number("long"),
// ExportType: "FULL_EXPORT" || "INCREMENTAL_EXPORT",
// IncrementalExportSpecification: { // IncrementalExportSpecification
// ExportFromTime: new Date("TIMESTAMP"),
// ExportToTime: new Date("TIMESTAMP"),
// ExportViewType: "NEW_IMAGE" || "NEW_AND_OLD_IMAGES",
// },
// },
// };
ExportTableToPointInTimeCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
S3Bucket Required | string | undefined | The name of the Amazon S3 bucket to export the snapshot to. |
TableArn Required | string | undefined | The Amazon Resource Name (ARN) associated with the table to export. |
ClientToken | string | undefined | Providing a A client token is valid for 8 hours after the first request that uses it is completed. After 8 hours, any request with the same client token is treated as a new request. Do not resubmit the same request with the same client token for more than 8 hours, or the result might not be idempotent. If you submit a request with the same client token but a change in other parameters within the 8-hour idempotency window, DynamoDB returns an |
ExportFormat | ExportFormat | undefined | The format for the exported data. Valid values for |
ExportTime | Date | undefined | Time in the past from which to export table data, counted in seconds from the start of the Unix epoch. The table export will be a snapshot of the table's state at this point in time. |
ExportType | ExportType | undefined | Choice of whether to execute as a full export or incremental export. Valid values are FULL_EXPORT or INCREMENTAL_EXPORT. The default value is FULL_EXPORT. If INCREMENTAL_EXPORT is provided, the IncrementalExportSpecification must also be used. |
IncrementalExportSpecification | IncrementalExportSpecification | undefined | Optional object containing the parameters specific to an incremental export. |
S3BucketOwner | string | undefined | The ID of the Amazon Web Services account that owns the bucket the export will be stored in. S3BucketOwner is a required parameter when exporting to a S3 bucket in another account. |
S3Prefix | string | undefined | The Amazon S3 bucket prefix to use as the file name and path of the exported snapshot. |
S3SseAlgorithm | S3SseAlgorithm | undefined | Type of encryption used on the bucket where export data will be stored. Valid values for
|
S3SseKmsKeyId | string | undefined | The ID of the KMS managed key used to encrypt the S3 bucket where export data will be stored (if applicable). |
ExportTableToPointInTimeCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
ExportDescription | ExportDescription | undefined | Contains a description of the table export. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ExportConflictException | client | There was a conflict when writing to the specified S3 bucket. |
InternalServerError | server | An error occurred on the server side. |
InvalidExportTimeException | client | The specified |
LimitExceededException | client | There is no limit to the number of daily on-demand backups that can be taken. For most purposes, up to 500 simultaneous table operations are allowed per account. These operations include When you are creating a table with one or more secondary indexes, you can have up to 250 such requests running at a time. However, if the table or index specifications are complex, then DynamoDB might temporarily reduce the number of concurrent operations. When importing into DynamoDB, up to 50 simultaneous import table operations are allowed per account. There is a soft account quota of 2,500 tables. GetRecords was called with a value of more than 1000 for the limit request parameter. More than 2 processes are reading from the same streams shard at the same time. Exceeding this limit may result in request throttling. |
PointInTimeRecoveryUnavailableException | client | Point in time recovery has not yet been enabled for this source table. |
TableNotFoundException | client | A source table with the name |
DynamoDBServiceException | Base exception class for all service exceptions from DynamoDB service. |