在Windows 2012的PowerShell中运行AWS命令时出现连接错误

我们已经安装了AWS PowerShell的工具,使用下面给出的版本。 当我们尝试运行AWS命令时,我们得到如下所示的连接错误:

---- AWS Powershell version--- PS C:\Users> Get-AWSPowerShellVersion AWS Tools for Windows PowerShell Version 2.3.8.1 Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. Amazon Web Services SDK for .NET Version 2.3.8.1 Copyright 2009-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. --- PSVersion 4.0 ------ 

 --- Error --- ConnectionError: ('Connection aborted.', error(10060, 'A connection attempt failed because the connected party did not p roperly respond after a period of time or established connection failed because connected host has failed to respond')) 2016-08-23 09:43:30,944 - MainThread - awscli.clidriver - DEBUG - Exiting with rc 255 ('Connection aborted.', error(10060, 'A connection attempt failed because the connected party did not properly respond a fter a period of time or established connection failed because connected host has failed to respond')) PS C:\Users> curl http://ec2.eu-central-1.amazonaws.com curl : Unable to connect to the remote server At line:1 char:1 + curl http://ec2.eu-central-1.amazonaws.com + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc eption + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand 

港口80和港口443适当地在SGs打开。 尝试/不在机器中导出代理。

这已经解决了。 我们将AWS powershell版本升级到3.1.95.0。 安装了AWSToolsAndSDKForNet_sdk-3.1.95.0_ps-3.1.95.0_tk-1.10.0.2。 使用下面的代理设置:Set-AWSProxy -Hostname <> -Port <>