AWS Certified Developer – Associate — Question 196

A developer is creating an AWS CloudFormation template to deploy Amazon EC2 instances across multiple AWS accounts. The developer must choose the EC2 instances from a list of approved instance types.

How can the developer incorporate the list of approved instance types in the CloudFormation template?

Answer options

Correct answer: D

Explanation

The correct answer is D because creating a parameter with Allowed Values allows the developer to restrict the selection to the approved instance types, ensuring compliance. Options A and B are inefficient as they create unnecessary complexity and do not enforce the approved list. Option C, while it could work, is less efficient than using Allowed Values since it requires multiple parameters for each instance type.