serverless-dynamodb-local
serverless-dynamodb-local copied to clipboard
migrate does not work with higher version of node over 16
https://stackoverflow.com/questions/71799147/serverless-offline-dynamodb-throws-local-unknownendpoint-inaccessible-host-l
After getting the new message, "We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023." I decided to migrate my app to AWS SDK v3, it was a lot of work, but I was happy to be able to use Node 18 finally. Just to found out that this plugin is not supporting it :(
Do you know if any fixes are coming soon? Looks like we're getting this issue when the migrate or seed options are set to true in serverless.yml
I run on node v16.19.1
in Github actions and missing dynamodb migrate
command:
npx serverless help
...
ServerlessDynamodbLocal
dynamodb
dynamodb create
dynamodb execute
dynamodb executeAll
dynamodb start
dynamodb remove
dynamodb install
> serverless dynamodb migrate
Environment: linux, node 16.19.1, framework 3.28.1 (local), plugin 6.2.3, SDK 4.3.2
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
Serverless command "dynamodb migrate" not found. Run "serverless help" for a list of all available commands.
1 deprecation found: run 'serverless doctor' for more details
Error: Process completed with exit code 1.
Locally, on the same node version, or even v18 I can see serverless dynamodb migrate
, and it works just fine.
Here is my config:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup local DynamoDB
run: docker run -d -p 8000:8000 amazon/dynamodb-local
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm i
- run: npx serverless dynamodb migrate
Any ideas?
Aha! it's probably because serverless dynamodb migrate
has been quietly replaced with serverless dynamodb create
Just to be clear, I'm speaking about the options from serverless.yml
dynamodb:
stages:
- 'local'
start:
port: 8000
inMemory: true
heapInitial: 200m
heapMax: 1g
migrate: true
seed: true
convertEmptyValues: true