Skip to content

Commit 35608f1

Browse files
committed
Testing auto scaling for Dynamo
1 parent e837b16 commit 35608f1

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

resources/dynamodb-table.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,5 @@ Resources:
1313
KeyType: HASH
1414
- AttributeName: noteId
1515
KeyType: RANGE
16-
# Set the capacity based on the stage
17-
ProvisionedThroughput:
18-
ReadCapacityUnits: ${self:custom.tableThroughput}
19-
WriteCapacityUnits: ${self:custom.tableThroughput}
16+
# Set the capacity to auto-scale
17+
BillingMode: PAY_PER_REQUEST

serverless.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ custom:
1111
stage: ${opt:stage, self:provider.stage}
1212
# Set the table name here so we can use it while testing locally
1313
tableName: ${self:custom.stage}-notes
14-
# Set our DynamoDB throughput for prod and all other non-prod stages.
15-
tableThroughputs:
16-
prod: 5
17-
default: 1
18-
tableThroughput: ${self:custom.tableThroughputs.${self:custom.stage}, self:custom.tableThroughputs.default}
1914
# Load our webpack config
2015
webpack:
2116
webpackConfig: ./webpack.config.js

0 commit comments

Comments
 (0)