Skip to content

Conversation

@jdisanti
Copy link
Contributor

@jdisanti jdisanti commented Feb 24, 2022

Motivation and Context

This is for awslabs/aws-sdk-rust#462. It is just making it possible to change settings on the lazy caching builder used by the default credentials provider builder.

This should enable customizing the credential load timeout with:

let default_provider = DefaultCredentialsChain::builder()
    .load_timeout(Duration::from_secs(20))
    .build();

Checklist

  • I have updated CHANGELOG.next.toml if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jdisanti jdisanti requested a review from a team as a code owner February 24, 2022 02:07
@github-actions
Copy link

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

@github-actions
Copy link

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

@github-actions
Copy link

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

@jdisanti jdisanti force-pushed the jdisanti-configure-cache-default-provider branch from 70c09f4 to 96deb3c Compare February 24, 2022 18:20
@github-actions
Copy link

A new doc preview is ready to view.

Copy link
Collaborator

@rcoh rcoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just some proposed docs improvements.

self
}

/// Timeout for the given [`ProvideCredentials`] implementation.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this say "default credentials chain"? We should clarify that this is the entire chain and not an individual provider (but maybe we should actually add that too...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. Fixed.

Comment on lines +133 to +137
/// Amount of time before the actual credential expiration time
/// where credentials are considered expired.
///
/// For example, if credentials are expiring in 15 minutes, and the buffer time is 10 seconds,
/// then any requests made after 14 minutes and 50 seconds will load new credentials.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should update to have a first line that can stand alone

@github-actions
Copy link

A new generated diff is ready to view.

@jdisanti jdisanti enabled auto-merge (squash) February 24, 2022 18:43
@github-actions
Copy link

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

@github-actions
Copy link

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

@jdisanti jdisanti merged commit 4ff8dc6 into main Feb 24, 2022
@jdisanti jdisanti deleted the jdisanti-configure-cache-default-provider branch February 24, 2022 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants