kpfaulkner / azurecopy

copy blobs between azure, s3 and local storage
Apache License 2.0
36 stars 13 forks source link

GenerateS3Client fails, if accessed region is not default #40

Open crazy-gecko opened 5 years ago

crazy-gecko commented 5 years ago

I had problems accessing my AWS that's not located in the default region us-east-1, even when I used the region setting (using the commandline parameter). I changed the code in file S3Helper.cs in line 154 from IAmazonS3 client = new AmazonS3Client( accessKey, secretKey); to IAmazonS3 client = new AmazonS3Client( accessKey, secretKey, RegionEndpoint.USEast1);

This way it worked and even the assigned region of the bucket was then correctly read and used while reading the content.

Am I missing anything or would this code change be something you would want to include?