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

Auth Error With No Default Credentials #139

Open
BTripp1986 opened this issue Oct 6, 2022 · 1 comment
Open

Auth Error With No Default Credentials #139

BTripp1986 opened this issue Oct 6, 2022 · 1 comment

Comments

@BTripp1986
Copy link
Contributor

I have access to several AWS accounts via SSO and no default profile for AWS. When I sign in to AWS via SSO the .aws/credentials file is updated with a fresh Access Key, Secret Key, and Security Token.

I specify which credentials I will use with the AWS_PROFILE env var, which is checked as part of the credentials chain lookup. If using boto3 or the aws-cli this method works. With this method I can sign in via SSO to dev and prod accounts. Then if I AWS_PROFILE=dev aws s3 ls(or similar call in boto3) it will run the command against the dev account. Then if I AWS_PROFILE=prod aws s3 ls it will run against prod.

This doesn't seem to work with aiodynamo. In order to get it to work I need to create a default profile and then copy/paste the credentials from the desired profile into the default profile. Aiodynamo should respect the AWS_PROFILE env var.

@ojii
Copy link
Contributor

ojii commented Oct 7, 2022

You can select which profile to use by using aiodynamo.credentials.FileCredentials(profile=...), but I agree that it should default to load from AWS_PROFILE, so I'd accept a PR to that effect.

BTripp1986 added a commit to BTripp1986/aiodynamo that referenced this issue Dec 18, 2022
this behavior is more in line with the behavior expected by users coming
from boto3 or aiobotocore.

[Issue HENNGE#139]
BTripp1986 added a commit to BTripp1986/aiodynamo that referenced this issue Dec 21, 2022
this behavior is more in line with the behavior expected by users coming
from boto3 or aiobotocore.

[Issue HENNGE#139]
BTripp1986 added a commit to BTripp1986/aiodynamo that referenced this issue Dec 22, 2022
this behavior is more in line with the behavior expected by users coming
from boto3 or aiobotocore.

[Issue HENNGE#139]
BTripp1986 added a commit to BTripp1986/aiodynamo that referenced this issue Dec 26, 2022
this behavior is more in line with the behavior expected by users coming
from boto3 or aiobotocore.

[Issue HENNGE#139]
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

No branches or pull requests

2 participants