How to keep non-current versions in a nested folder via Cloudformation template?

295 Views Asked by At

I have a bucket with a structure like this:

  • root
    • source
    • processed
      • form

I would like non-current versions to expire in everything except the form directory.

Will this work, or do I need to create individual rules for source, processed, and forms?

            "LifecycleConfiguration": {
                "Rules" : [{
                    "NoncurrentVersionExpiration" : {
                        "NoncurrentDays": 1
                    },
                    "Status": "Enabled"
                }, {
                    "Prefix": "form",
                    "NoncurrentVersionExpiration" : {
                        "NoncurrentDays": 1
                    },
                    "Status": "Disabled"
                }]
            },
0

There are 0 best solutions below