command
module
Version:
v1.0.0
Opens a new window with list of versions in this module.
Published: Aug 24, 2022
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
amicleaner
This tool finds and removes orphaned AMIs and their snapshots
It finds all AMIs and identifies those not bound to an
instance that's still in use or to a launch template.
It then finds snapshots not bound to a volume used by
an instance that's in use.
Options:
-dry-run
dry-run (list only) (default true)
-region string
AWS region to search (default "us-east-2")
-verbose
verbose output
The tool expects credentials in the usual way for the
AWS CLI.
Method
- Find all the instances, their image IDs and volumes
- Check the instance state and ignore if in use
- Find all launch templates and their images
- List all AMIs in the account and region
- Remove from that list those tied to an instance or a launch template
- List all snapshots in the account and region
- Remove from the list those tied to an instance's volume (through a block device mapping)
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.