Skip to content

Document profile provider runtime change, warn on ignored refreshRateMs - #4010

Open
sbiscigl wants to merge 1 commit into
mainfrom
profile-provider-changelog
Open

sbiscigl wants to merge 1 commit into
mainfrom
profile-provider-changelog

Conversation

@sbiscigl

Copy link
Copy Markdown
Collaborator

Issue #, if available:

github.com//issues/4008

Description of changes:

Adds a changelog note about breaking changes and removes a errant comment.

Check all that applies:

  • Did a review by yourself.
  • Added proper tests to cover this PR. (If tests are not applicable, explain.)
  • Checked if this PR is a breaking (APIs have been changed) change.
  • Checked if this PR will not introduce cross-platform inconsistent behavior.
  • Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR.

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

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

@sbiscigl
sbiscigl force-pushed the profile-provider-changelog branch from 64ef27c to 397f35c Compare November 25, 2026 21:48
@sbiscigl sbiscigl changed the title Document 1.11.760 profile provider runtime change, drop stray comment Document profile provider runtime change, warn on ignored refreshRateMs Nov 25, 2026
@@ -22,7 +23,8 @@ namespace {
const char PROFILE_AWS_CREDENTIALS_FILE[] = "AWS_SHARED_CREDENTIALS_FILE";
const char PROFILE_DEFAULT_CREDENTIALS_FILE[] = "credentials";
const char PROFILE_PROFILE_DIRECTORY[] = ".aws";
const long DEFAULT_REFRESH_RATE_MS = 300000;
const char PROFILE_PROVIDER_LOG_TAG[] = "ProfileCredentialsProvider";
const long PROVIDER_FUTURES_TIMEOUT_MS = 300000;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

5 minutes seems overdimensioned for retrieving profile credentials.
Use 60 seconds? That would even cover network-bound calls, if any.

AWS_UNREFERENCED_PARAM(refreshRateMs);
AWS_LOGSTREAM_WARN(PROFILE_PROVIDER_LOG_TAG, "refreshRateMs is ignored, credentials refresh when they expire");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The message is misleading, as the profile credentials do not have an expiration.
Maybe

AWS_LOGSTREAM_WARN(PROFILE_PROVIDER_LOG_TAG, "refreshRateMs is ignored, profile credentials do not support expiration");

}

void ProfileCredentialsProvider::Reload() {}
void ProfileCredentialsProvider::Reload() {
AWS_LOGSTREAM_WARN(PROFILE_PROVIDER_LOG_TAG, "Reload does nothing, credentials refresh when they expire");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
AWS_LOGSTREAM_WARN(PROFILE_PROVIDER_LOG_TAG, "Reload does nothing, credentials refresh when they expire");
AWS_LOGSTREAM_WARN(PROFILE_PROVIDER_LOG_TAG, "Reload does nothing");

Comment thread CHANGELOG.md
# 1.11.760 (2026-02-27)

## SDK Highlights
* **Breaking Change**: `ProfileCredentialsProvider`, used by the default credentials provider chain, is now backed by the CRT and no longer re-reads the shared credentials file on a timer. This is a runtime behavior change: credentials from the file have no expiration, so they are loaded once, matching other AWS SDKs, and `refreshRateMs` is still accepted but ignored. Use `credential_process` or web identity for credentials that rotate, or use `ProfileConfigFileAWSCredentialsProvider` to keep re-reading the file on an interval.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you.

This branch has not been deployed

No deployments
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