How could I implement an AWS S3 retry policy on Laravel Storage facade?

Viewed 31

With our software growing, we are sometimes experimenting marginal S3 503 errors. As explained by AWS on https://aws.amazon.com/premiumsupport/knowledge-center/http-5xx-errors-s3/ this is normal, and we should implement a retry mechanism such as https://github.com/aws/aws-sdk-php/blob/master/src/RetryMiddleware.php.

I think I understand how to do that in the context of custom code, but our code uses Laravel Storage facade (Storage::get(), put(), disk(), append(), delete(), exists()...).

What would be the correct way to implement a retry middleware for a standard facade? Eg stay as close as possible to Laravel standard?

0 Answers
Related