Skip to content

Commit cafa694

Browse files
committed
Support on-demand read capacity
1 parent df76c1f commit cafa694

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/dynamo-archive.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@ dynamo.describeTable(
6868
if (data == null) {
6969
throw 'Table ' + argv.table + ' not found in DynamoDB';
7070
}
71+
const rcu = data.Table.ProvisionedThroughput.ReadCapacityUnits;
7172
var params = {
7273
TableName: argv.table,
7374
ReturnConsumedCapacity: 'NONE',
74-
Limit: data.Table.ProvisionedThroughput.ReadCapacityUnits
75+
Limit: rcu > 0 ? rcu : 1000
7576
};
7677
if (argv.index) {
7778
params.IndexName = argv.index

0 commit comments

Comments
 (0)