- Symptom
- event.httpMethod is undefinedevent.multiValueHeaders and event.multiValueQueryStringParameters are missingHandler written for a REST API or ALB routes everything to the default branch
- Cause
- HTTP APIs created in the console use payload format 2.0, which moves the method and path to requestContext.http and rawPath. Format 2.0 also merges duplicate headers and query strings with commas.
- Fix
- Read the 2.0 fields, or set the integration payloadFormatVersion to 1.0 if the handler expects the REST API shape. The CLI, CloudFormation and SDKs require you to choose it explicitly.
- Apply
const method = event.requestContext?.http?.method ?? event.httpMethod; const path = event.rawPath ?? event.path; # or keep the old shape aws apigatewayv2 update-integration --api-id $API --integration-id $INT --payload-format-version 1.0- Affected
- API Gateway HTTP APIs (apigatewayv2) with payload format version 2.0, the console default
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders