Product
Introducing Ruby Support in Socket
Socket is launching Ruby support for all users. Enhance your Rails projects with AI-powered security scans for vulnerabilities and supply chain threats. Now in Beta!
dynamo-replicator
Advanced tools
Lambda-ready npm package for replicating DynamoDB tables within or between regions.
Lambda-ready npm package for replicating DynamoDB tables within or between regions.
Supports one-way replication (single master to slave(s))
You'll need NodeJS and NPM installed on your local machine.
Add a stream to the DynamoDB table you want to use as your master.
Alternatively, if you want to provision your DynamoDB table with CloudFormation add the StreamSpecification
property to the AWS::DynamoDB::Table
object, e.g.
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"myTable": {
"TableName": "mytable",
"StreamSpecification": {
"StreamViewType": "NEW_IMAGE"
}
}
}
}
package.json
and another called index.js
.package.json
and save {}
as the contents of that file.npm install --save dynamo-replicator es6-promise
index.js
and save the contents of the file shown below (changing SLAVE-REGION
and SLAVE-TABLE
to be the region and table name of the DynamoDB to be replicated to).dynamodb::PutItem
and dynamodb::DeleteItem
on the slave table.dynamodb-replicator
and for Code entry type select Upload a .ZIP file and choose the zip file created earlier.SLAVE-REGION
and SLAVE-TABLE
in index.js
each time and re-zipping for each slave.Contents of index.json
:
'use strict';
require('es6-promise').polyfill();
var replicator = require('dynamo-replicator')({
region: 'SLAVE-REGION',
table: 'SLAVE-TABLE'
});
exports.handler = function(event, context) {
replicator.process(event)
.then(function() {
context.succeed('success');
})
.catch(function(err) {
context.fail(err);
});
};
FAQs
Lambda-ready npm package for replicating DynamoDB tables within or between regions.
The npm package dynamo-replicator receives a total of 0 weekly downloads. As such, dynamo-replicator popularity was classified as not popular.
We found that dynamo-replicator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket is launching Ruby support for all users. Enhance your Rails projects with AI-powered security scans for vulnerabilities and supply chain threats. Now in Beta!
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.