I use an AWS API Gateway that has a custom authorizer (written in python) and instead of returning unauthorised when a user does not have a valid token, I want to redirect him to a different page. I want to deliver static html from a s3 bucket for authorised users. Unauthorised users should be redirected to the login page. The question is, how can I redirect the user?
I use cloudformation to define the environment. Any help is highly appreciated!