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

add profile changing (persists across queries) #36

Open
rkoval opened this issue Aug 1, 2021 · 4 comments
Open

add profile changing (persists across queries) #36

rkoval opened this issue Aug 1, 2021 · 4 comments

Comments

@rkoval
Copy link
Owner

rkoval commented Aug 1, 2021

original issue: #29

@MacHu-GWU
Copy link

@rkoval Hi, I find out that your solution is to use @ to choose which named profile to use. However, you need to enter @ everytime you want to use a named profile.

I create a Workflow that can update ~/.aws/credentials and ~/.aws/config on the file and set one of the named profile as DEFAULT. Then you no longer need to do @ over and over again. I think it is a good company for your workflow

The workflow is here https://github.com/MacHu-GWU/afwf_aws_tools-project

BTW, I used to use this workflow for exactly same thing your workflow does - jump to different console and list resources like ec2 / s3. But I believe your workflow is awesome, so I deleted all my Alfred Keyword from my workflow and only keep the aws-set-default-profile keyword for better using your workflow.

Nice work bro!

@rkoval
Copy link
Owner Author

rkoval commented Aug 5, 2021

thanks for the suggestion here!
this issue is to track the task for adding support for making it so profile persist across invocations. this will be implemented internally at.. some point. however, globally modifying the config/credentials file on disk seems a bit error prone and outside of the scope for alfred-aws-console-services-workflow, though it's cool that your supports that. i will likely utilize AWS_PROFILE env vars for this, as alfred supports persisting them and that's an officially supported way that the aws sdks allow for switching between them

@MacHu-GWU
Copy link

@rkoval I know it is a temp solution, looking forward to seeing you officially support that.

BTW, another case would be MFA. Some organizations force MFA using any AWS API key, you need to run some aws sts ... six-digits-token-from-your-phone commands and manually copy and paste the response into the ~/.aws/credentials file, which is very annoying. (See how to do it correctly https://aws.amazon.com/premiumsupport/knowledge-center/authenticate-mfa-cli/)

I think this is a good feature to add to this workflow.

I implement it https://github.com/MacHu-GWU/afwf_aws_tools-project as a temporary solution. Looking forward to seeing this feature is added to your workflow, of course, not a in-place-editing but a in-memory-cache version of implementation

Thank you for your great work bro.

@rkoval
Copy link
Owner Author

rkoval commented Aug 5, 2021

BTW, another case would be MFA. Some organizations force MFA using any AWS API key, you need to run some aws sts ... six-digits-token-from-your-phone commands and manually copy and paste the response into the ~/.aws/credentials file, which is very annoying. (See how to do it correctly https://aws.amazon.com/premiumsupport/knowledge-center/authenticate-mfa-cli/)

ahh, thanks for the heads up. i wasn't aware AWS allowed you to do this. issue for tracking this here: #45

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

No branches or pull requests

2 participants