Currently you can specify provisioned capacity and BillingMode: PAY_PER_REQUEST for a DynamoDB table and CloudFormation will process the resource without errors. In that case the provisioned capacity settings are prioritized over the billing mode, resulting in the table still being set to BillingMode: PROVISIONED.
I propose that cfn-lint checks that BillingMode: PAY_PER_REQUEST and provisioned capacity on a table and its global indexes are mutually exclusive.
Ran into a similar issue myself, so I am currently writing the supporting code. Hope to have a PR this week for this.
@cmmeyer this seems like a weird one. I'm going to put this one as an Error and you can debate me later on it. Error not because it will fail but it won't do what you ask it to do.
This is a weird one I just dealt with myself (switched an architecture to use PAY_PER_REQUEST) -- it gets even weirder in-so-much as BillingMode doesn't even show up on describe calls. I'm cool with whatever normalizes the experience.
Most helpful comment
Ran into a similar issue myself, so I am currently writing the supporting code. Hope to have a PR this week for this.