Skip to content
Permalink
Browse files

Adding even more info

  • Loading branch information
Jim Van Fleet
Jim Van Fleet committed Sep 6, 2016
1 parent c33dc1b commit ff47790d7744b505d2ec31cc2f9b81af2040fafa
Showing with 11 additions and 2 deletions.
  1. +11 −2 bin/perms.sh
@@ -8,10 +8,19 @@ ova_key=$(aws s3api list-objects-v2 --bucket $bucket --query 'reverse(sort_by(Co
echo "Found $vagrant_key"
aws s3api put-object-acl --bucket $bucket --key $vagrant_key --acl public-read

echo "(https://s3-us-west-1.amazonaws.com/$bucket/$vagrant_key)"

echo $(md5 builds/$vagrant_key)

echo "Found $ova_key"
aws s3api put-object-acl --bucket $bucket --key $ova_key --acl public-read

echo "(https://s3-us-west-1.amazonaws.com/$bucket/$ova_key)"

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 "Found $ami_id"
echo "Publishing $ami_id to $aws_acct_id"

aws ec2 modify-image-attribute --image-id $ami_id --launch-permission "{\"Add\":[{\"UserId\":\"$aws_acct_id\"}]}"

aws ec2 modify-image-attribute --image-id $ami_id --launch-permission "{\"Add\":[{\"UserId\":\"$aws_acct_id\"}]}"

0 comments on commit ff47790

Please sign in to comment.
You can’t perform that action at this time.