Skip to content

Commit

Permalink
Allow S3 bucket creation in us-east-1 region
Browse files Browse the repository at this point in the history
  • Loading branch information
mumumumu committed May 14, 2022
1 parent 67c84c3 commit c6eff63
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions replibyte/src/datastore/s3.rs
Expand Up @@ -443,13 +443,22 @@ fn create_bucket<'a>(client: &Client, bucket: &'a str, region: &str) -> Result<(
return Ok(());
}

let result = block_on(
client
.create_bucket()
.create_bucket_configuration(cfg)
.bucket(bucket)
.send(),
);
let result = if region == "us-east-1" {
block_on(
client
.create_bucket()
.bucket(bucket)
.send(),
)
} else {
block_on(
client
.create_bucket()
.create_bucket_configuration(cfg)
.bucket(bucket)
.send(),
)
};

match result {
Ok(_) => {}
Expand Down

0 comments on commit c6eff63

Please sign in to comment.