S3 Driver: Respect maxrequestspersecond During Deletes.
Context
The s3 driver is rate limited by calling the driver's embedded rate limiter before calls to the S3 API. This wait call must be manually called before calls to the API, calls to the rate limiter are missing in front of S3 API calls in two instances when we're deleting files.
Instances
Solutions
Insert Calls to the Rate Limiter
This is the most straight forward solution — simply adding in the appropriate calls in the aforementioned places.
Implement Limited Wrapper
This solution would have us embed the rate limiter within a new interface, which is the subset of the s3iface.S3API
used by the driver which calls the limiter before each call. Looking at this issue, I think it's not reasonable for us to expect ourselves and future devs to remember to make these calls each time, so this solution reduces some of that burden.
Edited by Hayley Swimelar