Without codes show us, it is hard to do anything.
When I got the unauthorized error, I do these:
check logs if there are any hints.
serverless logs -f <auth_function_name>
Clean the cache, and set the TTL to 0 to do the troubleshooting. Otherwise, even you change something, the cache still makes it unauthorized.
After fix the problem, don’t forget to change TTL value back.
- Go to aws console, do a test directly in api gateway with that auth handler.