DVA-C02 · Question #690
A development team at a company uses an AWS CloudFormation template to define and deploy Amazon EC2 instances in a development AWS account. The company's policy states that the development team can la
The correct answer is B. Create a custom Hook in CloudFormation Hooks to ensure that the development team can create. CloudFormation Hooks can enforce custom policy checks during stack operations. Creating a custom hook to validate that only general purpose instances are launched ensures compliance before resource creation, preventing noncompliant instances from being deployed.
Question
A development team at a company uses an AWS CloudFormation template to define and deploy Amazon EC2 instances in a development AWS account. The company's policy states that the development team can launch only general purpose instances in the account. During a monthly audit, the company notices that some instances that were launched by using the CloudFormation template do not comply with the company policy. The company must ensure that all instances the development team launches comply with the policy. Which solution should will meet this requirement?
Options
- ACreate a CloudFormation Guard rule to search the CloudFormation template for any instances
- BCreate a custom Hook in CloudFormation Hooks to ensure that the development team can create
- CImport the template into an AWS CDK application. Write a unit test to test whether the template
- DConfigure a CloudFormation rollback trigger to roll back the creation of instances that do not
How the community answered
(52 responses)- A12% (6)
- B63% (33)
- C6% (3)
- D19% (10)
Explanation
CloudFormation Hooks can enforce custom policy checks during stack operations. Creating a custom hook to validate that only general purpose instances are launched ensures compliance before resource creation, preventing noncompliant instances from being deployed.
Community Discussion
No community discussion yet for this question.