From 70797543e48cadd07ff40eea6edecd6cb48f2443 Mon Sep 17 00:00:00 2001 From: "Timothy J. Aveni" Date: Sat, 27 Jun 2026 23:19:18 -0700 Subject: [PATCH] Require published AMI role tag --- manage-amis.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/manage-amis.ts b/manage-amis.ts index 7af323f..8fff874 100644 --- a/manage-amis.ts +++ b/manage-amis.ts @@ -146,6 +146,7 @@ const listImages = (state) => { const filters = [ "Name=state,Values=available", `Name=tag:Project,Values=${state.name}`, + "Name=tag:Role,Values=published-ami", ]; if (state.architecture) { filters.push(`Name=tag:Architecture,Values=${state.architecture}`); @@ -163,10 +164,6 @@ const listImages = (state) => { ]); return (result?.Images ?? []) - .filter((image) => { - const tags = amiTags(image); - return tags.Role === "published-ami" || Boolean(tags.RootSnapshotId || tags.NixSnapshotId); - }) .sort((a, b) => String(b.CreationDate ?? "").localeCompare(String(a.CreationDate ?? ""))); };