Skip to content

Conversation

@richardwang1124
Copy link
Contributor

Fixes issue where Signin client initialization fails due to missing region configuration.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

  1. To make sure we include your contribution in the release notes, please make sure to add description entry for your changes in the "unreleased changes" section of the CHANGELOG.md file (at corresponding gem). For the description entry, please make sure it lives in one line and starts with Feature or Issue in the correct format.

  2. For generated code changes, please checkout below instructions first:
    https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md

Thank you for your contribution!

@richardwang1124 richardwang1124 merged commit 9b94aef into version-3 Nov 20, 2025
28 checks passed
@richardwang1124 richardwang1124 deleted the fix/login-credentials branch November 20, 2025 17:34
dobrite added a commit to dobrite/aws-sdk-ruby that referenced this pull request Nov 24, 2025
We're invoking the credential provider chain in our production code with
no args:

```
Aws::CredentialProviderChain.new.resolve
```

This fails on 176 with a `NameError` when config is enabled:

```
NameError:
  undefined local variable or method `region' for #<Aws::CredentialProviderChain:0x00000001094dc100 @config=nil>
aws-sdk-core-3.239.1/lib/aws-sdk-core/credential_provider_chain.rb:176:in `login_credentials'
aws-sdk-core-3.239.1/lib/aws-sdk-core/credential_provider_chain.rb:13:in `block in resolve'
aws-sdk-core-3.239.1/lib/aws-sdk-core/credential_provider_chain.rb:12:in `each'
aws-sdk-core-3.239.1/lib/aws-sdk-core/credential_provider_chain.rb:12:in `resolve'
```

PR aws#3319[^1] inadvertently caused this error by not checking if config
was passed. Elsewhere in the file the code is guarding against that.

Write a failing test, then make it pass.

[^1]: aws#3319
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants