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

CloudFormation false positive drift bug when S3 ObjectOwnership and/or ReplicationConfiguration properties are used in the AWS::S3::Bucket resource

Open
#1,106 3 comments 14 reactions 0 assignees View on GitHub
bug
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_

### Issue Description

CloudFormation falsely reports drift when a bucket is created with ObjectOwnership property. The actual property of the bucket shows the ObjectOwnership property set but CFN drift does not reflect this thereby causing a false positive.

A similar behavior can be seen when a bucket is created with the ReplicationConfiguration V2 (includes "Priority" and "Filter" and "DeleteMarkerReplication" parameters). CloudFormation shows a false positive as it returns the actual properties of the bucket missing some of the S3 bucket properties such as the Filters, DeleteMarkerReplication and Priority. Because of this the stack shows a drift as though these properties have been removed.

### Expected Behavior

Accurately return the actual resource properties so that it matches the stack template

### Observed Behavior

Inaccurate drift result

### Test Cases

Create an S3 bucket with either the ReplicationConfiguration or ObjectOwnership properties or both and after stack creation, run a drift check, CFN returns a false positive

### Other Details

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the AWS::S3::Bucket drift check with ObjectOwnership and ReplicationConfiguration, including Priority, Filter, and DeleteMarkerReplication. Compare the returned properties with the stack template; done means these properties are accurately returned and the stack reports no false drift.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.