Sdk fails with an error when default
profile is missing in ~/.aws/config
or ~/.aws/config
file is missing
#547
Labels
bug
This issue is a bug.
Describe the bug
It looks like sdk is not handling gracefully case when
~/.aws/config
is missing or whendefault
profile is missing in the~/.aws/config
file. Even if there are credentials provided by the environment (in this case by container credentials provider).Expected Behavior
sdk should pick up available credentials from the credentials chain even if there are issues with
~/.aws/config
file, and execute request successfully.Current Behavior
sdk fails with an error:
Reproduction Steps
Steps to reproduce:
~/.aws/config
fileexport AWS_CONTAINER_CREDENTIALS_FULL_URI=http://127.0.0.1:1234
Alternatively to step (1), instead of removing
~/.aws/config
you can modify it to remove[default]
profile, behavior will be the same.Possible Solution
SDK should ignore issue with
~/.aws/config
file, for example, same way asaws
CLI does it orboto3
Additional Information/Context
AWS cli handles missing
~/.aws/config
gracefully:boto3 handles same case gracefully:
Version
% cargo tree | grep aws- aws-sdk-bug v0.1.0 (/local/home/xxx/src/aws-sdk-bug) ├── aws-config v0.12.0 │ ├── aws-http v0.12.0 │ │ ├── aws-smithy-http v0.42.0 │ │ │ ├── aws-smithy-types v0.42.0 │ │ ├── aws-smithy-types v0.42.0 () │ │ ├── aws-types v0.12.0 │ │ │ ├── aws-smithy-async v0.42.0 │ │ │ ├── aws-smithy-client v0.42.0 │ │ │ │ ├── aws-smithy-async v0.42.0 () │ │ │ │ ├── aws-smithy-http v0.42.0 () │ │ │ │ ├── aws-smithy-http-tower v0.42.0 │ │ │ │ │ ├── aws-smithy-http v0.42.0 () │ │ │ │ ├── aws-smithy-types v0.42.0 () │ │ │ ├── aws-smithy-http v0.42.0 () │ │ │ ├── aws-smithy-types v0.42.0 () │ ├── aws-sdk-sso v0.12.0 │ │ ├── aws-endpoint v0.12.0 │ │ │ ├── aws-smithy-http v0.42.0 () │ │ │ ├── aws-types v0.12.0 () │ │ ├── aws-http v0.12.0 () │ │ ├── aws-sig-auth v0.12.0 │ │ │ ├── aws-sigv4 v0.12.0 │ │ │ │ ├── aws-smithy-http v0.42.0 () │ │ │ ├── aws-smithy-http v0.42.0 () │ │ │ ├── aws-types v0.12.0 () │ │ ├── aws-smithy-async v0.42.0 () │ │ ├── aws-smithy-client v0.42.0 () │ │ ├── aws-smithy-http v0.42.0 () │ │ ├── aws-smithy-http-tower v0.42.0 () │ │ ├── aws-smithy-json v0.42.0 │ │ │ └── aws-smithy-types v0.42.0 () │ │ ├── aws-smithy-types v0.42.0 () │ │ ├── aws-types v0.12.0 () │ ├── aws-sdk-sts v0.12.0 │ │ ├── aws-endpoint v0.12.0 () │ │ ├── aws-http v0.12.0 () │ │ ├── aws-sig-auth v0.12.0 () │ │ ├── aws-smithy-async v0.42.0 () │ │ ├── aws-smithy-client v0.42.0 () │ │ ├── aws-smithy-http v0.42.0 () │ │ ├── aws-smithy-http-tower v0.42.0 () │ │ ├── aws-smithy-query v0.42.0 │ │ │ ├── aws-smithy-types v0.42.0 () │ │ ├── aws-smithy-types v0.42.0 () │ │ ├── aws-smithy-xml v0.42.0 │ │ ├── aws-types v0.12.0 () │ ├── aws-smithy-async v0.42.0 () │ ├── aws-smithy-client v0.42.0 () │ ├── aws-smithy-http v0.42.0 () │ ├── aws-smithy-http-tower v0.42.0 () │ ├── aws-smithy-json v0.42.0 () │ ├── aws-smithy-types v0.42.0 () │ ├── aws-types v0.12.0 () ├── aws-sdk-sts v0.12.0 ()
Environment details (OS name and version, etc.)
Linux
Logs
No response
The text was updated successfully, but these errors were encountered: