How to copy a DynamoDB table to another account or Region

Written by Rahul Ahire
Last updated: October 23rd, 2026
To copy a DynamoDB table into a new table, use a backup restore, PITR restore, or export to S3 followed by import from S3. For an existing destination table, use application writes, a paginated scan-and-batch-write script, or an ETL job. Choose the method based on whether you need a consistent recovery point, another account or Region, a different schema, or ongoing synchronization.
Choose the copy method
| Method | Destination | Best fit | Main limitation |
|---|---|---|---|
| PITR restore | New table | Same-account copy at a recoverable timestamp, including another Region | Requires PITR history and post-restore configuration |
| Backup restore | New table | Copy from a retained recovery point | Not a merge into an existing table |
| AWS Backup copy and restore | New table in the destination account or Region | Managed copies with retention and vault controls | Account, vault and encryption prerequisites |
| S3 export then import | New table | Bulk transfer across accounts or Regions, with explicit schema | Import cannot create LSIs or target an existing table |
| Scan and batch writes | Existing, usually empty table | Small controlled copies or custom transformations | Consumes capacity and is not a consistent snapshot |
| AWS Glue | Destination configured by the job | Larger ETL or transformation workflows | Requires job configuration, permissions and validation |
A copy is not automatically a migration. If the source remains writable, you need a write freeze or a change-capture and reconciliation phase before moving traffic. Global tables are an option for ongoing replication, not a retained point-in-time copy.
Preparation
Record source and destination account IDs, Regions, table names and key schemas. Confirm whether overwriting destination items is permitted. Take a recoverable backup before changing an existing target, and identify the roles used for reading, writing, exporting, importing or restoring.
Preserve the destination access patterns, not just the items. Check primary keys, GSIs, LSIs, encryption, TTL, streams, capacity, tags, resource policies, backup settings and alarms. An item copy does not create those settings. If an import needs a different primary key, every source record must contain valid values for the new schema.
Set up AWS CLI profiles
Use temporary credentials through IAM Identity Center or an approved assumed-role profile. You do not need to create a new IAM user with unrestricted DynamoDB access just to copy data. For an organization using Identity Center, configure and authenticate profiles for the source and destination:
Verify the returned account IDs before writing. Follow the CLI Identity Center setup for your organization's sign-in configuration. The required permissions depend on the method: a scan copier needs source reads and destination writes; a managed export/import also needs S3 and potentially KMS access. See DynamoDB access control for scoped roles and cross-account policies.
Copy a table to another account with S3 export and import
A full native export reads a snapshot from the source table's PITR history without consuming table read capacity. The destination account can import the exported files into a new table when its role has the necessary bucket and key access. This avoids transporting the whole dataset through a laptop.
1. Export a full snapshot
Enable PITR first and confirm a restorable point is available. Request the export using credentials from the source table's account:
Replace the account and bucket values. Omitting the export time uses the latest available point; provide a verified historical time if the copy must precede a change. Wait for export status COMPLETED, and inspect failures instead of treating the returned ARN as completion. For a bucket owned by another account, include its owner and configure its permissions as described in requesting an export.
2. Select the data prefix, not the export root
A full export writes manifests and compressed data files. The data objects are under a prefix shaped like:
Find the actual export ID and data location in the completed export's manifest. Do not point import at the root containing manifest and checksum files. The export output specification describes the layout.
A filtered export copies a subset, and an incremental export represents changes over an interval. Neither should be mistaken for the full dataset required for a straightforward clone. Applying incremental changes, including deletes, requires a separate designed process.
3. Import into a new destination table
Save this as orders-import.json. It assumes the source has string keys pk and sk; change the schema to match your data, and replace the bucket owner and actual data prefix:
Wait for COMPLETED and inspect error counts and logs. Native import accepts DynamoDB JSON, CSV or Amazon Ion, but ordinary JSON is not interchangeable with DynamoDB JSON. It uses no destination write capacity, can define GSIs, and does not support LSIs or importing into an existing table. The import documentation covers formats and permissions.
The basic example creates no indexes beyond the primary key and no custom operational settings. Add required indexes and encryption to the import configuration, then apply the remaining table settings before cutover.
AWS Backup copy and restore across accounts
Use AWS Backup when the copy should remain part of a managed backup and retention workflow. Enable the advanced DynamoDB backup features, create a recovery point, copy it to the destination vault, then restore it in that account or Region.
For standard cross-account copy, the accounts must belong to the same AWS Organization and meet the copy prerequisites. Configure the destination vault policy, source role and relevant encryption keys. Confirm the copy job completed before restoring. The backup and restore guide walks through this route; it creates a new table rather than appending to one.
Copy a table to another Region with PITR
If the destination is in the same account and a suitable PITR point exists, a restore avoids an intermediate S3 transfer workflow. Run the restore in the destination Region with the source table ARN:
Use the same approach within one Region with a different target name. For a specific historical copy, replace the latest-time option with a valid --restore-date-time. Validate the destination's indexes, capacity and encryption, and reapply settings that restore does not carry over. The PITR guide explains those details.
S3 export/import and AWS Backup are also suitable cross-Region options. Choose one based on whether you need a portable data artifact, a different key schema or retained recovery points. A cross-Region copy does not follow later source changes automatically.
Copy into an existing table with a script
The scripts below are for controlled copies into a pre-created destination with a compatible key schema. Stop source writes, use strongly consistent reads and keep the destination isolated during the copy. Even a strongly consistent scan is not a snapshot while writes continue, as the Scan API explains.
Both scripts overwrite items with matching primary keys. They do not remove destination-only items or preserve table configuration. For “insert only if missing,” use conditional PutItem calls instead: BatchWriteItem does not support per-item conditions.
JavaScript: AWS SDK v3 with pagination and retries
Install @aws-sdk/client-dynamodb and @aws-sdk/credential-providers in the script's project. Save as copy-table.mjs, set SOURCE_TABLE, DESTINATION_TABLE, SOURCE_REGION and DESTINATION_REGION, and use the authenticated source and destination profiles.
The low-level client preserves DynamoDB number strings and binary values without converting them to ordinary JavaScript numbers. It paginates scans, limits batches by count and a conservative byte budget, and retries unprocessed writes with backoff:
The 8 MB threshold is the script's conservative batching choice, not a DynamoDB service limit. DynamoDB permits up to 25 operations and a 16 MB request; stored-item size and JSON wire size differ. SDK retries handle retryable request failures, while the loop handles successful responses containing UnprocessedItems. See BatchWriteItem.
This script stops on an unrecovered error and has no durable checkpoint. Rerun only against a quiescent source and a destination where repeated overwrites are acceptable. For a long migration, add durable progress records, rate controls and reconciliation rather than treating this example as a migration service.
Python: boto3 scan and batch writer
Boto3's table resource preserves numbers as Decimal. Its batch writer buffers writes and retries unprocessed items. This small-table example uses the same profiles and environment variables:
Use the boto3 helper when your batches fit the request-size limit; it is not an application-specific byte-budget or checkpoint manager. For unusually large wire representations, use explicit size-aware batches as in the JavaScript example. Both versions consume source read capacity and destination write capacity, including relevant index writes.
Use AWS Glue when the copy needs transformation
Glue can read and write DynamoDB through an ETL connector, or read a native export through its export connector. The export path avoids scanning the live table for the initial dataset and requires PITR and S3 permissions. The write path still needs destination write capacity and appropriate permissions.
Choose Glue when you must transform attributes, change key structures, join data or run an established ETL workflow. Configure the job's source and destination accounts and Regions explicitly, then validate transformed keys and duplicate handling. The Glue DynamoDB connector documentation covers these options.
Copy selected items or use a local export
For a small selected set, Dynobase's copy-items workflow lets you select a destination, map keys and choose skip or overwrite behavior. Use that when the task is moving a few records rather than cloning the entire table.
A local export/import workflow is also useful when you need a file to inspect or transform. Export the intended dataset, switch to the verified destination account and Region, create or choose a compatible table, and review import conflict handling before writing. These historical screenshots illustrate the file workflow; current UI layout may differ:








