Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for retries to EcsCredentialsProvider #2457

Closed
1 of 2 tasks
annuh opened this issue Jun 6, 2022 · 2 comments · Fixed by #2477
Closed
1 of 2 tasks

Add support for retries to EcsCredentialsProvider #2457

annuh opened this issue Jun 6, 2022 · 2 comments · Fixed by #2477
Assignees
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

Comments

@annuh
Copy link
Contributor

annuh commented Jun 6, 2022

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:

Error retrieving credential from ECS (cURL error 28: Connection timed out after 5001 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://169.254.170.2/v2/credentials/0fa84058-9780-492a-8a3b-xxxx)

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

  • I may be able to implement this feature request
  • This feature might incur a breaking change

SDK version used

3.224.3

Environment details (Version of PHP (php -v)? OS name and version, etc.)

8.1.6

@annuh annuh added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 6, 2022
@yenfryherrerafeliz
Copy link
Contributor

Hi @annuh, thanks for opening this feature request. We will review this as soon as we can and we will use this thread to provide an answer regarding. I want to let you know that we prioritize feature requests based on community engagement and reactions.

Thanks!

@yenfryherrerafeliz yenfryherrerafeliz self-assigned this Jun 13, 2022
@yenfryherrerafeliz yenfryherrerafeliz removed the needs-triage This issue or PR still needs to be triaged. label Oct 3, 2022
@yenfryherrerafeliz yenfryherrerafeliz added the p2 This is a standard priority issue label May 31, 2023
@yenfryherrerafeliz yenfryherrerafeliz added the queued This issues is on the AWS team's backlog label Dec 5, 2023
Copy link

github-actions bot commented Jun 3, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants