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

Shared config files still checked despite "use_aws_shared_config_files" = false #3026

Open
1 task
markinjapan opened this issue Nov 14, 2024 · 1 comment
Open
1 task
Labels
bug This issue is a bug. p2 This is a standard priority issue queued This issues is on the AWS team's backlog

Comments

@markinjapan
Copy link

markinjapan commented Nov 14, 2024

Describe the bug

The use_aws_shared_config_files config setting is not respected when resolving the following client configuration options:

  • region
  • sigv4a_signing_region_set

This causes the ConfigurationResolver::resolve() function to check for ~/.aws/config files unnecessarily.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

By setting the use_aws_shared_config_files config option, when all other config options are resolved, the shared config files should never be checked.

Current Behavior

Currently shared config files are checked for region and sigv4a_signing_region_set.

Reproduction Steps

// Create S3 client
$s3_client = new Aws\S3\S3Client([
    'region' => 'ap-northeast-1',
    'credentials' => new Aws\Credentials\Credentials(
        'MYAWSKEY',
        'xxxxxxxxxxxxxxxx'
    ),
    'version' => '2006-03-01',
    'use_aws_shared_config_files' => false,
]);

Possible Solution

In the methods ClientResolver::_default_sigv4a_signing_region_set() and ClientResolver::_default_region(), the $args argument is not being passed to the ConfigurationResolver::resolve() method.

This means the config option use_aws_shared_config_files is not respected.

Additional Information/Context

No response

SDK version used

3.326.0

Environment details (Version of PHP (php -v)? OS name and version, etc.)

PHP 8.3.13, MacOS 15.1 (24B83)

@markinjapan markinjapan added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 14, 2024
@yenfryherrerafeliz
Copy link
Contributor

Hi @markinjapan, thanks for reporting this. I have opened a PR to address this issue.

Thanks!

@yenfryherrerafeliz yenfryherrerafeliz added p2 This is a standard priority issue queued This issues is on the AWS team's backlog and removed needs-triage This issue or PR still needs to be triaged. labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue queued This issues is on the AWS team's backlog
Projects
None yet
Development

No branches or pull requests

2 participants