From 6011a309657c47085cb6445c2ea164e830df7890 Mon Sep 17 00:00:00 2001 From: Mason Packard Date: Tue, 13 Sep 2016 09:39:08 -0400 Subject: [PATCH] Add ami description info for perms / slack notification. --- bin/perms.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/perms.sh b/bin/perms.sh index 0b378a6..9ce6c23 100755 --- a/bin/perms.sh +++ b/bin/perms.sh @@ -22,5 +22,8 @@ echo $(md5 builds/$ova_key) ami_id=$(aws ec2 describe-images --owners $aws_acct_id --query 'reverse(sort_by(Images[?starts_with(Name, `import-ami`)], &CreationDate))[0].[ImageId]' --output text | tr -d '\n' ) echo "Publishing $ami_id to $aws_acct_id" +ami_image_description=$(aws ec2 describe-images --image-ids $ami_id --query 'Images[0].{Description:Tags[0].Value}') +echo $ami_image_description + aws ec2 modify-image-attribute --image-id $ami_id --launch-permission "{\"Add\":[{\"UserId\":\"$aws_acct_id\"}]}"