Closed darpandodiya closed 5 years ago
Awesome! Yes, S3 in us-east-1 has always been a bit odd due to legacy reasons. (When AWS launched S3 in ~2006, Amazon didn’t think new regions would have independent partitioned endpoints.)
And thank you for adding build instructions!
Merged.
Unusually so, in order to create S3 bucket in us-east-1 region, region shouldn't be specified. Not even 'us-east-1'. Wrapping with the Normalization function doesn't work too.
I have added a special case for us-east-1 which has no LocationConstraint. I have tested this on us-east-1 and it works well. Works as usual in other regions too. This fixes #8
I have also added some build instructions.
It's my first time writing any kind of Go code. Please give feedback and reject the pull request if needed.
References: https://medium.com/@DQNEO/amazon-s3s-put-bucket-api-cannot-accept-us-east-1-region-6092df86991b
https://github.com/xiedeacc/go/blob/8df08858f48ef29d0b243f0f631afd961c8e0352/src/github.com/aws/aws-sdk-go-v2/service/s3/bucket_location.go#L92
https://github.com/s3tools/s3cmd/blob/ae6cddee12731ad611c422e8aacdb494bad0de73/S3/S3.py#L381
https://github.com/boto/boto3/issues/125