serverless-dynamodb-local
serverless-dynamodb-local copied to clipboard
Plugin not working after upgrading to SLS v3
Actual Behaviour
After updating serverless to v3, I get the following error:
npx sls dynamodb migrate --stage test
Environment: darwin, node 14.18.1, framework 3.7.1 (local), plugin 6.1.5, SDK 4.3.2
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
Cannot resolve serverless.yml: Variables resolution errored with:
- Cannot resolve variable at "provider.environment": Value not found at "file" source
Expected Behaviour
Start dynamodb local as usual
Steps to reproduce it
Install serverless@3 run `sls dynamodb migrate``
LogCat for the issue
Screenshots of the issue
Would you like to work on the issue?
Getting a different error with v3 when running:
sls dynamodb install
TypeError: Cannot convert undefined or null to object
Hello @henhal,
I found a similar issue when running yarn sls dynamodb seed
after upgrading to v3. However, if you modify the command to be STAGE={yourStageNameHere} yarn sls dynamodb seed .......
, this fixed the issue for me.
Also having provider.stage: ${env:STAGE} set in the serverless.yml will be required.
I hope this helps as I just discovered this now :)