Courseiva
Cloud Technology and ServicesmediumMultiple ChoiceObjective-mapped

CLF-C02 Cloud Technology and Services Practice Question

A company is planning to deploy a multi-tier web application on AWS. The architecture includes Amazon EC2 instances, an Application Load Balancer, an Amazon RDS database, and security groups. The company wants to define and provision these resources as reusable, version-controlled infrastructure so they can consistently deploy the same environment to development, testing, and production accounts. The solution should allow the team to use JSON or YAML templates to describe the resources and their dependencies. Which AWS service should the company use?

⚠ Common exam trap

A common mix-up: candidates confuse AWS Elastic Beanstalk's environment configuration files (e.g., .ebextensions) with infrastructure-as-code, but Elastic Beanstalk does not provide the same level of resource-level control, dependency management, or cross-account stack deployment as CloudFormation.

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 service because it allows you to define and provision AWS infrastructure as code using JSON or YAML templates. This enables version-controlled, repeatable deployments across multiple accounts (development, testing, production) by describing resources like EC2 instances, ALBs, RDS databases, and security groups along with their dependencies in a declarative template.

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 Elastic Beanstalk

    Why it's wrong here

    AWS Elastic Beanstalk is incorrect because it is a Platform-as-a-Service (PaaS) that automates application deployment and infrastructure provisioning, rather than allowing direct definition of specific resources like EC2, ALB, and RDS via explicit JSON or YAML templates for infrastructure-as-code. While it provisions resources and ensures consistent environments, it abstracts away this granular templating. It is tempting as it simplifies deploying multi-tier web applications and manages underlying resources, making it suitable for rapid application deployment where direct infrastructure definition is not the primary requirement.

    When this WOULD be correct

    A company wants to quickly deploy a web application without managing underlying infrastructure, using automatic scaling and monitoring, and is okay with less control over individual resources. The question would specify 'minimal operational overhead' and 'rapid deployment' as key requirements.

  • AWS CloudFormation

    Why this is correct

    AWS CloudFormation is an infrastructure as code service that enables you to model and provision AWS resources using templates written in JSON or YAML. These templates can be stored in version control systems, making it possible to deploy identical environments across multiple accounts and regions consistently.

  • AWS OpsWorks

    Why it's wrong here

    AWS OpsWorks is a configuration management service that uses Chef and Puppet to manage server configurations. While it can be used to automate parts of infrastructure, it does not provide the same declarative, template-based infrastructure provisioning and version control capabilities that AWS CloudFormation offers.

  • AWS CodeDeploy

    Why it's wrong here

    AWS CodeDeploy is a service that automates code deployments to any instance, including Amazon EC2 and on-premises servers. It handles the rollout of application updates, not the provisioning or definition of the underlying infrastructure resources.

    When this WOULD be correct

    A company wants to automate the deployment of application code to EC2 instances in a rolling update fashion, ensuring minimal downtime. They already have the infrastructure managed separately (e.g., via CloudFormation) and need a service to handle code releases and rollbacks.

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 is an infrastructure as code service that enables you to model and provision AWS resources using templates written in JSON or YAML. These templates can be stored in version control systems, making it possible to deploy identical environments across multiple accounts and regions consistently.

AWS Elastic BeanstalkWrong answer — click to see why

Why this is wrong here

AWS Elastic Beanstalk is a PaaS service that abstracts infrastructure management, but it does not allow defining resources as reusable, version-controlled JSON/YAML templates; it uses environment configurations and platform settings instead.

★ When this WOULD be the correct answer

A company wants to quickly deploy a web application without managing underlying infrastructure, using automatic scaling and monitoring, and is okay with less control over individual resources. The question would specify 'minimal operational overhead' and 'rapid deployment' as key requirements.

Why candidates choose this

Candidates may confuse Elastic Beanstalk's environment configuration files (e.g., .ebextensions) with CloudFormation templates, or think Elastic Beanstalk supports JSON/YAML for resource definition, when it primarily uses them for environment customization, not full infrastructure provisioning.

AWS CodeDeployWrong answer — click to see why

Why this is wrong here

AWS CodeDeploy automates code deployments to running instances, but it does not provision or manage infrastructure resources like EC2, RDS, or security groups. The question requires defining and provisioning the entire infrastructure stack using templates, which is beyond CodeDeploy's scope.

★ When this WOULD be the correct answer

A company wants to automate the deployment of application code to EC2 instances in a rolling update fashion, ensuring minimal downtime. They already have the infrastructure managed separately (e.g., via CloudFormation) and need a service to handle code releases and rollbacks.

Why candidates choose this

Candidates may confuse CodeDeploy with infrastructure provisioning because both involve 'deployment,' but CodeDeploy focuses on application code, not infrastructure resources.

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?”

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.