According to the specified region, the script will search on all running instances, then it extracts the volumes ids attached to those EBS volumes, then it takes a snapshot for each volume with a consistent tagging approach.
- aws-cli 1.14.50 or later (https://github.com/aws/aws-cli/archive/1.14.50.tar.gz)
REMOTE_SCRIPT=https://cdn.rawgit.com/abdennour/d2f62543ec0b4b1d148bbd296f563ccc/raw/258d51a779686764afe5c17efb40353695392e71/ebs_create_snashopt_of_region.sh
LOCAL_SCRIPT=/usr/local/bin/create_ebs_snapshot_per_region
curl -sSL $REMOTE_SCRIPT > $LOCAL_SCRIPT
chmod u+x $LOCAL_SCRIPT
export AWS_PROFILE=snapshotter # Your choice when you ran "aws configure"
AWS_REGION=eu-west-1 create_ebs_snapshot_per_region eu-west-1
# for another region
AWS_REGION=eu-central-1 create_ebs_snapshot_per_region eu-central-1
How to use