aws-amicleaner icon indicating copy to clipboard operation
aws-amicleaner copied to clipboard

support multiple accounts

Open lifeofguenter opened this issue 6 years ago • 2 comments

a cross check over multiple accounts would be great, maybe by allowing to specify multiple profile-names via cli-arg and then looping through those.

the region can be static as those ami's would be copies anyways?

lifeofguenter avatar Dec 12 '17 08:12 lifeofguenter

Just curious, is this because you share AMI's across accounts and you want to operate from a single list or would just running tool twice across separate accounts be doable?

actionjack avatar Jun 11 '18 12:06 actionjack

Yes, AMIs are shared across accounts so they can be managed centrally and independent.

Running the script multiple times would not help because I'd still have to somehow create a cross-check if an AMI-id is still being used.

E.g. I can not delete the AMI from SOURCE if DEST-A or DEST-B are still using it.

I created already a simple tool in PHP that will do that: https://github.com/NINEJKH/mamicleaner - e.g. it accepts multiple -p (= profile) args and will only delete images that are not being used in either of the profiles.

The first -p value assumes the SOURCE.

lifeofguenter avatar Jun 14 '18 12:06 lifeofguenter