I am writing code to upload files to AWS S3 and receiving this exception:
AmazonClientException: No RegionEndpoint or ServiceURL configured
The short answer to error...
Amazon.Runtime.AmazonClientException: No RegionEndpoint or ServiceURL configured
...in my case was to specify a region when constructing the client object (for me it was AmazonSimpleEmailServiceClient
).
Assuming you're using BasicAWSCredentials
then try this:
var credentials = new BasicAWSCredentials(accessKeyID, secretKey);
new AmazonS3Client(credentials, RegionEndpoint.USEast1);
// ^^^^^^^^^^^^^^^^^^^^^^ add this