Commit a4daa88f authored by Victor Marmol's avatar Victor Marmol

Merge pull request #6090 from justinsb/use_s3_bucket_location

Use the correct region for the S3 bucket
parents 2f6c3d9f 194143e6
...@@ -236,8 +236,9 @@ function upload-server-tars() { ...@@ -236,8 +236,9 @@ function upload-server-tars() {
aws s3 mb "s3://${AWS_S3_BUCKET}" --region ${AWS_S3_REGION} aws s3 mb "s3://${AWS_S3_BUCKET}" --region ${AWS_S3_REGION}
fi fi
local s3_url_base=https://s3-${AWS_S3_REGION}.amazonaws.com local s3_bucket_location=$(aws --output text s3api get-bucket-location --bucket ${AWS_S3_BUCKET})
if [[ "${AWS_S3_REGION}" == "us-east-1" ]]; then local s3_url_base=https://s3-${s3_bucket_location}.amazonaws.com
if [[ "${s3_bucket_location}" == "us-east-1" ]]; then
# us-east-1 does not follow the pattern # us-east-1 does not follow the pattern
s3_url_base=https://s3.amazonaws.com s3_url_base=https://s3.amazonaws.com
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment