Package: ec2imgutils
ec2imgutilsA collection of utilities for image management in AWS EC2InstallationopenSUSE and SUSE Linux Enterprise> zypper in python3-ec2imgutilsPyPI> pip install ec2imgutilsUtilitiesec2deprecateimgA command line utility to deprecate images in Amazon EC2. The platform does
not support a formal deprecation mechanism. The mechansim implemented by this
tool is a convention. Unfortunately the tags are not sticky, i.e. not visible
to others if the image is shared.Images are tagged with:Deprecated on -> provided deprecation date or today's date (if no deprecation
date is provided) in YYYYMMDD formatRemoval date -> deprecation date plus the deprecation period specifiedReplacement image -> The AMI ID and name of the replacement image (Optional)The image set as the replacement is removed from the list of potential
images to be deprecated before any matching takes place. Therefore, the
deprecation search criteria specified with--image-name-fragor--image-name-matchcannot match the replacement image.Usage> ec2deprecateimg --account example --image-name-match v15 --image-virt-type hvm \
--replacement-name exampleimage_v16 --deprecation_date 20220510See theman pagesfor more information.man ec2deprecateimgec2listimgA command line utility to list the AMIs in an account.Usage> ec2listimg --account example --image-name-frag foo --region us-west-2See theman pagesfor more information.man ec2listimgec2publishimgA command line utility to control the visibility of an image in AWS EC2.
The utility sets the visibility of an AMI to allow others to use the
image, making it public or sharing it with sepecific accounts, or setting
the image to private, i.e. only available to the account owner.Usage> ec2publishimg --account example --image-name-match production-v2 --share-with allSee theman pagesfor more information.man ec2publishimgec2removeimgA command line utility to remove images in Amazon EC2. Removing an image,
in the sense that all traces of a given image are gone, means the image
(AMI) has to be deregistered and the associated snapshot has to be deleted.
Having to do this in multiple regions in the UI is tedious and from the
the command line is a bookkeeping annoyance. This tool handles the clean up
of images.Usage> ec2removeimg --account example --image-name-match v15See theman pagesfor more information.man ec2removeimgec2uploadimgA command line utility to upload a compressed raw image file, as created by
KIWI for example to Amazon EC2 and create a snapshot or register an EBS
backed AMI. Uploads a compressed raw image to Amazon EC2 using an
existing EC2 AMI and creates a snapshot or registers a new AMI from the
image. The apparent size of the raw image is recommended to be 10 GB or
less. It is expected that the raw image has 1 partition, i.e. the root
partition is/dev/sda1.The process of creating the image is as
follows:Start an instanceCreate a storage volume and attach it to the running instanceCreate volume that will be the new root and attach it to the running
instanceUpload the imageUnpack the image and dump it to the new root volumeDetach the new root volume and create a snapshotRegister a new AMIClean upUsage> ec2uploadimg --account example -d "My first image" -m x86_64 -n my_linux_image -r us-east-1 PATH_TO_COMPRESSED_FILESee theman pagesfor more information.man ec2uploadimg