500 error on running serverless invoke local
See original GitHub issueWhen running
$ serverless invoke local --function create --path mocks/create-event.json from https://serverless-stack.com/chapters/add-a-create-note-api.html
I get
{
"statusCode": 500,
"headers": {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Credentials": true
},
"body": "{\"status\":false}"
}
I added a log and get:
{ UnrecognizedClientException: The security token included in the request is invalid.
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Troubleshoot Lambda 502 and 500 errors - AWS
First, identify the specific Lambda Invoke API error that you receive. Then, follow the troubleshooting steps listed for that error.
Read more >Serverless invoke test returns status 500 when using Vandium
Serverless invoke test returns status 500 when using Vandium: Expected event type of apigateway but identified as unknown ; endpoint = (event, ...
Read more >Node8 Lambda function fails with "Internal Server Error" and ...
It runs perfectly on local ( npm run dev ) but when deployed, all I get is internal server error. The Cloudwatch logs...
Read more >Why does my Serverless Function work locally but not when ...
One of the common reasons for different behavior across environments is whether or not your Serverless Functions depend on packages with native dependencies....
Read more >Fix the Most Common API Gateway Request Errors - Dashbird
The next source for this error is inconsistent error mapping. Many of the errors we talked about here can become a 500 error...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had this error. It was because I forgot to create the table in DynamoDB
Found the following steps to be the solution to the exact problem -
sudo rm ~/.aws/config
andsudo rm ~/.aws/credentials
aws configure
and make sure you put the correct regionWorked for me!