1.0.8 • Published 3 months ago

dynamo-copy v1.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago
  • Copy data from one AWS account to another AWS account in DynamoDB.
  • Copy data in same AWS account in DynamoDB.
  • Upsert data in DynamoDB.
  • Copy data, modify, and insert.
const {syncTable} = require('dynamo-copy');

(async () => {
    await syncTable({
        sourceAWSConfig: { // AWS.config.update() params
            region: 'source AWS account region',
            accessKeyId: 'source AWS account access key',
            secretAccessKey: 'source AWS account secret key'
        },
        queryParams: { // dynamoDB queryParams
            TableName: 'source table name',
            KeyConditionExpression: "propertyId = :s",
            ExpressionAttributeValues: {
                ':s': 'test'
            },
            ExclusiveStartKey: null
        },
        destTableName: 'destination table name',
        destAWSConfig: { // AWS.config.update() params
            region: 'destination AWS account region',
            accessKeyId: 'destination AWS account access key',
            secretAccessKey: 'destination AWS account secret key'
        },
        fn: async (items) => { // you can modify the copy data and insert into destination table
            console.log({items});
            ...
            ...
            return items;
        },
        async: false
    })
})();
1.0.8

3 months ago

1.0.7

6 months ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago