Do not mark copied AMIs as public

It fails if the AMIs are pending:

| Client.InvalidAMIID.Unavailable: The AMI ID '...' is currently pending and may not be used for this operation

and we don't want to block (yet).
changes/46/546/1
Michael Prokop 11 years ago
parent ee60bcc3d8
commit 1aea8b892f

@ -87,15 +87,6 @@ copy_ami() {
return 1
fi
if $_opt_public ; then
echo "Marking AMI $ami_id_copy as public"
ec2-modify-image-attribute --region "$target_region" "$ami_id_copy" --launch-permission -a all
if [ $? -ne 0 ] ; then
echo "Noticed problem when trying to mark AMI with ID $ami_id_copy in region $target_region as public." >&2
return 1
fi
fi
# for usage as global report
echo "AMI ID for region ${target_region}: $ami_id_copy" >> ec2_report_amis.txt
;;

Loading…
Cancel
Save