Skip to content

Commit

Permalink
Support on-demand read capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
rickythefox committed Jun 6, 2023
1 parent df76c1f commit cafa694
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/dynamo-archive.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ dynamo.describeTable(
if (data == null) {
throw 'Table ' + argv.table + ' not found in DynamoDB';
}
const rcu = data.Table.ProvisionedThroughput.ReadCapacityUnits;
var params = {
TableName: argv.table,
ReturnConsumedCapacity: 'NONE',
Limit: data.Table.ProvisionedThroughput.ReadCapacityUnits
Limit: rcu > 0 ? rcu : 1000
};
if (argv.index) {
params.IndexName = argv.index
Expand Down

0 comments on commit cafa694

Please sign in to comment.