Skip to main content

build_credentials_provider

Function build_credentials_provider 

Source
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 ProfileFileCredentialsProvider only understands static aws_access_key_id entries 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.