Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAM/Lambda: better support for API-based lambdas (APIGateway) #2455

Open
JadenSimon opened this issue Jan 28, 2022 · 4 comments
Open

SAM/Lambda: better support for API-based lambdas (APIGateway) #2455

JadenSimon opened this issue Jan 28, 2022 · 4 comments
Labels
feature-request New feature or enhancement. May require GitHub community feedback. lambda sam service:apigateway

Comments

@JadenSimon
Copy link
Contributor

JadenSimon commented Jan 28, 2022

Parent issue to track features or improvements regarding API-based lambdas.

Proposed new features:

General improvements and bug fixes:

  • Uniform timeouts
    • Toolkit currently polls for a set amount of time to wait for the server to start
  • Better discoverability
    • It's not obvious how to configure things for anything more complex than a 'HelloWorld' project
  • Better logging during executions (less noise)
  • Fail faster
    • Improve the experience by finding common issues with configurations (wrong path, wrong method, etc.)
  • Less restrictions on payloads: SAM debug configurations don't allow non-JSON payloads to send to API #2478
@JadenSimon JadenSimon added feature-request New feature or enhancement. May require GitHub community feedback. sam lambda labels Jan 28, 2022
@JadenSimon JadenSimon changed the title SAM: better support for API-based lambdas SAM/Lambda: better support for API-based lambdas Jan 28, 2022
@justinmk3
Copy link
Contributor

Uniform timeouts

We could have very large timeouts if the Toolkit correctly handled VSCode debugger "Stop" button (assuming VSCode gives us a way to do this). Or as a workaround we could present a progress status w/ "Cancel" button.

@JadenSimon
Copy link
Contributor Author

JadenSimon commented Feb 1, 2022

Yeah, many of the timeouts (in the run/debug flow) seem to be more like workarounds rather than features. We still want to know if a process is hanging, but I think it's best if we give the user the final choice in cancelling an operation. The automatic cancellation has caused a lot of issues.

@justinmk3 justinmk3 changed the title SAM/Lambda: better support for API-based lambdas SAM/Lambda: better support for API-based lambdas (APIGateway) Mar 23, 2022
@bryantqo
Copy link

bryantqo commented Mar 31, 2022

I would also like to see being able to "attach" to an externally running instance of start-api i.e. in a terminal window I run sam local start-api -p 1234 -d 1235 and then be able to attach to that process on port 1235 without needing to define a payload. The debugging session would then remain "open" for all requests coming in. Additionally the ability for it to continue without a debugger attached is crucial. To that effect I would love it if:

  1. For invokeTarget.type = "api" a nvokeTarget.logicalId would not be required
  2. The debugging session to be smart enough to know how, based on the resulting function called, to properly connect to the correct source
  3. Remove the api definition from being required
  4. Do not automatically break on the entrypoint
  5. Able to attach to an already running start-api

@justinmk3
Copy link
Contributor

@bryantqo I added some notes to #2535 to try to capture your idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or enhancement. May require GitHub community feedback. lambda sam service:apigateway
Projects
None yet
Development

No branches or pull requests

3 participants