Skip to content

Commit 1f5c257

Browse files
committed
Fix: add BillingMode support (DynamoDb on-demand)
1 parent 1cc7d1b commit 1f5c257

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,15 @@ class ServerlessDynamodbLocal {
304304
if (migration.Tags) {
305305
delete migration.Tags;
306306
}
307+
if (migration.BillingMode) {
308+
delete migration.BillingMode;
309+
if (!migration.ProvisionedThroughput) {
310+
migration.ProvisionedThroughput = {
311+
ReadCapacityUnits: 5,
312+
WriteCapacityUnits: 5
313+
};
314+
}
315+
}
307316
dynamodb.raw.createTable(migration, (err) => {
308317
if (err) {
309318
if (err.name === 'ResourceInUseException') {

0 commit comments

Comments
 (0)