-
Notifications
You must be signed in to change notification settings - Fork 104
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
changing AWS_PROFILE value does not appear to change the authentication used to get information #1751
Comments
Hi @jpcope , can you please share your Also, do you have any other AWS env vars currently set ( |
|
Hey @jpcope Sorry to see you're not getting what you need... I did a quick test and as you can see, I get what I expected to see.
I then noticed you had a second connection in your Steampipe config, so added a similar one to mine and retested:
Full disclosure I'm using the newest version of Steampipe:
Addition NotesIf you define multiple connections (one per profile), you don't need to utilise the
You may sometimes wish to gather information from multiple profiles at the same time, for this you can utilise aggregators. For example if I extend my
Then when I execute the query against the aggregator I can obtain results from both my other connections...
I apologise this is a long response but I thought it best to provide information I could on attempting to replicate the issue and other approaches to obtain the information you require. HTH! |
Hey @jpcope - hopefully the above helped you resolve your issue, could you confirm if that is the case or if you're still having issues? |
In the two profiles used to test, were they using a third and same source_profile with two different role_arns? I am pretty sure this plays a factor in this issue. If the profiles tested with don't specify these attributes but use different key id and secret keys to grant access I do not think the issue will manifest. https://docs.aws.amazon.com/cli/latest/topic/config-vars.html |
Thanks for taking a look at this! Frustratingly I cannot recreate the issue at this time either though I've shown it to my peers at the time. In my workflow I'm often using the interactive cli to build a query on one account, then drop out to run it on specific accounts where it's relevant rather than the larger set of all of them (for speed reasons). I'll look out for it again and post some cleaner screenshots in a new issue if it ever resurfaces. I've gone ahead and updated my versions of everything to hopefully keep the issue away! Hopefully it was just something unique and bad on my work machine that won't happen again. 😄 |
I thought I was experiencing this, but ultimately determined my real issue was here: turbot/steampipe#4155. TL;DR my local AWS_PROFILE was not being honored because I had left a an open Dropping this note for future readers as one more thing to check. |
Describe the bug
When a command like
AWS_PROFILE=<some-profile> steampipe query "<some-query>"
is run and the operator changes the profile between invocations the results remain the same and the new profile is never used or the results are never updated with values from the new account. When running.cache clear
and then trying again, they still remain the same. It's like the credential used is cached and is not removed. In this specific setup the profiles are assuming a role to target different aws accounts from a technically third common federated access account.Steampipe version (
steampipe -v
)Steampipe v0.19.4
Plugin version (
steampipe plugin list
)+--------------------------------------------+---------+-----------------+
| Installed Plugin | Version | Connections |
+--------------------------------------------+---------+-----------------+
| hub.steampipe.io/plugins/turbot/aws@latest | 0.103.0 | aws_sometestaccount,aws |
+--------------------------------------------+---------+-----------------+
To reproduce
AWS_PROFILE=<profile-1> steampipe query "<some-query>"
AWS_PROFILE=<profile-2> steampipe query "<some-query>"
Expected behavior
Clearing the cache and/or changing the profile should result in data being read from the new account and not from the previous account
The text was updated successfully, but these errors were encountered: