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
gefragt vor einem Jahr1044 Aufrufe
2 Antworten
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
beantwortet vor einem Jahr
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
EXPERTE
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen