AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 312

A company has an organization in AWS Organizations with many Oils that contain many AWS accounts. The organization has a dedicated delegated administrator AWS account.

The company needs the accounts in one OU to have server-side encryption enforced for all Amazon Elastic Block Store (Amazon EBS) volumes and Amazon Simple Queue Service (Amazon SQS) queues that are created or updated on an AWS CloudFormation stack.

Which solution will enforce this policy before a CloudFormation stack operation in the accounts of this OU?

Answer options

Correct answer: A

Explanation

AWS CloudFormation Hooks are designed specifically to inspect and validate resource configurations before any provisioning action occurs during a stack operation, making it the ideal solution to enforce compliance proactively. Deploying this Hook using CloudFormation StackSets allows the delegated administrator to systematically distribute the enforcement policy across all accounts in the designated OU. Other approaches like AWS Config or Lambda functions are reactive rather than preventive, and SCPs do not integrate natively with the CloudFormation deployment lifecycle to evaluate configurations before stack execution.