aws / aws/aws-toolkit-vscode

SAM: debug API lambda without payload

Open
#1,840 6 comments 0 reactions 0 assignees View on GitHub
feature-request sam service:apigateway
Dominant language
TypeScript
Stars
2k
Forks
807
Avg merge
10h 12m
Merged PRs (30d)
7

Description

**Desktop (please complete the following information):**

- OS: Fedora 33
- VS Code version: 1.57.1
- AWS Toolkit extension version: 1.25.0

**Question**

What I want to do is launch my API locally so that I can interact with it using the browser or something like Postman, and debug the interactions, rather than needing to specify a payload to send to the API Gateway in the launch.json. But I can't seem to figure out the right combination of options to get this to work, if it is even possible. I've tried omitting the payload from the **api** block, and specifying various combinations of **localArguments** in the **sam** block, but I get errors from the SAM CLI stating that "start-api" is (of course) not a supported argument to **invoke".

So my question is, is it possible to effectively launch the API locally so that I can interactively send it payloads while debugging the underlying Lambda, and if so how?

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the launch.json api and sam configuration described in the issue, then compare the SAM CLI start-api and invoke entry points. Done means determining whether interactive local API requests can attach to Lambda debugging and documenting the required configuration or the limitation if it is unsupported.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, vscode
Domain
api, cloud, devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.