Do not assume a local JSON export has the same format as a native S3 export. Check the format accepted by the chosen importer. A copy into an existing table can overwrite matching records and leave unmatched old records behind, so equal item counts alone do not prove equivalence.
Validate the copy and budget the operation
Before cutover, compare representative records, data types, key coverage and important aggregate totals. Test every required index query with the destination application's role. Review import errors or script failures, and confirm that table settings and ongoing protections have been applied.
In US East (N. Virginia), a full export costs $0.10 per GB of table data plus LSIs, import costs $0.15 per GB of uncompressed source data, and restore costs $0.15 per GB restored. These billing bases are different, so do not blindly add export and import rates against one size. Include S3 storage and requests, transfer, KMS and destination table costs; current rates are on DynamoDB pricing.
For an online migration, capture changes before the initial copy, retain them until the load completes, apply them in a safe order and reconcile deletes. Stop or fence writes for the final cutover if required. Keep the original table and recovery point until the destination's correctness and rollback procedure are verified.
Frequently Asked Questions
Can I copy a DynamoDB table to another account?
Can DynamoDB import data into an existing table?
Does copying a table also copy its indexes and settings?
Is a scan a consistent snapshot?
Will batch writes overwrite existing items?
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
- SSH GUI Client
- Chat With Cloud
- MongoDB GUI Client
- AWS Cost Monitoring
- DynamoDB Query Builder
- DynamoDB Code Examples
- DynamoDB Node.js Queries
- DynamoDB JSON Converter
- DynamoDB UUID Generator
- DynamoDB Local Admin GUI
- DynamoDB Pricing Calculator
- DynamoDB Single-Table Design
- Best DynamoDB GUI Clients
- Dynobase vs DynoTable