Nope, prefer mopeds.

    dynamo-throughput

    0.0.1 • Public • Published

    dynamo-throughput

    Build Status

    Set and reset provisioned DynamoDB throughput

    Usage

    You can set the table's read and write capacities to perform some operation that requires a lot of throughput. After you're done, you can reset the provisioned throughput to prior levels.

    var throughput = require('dynamodb-throughput')('my-table', 'us-east-1');
    var queue = require('queue-async');
     
    queue(1)
      .defer(throughput.setCapacity, { read: 1000, write: 1000 })
      .defer(doSomethingStrenuous)
      .defer(throughput.resetCapacity)
      .awaitAll(function(err) {
        console.log(err || 'All done!');
      });

    It also works on GlobalSecondaryIndexes.

    var throughput = require('dynamodb-throughput')('my-table', 'us-east-1');
    var queue = require('queue-async');
     
    queue(1)
      .defer(throughput.setIndexCapacity, 'my-index', { read: 1000, write: 1000 })
      .defer(doSomethingStrenuous)
      .defer(throughput.resetIndexCapacity, 'my-index')
      .awaitAll(function(err) {
        console.log(err || 'All done!');
      });

    Install

    npm i dynamo-throughput

    DownloadsWeekly Downloads

    5

    Version

    0.0.1

    License

    ISC

    Last publish

    Collaborators

    • rclark