-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding aws s3 bucket lifecycle configuration to the repo (#1972)
- Loading branch information
1 parent
40e8baa
commit 5327f4e
Showing
4 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# AWS configuration | ||
|
||
## Lifecycle rules | ||
S3 lifecycle rules help to keep the S3 buckets free from cruft, from files that have been deleted, many versions of files, and old log files. The files in this directory can be applied to S3 using the aws command line client. The files are specific for staging and production data storage and log file storage. | ||
|
||
``` | ||
aws s3api put-bucket-lifecycle-configuration --bucket <bucket name> --lifecycle-configuration file://<file for bucket>.json | ||
``` | ||
|
||
You can check what rules are already applied to a bucket running | ||
|
||
``` | ||
aws s3api get-bucket-lifecycle-configuration --bucket <bucket name> | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"Rules": [ | ||
{ | ||
"Expiration": { | ||
"Days": 60 | ||
}, | ||
"ID": "delete old logs", | ||
"Filter": {}, | ||
"Status": "Enabled" | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"Rules": [ | ||
{ | ||
"Expiration": { | ||
"ExpiredObjectDeleteMarker": true | ||
}, | ||
"ID": "Remove old deleted versions", | ||
"Filter": {}, | ||
"Status": "Enabled", | ||
"NoncurrentVersionExpiration": { | ||
"NoncurrentDays": 30 | ||
}, | ||
"AbortIncompleteMultipartUpload": { | ||
"DaysAfterInitiation": 14 | ||
} | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"Rules": [ | ||
{ | ||
"Expiration": { | ||
"ExpiredObjectDeleteMarker": true | ||
}, | ||
"ID": "Remove old deleted versions", | ||
"Filter": {}, | ||
"Status": "Enabled", | ||
"NoncurrentVersionExpiration": { | ||
"NoncurrentDays": 30 | ||
}, | ||
"AbortIncompleteMultipartUpload": { | ||
"DaysAfterInitiation": 14 | ||
} | ||
} | ||
] | ||
} |