【发布时间】:2014-09-29 15:53:16
【问题描述】:
我可以使用 URL http://169.254.169.254/latest/meta-data/instance-id 从 AWS EC2 windows 机器的 IE 浏览器获取实例 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 cmd 给出响应。
请任何人澄清这是什么错误。
【问题讨论】:
标签: windows amazon-ec2 powershell-3.0 invoke-command ec2-api-tools