Courseiva

SOA-C02 Deployment, Provisioning, and Automation Practice Question

A company uses AWS CloudFormation to deploy infrastructure. The SysOps administrator has a template that creates an Amazon EC2 instance and an Amazon RDS DB instance. The administrator needs to reuse the same template for development, test, and production environments, where the only differences are the EC2 instance type and the RDS DB instance class. Which CloudFormation feature should be used to define these environment-specific values?

⚠ Common exam trap

It's easy for candidates to confuse Mappings (which are static and cannot be changed per stack instance) with Parameters (which are dynamic and input at runtime), leading them to incorrectly choose Mappings for environment-specific values that must vary per deployment.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Parameters

Parameters are the correct CloudFormation feature because they allow you to pass environment-specific values (such as EC2 instance type and RDS DB instance class) into the template at stack creation or update time. This enables reuse of the same template across development, test, and production environments without modifying the template itself, simply by providing different parameter values for each environment.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Nested stacks

    Why it's wrong here

    Nested stacks are useful for decomposing a large template into smaller, reusable pieces, but they do not inherently accept environment-specific inputs. Each nested stack still requires its own parameters to receive values from the parent stack, adding extra layers of complexity. For simply passing different instance types and DB classes per environment, a direct parameter on the root template is far simpler and more transparent.

  • ✓

    Parameters

    Why this is correct

    Parameters are the native CloudFormation feature designed to accept external input at stack creation or update time. By defining a parameter for the instance type and another for the DB class, the exact same template can be reused across dev, test, and production with different values supplied via the console, CLI, or API. This makes Params the most direct and maintainable way to achieve environment-specific resource configuration without editing the template.

  • ✗

    Mappings

    Why it's wrong here

    Mappings are static lookup tables embedded directly in the template, where keys and values are fixed at authoring time. They cannot accept user-defined input; they only return a preconfigured value based on a key like an AWS region or an environment name. To use a mapping to vary instance type per environment, you would still need a parameter to select the environment key, so mappings cannot replace parameters for accepting external values.

  • ✗

    Conditions

    Why it's wrong here

    Conditions are declarative expressions that determine whether a resource or a resource property is created or set, based on evaluation at stack creation. They act as an on/off switch, not as a value provider; they cannot supply the actual numeric or string value for an instance type or DB class. To choose different values for the same resource across environments, you need parameters, not conditions.

About these practice questions

One of 1,169 original SOA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SOA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SOA-C02 exam.