ag-common 0.0.95 → 0.0.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -20,10 +20,12 @@ const enforceDynamoProvisionCap = ({ tables, readsMax = 25, writesMax = 25, }) =
|
|
|
20
20
|
const reads = extractSum({ str: s, regex: /readCapacityUnits.*/gim });
|
|
21
21
|
const writes = extractSum({ str: s, regex: /writeCapacityUnits.*/gim });
|
|
22
22
|
if (reads > readsMax) {
|
|
23
|
-
|
|
23
|
+
(0, log_1.warn)(`dynamo table provisioned reads:${reads} greater than max:${readsMax}`);
|
|
24
|
+
throw new Error('exceeded dynamo provision cap');
|
|
24
25
|
}
|
|
25
26
|
if (writes > writesMax) {
|
|
26
|
-
|
|
27
|
+
(0, log_1.warn)(`dynamo table provisioned writes:${writes} greater than max:${writesMax}`);
|
|
28
|
+
throw new Error('exceeded dynamo provision cap');
|
|
27
29
|
}
|
|
28
30
|
(0, log_1.warn)(`dynamo provisioned total: R=${reads} W=${writes}`);
|
|
29
31
|
};
|