Skip to content

How to get a valid web identity configuration without env-variables and files? #550

Answered by Velfi
chdalski asked this question in Q&A
Discussion options

You must be logged in to vote

Why are things this way? I can't say as I don't know. It's probably just a miss on our part. What you can do is what we do, under the hood:

async fn load_credentials(
    fs: &Fs,
    sts_client: &StsClient,
    policy: Option<String>,
    policy_arns: Option<Vec<PolicyDescriptorType>>,
    token_file: impl AsRef<Path>,
    role_arn: &str,
    session_name: &str,
) -> provider::Result {
    // We read the token as a file, but you could pass it in as an argument instead.
    let token = fs
        .read_to_end(token_file)
        .await
        .map_err(CredentialsError::provider_error)?;
    let token = String::from_utf8(token).map_err(|_utf_8_error| {
        CredentialsError::unhandled("…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Velfi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants