If you try to use an HTTP Api Gateway (with event set to v2), you will probably see this error:
ERROR building error response for Lambda Runtime API
error=DeserializeError { inner: Error { path: Path { segments: [] }, original: Error("missing field `authorizationToken`", line: 1, column: 4833) } }
It would be nice to support both events seamlessly out of the box. It should be possible with Serde to try to deserilise both and then add some kind of abstraction to get the token.
Here are some more details about the 2 versions of the event: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-lambda-authorizer.html
If you try to use an HTTP Api Gateway (with event set to v2), you will probably see this error:
It would be nice to support both events seamlessly out of the box. It should be possible with Serde to try to deserilise both and then add some kind of abstraction to get the token.
Here are some more details about the 2 versions of the event: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-lambda-authorizer.html