Help us understand the problem. What is going on with this article?

TerraformでMFAを利用しながらAWSリソースへアクセスする方法

今回は

aws-vaultを使ってみます

前提

  • 下記設定が終了していること

    • ~/.aws/config
    • ~/.aws/credentials
  • source_profileの指定をしないこと

使い方(MacOSの場合)

Brew caskでインストール

$ brew cask install aws-vault

プロファイルを作成、アクセスキーとシークレットキーを入力

$ aws-vault add PROFILE_NAME

aws-vault ls で登録したプロフィールが確認できる

$ aws-vault ls 

aws-vault から一時的なアクセスキーを渡してプロセスを実行

$ aws-vault exec home -- aws s3 ls
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away