Rusoto ProfileProvider

I'm trying to use a profile with rusoto. What I have done works, if I select a profile which only specifies different access credentials for a different user, but not when I use one with role_arn & source_profile.
If I specify the same profiles in the aws cli they both work.
This is the simples example that works with the one profile, but not the other. I'm using rusoto 0.45.0

let provider = ProfileProvider::new().expect("New failed");
match S3Client::new_with(HttpClient::new().expect("-"), provider.clone(), Region::default()).list_buckets().await {
  Ok(output) => {
    for b in output.buckets.expect("No buckets") {
     println!("{}", b.name.expect("No bucket name"));
    }
  }
  Err(e) => {
    println!("Err: {}", e);
  }
}

I get a "profile not found" when using one from the ~/.aws/config where aws cli expects them, but even if I put one with a source profile in the ~/.aws/credentials, it just changes to "credentials not found"

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.