File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -169,14 +169,18 @@ func (p *AWSProvider) mkBucket(name string) error {
169169 _ , err := client .HeadBucket (* p .goContext , & s3.HeadBucketInput {Bucket : & name })
170170
171171 if err != nil {
172- _ , err = client .CreateBucket (* p .goContext ,
173- & s3.CreateBucketInput {
174- Bucket : & name ,
175- CreateBucketConfiguration : & s3Types.CreateBucketConfiguration {
176- LocationConstraint : s3Types .BucketLocationConstraint (p .Region ()),
177- },
178- },
179- )
172+
173+ bucket := & s3.CreateBucketInput {
174+ Bucket : & name ,
175+ }
176+
177+ if p .Region () != "us-east-1" {
178+ bucket .CreateBucketConfiguration = & s3Types.CreateBucketConfiguration {
179+ LocationConstraint : s3Types .BucketLocationConstraint (p .Region ()),
180+ }
181+ }
182+
183+ _ , err = client .CreateBucket (* p .goContext , bucket )
180184 return err
181185 }
182186
You can’t perform that action at this time.
0 commit comments