URL を使用して、AWS EC2 Windows マシンの IE ブラウザーからインスタンス ID を取得できます。http://169.254.169.254/latest/meta-data/instance-id
Powershell コマンドを使用するときに同じマシンで
Invoke-WebRequest http://169.254.169.254/latest/meta-data/instance-id
その後、エラーを下回っています
Invoke-WebRequest : Network Error (tcp_error) A communication error occurred: "Operation timed out" The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time. For assistance, contact your network support team. At line:1 char:1
+ Invoke-WebRequest http://169.254.169.254/latest/meta-data/instance-id
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
注:Invoke-WebRequest http://google.com
は動作しており、PowerShell コマンドから応答を返しています。
このエラーが何であるかを明確にしてください。