Skip to content

Error using credential process provider #1036

@trevorstr

Description

@trevorstr

Describe the bug

I'm trying to create an SdkConfig, using a CredentialProcessProvider. However, the credentials_provider() function on the SdkConfig requires a specific SharedCredentialsProvider instead.

Expected Behavior

I should be able to pass in any valid type of Credential Provider into the credentials_provider() function, on the SdkConfig.

Current Behavior

mismatched types
expected `SharedCredentialsProvider`, found `CredentialProcessProvider`

Reproduction Steps

  1. Create a CredentialProcessProvider
  2. Create an SdkConfig builder, and set the credential provider to the object from Step 1
let cred_proc = aws_config::credential_process::CredentialProcessProvider::new("/Users/trevor.sullivan/Downloads/aws_signing_helper credential-process --certificate xyz.crt --private-key xyz.key --profile-arn <profile_arn> --trust-anchor-arn <trust_anchor_arn> --role-arn <role_arn> --region us-east-1".to_string());
let config = aws_config::SdkConfig::builder().credentials_provider(cred_proc).build();

Possible Solution

No response

Additional Information/Context

I configured IAM Roles Anywhere, so I can exchange an X.509 certificate for a JSON blob containing short-lived credentials. That isn't necessarily relevant though, as the program won't even compile using a credential process provider.

Version

[dependencies]
aws-config = { version = "1.1.2", features = ["behavior-version-latest"] }
tokio = { version = "1.35.1", features = ["full"] }



### Environment details (OS name and version, etc.)

MacOS Sonoma

### Logs

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions