Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 2 tasks
delsner opened this issue Jan 5, 2025 · 2 comments
Open
1 of 2 tasks
Labels
feature-request A feature should be added or improved. p3 This is a minor priority issue s3

Comments

@delsner
Copy link

delsner commented Jan 5, 2025

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
@delsner delsner added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jan 5, 2025
@aajtodd
Copy link
Contributor

aajtodd commented Jan 6, 2025

The S3 settings listed here are generally CLI specific and their support across SDKs is likely inconsistent (I'm not even aware of another SDK other than Python that supports this).

This is not likely something we would implement unless it becomes standardized across SDKs.

@aajtodd aajtodd added p3 This is a minor priority issue s3 and removed needs-triage This issue or PR still needs to be triaged. labels Jan 6, 2025
@delsner
Copy link
Author

delsner commented Jan 6, 2025

That's too bad, but thanks for the information!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p3 This is a minor priority issue s3
Projects
None yet
Development

No branches or pull requests

2 participants