How to delete expired object delete markers in S3 with a rule in cloudformation S3 template ?

0

How to script lifecyle rule action in a S3 cloudformation template to apply the same rule as in the screen shot ?

Enter image description here

profile picture
ST Team
已提问 1 年前1045 查看次数
2 回答
0

@ST Team, you can use the ExpiredObjectDeleteMarker in the rule section of a lifecycle policy in CloudFormation - more info at https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-rule-expiredobjectdeletemarker

profile picture
已回答 1 年前
0

Hi,

You should set these values:

Resources:
  S3Bucket:
    Type: AWS::S3::Bucket
    Properties:
      LifecycleConfiguration:
        Rules:
          - Id: MyRule
            Status: Enabled
            NoncurrentVersionExpiration:
              NoncurrentDays: 30
            ExpiredObjectDeleteMarker: true
profile picture
专家
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则