A SysOps administrator needs to deploy infrastructure as code and wants a single AWS CloudFormation template that can be reused for multiple environments (for example, dev, test, prod). How should the administrator design the CloudFormation template?
Choose an answer
Tap an option to check your answer.
Correct answer: Define parameters in the CloudFormation template to control environment-specific values..
Why this is the answer
Defining parameters in the CloudFormation template is the correct approach because it allows you to pass in environment-specific values (like instance types, database names, or environment tags) at the time of stack creation or update. This makes the template reusable across dev, test, and prod environments without modification. Embedding EC2 user data scripts directly makes the template less flexible and harder to manage for different environments, as changes would require editing the template itself. Nested stacks are useful for organizing and reusing common components but don't directly address the need to customize a single template for multiple environments with varying configurations. Stack policies are used to prevent unintended updates or deletions of specific stack resources, not for defining environment-specific configurations.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed