clarkie / dynogels

DynamoDB data mapper for node.js. Originally forked from https://github.com/ryanfitz/vogels
Other
491 stars 110 forks source link

Enable On-Demand Billing Mode #182

Open aneilbaboo opened 5 years ago

aneilbaboo commented 5 years ago

In November, AWS released On-Demand mode: https://aws.amazon.com/blogs/aws/amazon-dynamodb-on-demand-no-capacity-planning-and-pay-per-request-pricing/

It would be great to have support for this: It's enabled by setting a new BillingMode attribute to 'PAY_PER_REQUEST' in the AWS table configuration JSON.

Maybe something like:

var Account = dynogels.define('MyTable', {
  hashKey : 'id',
  billingMode: 'PAY_PER_REQUEST', // default is 'PROVISIONED'
  schema : {
   id: ...
  }
});