Skip to content

Conversation

@lucaswilric
Copy link
Contributor

We keep AMIs if they are tagged with a version.

But we have a few thousand private AMIs that are over a year old, and we're certain they're not being used, even though they have a Version:* tag.

This PR changes the AMI cleanup script such that, for AMIs tagged with Version:*:

  • If they're public, or shared with any other AWS accounts, we keep them, just as we do now.
  • If they are private and not shared with any other AWS accounts, we treat them as if they were not tagged with Version:*, and continue checking for age, recent use, etc.

I'm hoping this will reduce the number of nested conditionals I'm about
to introduce.
@lucaswilric lucaswilric requested a review from a team as a code owner November 10, 2025 02:05
It's in a different org to the CI pipeline!
@scadu scadu enabled auto-merge November 10, 2025 13:36
@scadu scadu merged commit 915c49f into main Nov 10, 2025
1 check passed
@scadu scadu deleted the PLT-4592/deregister-old-private-amis branch November 10, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants