Giter Site home page Giter Site logo

Comments (3)

bonclay7 avatar bonclay7 commented on September 23, 2024

Hi !

If I understand correctly what you want to do, I think yes it's possible.

You can specify that you want to group your AMIs based on the tags, with all the tags you provide, the tool will match all the AMIs with the same Tags keys and values together and then regroup them.

Let's say I have 3 AMIs : 2 test-1, and 1 test-1, all with the same SourceAmi tag.

The following run :

amicleaner --full-report --mapping-key tags --mapping-values SourceAmi Name --keep-previous 0

will result with this :

ami-ed82e39e.test-1
+--------------+-----------------------+--------------------------+
|    AMI ID    |        AMI Name       |      Creation Date       |
+--------------+-----------------------+--------------------------+
| ami-0badf878 | gatling-61e878a | 2016-11-03T10:45:49.000Z |
| ami-86d287f5 | gatling-8d2c6bc | 2016-11-03T13:09:10.000Z |
+--------------+-----------------------+--------------------------+

test-2
+--------------+-----------------------+--------------------------+
|    AMI ID    |        AMI Name       |      Creation Date       |
+--------------+-----------------------+--------------------------+
| ami-c398afa5 | gatling-61e878a | 2017-03-15T17:01:13.000Z |
+--------------+-----------------------+--------------------------+

AMIs to be removed:
+---------------------+------------+
|      Group name     | candidates |
+---------------------+------------+
| ami-ed82e39e.test-1 |     2      |
|        test-2       |     1      |
+---------------------+------------+

please let me know

from aws-amicleaner.

rquadling avatar rquadling commented on September 23, 2024

The tags are custom tags, not named AMIs. All the AMIs are named based upon the nature of their use (i.e. app, cron, etc.), not upon the expected environment.

As an example, these are the tags I have for a production-master AMI

image

from aws-amicleaner.

bonclay7 avatar bonclay7 commented on September 23, 2024

Actually, the Name I used in my example is a tag, like most of AWS resources. Go ahead and try to give the custom tag keys you want to filter on.

from aws-amicleaner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.