API Gateway emulator: HTTP proxy integration so non-Lambda backends share the emulator origin
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 503
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 18
Description
### Describe the feature
The Lambda Test Tool v2 **API Gateway emulator** today models routes as **Lambda integrations only** (HTTP → `APIGatewayProxyRequest` / HTTP API v2 JSON → Runtime API).
Real API Gateway also supports **HTTP proxy integrations**. Locally, teams often need the same: some routes are Lambda, others are plain HTTP (Kestrel, containers, App Runner, etc.), but callers should keep **one emulator base URL / origin**.
Please add an optional route integration type on the emulator:
- **`Lambda`** (default) — current behavior.
- **`Http`** — reverse-proxy the incoming HTTP request to a configured `Endpoint` URL. Do **not** wrap the body as an API Gateway Lambda event. The client still talks to the emulator; the emulator talks to the HTTP process.
### Use Case
Mixed local topologies where a frontend (or other clients) already call the emulator host for API Gateway. If a backend is not a Lambda, there is today no way for that route to stay on the **same emulator domain**, so callers must switch origin. An HTTP proxy integration closes that gap and mirrors API Gateway’s HTTP integration concept (emulator fidelity for local inner-loop).
### Proposed Solution
- Extend emulator route config with `IntegrationType` (`Lambda` | `Http`) and reuse `Endpoint` for the HTTP target when `Http`.
- Validate that `Http` routes have an absolute `http(s)` endpoint.
- Keep Lambda translation as the default; no change for existing configs.
- Tests covering HTTP proxy passthrough (status, headers, body) vs Lambda path.
Out of scope for this request:
- gRPC / HTTP/2 trailers (same “share emulator origin” idea later; needs HTTP/2 passthrough, not JSON marshalling).
- AspNetCoreServer null-safety / incomplete REST `RequestContext` — tracked separately in #2566 / #2567.
### Other Information
Happy to contribute a PR once this feature request is triaged. We already prototyped `IntegrationType=Http` on a fork for local use.
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS .NET SDK and/or Package version used
Amazon.Lambda.TestTool 0.15.1
### Targeted .NET Platform
.NET 10
### Operating System and version
Windows 11
Contributor guide
Research direction
Start by locating the API Gateway emulator's route configuration and request-dispatch entry point, then trace how Lambda integrations are selected and how Endpoint values are validated. Add coverage for Http proxy status, headers, and body passthrough while preserving the default Lambda path and rejecting non-absolute HTTP(S) endpoints.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, csharp
- Domain
- api, backend, devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100