権限などに問題がないのにCloudShellが利用できないときは、アカウントが制限されている可能性があるのでサポートケースを作成してください。
経緯
CloudShellを利用しようとすると、上部に以下のエラーメッセージが表示されてCloudShellが利用できませんでした。
Unable to start the environment. To retry, refresh the browser or restart by selecting Actions, Restart AWS CloudShell.
ブラウザのリロードやCookie、キャッシュの削除、 CloudShell の再起動、CloudShellのホームディレクトリ削除など試しましたが、このエラーは回避できませんでした。
また、権限も問題なく、以下のトラブルシューティングでも解決できる方法がありませんでした。
さらにネットで調べると、以下の Re:Postの投稿の通り、アカウントが制限されている場合があることがわかりました。
It is possible your account is not 100% verified. Try this: Create a CloudFront distribution if you get the below error it confirms your account is unverified or if you can create 2 distributions and can’t create the 3rd one.
https://repost.aws/questions/QUl4tcVsElQZGEpnJ7JaCJfw/unable-to-start-cloudshell
上記Re:Postの投稿から、 CloudFront ディストリビューションの作成を試みてエラーが発生する場合はアカウントに制限がかかっていると判断できそうだったので、CloudFront ディストリビューションの作成を試しました。
すると、以下エラーメッセージが表示され、アカウントが制限されていることが分かりました。
Your account must be verified before you can add new CloudFront resources. To verify your account, please contact AWS Support (https://console.aws.amazon.com/support/home#/ ) and include this error message.
解決方法
AWSサポートケース(サポートプランはBasicでいけます)を作成し、数日後にアカウントの制限が解除されました。
その結果、CloudShell、CloudFrontともに利用できるようになりました。
私が行ったサポートケース作成方法は以下の通り。
- Account and billing support からケース作成
- Typeは「アカウント」を選択
- あとは問い合わせ内容を記載して、送信
上記の内容でなくとも、サポートケースを作成すればよしなにやってくれると思います。
実際の問い合わせの内容は、以下のように行いました。
件名:CloudShellが利用できないため、アカウントの制限解除をお願いします
内容
Chrome(バージョン: xxx)を利用してコンソールからCloudShellに移動すると、
以下のエラーが発生するためアカウントの制限解除をお願いいたします。
Unable to start the environment. To retry, refresh the browser or restart by selecting Actions, Restart AWS CloudShell.
CloudShellが利用できる全てのリージョンで上記エラーが発生し利用できなくなっています。
本アカウントはOrganizationsの子アカウントですが、
同一OUの別アカウントでは本事象は発生しておらず、SCPの問題でもないと認識しています。
以下の Re:Post の投稿から、アカウントに制限があると判断しました。
https://repost.aws/questions/QUl4tcVsElQZGEpnJ7JaCJfw/unable-to-start-cloudshell
--抜粋--
It is possible your account is not 100% verified. Try this: Create a CloudFront distribution if you get the below error it confirms your account is unverified or if you can create 2 distributions and can't create the 3rd one.
Your account must be verified before you can add new CloudFront resources. To verify your account, please contact AWS Support (https://console.aws.amazon.com/support/home#/ ) and include this error message.
--抜粋--
本アカウントで CloudFront でウェブディストリビューションの作成を試みると、以下のとおり上記同様のエラーメッセージが確認できました。
Your account must be verified before you can add new CloudFront resources. To verify your account, please contact AWS Support (https://console.aws.amazon.com/support/home#/ ) and include this error message.
そのため、本アカウントが制限されていると思われましたので、本ケースを作成いたしました。
お忙しいところ恐縮ですが、ご対応いただけますと幸いです。
なお、当初 Service Quotas から CloudFront ウェブディストリビューションの制限緩和を行ってもいけるのではと思い、200 のところを 201 にして制限緩和申請を行い緩和されましたが、CloudShell のエラー表示は変わりませんでした。