Repository navigation
Add lifecycle rules to S3 buckets - #271
Conversation
a956631 to
6556b55
Compare
cecilia-donnelly
left a comment
There was a problem hiding this comment.
I'd like to start with doing this on dev only so we can see what happens, and then follow up next week on prod. I know we said "AWS probably does the right thing" re too many requests to the bucket, etc, but it would give me some peace of mind to check.
| alias = "us_east_1" | ||
| profile = "default" | ||
| region = "us-east-1" | ||
| } |
There was a problem hiding this comment.
Is this because we already had a us west 2 provider?
There was a problem hiding this comment.
Yes (and the prod replica bucket is the only thing this terraform workspace manages that's in us-east-1)
6556b55 to
d2838b2
Compare
Currently, we have a lot of noncurrent copies of files stored in S3, which cost money and aren't used for anything. This commit adds lifecycle rules to our S3 buckets that will delete old versions of files after 30 days, as well as cleaning up incomplete multi-part uploads. PER-10906
d2838b2 to
172fff1
Compare
That makes sense; it's tricky to test these changes thoroughly prior to merging a PR. I've removed the prod changes. |
cecilia-donnelly
left a comment
There was a problem hiding this comment.
Thanks for removing prod!
| days_after_initiation = 7 | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Should we expire noncurrent objects on local too? (Sorry, didn't notice this the first go-around.)
There was a problem hiding this comment.
I left out the noncurrent rule on local and staging because they don't have versioning turned on at all, and thus it wouldn't do anything (though I can see an argument for including it just for consistency)
There was a problem hiding this comment.
Ah that makes sense. Thanks!
| days_after_initiation = 7 | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
I would think we'd want the same noncurrent rule on staging, even though it's not currently (ha) a big factor there.
Currently, we have a lot of noncurrent copies of files stored in S3, which cost money and aren't used for anything. This commit adds lifecycle rules to our S3 buckets that will delete old versions of files after 30 days, as well as cleaning up incomplete multi-part uploads.