Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/aws/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1060,10 +1060,9 @@ impl AmazonS3Builder {
(Some(_), None, _) => return Err(Error::MissingSecretAccessKey.into()),
(None, None, _) => unreachable!(),
}
} else if let (Ok(token_path), Ok(role_arn)) = (
std::env::var("AWS_WEB_IDENTITY_TOKEN_FILE"),
std::env::var("AWS_ROLE_ARN"),
) {
} else if let (Some(token_path), Some(role_arn)) =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes sense to me -- thank you @Friede80 and @kylebarron

I double checked that the environment variables are still honored and I think they will be -- specifically, they will be parsed when creating from the environment here:

https://github.com/apache/arrow-rs-object-store/blob/1b8ecc7f41eab2a3c2c373f1c2fe21bebe391727/src/aws/builder.rs#L566-L565

"aws_web_identity_token_file" | "web_identity_token_file" => {
Ok(Self::WebIdentityTokenFile)
}
"aws_role_arn" | "role_arn" => Ok(Self::RoleArn),

(self.web_identity_token_file, self.role_arn)
{
debug!("Using WebIdentity credential provider");

let session_name = self
Expand Down