feat(services/s3): add configuration aliases for better Arrow object_store compatibility#6524
Merged
Xuanwo merged 3 commits intoapache:mainfrom Aug 25, 2025
Merged
feat(services/s3): add configuration aliases for better Arrow object_store compatibility#6524Xuanwo merged 3 commits intoapache:mainfrom
Xuanwo merged 3 commits intoapache:mainfrom
Conversation
…tibility Add serde aliases to S3Config fields to support multiple configuration key naming conventions. This enables seamless migration from AWS SDK and other S3-compatible libraries by allowing users to use either OpenDAL's native field names or AWS-prefixed alternatives. ## Added Aliases | OpenDAL Field | Added Aliases | Arrow Reference | |---------------|---------------|-----------------| | `bucket` | `aws_bucket`, `aws_bucket_name`, `bucket_name` | [L1026](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1026) | | `access_key_id` | `aws_access_key_id` | [L1022](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1022) | | `secret_access_key` | `aws_secret_access_key` | [L1023](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1023) | | `session_token` | `aws_session_token`, `aws_token`, `token` | [L1028](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1028) | | `region` | `aws_region` | [L1025](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1025) | | `endpoint` | `aws_endpoint`, `aws_endpoint_url`, `endpoint_url` | [L1027](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1027) | | `enable_virtual_host_style` | `aws_virtual_hosted_style_request`, `virtual_hosted_style_request` | [L1029-L1030](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1029-L1030) | | `checksum_algorithm` | `aws_checksum_algorithm` | [L1036](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1036) | | `enable_request_payer` | `aws_request_payer`, `request_payer` | [L1044](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1044) | | `server_side_encryption` | `aws_server_side_encryption` | [L1047-L1048](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1047-L1048) | | `server_side_encryption_aws_kms_key_id` | `aws_sse_kms_key_id` | [L1049](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1049) | | `server_side_encryption_customer_key` | `aws_sse_customer_key_base64` | [L1053-L1054](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1053-L1054) | ## Missing Configurations (Future Work) These Arrow configurations are not yet available in OpenDAL: | Arrow Configuration | Aliases | Reference | Description | |-------------------|---------|-----------|-------------| | `DefaultRegion` | `aws_default_region`, `default_region` | [L1024](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1024) | Fallback region when region not specified | | `ImdsV1Fallback` | `aws_imdsv1_fallback`, `imdsv1_fallback` | [L1033](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1033) | Allow fallback to IMDSv1 for credentials | | `UnsignedPayload` | `aws_unsigned_payload`, `unsigned_payload` | [L1035](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1035) | Skip payload signing for performance | | `MetadataEndpoint` | `aws_metadata_endpoint`, `metadata_endpoint` | [L1034](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1034) | Custom metadata service endpoint | | `ContainerCredentialsRelativeUri` | `aws_container_credentials_relative_uri` | [L1037](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1037) | ECS container credentials | | `ContainerCredentialsFullUri` | `aws_container_credentials_full_uri` | [L1038](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1038) | EKS pod credentials | | `ContainerAuthorizationTokenFile` | `aws_container_authorization_token_file` | [L1039](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1039) | EKS auth token file | | `CopyIfNotExists` | `aws_copy_if_not_exists`, `copy_if_not_exists` | [L1041](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1041) | Conditional copy operations | | `ConditionalPut` | `aws_conditional_put`, `conditional_put` | [L1042](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1042) | Conditional put operations | | `SkipSignature` | `aws_skip_signature`, `skip_signature` | [L1040](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1040) | Skip request signing | | `DisableTagging` | `aws_disable_tagging`, `disable_tagging` | [L1043](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1043) | Disable object tagging | | `S3Express` | `aws_s3_express`, `s3_express` | [L1032](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1032) | S3 Express One Zone support | | `BucketKeyEnabled` | `aws_sse_bucket_key_enabled` | [L1051-L1052](https://github.com/apache/arrow-rs-object-store/blob/main/src/aws/builder.rs#L1051-L1052) | SSE-KMS bucket key optimization | Contributes to apache#6456 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Fix clippy::bool_assert_comparison warnings by using assert!() instead of assert_eq!() with boolean literals - Apply rustfmt formatting for multi-line serde attributes - All tests continue to pass
This was referenced Aug 22, 2025
Merged
- Split the combined test into 4 separate tests for better clarity - test_s3_config_original_field_names: Tests original field names - test_s3_config_aws_prefixed_aliases: Tests AWS-prefixed aliases - test_s3_config_additional_aliases: Tests additional alias variations - test_s3_config_encryption_aliases: Tests encryption-related aliases 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Xuanwo
approved these changes
Aug 25, 2025
Member
Xuanwo
left a comment
There was a problem hiding this comment.
Thank you for working on this!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds serde aliases to S3Config fields to support multiple configuration key naming conventions, enabling seamless migration from Arrow object_store and other file system libraries. Users can now use either OpenDAL's native field names or AWS-prefixed alternatives.
Changes
Added
#[serde(alias = "...")]attributes to 12 key S3 configuration fields, following the exact same patterns used by Apache Arrow's object_store library.Example Usage
Added Aliases
bucketaws_bucket,aws_bucket_name,bucket_nameaccess_key_idaws_access_key_idsecret_access_keyaws_secret_access_keysession_tokenaws_session_token,aws_token,tokenregionaws_regionendpointaws_endpoint,aws_endpoint_url,endpoint_urlenable_virtual_host_styleaws_virtual_hosted_style_request,virtual_hosted_style_requestchecksum_algorithmaws_checksum_algorithmenable_request_payeraws_request_payer,request_payerserver_side_encryptionaws_server_side_encryptionserver_side_encryption_aws_kms_key_idaws_sse_kms_key_idserver_side_encryption_customer_keyaws_sse_customer_key_base64Missing Configurations (Future Work)
These Arrow configurations are not yet available in OpenDAL and could be added in future PRs:
DefaultRegionaws_default_region,default_regionImdsV1Fallbackaws_imdsv1_fallback,imdsv1_fallbackUnsignedPayloadaws_unsigned_payload,unsigned_payloadMetadataEndpointaws_metadata_endpoint,metadata_endpointContainerCredentialsRelativeUriaws_container_credentials_relative_uriContainerCredentialsFullUriaws_container_credentials_full_uriContainerAuthorizationTokenFileaws_container_authorization_token_fileCopyIfNotExistsaws_copy_if_not_exists,copy_if_not_existsConditionalPutaws_conditional_put,conditional_putSkipSignatureaws_skip_signature,skip_signatureDisableTaggingaws_disable_tagging,disable_taggingS3Expressaws_s3_express,s3_expressBucketKeyEnabledaws_sse_bucket_key_enabledTesting
Backward Compatibility
This change is fully backward compatible. All existing configurations continue to work exactly as before, with the new aliases providing additional flexibility.
Contributes to #6456