-
Hi! In my app I want to make a bunch of requests for various profiles. I expected that when using [profile abc]
output=json
region=eu-central-1
role_arn=arn:aws:iam::1234:role/abc-role
source_profile = default I expected the following code to have the same effect as starting the app with let shared_config = aws_config::from_env()
.credentials_provider(
aws_config::profile::ProfileFileCredentialsProvider::builder()
.profile_name("abc")
.build(),
)
.region(RegionProviderChain::first_try(Region::new(
p.region.clone(),
)))
.profile_name(p.profile.clone()); How can I make the sdk assume the configured role from the profile without using the iam sdk to call assume_role and then passing the credentials manually? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I found what I need: https://docs.rs/aws-config/latest/aws_config/sts/struct.AssumeRoleProvider.html |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
I found what I need: https://docs.rs/aws-config/latest/aws_config/sts/struct.AssumeRoleProvider.html