diff --git a/resources/dynamodb-table.yml b/resources/dynamodb-table.yml index 005df13..a973acc 100644 --- a/resources/dynamodb-table.yml +++ b/resources/dynamodb-table.yml @@ -13,7 +13,5 @@ Resources: KeyType: HASH - AttributeName: noteId KeyType: RANGE - # Set the capacity based on the stage - ProvisionedThroughput: - ReadCapacityUnits: ${self:custom.tableThroughput} - WriteCapacityUnits: ${self:custom.tableThroughput} + # Set the capacity to auto-scale + BillingMode: PAY_PER_REQUEST diff --git a/serverless.yml b/serverless.yml index 4be9230..5575add 100644 --- a/serverless.yml +++ b/serverless.yml @@ -11,11 +11,6 @@ custom: stage: ${opt:stage, self:provider.stage} # Set the table name here so we can use it while testing locally tableName: ${self:custom.stage}-notes - # Set our DynamoDB throughput for prod and all other non-prod stages. - tableThroughputs: - prod: 5 - default: 1 - tableThroughput: ${self:custom.tableThroughputs.${self:custom.stage}, self:custom.tableThroughputs.default} # Load our webpack config webpack: webpackConfig: ./webpack.config.js