API Gateway emulator: HTTP proxy integration so non-Lambda backends share the emulator origin
- Vorherrschende Sprache
- C#
- Sterne
- 1.7k
- Forks
- 503
- Ø Merge
- 1 T. 18 Std.
- Gemergte PRs (30 T.)
- 21
Beschreibung
### 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
Beitragsleitfaden
Rechercherichtung
Beginnen Sie damit, die Routenkonfiguration und den Einstiegspunkt für die Anfrageweiterleitung des API Gateway-Emulators zu lokalisieren. Verfolgen Sie anschließend, wie Lambda-Integrationen ausgewählt werden und wie Endpoint-Werte validiert werden. Fügen Sie Tests für den Http-Proxy-Status, Header und die Body-Durchleitung hinzu, wobei der standardmäßige Lambda-Pfad beibehalten und die Ablehnung nicht-absoluter HTTP(S)-Endpoints sichergestellt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- aws, csharp
- Bereich
- api, backend, devtools
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 55/100