No RegionEndpoint or ServiceURL configured

后端 未结 5 1993
野性不改
野性不改 2021-01-01 09:35

I am writing code to upload files to AWS S3 and receiving this exception:

AmazonClientException: No RegionEndpoint or ServiceURL configured

5条回答
  •  执念已碎
    2021-01-01 10:35

    If you are using TransferUtility() try this:

    var credentials = new BasicAWSCredentials(accessKeyID, secretKey);
    
    var S3Client = new AmazonS3Client(credentials, RegionEndpoint.USEast1);
    
    this._transferUtility = new TransferUtility(S3Client);
    

提交回复
热议问题