From 6ea4156b43613ff986df7d2aedb6f151405332ab Mon Sep 17 00:00:00 2001 From: Danny Thomas Date: Sat, 29 Oct 2016 21:54:34 -0700 Subject: [PATCH] Add wait --- scripts/ec2gaming-start.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ec2gaming-start.sh b/scripts/ec2gaming-start.sh index 5a07df4..11f49b3 100755 --- a/scripts/ec2gaming-start.sh +++ b/scripts/ec2gaming-start.sh @@ -58,6 +58,7 @@ if ! aws iam get-instance-profile --instance-profile-name ec2gaming &> /dev/null 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" > /dev/null aws iam add-role-to-instance-profile --instance-profile-name "$PROFILE_NAME" --role-name "$PROFILE_NAME" > /dev/null + aws iam wait instance-profile-exists --instance-profile-name ec2gaming fi INSTANCE_PROFILE_ARN=$(aws iam get-instance-profile --instance-profile-name ec2gaming | jq -r '.InstanceProfile.Arn') echo "$INSTANCE_PROFILE_ARN"