Skip to content

Suspend SPA bucket versioning and expire old versions after 30 days - #9

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/spa-bucket-versioning-f4e1
Oct 16, 2026
Merged

cursor[bot] merged 1 commit into
mainfrom
cursor/spa-bucket-versioning-f4e1

Conversation

@keval6b

@keval6b keval6b commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Summary

The frontend bucket kept every previous deploy because versioning was enabled and nothing expired noncurrent objects. aws s3 sync --delete then left those old assets in place.

  • Versioning on the SPA bucket is now Suspended. S3 cannot return a bucket that has had versioning enabled to an unversioned state, so suspended is the off setting.
  • A lifecycle rule deletes noncurrent versions after 30 days and removes expired delete markers.

Current objects are left in place. New uploads overwrite the single null version instead of stacking another copy.

Test plan

  • tofu plan against staging shows the versioning status change and the new lifecycle rule, with no other SPA bucket changes.
  • After apply, the bucket versioning status is Suspended and the expire-old-versions rule is enabled with a 30-day noncurrent expiration.
Open in Web Open in Cursor 

S3 cannot return a versioned bucket to unversioned, so versioning is suspended and a lifecycle rule deletes noncurrent versions after 30 days.

Co-authored-by: Keval Kapdee <keval@kapdee.uk>
@keval6b
keval6b marked this pull request as ready for review October 16, 2026 23:44
@cursor
cursor Bot merged commit 78c4e24 into main Oct 16, 2026
1 check passed
@cursor
cursor Bot deleted the cursor/spa-bucket-versioning-f4e1 branch October 16, 2026 23:44
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.

2 participants