aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
AWS::S3::Bucket InventoryConfiguration Drift Issue
- 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
### Issue Description
Drift detection does not detect that the S3 bucket resource is drifted, when Inventory Configuration is applied out-of-band / outside of CloudFormation.
### Expected Behavior
The values returned in the drift report should reflect the Inventory Configuration being applied on the physical resource and show the resource as DRIFTED, but instead shows IN_SYNC.
### Observed Behavior
There is no drift detected. There might be an issue with the drift evaluation workflow.
### Test Cases
1. Deploy a CloudFormation template like below:
```
Resources:
MyS3Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: test-bucket-2-sep-2025
```
2. Execute the below CLI command to apply an arbitrary Inventory Configuration on the same S3 bucket:
```
aws s3api put-bucket-inventory-configuration \
--bucket test-bucket-2-sep-2025 \
--id MyInventoryConfig \
--inventory-configuration '{
"Id": "MyInventoryConfig",
"IsEnabled": true,
"Destination": {
"S3BucketDestination": {
"Bucket": "arn:aws:s3:::destination-bucket",
"Format": "CSV"
}
},
"Schedule": {
"Frequency": "Daily"
},
"IncludedObjectVersions": "Current"
}'
```
3. Run drift detection on the stack.
Contributor guide
Research direction
Start by deploying the inline CloudFormation template, applying the shown Inventory Configuration with the AWS CLI command, and running stack drift detection. Compare the physical bucket configuration with the drift report; done means an out-of-band Inventory Configuration is represented in the report and the resource is marked DRIFTED.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100