A company must detect S3 bucket policy violations introduced outside CloudFormation and automatically restore approved settings, without overwriting changes that have already restored compliance. Which design meets these requirements?
Show the answer
Correct answerA. Use an AWS Config rule with automatic remediation that rechecks current settings before making changes.
AWhy this is right: AWS Config detects out-of-band violations, and a current-state check prevents unnecessary changes based on stale evaluations.
BWhy not this: StackSets drift detection reports differences; automatic redeployment is not a built-in consequence of detecting drift.
CWhy not this: CDK aspects inspect constructs during synthesis; synthesis alone neither inspects live settings nor reapplies configuration.
DWhy not this: CloudFormation Hooks run during supported CloudFormation operations, not when someone independently changes a bucket.
AWS Config can detect configuration changes outside CloudFormation and invoke remediation; checking current state avoids acting on stale compliance results. StackSets drift detection reports drift but does not automatically redeploy stack instances.