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

Support service specific configs appearing in the general section of a profile file #1073

Open
ysaito1001 opened this issue Feb 21, 2024 · 0 comments
Assignees
Labels
feature-request A feature should be added or improved. p2 This is a standard priority issue

Comments

@ysaito1001
Copy link
Collaborator

Describe the bug

The Rust SDK current does not support configuring following variables in a profile file

  • s3_use_arn_region
  • s3_disable_multiregion_access_points
  • s3_disable_express_session_auth

Expected Behavior

If a customer puts the variable s3_use_arn_region in the AWS shared configuration file (by default in ~/.aws/config).

[default]
s3_use_arn_region = true

and create an S3 client like so

let shared_config = aws_config::from_env()
    .region(aws_sdk_s3::config::Region::new("us-west-2"))
    .load()
    .await;
let client = aws_sdk_s3::Client::new(&shared_config);

client should use the ARN region instead.

Current Behavior

The current behavior has no effect on the above client even if the config variable is specified in a profile file. The same goes for the other variables.

Reproduction Steps

Described above.

Possible Solution

No response

Additional Information/Context

No response

Version

The latest release from https://github.com/awslabs/aws-sdk-rust/releases/tag/release-2024-02-20

Environment details (OS name and version, etc.)

Any

Logs

No response

@ysaito1001 ysaito1001 added the bug This issue is a bug. label Feb 21, 2024
@ysaito1001 ysaito1001 added the p2 This is a standard priority issue label Feb 21, 2024
ysaito1001 added a commit to smithy-lang/smithy-rs that referenced this issue Feb 27, 2024
## Motivation and Context
Adds the ability to disable S3 Express session auth (causing it to use a
regular sigv4 session auth instead).

## Description
S3 Express One Zone is an opt out feature, and there are three ways to
disable it (with the order of precedence as listed):
- through the `disable_s3_express_session_auth` method on an S3 client
- through an environment variable `AWS_S3_DISABLE_EXPRESS_SESSION_AUTH`
- through a profile file with a key `s3_disable_express_session_auth`
(won't be supported until
awslabs/aws-sdk-rust#1073 is addressed)
 
If one of the places is set to true/false, then the subsequent places
with lower precedence will not be considered.

Something to be aware of when setting the disable option through the
environment variable. The environment variable is only checked during a
client construction, meaning that if a customer sets it after the client
has been created the SDK will not take the environment variable value
into account, i.e. the following snippet will NOT disable the S3 Express
session auth:
```
let config = aws_config::load_from_env().await;
let client = aws_sdk_s3::Client::new(&config);

// Set the env variable to true after an S3 client has been created
std::env::set_var("AWS_S3_DISABLE_EXPRESS_SESSION_AUTH", "true");

let _ = client
    .list_objects_v2()
    .bucket("s3express-test-bucket--usw2-az1--x-s3")
    .send()
    .await;
``` 

## Testing
Added unit tests for `S3ExpressRuntimePlugin` and integration tests for
verifying disabling S3 Express session auth.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
@jdisanti jdisanti added feature-request A feature should be added or improved. and removed bug This issue is a bug. labels Mar 14, 2024
@Velfi Velfi self-assigned this Mar 19, 2024
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. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

3 participants