I got this error during start a SAM local API
Error: [InvalidResourceException(‘TableSizeMapping’, ‘property BillingMode not defined for resource of type AWS::Serverless::SimpleTable’)] (‘TableSizeMapping’, ‘property BillingMode not defined for resource of type AWS::Serverless::SimpleTable’)
This is my table resource definition
TableSizeMapping:
Type: AWS::Serverless::SimpleTable
Properties:
TableName: !Sub "${AWS::StackName}-sizemapping"
PrimaryKey:
Name: _id
Type: String
BillingMode: PAY_PER_REQUEST
When I remove the BillingMode property, it works fine.
According to the document: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-simpletable.html
If ProvisionedThroughput
is not specified BillingMode
will be specified as PAY_PER_REQUEST
.
So do I need to explicitly provide the BillingMode value for AWS::Serverless::SimpleTable resources?
Thanks for reading.