Great tutorial … I have started part 2 of the tutorial but after I deployed the code I noticed that create returns:
serverless invoke local --function create --path mocks/create-event.json
{
"statusCode": 500,
"headers": {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Credentials": true
},
"body": "{\"status\":false}"
}
I added logging to catch the error and it looks like an issue with finding the dynamodb resource. I’ve been reading a lot of the threads and have seen similar issues but can’t seem to narrow down whats going on here. Can anyone shed some light on this issue?
{ ResourceNotFoundException: Requested resource not found
at Request.extractError (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/protocol/json.js:48:27)
at Request.callListeners (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at Request.emit (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/request.js:685:12)
at Request.callListeners (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
at Request.emit (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/request.js:685:12)
at Request.callListeners (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
at callNextListener (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/sequential_executor.js:95:12)
at IncomingMessage.onEnd (/Users/dave/work/serverless-stack/serverless-stack-2-api/node_modules/aws-sdk/lib/event_listeners.js:269:13)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
message: 'Requested resource not found',
code: 'ResourceNotFoundException',
time: 2018-10-07T12:49:04.221Z,
requestId: '8SDBLHNHSOLKO98K0OO1V2AAMRVV4KQNSO5AEMVJF66Q9ASUAAJG',
statusCode: 400,
retryable: false,
retryDelay: 21.45806630394238 }
{
"statusCode": 500,
"headers": {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Credentials": true
},
"body": "{\"status\":false}"
}