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
When using a specific profile (configured the AWS_PROFILE environment variable) and using role_arn for the provided profile, the CredentialProvider doesn't search the ~/.aws/credentials file for the source_profile's credentials. This is different from how it works for both AWS CLI and Python (boto3).
Expected Behavior
I expect that using the AWS_PROFILE=foobar environment variable will properly use STS by pulling the source credentials from ~/.aws/credentials.
Current Behavior
When processing the role_arn, it only searches for the credentials in the ~/.aws/config file, instead of the more appropriate ~/.aws/credentials file.
Reproduction Steps
With the ~/.aws/config:
[default]
region = us-east-1
[profile foobar]
source_profile = default
role_arn = arn:aws:iam::123:role/OrganizationAccessRole
region = us-east-1
Hi @BVMiko, sorry to hear about your issues. I can confirm the reported behavior so that I will add a needs-review label to it so we can address this further.
Hi @yenfryherrerafeliz, I'm just checking to see if there's any chance of this being considered in the near future. I had to set up a pretty messy workaround with my development environment last year, but I'm going through to optimize things recently and was hoping to clean it up.
If there is any chance of it picking up some traction, let me know and I will rebase against the current master branch.
Describe the bug
When using a specific profile (configured the
AWS_PROFILE
environment variable) and usingrole_arn
for the provided profile, the CredentialProvider doesn't search the~/.aws/credentials
file for thesource_profile
's credentials. This is different from how it works for both AWS CLI and Python (boto3).Expected Behavior
I expect that using the
AWS_PROFILE=foobar
environment variable will properly use STS by pulling the source credentials from~/.aws/credentials
.Current Behavior
When processing the
role_arn
, it only searches for the credentials in the~/.aws/config
file, instead of the more appropriate~/.aws/credentials
file.Reproduction Steps
With the
~/.aws/config
:And the
~/.aws/credentials
file:Use the
AWS_PROFILE=foobar
environment variable.Possible Solution
The code here should first check the
~/.aws/credentials
file with:and on rejection it should try the
~/.aws/config
file as it is doing currently:Additional Information/Context
No response
SDK version used
3.283.2
Environment details (Version of PHP (
php -v
)? OS name and version, etc.)PHP 8.2.11; Ubuntu Linux 22.04
The text was updated successfully, but these errors were encountered: