result_id=`ec2-run-instances $AMI --region ap-northeast-1 --user-data "$WAR" --instance-type $TYPE --availability-zone $ZONE --key $KEY  --kernel $KERNEL --group default --group $GROUP | grep INSTANCE | sed 's/^INSTANCE\s\+//g' | sed 's/\s.*$//g'`
echo "instance_id: $result_id created !"

関連記事