Question 377 of 1,024
Cloud Technology and ServicesmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is AWS CloudFormation, as it provides Infrastructure as Code (IaC) capabilities that let you define your entire cloud environment—VPCs, subnets, EC2 instances, and RDS databases—as reusable JSON or YAML templates stored in version control. This service automatically handles resource dependencies through the DependsOn attribute and intrinsic functions like Ref and Fn::GetAtt, ensuring resources like databases are created before application servers, while parameters and stacksets enable consistent provisioning across development, staging, and production environments. On the AWS Certified Cloud Practitioner CLF-C02 exam, this question tests your understanding of managed IaC services versus manual provisioning or scripting; a common trap is confusing CloudFormation with AWS Elastic Beanstalk, which focuses on application deployment rather than full infrastructure definition. Remember the memory tip: “CloudFormation forms your cloud” — it’s the template-based tool for building and versioning your entire AWS infrastructure.

CLF-C02 Cloud Technology and Services Practice Question

This CLF-C02 practice question tests your understanding of cloud technology and services. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A company is migrating its on-premises infrastructure to AWS. The operations team needs a managed service that allows them to define their entire cloud environment—including VPCs, subnets, EC2 instances, and RDS databases—as a reusable template stored in version control. The service must automatically handle resource dependencies, such as creating the database before launching the application servers, and ensure that the infrastructure is provisioned consistently across multiple environments (e.g., development, staging, production). Which AWS service should the company use to meet these requirements?

Question 1mediummultiple choice
Review the full subnetting walkthrough →

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

AWS CloudFormation

AWS CloudFormation is the correct choice because it provides Infrastructure as Code (IaC) capabilities, allowing you to define your entire cloud environment—including VPCs, subnets, EC2 instances, and RDS databases—in a reusable JSON or YAML template stored in version control. It automatically manages resource dependencies using the DependsOn attribute and intrinsic functions like Ref and Fn::GetAtt, ensuring resources are created in the correct order (e.g., database before application servers). CloudFormation also supports consistent provisioning across multiple environments by using parameters, mappings, and stacksets, making it ideal for the operations team's requirements.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • AWS CloudFormation

    Why this is correct

    AWS CloudFormation allows you to define your entire infrastructure as code in a template. It automatically manages resource dependencies, handles creation and updates in the correct order, and provides consistent provisioning across environments. This matches the requirement for a managed infrastructure-as-code service.

    Related concept

    Read the scenario before looking for a memorised answer.

  • AWS Elastic Beanstalk

    Why it's wrong here

    AWS Elastic Beanstalk is a PaaS service that simplifies deploying and scaling applications. It automatically provisions underlying resources (e.g., EC2, load balancers) based on the application needs, but it does not give you direct control to define arbitrary resources like custom VPCs or RDS with specific configurations. The requirement is for a service that defines the entire infrastructure as code, not just an application platform.

  • AWS OpsWorks

    Why it's wrong here

    AWS OpsWorks is a configuration management service that uses Chef and Puppet to automate server configuration and application deployment. While it can manage EC2 instances, it is not designed for provisioning core network resources (VPC, subnets) or managed databases. The team needs an infrastructure-as-code service, not a configuration management tool.

  • AWS CodeDeploy

    Why it's wrong here

    AWS CodeDeploy automates the deployment of application code to running instances (EC2, Lambda, etc.). It does not provision infrastructure resources such as VPCs, subnets, or databases. The requirement is about defining and creating the infrastructure itself, not deploying code onto existing infrastructure.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse AWS Elastic Beanstalk with Infrastructure as Code because it automates resource provisioning, but Elastic Beanstalk is a managed PaaS that does not give you full control over defining every resource (like VPCs and subnets) in a reusable template, whereas CloudFormation provides that granular, declarative control.

Detailed technical explanation

How to think about this question

Under the hood, CloudFormation uses a stack-based model where each template defines a set of resources, and the service orchestrates their creation using a state machine that respects explicit and implicit dependencies (e.g., a Subnet depends on its VPC via the VpcId property). A subtle behavior is that CloudFormation's Change Sets allow you to preview how changes to a template will affect existing resources before execution, which is critical for avoiding unintended downtime in production environments. In a real-world scenario, a company might use nested stacks to modularize infrastructure (e.g., a network stack for VPCs and a database stack for RDS), enabling team-specific version control and reuse across environments.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A healthcare organisation deploys an application with a public-facing web tier and a private database tier. The database subnet has no public IP and only accepts connections from the web tier's security group. Questions like this test whether you can design cloud network isolation using VNets/VPCs, subnets, and security group rules.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related CLF-C02 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free CLF-C02 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this CLF-C02 question test?

Cloud Technology and Services — This question tests Cloud Technology and Services — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: AWS CloudFormation — AWS CloudFormation is the correct choice because it provides Infrastructure as Code (IaC) capabilities, allowing you to define your entire cloud environment—including VPCs, subnets, EC2 instances, and RDS databases—in a reusable JSON or YAML template stored in version control. It automatically manages resource dependencies using the DependsOn attribute and intrinsic functions like Ref and Fn::GetAtt, ensuring resources are created in the correct order (e.g., database before application servers). CloudFormation also supports consistent provisioning across multiple environments by using parameters, mappings, and stacksets, making it ideal for the operations team's requirements.

What should I do if I get this CLF-C02 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More CLF-C02 practice questions

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This CLF-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 CLF-C02 exam.