LoginSignup
0
0

More than 5 years have passed since last update.

AWS CLIでプロファイルを切り替える

Last updated at Posted at 2018-06-29

credentialからprofile名を持ってきてpecoで選択してAWS_DEFAULT_PROFILE変数に入れるだけ。bash_profile的な何かに書きましょう。

awsc () {
  export AWS_DEFAULT_PROFILE=$(grep -oE "(\[).+(\])" ~/.aws/credentials | tr -d [] | peco)
}

peco本当に便利だ。

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