Howto wait beanstalk environment to be ready
Task: Implement loop to wait till AWS BeansTalk environment will be ready
Implementation:
#!/bin/bash echo 'Waiting...' status='' iterations=0 maxiterations=20 while [[ ( $status != "Ready" ) && ( $iterations -lt $maxiterations ) ]]; do status=$(aws elasticbeanstalk describe-environments --region us-east-1 --environment-name app-env --output text --query 'Environments[0].Status') echo $status sleep 15 ((iterations+=1)) done echo "Done."
Done.