LoginSignup
0
0

More than 1 year has passed since last update.

aws cliの"default"を名前変更&変更後のprofileをデフォルトにする方法

Last updated at Posted at 2022-05-08

複数アカウントで運用していると、

  • いちいち--profileで指定するのは面倒くさい
  • どれがデフォルトなのか分かりにくい

と思い、defaultという名前を持たないようにしたいと思った。
gcloudでも全てに名前つけてactivateで切り替えているので

名前を変更するコマンドはない

結論から言うとファイルをいじる。
.aws/にある/credentialsconfigを開いて[default]となっている部分をYOUR_FAVORITE_NAMEと手打ちで変更。
image.png

それからWindowsでは

setx AWS_DEFAULT_PROFILE YOUR_FAVORITE_NAME

Linux系なら

$ export AWS_DEFAULT_PROFILE=YOUR_FAVORTITE_NAME

でOK。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0