From 8b8aaaf075dfae353c94d2116d6e7a868259bf4e Mon Sep 17 00:00:00 2001 From: Jonas Haag Date: Mon, 6 Oct 2025 22:32:13 +0200 Subject: [PATCH] Allow more settings without vendor prefix --- src/aws/builder.rs | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/aws/builder.rs b/src/aws/builder.rs index 06503ca..e833364 100644 --- a/src/aws/builder.rs +++ b/src/aws/builder.rs @@ -452,9 +452,15 @@ impl FromStr for AmazonS3ConfigKey { "aws_metadata_endpoint" | "metadata_endpoint" => Ok(Self::MetadataEndpoint), "aws_unsigned_payload" | "unsigned_payload" => Ok(Self::UnsignedPayload), "aws_checksum_algorithm" | "checksum_algorithm" => Ok(Self::Checksum), - "aws_container_credentials_relative_uri" => Ok(Self::ContainerCredentialsRelativeUri), - "aws_container_credentials_full_uri" => Ok(Self::ContainerCredentialsFullUri), - "aws_container_authorization_token_file" => Ok(Self::ContainerAuthorizationTokenFile), + "aws_container_credentials_relative_uri" | "container_credentials_relative_uri" => { + Ok(Self::ContainerCredentialsRelativeUri) + } + "aws_container_credentials_full_uri" | "container_credentials_full_uri" => { + Ok(Self::ContainerCredentialsFullUri) + } + "aws_container_authorization_token_file" | "container_authorization_token_file" => { + Ok(Self::ContainerAuthorizationTokenFile) + } "aws_web_identity_token_file" | "web_identity_token_file" => { Ok(Self::WebIdentityTokenFile) } @@ -468,14 +474,16 @@ impl FromStr for AmazonS3ConfigKey { "aws_request_payer" | "request_payer" => Ok(Self::RequestPayer), // Backwards compatibility "aws_allow_http" => Ok(Self::Client(ClientConfigKey::AllowHttp)), - "aws_server_side_encryption" => Ok(Self::Encryption( + "aws_server_side_encryption" | "server_side_encryption" => Ok(Self::Encryption( S3EncryptionConfigKey::ServerSideEncryption, )), - "aws_sse_kms_key_id" => Ok(Self::Encryption(S3EncryptionConfigKey::KmsKeyId)), - "aws_sse_bucket_key_enabled" => { + "aws_sse_kms_key_id" | "sse_kms_key_id" => { + Ok(Self::Encryption(S3EncryptionConfigKey::KmsKeyId)) + } + "aws_sse_bucket_key_enabled" | "sse_bucket_key_enabled" => { Ok(Self::Encryption(S3EncryptionConfigKey::BucketKeyEnabled)) } - "aws_sse_customer_key_base64" => Ok(Self::Encryption( + "aws_sse_customer_key_base64" | "sse_customer_key_base64" => Ok(Self::Encryption( S3EncryptionConfigKey::CustomerEncryptionKey, )), _ => match s.strip_prefix("aws_").unwrap_or(s).parse() {