serverless-dynamodb-local
serverless-dynamodb-local copied to clipboard
Adding custom serverless.yml properties breaks execution
Actual Behaviour
Per the suggestions in the README, I've added the following section to my serverless.yml configuration:
custom:
dynamodb:
stages:
- dev
(For clarity, my stage is defined as dev at a provider level.)
What I'm now seeing is that all commands to sls dynamodb <command> (with the env variable SLS_DEBUG=*) follow the same trajectory to failure. As an example:
$ > sls dynamodb start --migrate
Serverless: Load command config
# Other commands truncated
Serverless: Load command dynamodb
Serverless: Load command dynamodb:migrate
Serverless: Load command dynamodb:seed
Serverless: Load command dynamodb:start
Serverless: Load command dynamodb:noStart
Serverless: Load command dynamodb:remove
Serverless: Load command dynamodb:install
Serverless: Invoke dynamodb:start
Serverless: Warning: The command you entered did not catch on any hooks
Expected Behaviour
When I remove the custom yml configuration, then it behaves as expected. After the invoke logline, the command runs successfully.
Actually, digging into it, I think this is a duplicate of (or at least closely related to) #205 - my stage uses the format of stage: ${opt:stage, self:custom.defaultStage} to allow for commandline specification with a fallback of dev. Even though everything else in the yaml file reads the resulting stage value as dev, it appears that this plugin does not.
My stage value was also dynamic stage: ${opt:stage, 'local'}. Removing the stages property (and value) from my serverless.yml file fixed the issue.
custom:
dynamodb:
stages:
- local