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
60
60
` ` ` yml
61
61
custom:
62
62
dynamodb:
63
+ # If you only want to use DynamoDB Local in some stages, declare them here
64
+ stages:
65
+ - dev
63
66
start:
64
67
port: 8000
65
68
inMemory: true
Original file line number Diff line number Diff line change @@ -95,6 +95,13 @@ class ServerlessDynamodbLocal {
95
95
}
96
96
} ;
97
97
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
+
98
105
this . hooks = {
99
106
"dynamodb:migrate:migrateHandler" : this . migrateHandler . bind ( this ) ,
100
107
"dynamodb:seed:seedHandler" : this . seedHandler . bind ( this ) ,
You can’t perform that action at this time.
0 commit comments