I have a AWS Lambda function which does API calls to several endpoints. Normally, it works fine, but totally randomly it gives timeout with no reason while doing API call.
It is within VPC, and able to access APIs. (otherwise, it would not succeed anytime). I also thought maybe the API is busy, but when I try to call API from the browser it gets results fastly. Interestingly, if I try to run Lambda again, it runs successfully.
What could be the reason for random timeouts? (sometimes works fine, sometimes timeout)
Note: there is no API limit per client that calls the API. So, this is not an issue regarding limiting the lambda function client after a certain number of calls.
p.language: python module: requests