Which solution will enable this change?
Add values for the rcuCount and wcuCount parameters to the Mappings section of the template. Configure DynamoDB to provision throughput capacity using the stack’s mappings.
Add values for two Number parameters, rcuCount and wcuCount, to the template. Replace the hard-coded values with calls to the Ref intrinsic function, referencing the new parameters.
Add values for the rcuCount and wcuCount parameters as outputs of the template. Configure DynamoDB to provision throughput capacity using the stack outputs.
Add values for the rcuCount and wcuCount parameters to the Mappings section of the template. Replace the hard-coded values with calls to the Ref intrinsic function, referencing the new parameters.
Explanations:
The Mappings section is used for static data, not for dynamically configuring parameters like read and write capacity units. The Ref function cannot reference mappings to dynamically configure throughput.
By adding rcuCount and wcuCount as parameters and using the Ref function to reference them, the throughput capacity can be independently configured when creating the table. This is the correct way to make the read and write capacity configurable at runtime.
Outputs are used to return values after the stack is created, not for configuring resources dynamically during creation. DynamoDB table configuration must happen at stack creation time, not after.
The Mappings section is not meant for parameterization or dynamic configuration. The Ref function works with parameters, not mappings, and thus this approach does not provide the required flexibility.