Return a custom header from lambda authorizer in API-gateway (HTTP api)

1

I'm using an API-Gateway HTTP-api (not REST!) with a custom lambda authorizer. However I'd like to be able to customize the HTTP headers returned on authentication failure. This seems possible with the REST-api (https://repost.aws/questions/QUgItZ7VFcS1iQ5wKGeU4YqA/is-it-possible-to-throw-custom-error-message-from-api-gateway-lambda-authorizer), but can't get this working with the HTTP-api.

Is this somehow possible?

Tom
已提問 2 年前檢視次數 604 次
2 個答案
1

Short answer is no, for now. I've tried too but the response integration is not even processed when the authorizer rejects with 403.

profile pictureAWS
ab
已回答 1 年前
0

I am trying to add a custom lambda authorization using CFT to my HTTP api, It would be great if you can help me with it. question: https://repost.aws/questions/QUQidcTLDQTeiEiIsMvLDvPQ/creating-a-authorizer-for-api-gatewayv2-http-api-with-a-custom-lambda-authorizer-using-cft

已回答 5 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南