This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// source https://tvernon.tech/blog/move-dynamodb-data-between-regions | |
const AWS = require('aws-sdk') | |
// Use the scan method to get everything from the old table | |
const readAllDataFromTable = async ({ region, table }) => { | |
AWS.config.update({ region }) | |
const documentClient = new AWS.DynamoDB.DocumentClient() | |
const params = { | |
TableName: table, | |
}; |