You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure identity resolver exists when a credentials provider is given only at operation level (#3021)
## Motivation and Context
Fixesawslabs/aws-sdk-rust#901
## Description
When a credentials provider is specified _only_ at the operation level
(but not at the service config level), the code in the above PR fails on
request dispatch, saying `NoMatchingAuthScheme`. This occurs today
because if we [do not set a credentials provider at the service config
level](https://github.com/awslabs/aws-sdk-rust/blob/main/sdk/kms/src/config.rs#L757-L769),
we will [not set the identity resolver for
sigv4](https://github.com/awslabs/aws-sdk-rust/blob/main/sdk/kms/src/config.rs#L811-L818).
The same goes for configuring a `SigningRegion` when it is only supplied
at the operation level.
This PR fixes the said issue so that `config_override` sets
- the identity resolver for sigv4 when a credentials provider is
supplied only at the operation config level
- a `SigningRegion` when a `Region` is given only at the operation level
## Testing
Added a Kotlin integ test
`test_specifying_credentials_provider_only_at_operation_level_should_work`
based on the customer reported PR.
## Checklist
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS
SDK, generated SDK code, or SDK runtime crates
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
---------
Co-authored-by: John DiSanti <[email protected]>
message = "Fix exclusively setting the credentials provider and/or region at operation config-override time. It's now possible to set the region or credentials when an operation is sent (via `.config_override()`), rather than at client-creation time."
0 commit comments