Courseiva
Question 878 of 988
Cloud Technology and ServicesmediumMultiple ChoiceObjective-mapped

CLF-C02 Cloud Technology and Services Practice Question

A DevOps team needs to deploy a multi-tier web application on AWS. The application consists of Amazon EC2 instances, an Application Load Balancer, an Amazon RDS database, and security groups. The team wants to define all these resources in a single declarative template, automatically manage the creation order and dependencies, and version control the template for repeatable deployments. Which AWS service should the team use to meet these requirements?

⚠ Common exam trap

A common mix-up: candidates confuse AWS Elastic Beanstalk (a PaaS service) with CloudFormation, thinking it can also define all resources declaratively, but Elastic Beanstalk only manages the environment and does not give you control over individual resource dependencies or a single version-controlled template.

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 all AWS resources (EC2, ALB, RDS, security groups) in a single declarative JSON or YAML template. It automatically manages the creation order based on resource dependencies (e.g., EC2 instances depend on security groups), supports version control of templates, and enables repeatable, consistent deployments across environments.

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 is the correct choice because it provides infrastructure as code (IaC) with declarative JSON or YAML templates. It automatically manages resource dependencies, provisioning order, and rollback on failures, enabling a multi-tier application (VPC, subnets, EC2, RDS, ELB, security groups) to be deployed as a single, versionable stack. CloudFormation also supports change sets to preview updates and drift detection to ensure the live infrastructure matches the stack template, giving the team full declarative control over every resource.

  • AWS Elastic Beanstalk

    Why it's wrong here

    Elastic Beanstalk is a platform-as-a-service (PaaS) that simplifies application deployment but does not give the team granular control over individual resources like RDS or security groups in a single declarative template. It abstracts the infrastructure.

    When this WOULD be correct

    A team needs to quickly deploy a web application without managing underlying infrastructure, and they want automatic scaling, load balancing, and health monitoring. The question would specify that the team prefers a managed platform with minimal configuration and does not require granular control over resources or version-controlled templates.

  • AWS OpsWorks

    Why it's wrong here

    AWS OpsWorks is a configuration management service based on Chef and Puppet, designed to automate server configuration, package installation, and application deployment on existing or dynamically created EC2 instances. It uses a stack and layer model to manage cookbooks/recipes, but it does not provide a single declarative template that provisions all AWS resources such as RDS instances, load balancers, and security groups. For a multi-tier web application requiring granular IaC control over the entire environment, OpsWorks is less appropriate because it focuses on post-provisioning state management rather than end-to-end resource orchestration.

    When this WOULD be correct

    A team needs to manage application configuration and automate server updates using Chef recipes or Puppet modules across a fleet of EC2 instances, and they require integration with existing configuration management tools.

  • AWS CodePipeline

    Why it's wrong here

    AWS CodePipeline is a continuous integration and continuous delivery (CI/CD) orchestration service, not an infrastructure provisioning tool. It automates build, test, and deploy stages by chaining actions from services like CodeBuild, CodeDeploy, and Lambda. While a pipeline can invoke CloudFormation to deploy a stack as one of its actions, CodePipeline itself does not define, create, or manage AWS resources; it only coordinates the steps that other services perform, so it is the wrong tool to directly provision the multi-tier architecture.

    When this WOULD be correct

    A team needs to automate the build, test, and deployment phases of their application whenever code is pushed to a repository, requiring a continuous delivery pipeline that integrates with source control and deployment services.

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 the correct choice because it provides infrastructure as code (IaC) with declarative JSON or YAML templates. It automatically manages resource dependencies, provisioning order, and rollback on failures, enabling a multi-tier application (VPC, subnets, EC2, RDS, ELB, security groups) to be deployed as a single, versionable stack. CloudFormation also supports change sets to preview updates and drift detection to ensure the live infrastructure matches the stack template, giving the team full declarative control over every resource.

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 provide a single declarative template for defining all resources like EC2, ALB, RDS, and security groups with explicit dependency management and version control. It focuses on application deployment and scaling rather than infrastructure-as-code.

★ When this WOULD be the correct answer

A team needs to quickly deploy a web application without managing underlying infrastructure, and they want automatic scaling, load balancing, and health monitoring. The question would specify that the team prefers a managed platform with minimal configuration and does not require granular control over resources or version-controlled templates.

Why candidates choose this

Candidates may confuse Elastic Beanstalk's ability to provision resources automatically with the declarative template and dependency management of CloudFormation, overlooking that Elastic Beanstalk does not expose a user-defined template for version control.

AWS OpsWorksWrong answer — click to see why

Why this is wrong here

AWS OpsWorks is a configuration management service that uses Chef and Puppet, not a declarative template for defining resources like EC2, ALB, RDS, and security groups. It does not provide a single template for infrastructure as code with automatic dependency management.

★ When this WOULD be the correct answer

A team needs to manage application configuration and automate server updates using Chef recipes or Puppet modules across a fleet of EC2 instances, and they require integration with existing configuration management tools.

Why candidates choose this

Candidates may confuse OpsWorks with CloudFormation because both can manage AWS resources, but OpsWorks focuses on configuration management rather than declarative infrastructure provisioning.

AWS CodePipelineWrong answer — click to see why

Why this is wrong here

AWS CodePipeline is a CI/CD service for automating build, test, and deploy phases, not for defining infrastructure resources declaratively or managing creation order and dependencies.

★ When this WOULD be the correct answer

A team needs to automate the build, test, and deployment phases of their application whenever code is pushed to a repository, requiring a continuous delivery pipeline that integrates with source control and deployment services.

Why candidates choose this

Candidates may confuse CodePipeline's deployment automation with infrastructure provisioning, thinking it can define resources like CloudFormation does, but CodePipeline focuses on the software release process, not resource definition.

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

Same concept, more angles

2 more ways this is tested on CLF-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. 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?

medium
  • A.AWS Elastic Beanstalk
  • B.AWS CloudFormation
  • C.AWS OpsWorks
  • D.AWS CodeDeploy

Why B: 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.

Variation 2. A company plans to deploy a multi-tier web application on AWS. The architecture includes Amazon EC2 instances for the web and application tiers, an Application Load Balancer for traffic distribution, and an Amazon RDS database for the data tier. The company wants to automate the provisioning and configuration of all these AWS resources in a repeatable and predictable manner. The solution should allow the infrastructure definition to be stored in a version control system and be used to create identical environments for development, testing, and production with minimal manual effort. Which AWS service should the company use to define and manage the infrastructure as code?

medium
  • A.AWS CloudFormation
  • B.AWS Elastic Beanstalk
  • C.AWS OpsWorks
  • D.AWS CodeDeploy

Why A: AWS CloudFormation is the correct service because it enables you to define your entire multi-tier infrastructure—EC2 instances, Application Load Balancer, and RDS database—as a declarative JSON or YAML template. This template can be stored in a version control system and used to provision identical environments across development, testing, and production with a single API call, ensuring repeatability and predictability.

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.