How to debug locally?
Problem
Hi, this isn't really a bug but more a general question about using Lambda and JAWS. With a typical Node server I'm used to pointing my mobile app to the locally running server so I can debug in my IDE during development. How can this be accomplished when using Lambda and JAWS? As I understand it, there are two ways to call Lambda functions, either directly through the AWS SDK or via REST API calls. It seems neither of these would be available on my local machine, as the SDK would be calling to Amazon, API Gateway also points to Amazon, and calling the REST API some other way wouldn't be possible without something like Express running as part of the app. I'm very interested in trying JAWS but I just want to understand how I can run and debug locally like I do today before deploying my functions. Thanks.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: How to debug locally?
Although dev / prod parity and deploying to stages for testing is certainly ideal, I think many developers are going to expect support for local development environments. We've just started experimenting with JAWS in our dev team and are quite excited about it. One of the immediate questions from our developers, however, was "how do I run it locally". We're interested in implementing a utility t
Trust Score
6 verifications
- 1
Although dev / prod parity and deploying to stages for testing is certainly idea
Although dev / prod parity and deploying to stages for testing is certainly ideal, I think many developers are going to expect support for local development environments.
- 2
We've just started experimenting with JAWS in our dev team and are quite excited
We've just started experimenting with JAWS in our dev team and are quite excited about it. One of the immediate questions from our developers, however, was "how do I run it locally".
- 3
We're interested in implementing a utility to read the API gateway config and em
We're interested in implementing a utility to read the API gateway config and emulate the routing to the appropriate lambda functions. We'll likely be looking at a docker-based solution so that everything is in a linux environment. Will certainly update the community if / when we begin work on it, although I don't anticipate any work on it soon.
Validation
Resolved in serverless/serverless GitHub issue #281. Community reactions: 24 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep