ec2removeimg(1)

πŸ“¦ version 10.0.3, in opensuse-leap 16.0

✨ NAME ✨

okay so bestie, this is ec2removeimg(1) from the General Commands Manual, and it's literally the glow-up helper for removing images in EC2. That's the vibe. πŸ’…

🌸 SYNOPSIS 🌸

ec2removeimg [option]

πŸ’– DESCRIPTION πŸ’–

ec2removeimg removes an image in EC2 by deregistering the AMI and deleting the associated snapshot. iconic behavior, no cap. πŸ¦‹

πŸŽ€ OPTIONS πŸŽ€

  • -a, --account ACCOUNT_NAME β€” tells the program which account to use to connect to EC2. The account is specified in the config file ~/.ec2utils.conf, as a section with [account-ACCOUNT_NAME] delimiter. The options of the sections are: access_key_id secret_access_key ssh_key_name and ssh_private_key. This allows the program to connect to EC2. If the access_key_id and/or secret_access_key are not found in ~/.ec2utils.conf, the search will use ACCOUNT_NAME to look for a matching section [profile ACCOUNT_NAME] in ~/.aws/config or [ACCOUNT_NAME] in ~/.aws/credentials. Only the access_key_id and secret_access_key options are used by this tool. πŸ”‘
  • --access-id AWS_ACCESS_KEY β€” specifies the AWS access key and overrides the value given for the account with the access_key_id in the configuration file. πŸ’³
  • --all β€” deletes all images that match the criteria for image lookup. By default the tool will only delete an image if there is a singular match. so yes, this is the "go off, delete the whole matching set" button. πŸ”₯
  • -n, --dry-run β€” the program will not perform any action. It will provide information on stdout about the actions it would perform. perfect for a little look-see before the real thing. πŸ™ˆ
  • -f, --file CONFIG_FILE β€” specifies the configuration file to use. The default is ~/.ec2utils.conf. πŸ—‚οΈ
  • --image-id AMI_ID β€” specify the AMI ID of the image to be removed. This option is mutually exclusive with the --image-name, --image-name-frag, and --image-name-match. pick one selector, bestie. 🎯
  • --image-name IMAGE_NAME β€” specify the name of the image to be removed. The program will look for an exact match of the name. This option is mutually exclusive with --image-id, --image-name-frag, and --image-name-match. exact-name energy. ✨
  • --image-name-frag IMAGE_NAME_FRAGMENT β€” specify a section of an image name for the image(s) to be removed. Every image that matches the name fragment will be removed. This option is mutually exclusive with --image-id, --image-name, and --image-name-match. fragment hunting, lowkey powerful. 🧚
  • --image-name-match REGEX β€” specify a regular expression to match an image name. Every image matching the regular expression will be removed. This option is mutually exclusive with --image-id, --image-name, and --image-name-frag. regex girlies rise. 🌈
  • --no-confirm β€” delete the image without waiting for confirmation input. This will only delete the image without confirmation if there is a unique match of the image selection criteria given or if the --all option is specified, all matches will be deleted. proceed with intention, okay? πŸ’€
  • --preserve-snap β€” this option will preserve the snapshot associated with the AMI. keep the little snapshot safe. 🫢
  • -r, --regions EC2_REGIONS β€” a comma separated list of Amazon EC2 regions, or a single region. If no region argument is specified all EC2 connected regions will be processed. EC2 disconnected regions have different API keys and thus the specified account would not work with the disconnected regions. If a disconnected region is to be processed specify the region explicitly on the command line, and only the region of interest along with the matching account. 🌍
  • -s, --secret-key AWS_SECRET_KEY β€” specifies the AWS secret access key and overrides the value given for the account with the secret_access_key in the configuration file. 🀫
  • --verbose β€” print extra output about the operations performed to STDOUT. give me the lore. πŸ“£
  • --version β€” print the version of the program. πŸ‘‘

πŸ¦‹ EXAMPLE πŸ¦‹

ec2removeimg --account example --image-name-match v15 --all --no-confirm --verbose

Will delete all images in all connected regions that match the v15 regular expression in the image name. All associated snapshots will be deleted as well, no confirmation of the delete operation is required by the user and progress will be written to STDOUT. ate that. πŸ’…πŸ”₯

πŸ‘‘ AUTHOR πŸ‘‘

SUSE Public Cloud Team (public-cloud-dev@susecloud.net) β€” icons only. 🫢


okay that's the whole ec2removeimg(1) page from the General Commands Manual β€” the footer has no extra version or date to flex, so we're done, bestie πŸ’…πŸŽ€

πŸ“¦ where this page comes from