Update snapshot.sh

This commit is contained in:
Alex Grin 2019-12-13 10:10:30 -05:00 committed by GitHub
parent 71ea98abe8
commit 3906fa750b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@
echo "Running $0" echo "Running $0"
hash aws 2>/dev/null || { echo >&2 '`aws` command not found. Install it: sudo apt install awscli'; exit 1; } hash aws 2>/dev/null || { echo >&2 '`aws` command not found. Install it: sudo apt install awscli'; exit 1; }
[ "$(curl -q http://169.254.169.254/latest/meta-data/iam/security-credentials)" == "ec2-snapshotter" ] || { echo >&2 'This instance is missing the "ec2-snapshotter" IAM role'; exit 1; } [ "$(curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials)" == "ec2-snapshotter" ] || { echo >&2 'This instance is missing the "ec2-snapshotter" IAM role'; exit 1; }
user=$(whoami) user=$(whoami)