]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[cloud] Remove AWS public image access block automatically if needed
authorMichael Brown <mcb30@ipxe.org>
Fri, 17 Oct 2025 13:21:06 +0000 (14:21 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 17 Oct 2025 13:22:21 +0000 (14:22 +0100)
Making images public is blocked by default in new AWS regions.  Remove
this block automatically whenever creating a public image.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
contrib/cloud/aws-import

index 3b6b5223a0efc620317f467479b781c2f59f4118..8ec71f454a90522301d0296d2d84460f5c8cdce8 100755 (executable)
@@ -104,6 +104,7 @@ def import_image(region, name, family, architecture, image, public, overwrite,
     image_id = image['ImageId']
     client.get_waiter('image_available').wait(ImageIds=[image_id])
     if public:
+        client.disable_image_block_public_access()
         resource.Image(image_id).modify_attribute(Attribute='launchPermission',
                                                   OperationType='add',
                                                   UserGroups=['all'])