From e124560678366d37bd9261823b6a7b04d9c5ae39 Mon Sep 17 00:00:00 2001 From: Alex Polvi Date: Mon, 14 Oct 2013 15:17:25 -0700 Subject: [PATCH] sneak in some permission stuff --- oem/ami/build_ebs_on_ec2.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/oem/ami/build_ebs_on_ec2.sh b/oem/ami/build_ebs_on_ec2.sh index d92e7dbaf0..2955ce65ab 100755 --- a/oem/ami/build_ebs_on_ec2.sh +++ b/oem/ami/build_ebs_on_ec2.sh @@ -158,6 +158,9 @@ snapshotid=$(ec2-create-snapshot --description "$name" "$volumeid" | cut -f2) while ec2-describe-snapshots "$snapshotid" | grep -q pending do sleep 30; done +echo "Sharing snapshot with Amazon" +ec2-modify-snapshot-attribute "$snapshotid" -c --add 679593333241 + echo "Created snapshot $snapshotid, registering as a new AMI" amiid=$(ec2-register \ --name "$name" \ @@ -168,6 +171,9 @@ amiid=$(ec2-register \ --block-device-mapping $ephemeraldev=ephemeral0 | cut -f2) +echo "Making $amiid public" +ec2-modify-image-attribute "$amiid" --launch-permission -a all + ec2-delete-volume "$volumeid" # hack job to copy AMIs @@ -182,6 +188,7 @@ do --name "$description" \ --region "$r" | cut -f2) + ec2-modify-image-attribute --region "$r" "$amiid" --launch-permission -a all echo "$r $r_amiid" done