Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
dynamodb-backup-restore
Advanced tools
This tool supports following functionality:
Built on NodeJS classes and ECMAScript 2015 (ES6).
It can be used independently and as a dependency in your code.
$ gulp backup-full --s3bucket <bucket> --s3prefix <prefix> --s3region <region> --dbtable <table> --dbregion <region>
Options:
--s3bucket (required) Amazon S3 backup bucket name
--s3prefix (optional) subfolder for backup(recomend use AWS DynamoDb table name)
--s3region (required) AWS Region for Amazon S3 backup bucket
--dbtable (required) AWS DynamoDb table name
--dbregion (required) AWS Region for AWS DynamoDb table
const Backup = require('dynamodb-backup-restore').Backup;
let config = {
S3Bucket: 'STRING_VALUE', /* required */
S3Prefix: 'STRING_VALUE', /* optional */
S3Region: 'STRING_VALUE', /* required */
DbTable: 'STRING_VALUE', /* required */
DbRegion: 'STRING_VALUE' /* required */
};
let backup = new Backup(config);
backup.full();
$ gulp backup-incremental --s3bucket <bucket> --s3prefix <prefix> --s3region <region> --dbtable <table> --dbregion <region>
Options:
--s3bucket (required) Amazon S3 backup bucket name
--s3prefix (optional) subfolder for backup(recomend use AWS DynamoDb table name)
--s3region (required) AWS Region for Amazon S3 backup bucket
--dbtable (required) AWS DynamoDb table name
--dbregion (required) AWS Region for AWS DynamoDb table
const Backup = require('dynamodb-backup-restore').Backup;
let config = {
S3Bucket: 'STRING_VALUE', /* required */
S3Prefix: 'STRING_VALUE', /* optional */
S3Region: 'STRING_VALUE', /* required */
DbTable: 'STRING_VALUE', /* required */
DbRegion: 'STRING_VALUE' /* required */
};
let backup = new Backup(config);
backup.incremental();
const Backup = require('dynamodb-backup-restore').Backup;
module.exports.handler = (event, context, callback) => {
if (!event.Records) {
callback('There are no items to process.');
}
else {
let config = {
S3Bucket: 'STRING_VALUE', /* required */
S3Region: 'STRING_VALUE', /* required */
S3Prefix: 'STRING_VALUE' /* optional */
};
let backup = new Backup(config);
backup.fromDbStream(event.Records).then(() => {
callback();
}).catch(err => {
callback(err);
});
}
}
$ gulp restore --s3bucket <bucket> --s3prefix <prefix> --s3region <region> --dbtable <table> --dbregion <region>
Options:
--s3bucket (required) Amazon S3 backup bucket name
--s3prefix (optional) subfolder for backup(recomend use AWS DynamoDb table name)
--s3region (required) AWS Region for Amazon S3 backup bucket
--dbtable (required) AWS DynamoDb table name
--dbregion (required) AWS Region for AWS DynamoDb table
const Restore = require('dynamodb-backup-restore').Restore;
let config = {
S3Bucket: 'STRING_VALUE', /* required */
S3Prefix: 'STRING_VALUE', /* optional */
S3Region: 'STRING_VALUE', /* required */
DbTable: 'STRING_VALUE', /* required */
DbRegion: 'STRING_VALUE', /* required */
RestoreTime:'STRING_VALUE' /* optional */
};
Restore(config);
$ gulp deploy-s3-bucket --s3bucket <bucket> --s3region <region>
Options:
--s3bucket (required) Amazon S3 backup bucket name
--s3region (required) AWS Region for Amazon S3 backup bucket
const Deploy = require('dynamodb-backup-restore').Deploy;
let config = {
S3Bucket: 'STRING_VALUE', /* required */
S3Region: 'STRING_VALUE' /* required */
};
let deploy = new Deploy(config);
deploy.backupBucket();
$ gulp deploy-lambda --s3bucket <bucket> --s3prefix <prefix> --s3region <region> --dbregion <region> --lName <lambdaName> --lRegion <region> --lAlias <lambdaAlias> --lRoleName <lambdaRole>
Options:
--s3bucket (required) Amazon S3 backup bucket name
--s3prefix (optional) subfolder for backup(recomend use AWS DynamoDb table name)
--s3region (required) AWS Region for Amazon S3 backup bucket
--dbregion (required) AWS Region for AWS DynamoDb table
--lName (required) AWS Lambda Function Name
--lRegion (required) AWS Region for AWS Lambda Funtion
--lAlias (required) AWS Lambda Function Alias
--lRoleName (required) AWS Lambda Function Execution Role
const Deploy = require('dynamodb-backup-restore').Deploy;
let config = {
S3Bucket: 'STRING_VALUE', /* required */
S3Prefix: 'STRING_VALUE', /* optional */
S3Region: 'STRING_VALUE', /* required */
DbRegion: 'STRING_VALUE', /* required */
LambdaName: 'STRING_VALUE', /* required */
LambdaRegion: 'STRING_VALUE', /* required */
LambdaAlias: 'STRING_VALUE', /* required */
LambdaRoleName: 'STRING_VALUE' /* required */
};
let deploy = new Deploy(config);
deploy.lambda();
$ gulp deploy-lambda-event --dbtable <table> --dbregion <region> --lName <lambdaName> --lRegion <region> --lAlias <lambdaAlias>
Options:
--dbtable (required) AWS DynamoDb table name
--dbregion (required) AWS Region for AWS DynamoDb table
--lName (required) AWS Lambda Function Name
--lRegion (required) AWS Region for AWS Lambda Funtion
--lAlias (required) AWS Lambda Function Alias
const Deploy = require('dynamodb-backup-restore').Deploy;
let config = {
DbTable: 'STRING_VALUE', /* required */
DbRegion: 'STRING_VALUE', /* required */
LambdaName: 'STRING_VALUE', /* required */
LambdaRegion: 'STRING_VALUE', /* required */
LambdaAlias: 'STRING_VALUE' /* required */
};
let deploy = new Deploy(config);
deploy.lambdaEvent();
FAQs
NPM package for Backup and Restore AWS DynamoDB
We found that dynamodb-backup-restore demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.