# Error property BillingMode not defined during start a sam local API

**URL:** <https://forum.serverless.com/t/error-property-billingmode-not-defined-during-start-a-sam-local-api/15443>\
**Category:** Serverless Framework\
**Tags:** aws, cloudformation\
**Created:** [June 30, 2021, 2:29am UTC](https://forum.serverless.com/t/error-property-billingmode-not-defined-during-start-a-sam-local-api/15443 "2021-06-30T02:29:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hsnamIT](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/hsnamit/32/5921_2.png) [@hsnamIT](https://forum.serverless.com/u/hsnamIT)\
**Post date:** [June 30, 2021, 2:29am UTC](https://forum.serverless.com/t/error-property-billingmode-not-defined-during-start-a-sam-local-api/15443/1 "2021-06-30T02:29:05Z")

</div>

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

```auto
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](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.

---

<div class="post-metadata">

**Author:** ![bfieber](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/bfieber/32/653_2.png) [@bfieber](https://forum.serverless.com/u/bfieber)\
**Post date:** [July 6, 2021, 3:20pm UTC](https://forum.serverless.com/t/error-property-billingmode-not-defined-during-start-a-sam-local-api/15443/2 "2021-07-06T15:20:33Z")

</div>

> [@hsnamIT](#):
>
> So do I need to explicitly provide the BillingMode value for AWS::Serverless::SimpleTable resources?

Nope… There is not property named BillingMode on the SimpleTable resource.  
It can be implied by the lack of a `ProvisionedThroughput` property.  
That is, you can explicitly define ProvisionedThroughput, or leave it off for PAY\_PER\_REQUEST.

---

<div class="post-metadata">

**Author:** ![hsnamIT](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/hsnamit/32/5921_2.png) [@hsnamIT](https://forum.serverless.com/u/hsnamIT)\
**Post date:** [July 6, 2021, 5:40pm UTC](https://forum.serverless.com/t/error-property-billingmode-not-defined-during-start-a-sam-local-api/15443/3 "2021-07-06T17:40:40Z")

</div>

Oh, that’s so.  
Thanks for your helping.
