10
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AWS MFA 設定で「エンティティは既に存在しています」エラーの解決方法

Last updated at Posted at 2020-07-23

概要

AWS MFA 設定中に中断した結果「エンティティは既に存在しています」というエラーが発生したときの解決方法をご紹介します。

aws-mfa.png

「エンティティは既に存在しています」エラーの解決手順

list-virtual-mfa-devices で問題の SerialNumber を特定する

aws iam list-virtual-mfa-devices

aws iam list-virtual-mfa-devices の結果 (JSON)

{
    "VirtualMFADevices": [
        {
            "SerialNumber": "arn:aws:iam::012345678990:mfa/sample-username"
        },
        {
            "SerialNumber": "arn:aws:iam::012345678990:mfa/root-account-mfa-device",
            "User": {
                "UserId": "012345678990",
                "Arn": "arn:aws:iam::012345678990:root",
                "CreateDate": "2020-06-17T14:05:18+00:00",
                "PasswordLastUsed": "2020-07-21T02:39:58+00:00"
            },
            "EnableDate": "2020-06-17T14:14:35+00:00"
        },
    ]
}

delete-virtual-mfa-device で削除する

aws iam delete-virtual-mfa-device --serial-number "arn:aws:iam::012345678990:mfa/sample-username"

以上、AWS MFA 設定で「エンティティは既に存在しています」というトラブルシューティングをした、現場からお送りしました。

10
6
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
10
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?