From a13cb712202af73b695f63fe41aba9ca6bc89a32 Mon Sep 17 00:00:00 2001 From: Stephen Carman Date: Fri, 25 Oct 2024 10:45:20 -0400 Subject: [PATCH] chore: revert S3 key changes for deprecated keys Signed-off-by: Stephen Carman --- crates/aws/src/constants.rs | 2 ++ crates/aws/src/storage.rs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/crates/aws/src/constants.rs b/crates/aws/src/constants.rs index 00b3b3dbac..cfc5559518 100644 --- a/crates/aws/src/constants.rs +++ b/crates/aws/src/constants.rs @@ -107,6 +107,8 @@ pub const S3_OPTS: &[&str] = &[ AWS_S3_LOCKING_PROVIDER, AWS_IAM_ROLE_ARN, AWS_IAM_ROLE_SESSION_NAME, + AWS_S3_ASSUME_ROLE_ARN, + AWS_S3_ROLE_SESSION_NAME, AWS_WEB_IDENTITY_TOKEN_FILE, AWS_ROLE_ARN, AWS_ROLE_SESSION_NAME, diff --git a/crates/aws/src/storage.rs b/crates/aws/src/storage.rs index 400f9710c8..bfa44c3eac 100644 --- a/crates/aws/src/storage.rs +++ b/crates/aws/src/storage.rs @@ -526,6 +526,11 @@ mod tests { "arn:aws:iam::123456789012:role/some_role", ); std::env::set_var(constants::AWS_IAM_ROLE_SESSION_NAME, "session_name"); + std::env::set_var( + constants::AWS_S3_ASSUME_ROLE_ARN, + "arn:aws:iam::123456789012:role/some_role", + ); + std::env::set_var(constants::AWS_S3_ROLE_SESSION_NAME, "session_name"); std::env::set_var(constants::AWS_WEB_IDENTITY_TOKEN_FILE, "token_file"); let options = S3StorageOptions::try_default().unwrap();