Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
TreehouseFalcon committed Dec 6, 2023
1 parent 4be1dc5 commit d9ce422
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mantle/rbx_mantle/src/state/aws_credentials_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,28 @@ async fn chain_provider_credentials(
}
if let Some(ref profile_provider) = provider.profile_provider {
if let Ok(creds) = profile_provider.credentials().await {
println!(
"Using profile creds - key: {0} | secret: {1}",
creds.aws_access_key_id(),
creds.aws_secret_access_key()
);
return Ok(creds);
}
}
if let Ok(creds) = provider.container_provider.credentials().await {
println!(
"Using container creds - key: {0} | secret: {1}",
creds.aws_access_key_id(),
creds.aws_secret_access_key()
);
return Ok(creds);
}
if let Ok(creds) = provider.instance_metadata_provider.credentials().await {
println!(
"Using instance metadata creds - key: {0} | secret: {1}",
creds.aws_access_key_id(),
creds.aws_secret_access_key()
);
return Ok(creds);
}
Err(CredentialsError::new(
Expand Down

0 comments on commit d9ce422

Please sign in to comment.