As I am trying to fetch the audit events of the last 90 days through the Lookup API of CloudTrail with java SDK V2.
Currently, I am fetching the audit events for 2 regions: ap-south-1 and us-east-1
I have analyzed and collected some statistics as mentioned below:
Note : RRT : Request-Response Time of Lookup API
ap-south-1 :
RRT (For 1.5 hours):
Avarage : 209 ms : ~ 0.2 sec
Highest : 7575 ms : ~ 7.5 sec
us-east-1 :
RRT (For 4.5 hours):
Avarage : 3893 ms : ~ 4 sec
Highest : 35073 ms : ~ 35 sec
Graph Of RRT (in millisecond) vs Time (HH:MM:SS)
Important :
The rate of lookup requests is limited to two per second, per account, per region. If this limit is exceeded, a throttling error occurs.
Reference Link : https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_LookupEvents.html
As per the rule of Lookup API, I should get the response within 500 ms but I am getting responses for region us-east-1 in an average of 4 sec.
It is too high time to get a single response.
I think this issue is from the AWS side.
Please provide if any solution is available.