Courseiva
Cloud Technology and ServicesmediumMultiple ChoiceObjective-mapped

CLF-C02 Cloud Technology and Services Practice Question

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?

⚠ Common exam trap

It's easy for candidates to 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.

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.

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.

  • 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.

    When this WOULD be correct

    A company wants to quickly deploy a web application without managing the underlying infrastructure. They need automatic scaling, load balancing, and health monitoring, and are willing to accept less control over the environment. Elastic Beanstalk would be the correct choice for deploying and scaling web applications with minimal configuration.

  • 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.

    When this WOULD be correct

    A company uses Chef recipes to manage server configurations and wants a managed service to automate application deployment and server configuration across a fleet of EC2 instances. The question would specify the need for configuration management with Chef/Puppet, not infrastructure provisioning as code.

  • 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.

    When this WOULD be correct

    A company needs to automate the deployment of application code to EC2 instances or Lambda functions, ensuring zero-downtime updates and rollback capabilities. The question would focus on code deployment, not infrastructure provisioning.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The CLF-C02 exam frequently reuses these exact scenarios with slightly different constraints.

AWS CloudFormationCorrect answer

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.

AWS Elastic BeanstalkWrong answer — click to see why

Why this is wrong here

AWS Elastic Beanstalk is a PaaS service that abstracts infrastructure management, not a tool for defining reusable templates in version control. It does not allow granular control over resources like VPCs and subnets, nor does it manage dependencies between resources as templates.

★ When this WOULD be the correct answer

A company wants to quickly deploy a web application without managing the underlying infrastructure. They need automatic scaling, load balancing, and health monitoring, and are willing to accept less control over the environment. Elastic Beanstalk would be the correct choice for deploying and scaling web applications with minimal configuration.

Why candidates choose this

Elastic Beanstalk also automates infrastructure provisioning and can manage dependencies, leading candidates to confuse it with CloudFormation. However, it is higher-level and less customizable, making it unsuitable for defining detailed, reusable templates.

AWS OpsWorksWrong answer — click to see why

Why this is wrong here

AWS OpsWorks is a configuration management service that uses Chef or Puppet, not a declarative template language like CloudFormation. It does not natively define entire cloud environments as reusable templates stored in version control with automatic dependency resolution across resources like VPCs, subnets, EC2, and RDS.

★ When this WOULD be the correct answer

A company uses Chef recipes to manage server configurations and wants a managed service to automate application deployment and server configuration across a fleet of EC2 instances. The question would specify the need for configuration management with Chef/Puppet, not infrastructure provisioning as code.

Why candidates choose this

Candidates may confuse OpsWorks as a tool for defining and managing infrastructure because it can automate server setup, but they overlook that it focuses on configuration management rather than declarative infrastructure provisioning with dependency handling.

AWS CodeDeployWrong answer — click to see why

Why this is wrong here

AWS CodeDeploy automates code deployments to running instances, not infrastructure provisioning. It does not define or manage cloud resources like VPCs, subnets, or RDS databases as reusable templates.

★ When this WOULD be the correct answer

A company needs to automate the deployment of application code to EC2 instances or Lambda functions, ensuring zero-downtime updates and rollback capabilities. The question would focus on code deployment, not infrastructure provisioning.

Why candidates choose this

Candidates may confuse 'deployment' of infrastructure with 'deployment' of code, assuming CodeDeploy can handle both. The term 'deploy' in the question might mislead them into thinking CodeDeploy is the right service.

Analysis generated from the official CLF-C02blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

Visual reference

192.168.1.0 /24 256 addresses (254 usable) 192.168.1.0 /25 Subnet A 128 addr (126 usable) 192.168.1.128 /25 Subnet B 128 addr (126 usable) Borrowing 1 bit from host portion creates 2 subnets (/25)

About these practice questions

Courseiva writes every CLF-C02 question from scratch — 988 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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 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.