适用于iOS的Amazon AWS S3 SDK删除连接(错误-1005)

运行AWSiOSDemoTVM项目时,asynchronousS3演示代码将开始上传数据,但连接将在几秒钟后丢弃。

AWSiOSDemoTVM:didFailWithError:错误域= NSURLErrorDomain代码= -1005“networking连接丢失。”UserInfo = 0xb54e850 {NSErrorFailingURLStringKey = https://BUCKETNAME.s3.amazonaws.com/asyncDemoKey,NSErrorFailingURLKey = https://BUCKETNAME.s3。 amazonaws.com/asyncDemoKey,NSLocalizedDescription =networking连接丢失,NSUnderlyingError = 0xb5527f0“networking连接丢失。”}

小型上传不使用asynchronous委托将成功。

我没有设置桶的正确端点。 默认端点只适用于美国桶。

在AmazonClientManager.m中,为您的存储区域添加正确的端点。

s3 = [[AmazonS3Client alloc] initWithCredentials:credentials]; s3.endpoint = @"https://s3-eu-west-1.amazonaws.com"; 

S3和其他AWS服务的区域端点列表可以在这里find