Skip to content

Commit

Permalink
add logging (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
arianvp authored Mar 16, 2024
1 parent dacda55 commit 86d1e74
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions upload-ami/src/upload_ami/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def register_image_if_not_exists(ec2, image_name, image_info, snapshot_id, publi

ec2.get_waiter("image_available").wait(ImageIds=[image_id])
if public:
logging.info(f"Making {image_id} public")
ec2.modify_image_attribute(
ImageId=image_id,
Attribute="launchPermission",
Expand Down Expand Up @@ -157,6 +158,7 @@ def copy_image(image_id, image_name, source_region, target_region_name):
f"Finished image {image_id} from {source_region} to {target_region_name} {copy_image['ImageId']}"
)
if public:
logging.info(f"Making {copy_image['ImageId']} public")
ec2r.modify_image_attribute(
ImageId=copy_image["ImageId"],
Attribute="launchPermission",
Expand Down

0 comments on commit 86d1e74

Please sign in to comment.