aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

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

Open
#1,929 1 comment 8 reactions 0 assignees View on GitHub
Coverage
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### 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:

```json
[
{
"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: https://github.com/aws/aws-cdk/issues/29168

Contributor guide

Open the contributing guide

Research direction

Review the AWS::S3::Bucket resource behavior described in the issue and compare it with the linked AWS announcement and CloudFormation change-set output. Determine where the resource specification represents ObjectLockEnabled and verify that enabling it on an existing bucket no longer requires replacement; the payload names no repository files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.