Only grab running instances
@@ -29,6 +29,7 @@ EOF
SERVER_INSTANCE_ID=$(
aws ec2 describe-instances \
--filter Name=tag:Name,Values="${SERVER_TYPE}" \
+ --filter Name="instance-state-name",Values="running" \
--query="Reservations[0].Instances[0].InstanceId" \
--output=text
)
