Description
Set a DynamoDB table’s BillingMode to PAY_PER_REQUEST or PROVISIONED.
Potential impact
An unsupported value can interrupt deployment when CloudFormation creates or updates the table.
Remediation
Choose a mode that fits the workload’s traffic and costs. If you select PROVISIONED or omit BillingMode and use that default, set the read and write capacity in ProvisionedThroughput.
Examples
The second excerpt replaces the invalid PayPal value with on-demand PAY_PER_REQUEST. Supply the table’s key schema and attribute definitions for deployment.
Before
yaml
Resources:
Table:
Type: AWS::DynamoDB::Table
Properties:
TableName: myTable
BillingMode: PayPal
After
yaml
Resources:
Table:
Type: AWS::DynamoDB::Table
Properties:
TableName: myTable
BillingMode: PAY_PER_REQUEST