I'm using a custom authentication with AWS Lambda on my API Gateway HTTP API. Currently, if auth pass, it will return like this:
return {
'isAuthorized': True,
'context': {
'userId': user_id
}
}
I'm aware that with REST API its possible to use mappers and set a custom headers. But is it viable with HTTP API? I want to pass to my application a header X-AUTH-USER-ID with the value of context.userId