I'm facing an intermittent issue where my OPTIONS requests to an API Gateway endpoint occasionally return a "403 Forbidden" error, specifically with the "x-amzn-errortype" set to "ForbiddenException." I've reviewed AWS documentation about this error type, but none of the listed scenarios seem to apply in my case. Has anyone else dealt with similar rare 403 errors on OPTIONS requests?
1 Answer
I've noticed that the problem tends to occur more frequently when the browser tab runs code for an extended period, like several days. It's not a hard rule, but I have seen this error pop up a few times in my logs when the tab has been open for too long.

Could it be that some cookies have expired?