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

SAWS Caching credentials? Leading to conflict. #62

Open
zapman449 opened this issue Oct 20, 2015 · 3 comments
Open

SAWS Caching credentials? Leading to conflict. #62

zapman449 opened this issue Oct 20, 2015 · 3 comments
Labels

Comments

@zapman449
Copy link

When I set shell variables AWS_SECRET_ACCESS_ID and AWS_ACCESS_KEY_ID, and within SAWS run a command like:

aws s3 ls s3://

The command works

However, tab-completion is attempting to work against a DIFFERENT account, which is confusing as heck.

Does SAWS cache a credential or token somewhere if you run "aws configure"?

I don't see anything interesting in .saws-history or .saws.log or .sawsrc

-Jason

@donnemartin
Copy link
Owner

@zapman449 have you tried setting AWS_DEFAULT_PROFILE?

AWS Credentials and Named Profiles

If you'd like to use a specific named profile with SAWS, run the following commands on OS X, Linux, or Unix:

$ export AWS_DEFAULT_PROFILE=user1
$ saws

Or as a one-liner:

$ AWS_DEFAULT_PROFILE=user1 saws

@zapman449
Copy link
Author

I have not. Due to other aspects of our tooling, I'm hoping that SAWS can use the same auth mechanisms that AWSCLI can... The AWSCLI documentation says that the Shell Variables trump any config files.

Further, it's still very odd that SAWS is able to tab complete something that's not in the account that the internal AWS command will use

Example:
Account A s3 buckets:
tools-saw
tools-drill
tools-router

Account B s3 buckets:
tools-trimmer
tools-clipper
tools-mower

AWS variables set to Account A
SAWS previously saw Account B

saws
aws s3 ls s3://tools-

List will show:
tools-trimmer
tools-clipper
tools-mower

But 'aws s3 ls' will only work with account A's buckets.

-Jason

@donnemartin
Copy link
Owner

@zapman449 it does seem like the there's an issue with SAWS and profiles, which seems to also be the discussion in #16. The method described above hopefully is a workaround to you up and running until the bug is fixed.

I appreciate the detailed info, it should help investigating and fixing the root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants