Add a lifecycle configuration to the S3 bucket that stores cyhy-archive backups#880
Open
Add a lifecycle configuration to the S3 bucket that stores cyhy-archive backups#880
cyhy-archive backups#880Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds S3 bucket lifecycle management to automatically transition archived data to more cost-effective storage classes over time. The lifecycle rule transitions objects with the cyhy_archive_ prefix to Glacier Instant Retrieval after 30 days and to Glacier Deep Archive after 120 days total.
- Configures lifecycle transitions for cost optimization of long-term archive storage
- Adds configurable variable for lifecycle rule naming
- Updates documentation to reflect the new lifecycle configuration resource
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| terraform/variables.tf | Adds variable for lifecycle rule name configuration |
| terraform/cyhy_archive_bucket.tf | Implements S3 bucket lifecycle configuration with storage class transitions |
| terraform/README.md | Updates documentation to include the new lifecycle configuration resource and variable |
jsf9k
approved these changes
Aug 4, 2025
dv4harr10
approved these changes
Aug 4, 2025
57b137c to
7463b3a
Compare
7463b3a to
3c5a301
Compare
3c5a301 to
93527a4
Compare
jsf9k
approved these changes
Sep 10, 2025
93527a4 to
7ccdb36
Compare
This adds a lifecycle configuration to the cyhy-archive S3 bucket that will transition the cyhy-archive script's output archives to progressively cheaper to store S3 storage classes. These storage classes may incur additional charge to access, or require restoration before they can be accessed, but given how infrequently this data is accessed we should see notable cost savings.
Directly state the age of an object in the cyhy-archive S3 bucket when it is transitioned to a new storage class. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: dav3r <david.redmin@gwe.cisa.dhs.gov>
7ccdb36 to
72a70d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🗣 Description
This pull request adds an S3 bucket lifecycle configuration to the bucket that stores
cyhy-archivearchives. This lifecycle configuration transitions any objects that start with the archive prefix to Glacier Instant Retrieval at 30 days and to Glacier Deep Archive after another 90 days.💭 Motivation and context
As was pointed out in #871 there are some cost savings to be had by managing the lifecycle of objects we store in S3 long-term. Since we do not typically use this data it makes sense to move it directly into Glacier storage classes once enough time has passed.
🧪 Testing
Automated tests pass.
Note
Once we have settled on storage classes and age for transitioning objects I will deploy this to my test environment and verify that objects are transitioned. As mentioned in the user guide: "the configuration rules apply to both existing objects and objects that you add later".
✅ Pre-approval checklist