Skip to content

Commit

Permalink
Testing auto scaling for Dynamo
Browse files Browse the repository at this point in the history
  • Loading branch information
jayair committed Jul 18, 2019
1 parent e837b16 commit 35608f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
6 changes: 2 additions & 4 deletions resources/dynamodb-table.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 0 additions & 5 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 35608f1

Please sign in to comment.