From bea726ba662e89ae4907b43ae0dce32d49c178d8 Mon Sep 17 00:00:00 2001 From: Neil Pullman Date: Sat, 3 Dec 2016 21:49:25 -0500 Subject: [PATCH] pass a blank string to boto for region if using us-east-1 --- scripts/ec2gaming-start.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/ec2gaming-start.sh b/scripts/ec2gaming-start.sh index 11f49b3..d274bcc 100755 --- a/scripts/ec2gaming-start.sh +++ b/scripts/ec2gaming-start.sh @@ -44,6 +44,11 @@ BUCKET="ec2gaming-$ACCOUNT_ID" if ! aws s3api head-bucket --bucket "$BUCKET" &> /dev/null; then echo -n "not found. Creating... " REGION=$(aws configure get region) + + if REGION == 'us-east-1'; then + REGION='' + fi + aws s3api create-bucket --bucket "$BUCKET" --region "$REGION" --create-bucket-configuration LocationConstraint="$REGION" > /dev/null fi sed "s/BUCKET/$BUCKET/g;s/USERNAME/$USERNAME/g;s/PASSWORD/$PASSWORD/g" ec2gaming.bat.template > ../ec2gaming.bat