こんにちは、エデュケーショナルサービス課 AWS トレーナーの小倉です。
先ほど公開した aws-nuke のブログの中で消してはいけない設定を消してしまったと書いたのですが、それが AWS IAM Identity Center の ID プロバイダの設定です。
AWS Organizations (IAM Identity Center 有効化済み) 内の AWS アカウントに対して aws-nuke を実行したところ、IAM Identity Center 経由でログインできなくなりました。

原因調査
AWS Organizations のマネジメントアカウントからスイッチロールはできたので、ログインして IAM の設定を確認したところ AWS IAM Identity Center の ID プロバイダの設定が消えていることを確認しました。設定が入っていたら AWSSSO_xxxxxx_DO_NO_DELETE という、いかにも消してはいけない名前の設定があります。

試しにログインできない状態を再現して、AWS DevOps Agent を使って、原因の特定ができるかをやってみました。 DevOps Agent は、2026/1/28現在、パブリックプレビューとなっており、正式リリースされていない AWS サービスとなります。
自然言語で問い合わせることができますので、Investigation details に以下の内容を入力し、調査を開始しました(ただし現在は英語のみ)。
After running aws-nuke, a tool for deleting AWS resources, I have been unable to log in to my AWS account via IAM Identity Center. Please investigate the cause. # 日本語訳 aws-nuke という AWS リソースを削除するツールを実行したあとから IAM Identity Center 経由で AWS アカウントにログインできなくなりましたので、原因の調査をお願いします。
以下が結果として返ってきた内容で、ちゃんと原因を特定してくれています。
Root causes 1. aws-nuke deleted the IAM Identity Center SAML provider required for authentication The aws-nuke tool deleted the SAML provider 'AWSSSO_e79936a693fcfe79_DO_NOT_DELETE' (ARN: arn:aws:iam::000000000000:saml-provider/AWSSSO_e79936a693fcfe79_DO_NOT_DELETE) at 2026-01-28T08:03:51Z from CloudShell in us-east-1. This SAML provider is a critical authentication component that establishes the trust relationship between AWS and the IAM Identity Center service. When users attempt to log in via IAM Identity Center, AWS validates SAML assertions against this provider. Without this SAML provider, the authentication mechanism is broken and users cannot complete the login process through IAM Identity Center. The deletion occurred approximately 10 minutes before the reported authentication failure, and the SAML provider name includes 'DO_NOT_DELETE' warning that was disregarded by the aws-nuke tool. # 日本語訳 根本原因 1. aws-nuke は認証に必要な IAM Identity Center SAML プロバイダーを削除しました aws-nuke ツールは、2026年1月28日午前8時03分51秒に、us-east-1 の CloudShell から SAML プロバイダー「AWSSSO_e79936a693fcfe79_DO_NOT_DELETE」(ARN: arn:aws:iam::000000000000:saml-provider/AWSSSO_e79936a693fcfe79_DO_NOT_DELETE)を削除しました。この SAML プロバイダーは、AWS と IAM Identity Center サービス間の信頼関係を確立する重要な認証コンポーネントです。ユーザーが IAM Identity Center 経由でログインしようとすると、AWS はこのプロバイダーに対して SAML アサーションを検証します。この SAML プロバイダーがないと認証メカニズムが機能せず、ユーザーは IAM Identity Center 経由でログインプロセスを完了できません。削除は、報告された認証失敗の約 10 分前に発生し、SAML プロバイダー名には、aws-nuke ツールによって無視された「DO_NOT_DELETE」警告が含まれています。
ただ、Mitigation Plan (緩和計画) では復旧手順はでてこなかったです。
No immediate mitigation action can be identified. The root cause is that aws-nuke deleted the IAM Identity Center SAML provider 'AWSSSO_e79936a693fcfe79_DO_NOT_DELETE' (ARN: arn:aws:iam::000000000000:saml-provider/AWSSSO_e79936a693fcfe79_DO_NOT_DELETE) from AWS account 000000000000 in us-east-1 at 2026-01-28T08:03:51Z. This SAML provider is a service-managed resource created and maintained by AWS IAM Identity Center, containing specific metadata and trust relationships that cannot be manually recreated using standard AWS CLI commands or console actions. The SAML provider requires restoration by AWS IAM Identity Center service itself, which can only be accomplished through: (1) Opening an AWS Support case for service-managed resource restoration, or (2) Reconfiguring IAM Identity Center from the organization management account (000000000000), which may result in loss of existing user assignments, permission sets, and group configurations. Neither option represents an immediate operational mitigation that can be safely executed without significant coordination and potential data loss. AWS Support intervention is recommended as the safest recovery path. # 日本語訳 直ちに緩和策を特定することはできません。 根本原因は、aws-nuke が 2026-01-28T08:03:51Z に us-east-1 の AWS アカウント 000000000000 から IAM Identity Center SAML プロバイダー「AWSSSO_e79936a693fcfe79_DO_NOT_DELETE」(ARN: arn:aws:iam::000000000000:saml-provider/AWSSSO_e79936a693fcfe79_DO_NOT_DELETE)を削除したことです。この SAML プロバイダーは、AWS IAM Identity Center によって作成および管理されるサービス管理リソースであり、標準の AWS CLI コマンドやコンソールアクションを使用して手動で再作成できない特定のメタデータと信頼関係が含まれています。 SAMLプロバイダーはAWS IAM Identity Centerサービス自体による復旧が必要です。復旧は、(1) サービス管理リソースの復旧をAWSサポートケースで申請するか、(2) 組織管理アカウント(000000000000)からIAM Identity Centerを再構成する(この場合、既存のユーザー割り当て、権限セット、およびグループ設定が失われる可能性があります)ことでのみ実行できます。どちらのオプションも、多大な調整やデータ損失の可能性なしに安全に実行できる即時の運用上の緩和策ではありません。AWSサポートの介入は、最も安全な復旧パスとして推奨されます。
また、同じ内容をマネジメントコンソールの右側にある Amazon Q にも聞いてみましたが、原因の特定まではできていなかったです。原因の可能性のあるところをいくつかあげてくれましたが、DevOps Agent ほどの精度ではありませんでした。
復旧手順
ドキュメントなどを確認してみたのですが、復旧方法を見つけることができませんでした。
以下はいろいろ試してみて復旧できたという内容になります。
IAM Identity Center を管理している AWS アカウントにログインし、IAM Identity Center のコンソール画面を開きます。
AWS アカウント をクリックし、対象の AWS アカウント (今回は Production が対象の AWS アカウント) のリンクをクリックします。

対象 AWS アカウントの画面で、ユーザーまたはグループを割り当て をクリックします。

ユーザータブをクリックし、既存とは別のユーザーにチェックを入れ、次へ をクリックします。

どれでもよいので、許可セットにチェックを入れ、次へ をクリックします。

確認画面で 送信 をクリックします。

送信をクリックしたあとに AWS アカウントへの設定が行われます。

今、追加したユーザーにチェックを入れ、アクセスの削除 をクリックし、確認画面で アクセスの削除 をクリックし、作業前の状態に戻します。

これで、ID プロバイダの設定が追加され、IAM Identity Center 経由でログイン可能な状態に戻りました。
まとめ
AWS IAM Identity Center の ID プロバイダを誤って消してしまったときの復旧方法をまとめました。aws-nuke のような自動で AWS リソースを削除する場合は削除対象をよく確認してから削除するようにしましょう。
また、今回の件に限らないですが、なにか起きたときの原因調査は人が調べるよりも生成 AI のサービスに任せたほうが原因の特定が早いように感じました。ただ、生成 AI の回答が必ずしも正しいわけではないので、原因のあたりをつけるように調査のサポートとして利用するのがよいと考えています。
小倉 大(記事一覧)
アプリケーションサービス部エデュケーショナルサービス課 札幌在住
AWSトレーニングの講師をしています。
最近は7歳の息子と遊ぶのが楽しいです!
Twitter: @MasaruOgura