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

does not work with non-default AWS profiles #4

Closed
dtenenba opened this issue Aug 8, 2019 · 2 comments
Closed

does not work with non-default AWS profiles #4

dtenenba opened this issue Aug 8, 2019 · 2 comments

Comments

@dtenenba
Copy link

dtenenba commented Aug 8, 2019

I typically have multiple profiles in my ~/.aws/config and ~/.aws/credentials files.
I deliberately don't set a default profile because I want to be sure I don't do things in the wrong account by mistake.

So I use the AWS_PROFILE environment variable to determine which profile to use.

After setting that variable, I get this when running awsbw:

$ awsbw -Q mixed
AWS profile default does not exist.
Available profiles: [redacted]
Exiting.

Would be great if awsbw would recognize non-default profiles.

@dtenenba
Copy link
Author

dtenenba commented Aug 8, 2019

An easy way to reproduce this:

  • back up your ~/.aws/* files
  • modify config so instead of [default] it says [profile foo]
  • modify credentials so instead of [default] it says [foo]
  • set non-default profile by running export AWS_PROFILE=foo
  • you should be able to use the AWS CLI, try aws s3 ls
  • now try running awsbw
  • when done testing, replace files in ~/.aws with backed up copies

@dtenenba
Copy link
Author

Never mind, I did not notice the -P option. Though this seems like a bit of a nonstandard way of supporting multiple profiles (I would have expected the AWS_PROFILE variable to be honored), it works.

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

1 participant