
Answer-first summary for fast verification
Answer: Utilize a single template parameter with approved types listed in AllowedValues.
Option D is the correct answer. By creating a parameter in the CloudFormation template with the allowed EC2 instance types listed in AllowedValues, the developer ensures that users can only select from an approved list of instance types when launching the CloudFormation stack. This approach enforces the restriction and keeps the template manageable. Options A, B, and C either do not enforce the restriction effectively or make the template more complex and harder to maintain.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
In an AWS CloudFormation template for deploying EC2 instances across multiple accounts, how should a developer restrict instance selection to a predefined list of approved types?
A
Create individual CloudFormation templates for each approved EC2 instance type.
B
Define resources in the template for each approved EC2 instance type.
C
Include a separate template parameter for each approved EC2 instance type.
D
Utilize a single template parameter with approved types listed in AllowedValues.