async fn build_credentials_provider(
profile: &Profile,
secret: Option<&Secret>,
) -> Option<SharedCredentialsProvider>Expand description
Build a SharedCredentialsProvider for a profile.
- Manual profiles: use the keychain secret directly.
- AWS-discovered profiles: load the full SDK config for the named profile so
the SSO / assume-role / credential-process providers are wired in. A bare
ProfileFileCredentialsProvideronly understands staticaws_access_key_identries and silently fails on SSO profiles. - Env profiles: fall through to None — the SDK’s default chain will pick up the env vars on its own.
Returns None when no provider can be constructed.