Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix loop in export AMI script #2446

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions projects/aws/eks-a-admin-image/build/export-ami-to-s3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ for i in $(seq 1 $MAX_RETRIES); do
done

# Wait in loop until instance is running
aws ec2 wait instance-running --instance-ids $INSTANCE_ID
aws ec2 wait instance-running --instance-ids $INSTANCE_ID && echo "EC2 instance $INSTANCE_ID is in Running state"

# Amazon Inspector requires that the instance be managed by AWS Systems Manager, so we wait until
# the condition is satisfied
Expand All @@ -115,7 +115,7 @@ for i in $(seq 1 $MAX_RETRIES); do
fi

sleep 15
fi
done

# Generate the findings report for the EC2 instance using Amazon Inspector V2
# and export it to an S3 bucket
Expand Down