diff --git a/bin/perms.sh b/bin/perms.sh index c773256..0d2f79d 100755 --- a/bin/perms.sh +++ b/bin/perms.sh @@ -1,7 +1,7 @@ #!/bin/bash -aws_acct_id="750790314930" -bucket="internet2-appliance-us-west-1" +aws_acct_id="823003027569" +bucket="internet2-tier-appliance-us-west-1" vagrant_key=$(aws s3api list-objects --bucket $bucket --query 'reverse(sort_by(Contents[?contains(Key, `vagrant`)], &LastModified))[0].[Key]' --output text | tr -d '\n' ) ova_key=$(aws s3api list-objects --bucket $bucket --query 'reverse(sort_by(Contents[?contains(Key, `ova`)], &LastModified))[0].[Key]' --output text | tr -d '\n' ) @@ -22,8 +22,5 @@ echo $(md5sum 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\"}]}"