Skip to content

Missing support for s3 section, particularly s3.addressing_style in SDK config parserΒ #1230

@delsner

Description

@delsner

Describe the feature

The AWS CLI S3 configuration supports passing addressing_style = path to enable force_path_style in the aws.profile file.
Contrary to boto3 (and the AWS CLI), this crate ignores the s3 section the profile file.
I'd like to request support for at least s3.addressing_style.

Use Case

When using an AWS config or credentials file to configure the AWS SDK for an S3 provider that requires path-style S3 URLs, I have to manually set force_path_style to support path-style S3 URLs because the SDK doesn't parse the s3 section of the config file.
That in turns requires to manually parse the config file again to check if s3.addressing_style is set to path.
It would be great if the rust crate would behave similar to boto3 and the AWS CLI.

Proposed Solution

This would require adjusting the parsed config object and default parsing logic:

// This should also parse the `s3.addressing_style` value.
let sdk_config = aws_config::defaults(BehaviorVersion::latest()).load().await;
// The s3 config should implicitly call .force_path_style(true) if `s3.addressing_style` == `path`.
let s3_config = aws_sdk_s3::config::Builder::from(&sdk_config).build();
let s3_client = aws_sdk_s3::Client::from_conf(s3_config);

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

A note for the community

Community Note

  • Please vote on this issue by adding a πŸ‘ reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue, please leave a comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.p3This is a minor priority issues3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions