Here is the context:
I fixed this by setting the AuthorizerResultTtlInSeconds
to 0
.
The reason for this is that I was using a shared authorizer. However the authorizer worked by reading the event context of the request and granting an IAM to then invoke a specific lambda.
Because the authorizer was shared it was caching the response which was an IAM for a specific lambda for the TTL of (in my case) 300 seconds.
Therefore, I could call one API one minute, then not the next.
Changing the value above to 0 fixed the issue.