From db06d1a59aa228267095209b87af889141275cf9 Mon Sep 17 00:00:00 2001 From: cwturley Date: Tue, 21 Oct 2014 09:50:24 -0400 Subject: [PATCH] Update ec2-automate-backup-awscli.sh Tagging fails due to error "aws_ec2_create_tag_result='A client error (InvalidID) occurred when calling the CreateTags operation: The ID '\''2014-10-21T13:34:24.000Z'\'' is not valid'" The command "aws ec2 create-snapshot --region $region --description $ec2_snapshot_description --volume-id $ebs_selected --output text" is giving less information, so the position of the ID has changed. --- ec2-automate-backup/ec2-automate-backup-awscli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ec2-automate-backup/ec2-automate-backup-awscli.sh b/ec2-automate-backup/ec2-automate-backup-awscli.sh index 39cf94d..907c777 100755 --- a/ec2-automate-backup/ec2-automate-backup-awscli.sh +++ b/ec2-automate-backup/ec2-automate-backup-awscli.sh @@ -208,7 +208,7 @@ for ebs_selected in $ebs_backup_list; do if [[ $? != 0 ]]; then echo -e "An error occurred when running ec2-create-snapshot. The error returned is below:\n$ec2_create_snapshot_result" 1>&2 ; exit 70 else - ec2_snapshot_resource_id=$(echo "$ec2_create_snapshot_result" | cut -f 5) + ec2_snapshot_resource_id=$(echo "$ec2_create_snapshot_result" | cut -f 3) fi create_EBS_Snapshot_Tags done