Sha256: 900520370b73079747325183423c561dbd206e63a4d51fac51413604b9c0e352

Contents?: true

Size: 722 Bytes

Versions: 11

Compression:

Stored size: 722 Bytes

Contents

Examples:

    $ aws-ec2 clean ami 'base-amazonlinux2*'
    $ aws-ec2 clean ami 'base-ubuntu*' --keep 5
    $ aws-ec2 clean ami 'base-ubuntu*' --noop # dry-run

Deletes old AMIs using the provided name as the base portion of the AMI name to search for.

Let's say you have these images:

    base-ubuntu_2018-03-25-04-20
    base-ubuntu_2018-03-25-03-39
    base-ubuntu_2018-03-25-02-57
    base-ubuntu_2018-03-25-02-47
    base-ubuntu_2018-03-25-02-43
    base-ubuntu_2018-03-23-00-15

Running:

    $ aws-ec2 clean ami 'base-ubuntu*'

Would delete all images and keep the 2 most recent AMIs.  The default `--keep` value is 2.  Make sure to surround the query pattern with a single quote to prevent shell glob expansion.

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
aws-ec2-1.4.9 lib/aws_ec2/help/clean/ami.md
aws-ec2-1.4.8 lib/aws_ec2/help/clean/ami.md
aws-ec2-1.4.7 lib/aws_ec2/help/clean/ami.md
aws-ec2-1.4.6 lib/aws_ec2/help/clean/ami.md
aws-ec2-1.4.5 lib/aws_ec2/help/clean/ami.md
aws-ec2-1.4.4 lib/aws_ec2/help/clean/ami.md
aws-ec2-1.4.3 lib/aws_ec2/help/clean/ami.md
aws-ec2-1.4.2 lib/aws_ec2/help/clean/ami.md
aws-ec2-1.4.1 lib/aws_ec2/help/clean/ami.md
aws-ec2-1.4.0 lib/aws_ec2/help/clean/ami.md
aws-ec2-1.3.2 lib/aws_ec2/help/clean/ami.md