fix(aws-lambda): detect V2 events by request context, not rawPath alone (#5033)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
A V1 (REST API) event behind a custom domain base path mapping also carries a rawPath, so checking for rawPath alone made isProxyEventV2 classify it as a V2 event. The request was then routed on the wrong path and the V2 processor read fields the V1 event does not have. Require the V2-only requestContext.http instead, which every HTTP API and function URL event includes.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+22 added−1 removed
- tests:+18 added−0 removed
- other:+4 added−1 removed