question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run sam local start-api in debug mode since upgrade to 0.2.7

See original GitHub issue

Starting up sam local for debugging with following command: sam local start-api -p 3010 -d 5858

Also tried setting the SAM_LOCAL_DEBUG environment variable. export SAM_LOCAL_DEBUG=5858

In both cases, when sending a request to an endpoint on the api on port 3010, i can see the lambda gets invoked, but an exception is thrown before going in debug mode.

2018/02/27 21:44:24 Invoking specs_get_all.handler (nodejs6.10)
2018/02/27 21:44:24 Mounting /Users/user/development/bitbucket/cda-validation-services/aggregate-service as /var/task:ro inside runtime container
2018/02/27 21:44:25 Function returned an invalid response (must include one of: body, headers or statusCode in the response object): unexpected end of JSON input

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:9
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
sanathkrcommented, Mar 2, 2018

Fixed and created a new release 0.2.8

0reactions
sanathkrcommented, Jul 5, 2018

@makskant Can you cut a new issue so we can start tracking this separately? Do mention the version of Python, version of SAM CLI, platform etc so we can debug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to run sam local start-api in debug mode ... - GitHub
I'm seeing a similar problem with a java8 runtime function, also since upgrading from 0.2.6 to 0.2.7. sam local invoke -t lambda-stack.yaml -d ......
Read more >
sam local start-api - AWS Serverless Application Model
The AWS SAM CLI first tries to locate a template file built using the sam build command, located in the .aws-sam subfolder, and...
Read more >
How to debug application made by AWS SAM in VSCode?
I made Go application by AWS SAM. Now I try to debug this sample application in VSCode, but It fails so I want...
Read more >
Debug Serverless AWS Lambda Functions locally with SAM ...
A tutorial on debugging Amazon Web Services (AWS) Lambda ... This script runs the SAM CLI in debug mode and expects a path...
Read more >
How to setup a Serverless application with AWS SAM and ...
TLDR; AWS Serverless Application Model (SAM) is used to quickly ... run nodemon --exec sam build next to the command sam local start-api...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found