-
Notifications
You must be signed in to change notification settings - Fork 60
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
Write IAM credentials to ~/.aws/credentials #1020
Comments
@synfinatic, i can raise a PR if you agree with one of the options |
This feature should not be necessary. You just need to set the Alternatively, set the variable in your shell ( Generally speaking the writing of the IAM secrets to the |
I'd like to avoid using the environment variable
it could be a fair solution, but need to educate the developers to start intellij from shell and ask them to change the dev workflow |
I don't use IntelliJ myself, but I believe it will save the variable across multiple sessions? Shouldn't have to keep setting it? Alternatively, just define that test role with the profile name of |
in intellij we can define a launch template where to hard-code the profile. however, we have to share the template across the team across multi git repos, also each team may use different profile. |
right, we have to switch the profile somewhere, and I prefer to introduce as less change as possible to the dev workflow. |
"switch the profile"? users are using multiple IAM Roles and you want to switch the global/per user default role between them? I'm honestly a bit lost what your actual use case/requirements are. Generally speaking, changing the default role to point to different roles is not recommended as it's far too easy to accidentally run a command in the wrong AWS account/etc. That said, you've closed this ticket so I'm gonna assume you've got what you need. Feel free to re-open if you'd like to continue the conversation. |
hi @synfinatic thanks for your comments and patience in my org, we have multiple aws sub-accounts, people have multiple roles as well, though most of the time they only have one role, and in most cases, we just need to switch the profile (saying switch between the sub-accounts) based on the conversation, I'm experimenting with the workflow:
If they want to switch profiles, they just need to repeat step 2,3. They don't need to do anything in IntelliJ; the new credentials will be used seamlessly by the code. to be more convenient, i will create a shell alias to combine step 2 and 3, so the developers just need to hit one command on shell |
Sure that works. Does mean a few things:
Personally, if I was going to do this, I would modify the
|
@synfinatic , thanks for sharing the new idea with me, good to learn and i did some quick test:
that means to say, i'd stay with the workflow i mentioned #1020 (comment) |
ugh, that's lame that the Java SDK is different from the python & Go SDK. I'd probably open a ticket with AWS and ask them to be more aligned.... obviously doesn't help you now. :-/ |
Anyways, I guess I need to do something to enable all those people using Java... I may hate Java personally, but it's not really viable to tell everyone to just rewrite their code in a better language :D Anyways, need to think more about this. Probably will end up being something like:
So by default it will use the name of the profile for the What I'm still not sure about is supporting |
right, per the API doc and source code, credentials_process credentials is not in the default credentials provider chain: https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials-chain.html |
ya, that will be great.
understood, but it's not viable in my org as it could be a big change to the dev workflow, while my original purpose of the feature request in this thread is to streamline it. Thanks, |
when you say "workflow", I'm imaging setting the |
Yes, IntelliJ supports the launch template and can persist the launch configuration in git. However, it's not viable in my organization since we have to share the settings across the teams and git repos. There would be significant communication and education efforts. |
LOL. Sounds like we work at the same company. I get. |
Is your feature request related to a problem? Please describe.
I'd like to update the credentials of
default
profile in~/.aws/credentials
with cliaws-sso credentials -p <1111111111:AdminAccess> -f ~/.aws/credentials
because I need to run and debug the Java app in IntelliJ, it needs the AWS credentials to connect AWS services to make the app running. The Java AWS SDK load the
default
profile in~/.aws/credentials
, i don't want to modify the app code and configuration to support aws profile, it will widely impact the dev workflow in the whole dev team.Describe the solution you'd like
crdentials
sub-command to allow the user to specify the target profile name in credentials fileaws-sso credentials -p <1111111111:AdminAccess> -f ~/.aws/credentials --target_profile=default
it will update the credentials file with content
aws-sso credentials -p <1111111111:AdminAccess> -f ~/.aws/credentials --update_default_profile=true|false
it will update the credentials file with both profiles:
Describe alternatives you've considered
manually update the profile in ~/.aws/credentials after
aws-sso credentials -p <1111111111:AdminAccess> -f ~/.aws/credentials
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: