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
질문됨 일 년 전1044회 조회
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
답변함 일 년 전
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
전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