You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

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.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!