aws ec2 create-snapshot --volume-id vol-xxxxxxx --description "nameofsnap-`date +%d%m%y-%HHRs-%MMin-%SSec`" > /tmp/volback.out
x=`cat /tmp/volback.out|tail -2|awk '{print $2}'`
aws ec2 create-tags --resources `echo "$x" | sed -e 's/^"//' -e 's/"$//'` --tags Key=Owner,Value=Owner1 Key=Project,Value=Project1 Key=Application,Value=App1 Key=Environment,Value=PROD Key=Name,Value=AWS
x=`cat /tmp/volback.out|tail -2|awk '{print $2}'`
aws ec2 create-tags --resources `echo "$x" | sed -e 's/^"//' -e 's/"$//'` --tags Key=Owner,Value=Owner1 Key=Project,Value=Project1 Key=Application,Value=App1 Key=Environment,Value=PROD Key=Name,Value=AWS
Comments