Currently, the validation only checks for null values in the readCapacity and writeCapacity fields (both for PROVISIONED and PAY_PER_REQUEST billing modes).
However, a DescribeTableRequest will return a 0 (zero) value for both readCapacity and writeCapacity, which will fail the validation of a PAY_PER_REQUEST table.
This PR updates the checks to validate a non-zero, positive value for PROVISIONED tables and a null or smaller or equal to zero value for PAY_PER_REQUEST tables.
resolves #642
Currently, the validation only checks for
null
values in thereadCapacity
andwriteCapacity
fields (both forPROVISIONED
andPAY_PER_REQUEST
billing modes).However, a
DescribeTableRequest
will return a0
(zero) value for bothreadCapacity
andwriteCapacity
, which will fail the validation of aPAY_PER_REQUEST
table.Furthermore, a
0
(zero) value forreadCapacity
andwriteCapacity
will pass validation, whereas those values are below the minimum required values for aPROVISIONED
table (see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ServiceQuotas.html#default-limits-throughput-capacity-modes).This PR updates the checks to validate a non-zero, positive value for
PROVISIONED
tables and a null or smaller or equal to zero value forPAY_PER_REQUEST
tables.