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

Use profile different than default #29

Closed
newza-fullmetal opened this issue Feb 3, 2021 · 5 comments
Closed

Use profile different than default #29

newza-fullmetal opened this issue Feb 3, 2021 · 5 comments

Comments

@newza-fullmetal
Copy link

Hi, I would like to use this workflow to administrate our infrastructure.
But it does not match our need because we do not have only one profile but at least 3 like :

  • dev
  • preprod
  • prod

Can we imagine a way to switch between profile before to use a command like :
aws go prod -> switch the profile to prod
Or a way to specify it in the request :
aws prod ec2 instances plop

I am openned to participate to this feature.

@rkoval
Copy link
Owner

rkoval commented Mar 4, 2021

unfortunately, there is not yet any functionality to switch profiles on the fly. however, as a workaround, you can potentially just install multiple versions of this workflow that are each configured to utilize a different profile and prefix. have a look at this comment for more details. i have not tested this myself, and it is somewhat of a hack, but it seems like there has been some success doing it this way

@newza-fullmetal
Copy link
Author

Thank you I will give it a try :)

@newza-fullmetal
Copy link
Author

Ok It is working but partially for example : if I go to the loggroups of a lambda in dev with the aws command it oppens me my browser with my last active session (preprod).
I do not know if it is possible to work around this one

@MacHu-GWU
Copy link

@rkoval I recommend to create a command like: aws setprofile. Then it parse the ~/.aws/credential file and give the availalbe profile list. Then you can persist the value in a file like ~/.alfred-workflow-aws/current_profile.txt. Then in your workflow, try to load profile from the .txt file, if failed, use the default profile.

@rkoval
Copy link
Owner

rkoval commented Aug 1, 2021

splitting this issue into #36 and #37. i'll look into adding proper support for these soon-ish™

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

3 participants