diff --git a/scripts/ec2gaming-start.sh b/scripts/ec2gaming-start.sh index 3155f2d..5a07df4 100755 --- a/scripts/ec2gaming-start.sh +++ b/scripts/ec2gaming-start.sh @@ -56,8 +56,8 @@ if ! aws iam get-instance-profile --instance-profile-name ec2gaming &> /dev/null 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 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" + aws iam create-instance-profile --instance-profile-name "$PROFILE_NAME" > /dev/null + aws iam add-role-to-instance-profile --instance-profile-name "$PROFILE_NAME" --role-name "$PROFILE_NAME" > /dev/null fi INSTANCE_PROFILE_ARN=$(aws iam get-instance-profile --instance-profile-name ec2gaming | jq -r '.InstanceProfile.Arn') echo "$INSTANCE_PROFILE_ARN"