From 64b461d1edd127847413c6a6c569a940a6076118 Mon Sep 17 00:00:00 2001 From: Bradley Windybank Date: Tue, 25 Aug 2026 09:20:33 +1200 Subject: [PATCH] docs: record the retirement of the superseded artefact stores The pre-migration ECR repo and SAM-managed S3 bucket were deleted on 2026-08-25, along with their owning stacks, once the first CI deploy against the bootstrap stores was confirmed to land its artefacts there and nowhere else. Records what the deletion actually required (ECR images removed first because the companion stack's repository sets neither EmptyOnDelete nor a retain policy; all 158 S3 object versions and delete markers purged, since `aws s3 rm --recursive` only writes delete markers on a versioned bucket) and the one consequence worth knowing: the stack can no longer roll back to a version deployed before that date. Co-Authored-By: Claude Opus 5 --- .claude/rules/build-test-deploy.md | 40 ++++++++++++++++++------------ 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/.claude/rules/build-test-deploy.md b/.claude/rules/build-test-deploy.md index 2c39299..24d5f9f 100644 --- a/.claude/rules/build-test-deploy.md +++ b/.claude/rules/build-test-deploy.md @@ -157,22 +157,30 @@ add another artefact store, add its output to `infra/bootstrap.yaml` and read it `CONVERTER_ECR_REPO` is no longer referenced by anything and can be deleted from the repository's `production` environment. -### Superseded resources - -The pre-migration artefact stores still exist and still hold their history: - -- ECR `nzimageapi40221342/jp2converterfunctione92cbfdcrepo`, owned by the SAM-generated - `nzimageapi-40221342-CompanionStack`. -- S3 `aws-sam-cli-managed-default-samclisourcebucket-tfqwkahyri86`, owned by the - `aws-sam-cli-managed-default` stack. - -Both had the same lifecycle policies applied imperatively on 2026-08-24, so they drain on -their own rather than sitting there forever. Leave them until a deploy against the new -repo and bucket is confirmed working and you are past wanting to roll back to an old image. - -Note that CI kept writing to both of them until the deploy job was pointed at the bootstrap stack -(see "The wiring in CI" above), so their newest contents are more recent than the migration date -suggests. +### Superseded resources (retired 2026-08-25) + +The pre-migration artefact stores are **gone**. Both were deleted on 2026-08-25, once a CI +deploy against the bootstrap stores was confirmed: + +- ECR `nzimageapi40221342/jp2converterfunctione92cbfdcrepo` and its owning SAM-generated + `nzimageapi-40221342-CompanionStack` (3 remaining images deleted first, since the stack's + `AWS::ECR::Repository` sets neither `EmptyOnDelete` nor a retain policy and would otherwise + fail to delete). +- S3 `aws-sam-cli-managed-default-samclisourcebucket-tfqwkahyri86` and its owning + `aws-sam-cli-managed-default` stack (158 object versions and delete markers purged first; + `aws s3 rm --recursive` alone is not enough on a versioned bucket, it only writes delete + markers). + +The account now holds exactly one ECR repository and one S3 bucket, both from +`infra/bootstrap.yaml`. + +The practical consequence: CloudFormation cannot roll the `nzimageapi` stack back to any +version deployed before 2026-08-25, because those templates and images no longer exist. Every +artefact from that date on lives in the bootstrap stores under their retention policies. + +They lasted as long as they did because CI kept writing to both of them until the deploy job was +pointed at the bootstrap stack (see "The wiring in CI" above), which is why their final contents +were newer than the migration date suggested. ### When adding a new container-image Lambda