From 35608f1e0a9bebbf998bb1330bbae0090262e940 Mon Sep 17 00:00:00 2001 From: Jay Date: Thu, 18 Jul 2019 14:32:49 -0400 Subject: [PATCH] Testing auto scaling for Dynamo --- resources/dynamodb-table.yml | 6 ++---- serverless.yml | 5 ----- 2 files changed, 2 insertions(+), 9 deletions(-) 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