Skip to content

Instantly share code, notes, and snippets.

@sunnyone
Last active January 18, 2018 08:49
Show Gist options
  • Save sunnyone/f4fcee33290b7f438181f57f4f2c8fa3 to your computer and use it in GitHub Desktop.
Save sunnyone/f4fcee33290b7f438181f57f4f2c8fa3 to your computer and use it in GitHub Desktop.
Wait CloudFront deployed
#!/bin/sh
if [ -z "$1" ] ; then
echo usage: $0 id
exit 1
fi
CLOUDFRONT_ID=$1
while true; do
STATUS=$(aws cloudfront get-distribution --id "$CLOUDFRONT_ID" | jq -r .Distribution.Status)
echo $STATUS
if [ "$STATUS" = "Deployed" ] ; then
notify-send "CloudFront status is done"
exit
fi
sleep 10
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment