diff --git a/scripts/ec2gaming-start.sh b/scripts/ec2gaming-start.sh index 0dc7938..3155f2d 100755 --- a/scripts/ec2gaming-start.sh +++ b/scripts/ec2gaming-start.sh @@ -54,7 +54,7 @@ echo -n "Looking for instance profile... " if ! aws iam get-instance-profile --instance-profile-name ec2gaming &> /dev/null; then echo -n "not found. Creating... " aws iam create-role --role-name "$PROFILE_NAME" --assume-role-policy-document file://ec2gaming-trustpolicy.json > /dev/null - sed "s/BUCKET/$BUCKET/g" ec2gaming-permissionpolicy.json.template > ec2gaming-permissionpolicy.json > /dev/null + sed "s/BUCKET/$BUCKET/g" ec2gaming-permissionpolicy.json.template > ec2gaming-permissionpolicy.json aws iam put-role-policy --role-name "$PROFILE_NAME" --policy-name "$PROFILE_NAME" --policy-document file://ec2gaming-permissionpolicy.json > /dev/null aws iam create-instance-profile --instance-profile-name "$PROFILE_NAME" aws iam add-role-to-instance-profile --instance-profile-name "$PROFILE_NAME" --role-name "$PROFILE_NAME"