Goal
I am trying to start up Dynamodb local using the following command
yarn start:beta
Which calls this script
source ./scripts/prod-assumerole.sh && SLS_DEBUG=* sls offline start --region us-east-1 --stage local-beta --inMemory true --migrate true --seed local --noAuth true --dontPrintOutput
Problem
This call fails with the error linked at the end of this post. If I navigate to localhost:8000/shell, the aws local was loaded, but there were no tables.
Previous Attempts
- We have tried using different versions of java. Current version is 13.0.2
- We tried removing the node_modules folder and the .dynamodb folder, and then reinstalling them using yarn
- We confirmed that serverless was installed (version info below)
Serverless: Running "serverless" installed locally (in service node_modules)
Framework Core: 1.54.0
Plugin: 3.1.2
SDK: 2.1.2
Components Core: 1.1.1
Components CLI: 1.4.0
Questions
Does anyone have any idea of what could be causing this error?
Or does anyone have any troubleshooting ideas?
Error Message
UnknownError: Not Found: DynamoDB - Error -
Unknown Error ------------------------------------------
UnknownError: Not Found
at Request.extractError (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/protocol/json.js:48:27)
at Request.callListeners (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at Request.emit (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/request.js:685:12)
at Request.callListeners (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
at Request.emit (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/request.js:685:12)
at Request.callListeners (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
at callNextListener (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/sequential_executor.js:95:12)
at IncomingMessage.onEnd (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless-dynamodb-local/node_modules/aws-sdk/lib/event_listeners.js:269:13)
at IncomingMessage.emit (events.js:215:7)
at IncomingMessage.EventEmitter.emit (domain.js:475:20)
at endReadableNT (_stream_readable.js:1184:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
From previous event:
at PluginManager.invoke (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless/lib/classes/PluginManager.js:505:22)
at /Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless/lib/classes/PluginManager.js:540:24
From previous event:
at PluginManager.run (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless/lib/classes/PluginManager.js:540:8)
at /Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless/lib/Serverless.js:115:33
at processImmediate (internal/timers.js:439:21)
at process.topLevelDomainCallback (domain.js:130:23)
From previous event:
at Serverless.run (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless/lib/Serverless.js:102:74)
at /Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless/bin/serverless.js:72:30
at /Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless/node_modules/fs-extra/node_modules/graceful-fs/graceful-fs.js:111:16
at /Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:111:16
at /Users/myUser/Documents/GitHub/myRepoName/node_modules/archiver-utils/node_modules/graceful-fs/graceful-fs.js:43:10
at /Users/myUser/Documents/GitHub/myRepoName/node_modules/decompress/node_modules/graceful-fs/graceful-fs.js:43:10
at /Users/myUser/Documents/GitHub/myRepoName/node_modules/write-file-atomic/node_modules/graceful-fs/graceful-fs.js:43:10
at /Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless/node_modules/write-file-atomic/node_modules/graceful-fs/graceful-fs.js:43:10
at /Users/myUser/Documents/GitHub/myRepoName/node_modules/@serverless/platform-sdk/node_modules/graceful-fs/graceful-fs.js:43:10
at /Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:45:10
at FSReqCallback.oncomplete (fs.js:146:23)
From previous event:
at /Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless/bin/serverless.js:72:8
at processImmediate (internal/timers.js:439:21)
at process.topLevelDomainCallback (domain.js:130:23)
From previous event:
at Object.<anonymous> (/Users/myUser/Documents/GitHub/myRepoName/node_modules/serverless/bin/serverless.js:57:4)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
at internal/main/run_main_module.js:17:11
We discovered that I had accidentally modified my /etc/hosts file and deleted a reference to localhost.
After I added back in the following, I was able to start dynamodblocal without any issues:
We discovered this issue by testing starting dynamodblocal with and without my vpn connected. It worked while unconnected, but failed while connected (and localhost:3000 would not resolve and was displaying an error). This prompted us to check the 'etc/hosts' file which was indeed missing those references.