How to return custom http status code from gateway authorizer function
I have a API gateway authorizer function, where on auth failure I want it to return a custom http response code. The function works as expected and on failure the configuration UI allows for configuration of a static HTTP status code to be returned on failure in the "Custom response for failed auth." section. ie. I have the value 403
supplied and the gateway is working fine. (see image below).
The problems is that I want to use a context variable returned by the function to influence the HTTP status code response, much like I am already doing for the message body in the above image.
Tagged:
1