Add support for retries to EcsCredentialsProvider #2457
Labels
feature-request
A feature should be added or improved.
p2
This is a standard priority issue
queued
This issues is on the AWS team's backlog
Describe the feature
We are using this PHP SDK in an AWS ECS (via EC2) environment.
Sometimes we see errors like this when making signed requests to AWS using this SDK:
We already use
memory::()
to reduce the number of requests to the task metadata server, but still sometimes (during peak moment) some requests fail.It looks like the InstanceProfileProvider has support to retry these failed requests:
https://github.com/aws/aws-sdk-php/blob/master/src/Credentials/InstanceProfileProvider.php
It would be great if the ECS credentials provider could also support this
https://github.com/aws/aws-sdk-php/blob/master/src/Credentials/EcsCredentialProvider.php
Use Case
This would reduce the number of failed requests
Proposed Solution
Implement a similar retry logic as exists in the https://github.com/aws/aws-sdk-php/blob/master/src/Credentials/InstanceProfileProvider.php
Other Information
No response
Acknowledgements
SDK version used
3.224.3
Environment details (Version of PHP (
php -v
)? OS name and version, etc.)8.1.6
The text was updated successfully, but these errors were encountered: