Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dynamodb-backup-restore

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamodb-backup-restore

NPM package for Backup and Restore AWS DynamoDB

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
256
decreased by-36.63%
Maintainers
1
Weekly downloads
 
Created
Source

dynamodb-backup-restore

This tool supports following functionality:

  • Full backup AWS DynamoDb table to Amazon S3 bucket within or between regions.
  • Incremental backup AWS DynamoDb table to Amazon S3 bucket within or between regions.
  • AWS Lambda based incremental backup AWS DynamoDb tableto Amazon S3 bucket within or between regions.
  • Restore AWS DynamoDb table from Amazon S3 bucket within or between regions.
  • Deploy and configure Amazon S3 backup bucket.
  • Deploy, configure AWS Lambda and add event source.

Built on NodeJS calsses and ECMAScript 2015 (ES6).

It can be used independently and as a dependency in your code.

Usage samples

Full backup

$ 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

Incremental backup

$ 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

AWS Lambda based incremental backup

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);
        });
    }
}

Restore

$ 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

Keywords

FAQs

Package last updated on 02 Aug 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc