我正在经历一个奇怪的错误,我在本地运行spring boot并连接到AWS Dynamodb,它返回以下异常:
EVENT> {" @时间戳":" 2018-04-03T17:57:33.173 + 10:00"" @版":1,& #34; message":"创建与DynamoDB"," logger_name":" com.DynamoDBRepository"," thread_name"的连接时出错:" HTTP-NIO-8080-EXEC-1""电平":" ERROR"" LEVEL_VALUE":40000&#34 ;名称":" XYZ"" apiVersion":" 1""应用":" XYZ" "版本":" 1.6.37""类型":" ERROR"} com.amazonaws.SdkClientException:无法执行HTTP请求:连接到dynamodb.ap-southeast-2.amazonaws.com:443 [dynamodb.ap-southeast-2.amazonaws.com/52.94.13.132]失败:连接超时 在com.amazonaws.http.AmazonHttpClient $ RequestExecutor.handleRetryableException(AmazonHttpClient.java:1069)
连接代码:
ClientConfiguration clientConfiguration = new ClientConfiguration();
clientConfiguration.withProxyHost("http.com");
clientConfiguration.withProxyPort(8080);
clientConfiguration.withProtocol(Protocol.HTTPS);
clientConfiguration.withProtocol(Protocol.HTTP);
AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard()
.withClientConfiguration(clientConfiguration)
.withRegion(Regions.AP_SOUTHEAST_2).build();
但是,当我通过公共互联网运行我的代码时,不会出现此错误。