File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,9 @@ All the above options can be added to serverless.yml to set default configuratio
6060` ` ` yml
6161custom:
6262 dynamodb:
63+ # If you only want to use DynamoDB Local in some stages, declare them here
64+ stages:
65+ - dev
6366 start:
6467 port: 8000
6568 inMemory: true
Original file line number Diff line number Diff line change @@ -95,6 +95,13 @@ class ServerlessDynamodbLocal {
9595 }
9696 } ;
9797
98+ const stage = this . options . stage || this . service . provider . stage ;
99+ if ( this . config . stages && ! this . config . stages . includes ( stage ) ) {
100+ // don't do anything for this stage
101+ this . hooks = { } ;
102+ return ;
103+ }
104+
98105 this . hooks = {
99106 "dynamodb:migrate:migrateHandler" : this . migrateHandler . bind ( this ) ,
100107 "dynamodb:seed:seedHandler" : this . seedHandler . bind ( this ) ,
You can’t perform that action at this time.
0 commit comments