Closed newza-fullmetal closed 3 years ago
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
Thank you I will give it a try :)
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
@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.
splitting this issue into https://github.com/rkoval/alfred-aws-console-services-workflow/issues/36 and https://github.com/rkoval/alfred-aws-console-services-workflow/issues/37. i'll look into adding proper support for these soon-ish™
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 :
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.