Last active
October 26, 2018 21:31
-
-
Save dsalazar-carecloud/8cbf34b9311355c6dd734696877292f6 to your computer and use it in GitHub Desktop.
S3 Bucket Lifecycle Configuration (AWS CLI s3api cmd)
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
# AWS CLI required. | |
# s3api: http://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-lifecycle-configuration.html | |
aws s3api put-bucket-lifecycle-configuration --bucket <bucket-name> --lifecycle-configuration file://<path-to-policy-json> | |
# Policy file example | |
# { | |
# "Rules": [ | |
# { | |
# "ID": "Expires in 120 DAYS", | |
# "Prefix": "", | |
# "Status": "Enabled", | |
# "Expiration": { | |
# "Days": 120 | |
# } | |
# } | |
# ] | |
# } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment