Skip to content

[AWS::S3::Bucket] Enabling ObjectLock on an existing bucket is now supported #1929

@blimmer

Description

@blimmer

Name of the resource

AWS::S3::Bucket

Resource name

No response

Description

According to https://aws.amazon.com/about-aws/whats-new/2023/11/amazon-s3-enabling-object-lock-buckets/ , you can now enable Object Lock on an existing bucket.

However, the CloudFormation change set indicates that it requires replacement:

[
  {
    "type": "Resource",
    "resourceChange": {
      "action": "Modify",
      "logicalResourceId": "Bucket83908E77",
      "physicalResourceId": "foostack-bucket83908e77-x5oftmkjofzs",
      "resourceType": "AWS::S3::Bucket",
      "replacement": "True",
      "scope": [
        "Properties"
      ],
      "details": [
        {
          "target": {
            "attribute": "Properties",
            "name": "ObjectLockEnabled",
            "requiresRecreation": "Always"
          },
          "evaluation": "Static",
          "changeSource": "DirectModification"
        }
      ]
    }
  }
]

Other Details

Originally discovered via: aws/aws-cdk#29168

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Researching

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions