Skip to content

Commit

Permalink
Add ami description info for perms / slack notification.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mason Packard committed Sep 13, 2016
1 parent 3c79a6c commit 6011a30
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/perms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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\"}]}"

0 comments on commit 6011a30

Please sign in to comment.