Courseiva
Cloud Technology and ServicesmediumMultiple ChoiceObjective-mapped

CLF-C02 Cloud Technology and Services Practice Question

A company is deploying a new web application on AWS. The operations team needs to provision and manage AWS resources such as Amazon EC2 instances, Amazon RDS databases, and Amazon S3 buckets in a repeatable, consistent manner across development, test, and production environments. The team wants to define the entire infrastructure as code using declarative templates that can be version-controlled and reviewed. Which AWS service should the team use to meet this requirement?

⚠ Common exam trap

Many exam-takers confuse AWS Elastic Beanstalk (a PaaS for application deployment) with infrastructure-as-code, but Elastic Beanstalk does not provide the declarative, version-controlled resource templates that CloudFormation offers for managing individual AWS resources like EC2, RDS, and S3 across environments.

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 your entire infrastructure as code using declarative templates (JSON or YAML). These templates can be version-controlled and reviewed, enabling repeatable and consistent provisioning of resources like EC2 instances, RDS databases, and S3 buckets across multiple environments. CloudFormation manages the lifecycle of these resources as stacks, ensuring idempotent deployments.

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 a platform as a service (PaaS) that simplifies application deployment and scaling. However, it abstracts the underlying resources and does not provide a declarative template language for defining all infrastructure components in a reusable, version-controlled manner. It is not the primary service for infrastructure as code.

    When this WOULD be correct

    A company wants to quickly deploy a web application without managing underlying infrastructure, focusing on code upload and automatic scaling. The requirement is for a managed platform that handles provisioning and capacity management automatically, not for defining infrastructure as code.

  • AWS CloudFormation

    Why this is correct

    AWS CloudFormation is the correct service. It enables you to define and provision AWS infrastructure using declarative templates. You can version control these templates, review them, and deploy consistent environments across development, test, and production. This is the ideal solution for infrastructure as code on AWS.

  • AWS OpsWorks

    Why it's wrong here

    AWS OpsWorks is a configuration management service that uses Chef and Puppet to automate server configuration. While it can help manage existing infrastructure, it does not provide a declarative template language to provision a wide range of AWS resources in a repeatable infrastructure-as-code manner. CloudFormation is the appropriate service for that task.

    When this WOULD be correct

    A company uses Chef or Puppet for configuration management and wants to automate server setup and application deployment on AWS. The team needs to manage operating system configurations, install software, and maintain consistency across instances, but does not require declarative infrastructure provisioning.

  • AWS CodeDeploy

    Why it's wrong here

    AWS CodeDeploy automates the deployment of application code to Amazon EC2 instances, AWS Lambda, or on-premises servers. It does not handle the provisioning of infrastructure resources like EC2 instances, RDS databases, or S3 buckets. CodeDeploy is a deployment tool, not an infrastructure provisioning tool.

    When this WOULD be correct

    A question asks: 'Which AWS service automates application code deployments to EC2 instances, Lambda functions, or on-premises servers, supporting rolling updates and blue/green deployments?' Then CodeDeploy is correct.

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 service. It enables you to define and provision AWS infrastructure using declarative templates. You can version control these templates, review them, and deploy consistent environments across development, test, and production. This is the ideal solution for infrastructure as code on AWS.

AWS Elastic BeanstalkWrong answer — click to see why

Why this is wrong here

AWS Elastic Beanstalk is a PaaS service that automates application deployment and provisioning, but it does not provide declarative infrastructure-as-code templates for defining resources like EC2, RDS, and S3 in a repeatable, version-controlled manner across environments.

★ When this WOULD be the correct answer

A company wants to quickly deploy a web application without managing underlying infrastructure, focusing on code upload and automatic scaling. The requirement is for a managed platform that handles provisioning and capacity management automatically, not for defining infrastructure as code.

Why candidates choose this

Candidates may confuse Elastic Beanstalk's environment management with infrastructure-as-code, as it does provision resources automatically, but it lacks the declarative template and version control capabilities of CloudFormation.

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 declarative templates for infrastructure as code. It focuses on managing server configurations rather than provisioning resources like EC2, RDS, and S3 in a repeatable, version-controlled manner.

★ When this WOULD be the correct answer

A company uses Chef or Puppet for configuration management and wants to automate server setup and application deployment on AWS. The team needs to manage operating system configurations, install software, and maintain consistency across instances, but does not require declarative infrastructure provisioning.

Why candidates choose this

Candidates may confuse OpsWorks with CloudFormation because both are used for automation and managing AWS resources, but OpsWorks is specifically for configuration management, not declarative infrastructure as code.

AWS CodeDeployWrong answer — click to see why

Why this is wrong here

AWS CodeDeploy automates code deployments to running instances, not infrastructure provisioning. The question requires defining and managing infrastructure as code with declarative templates, which is CloudFormation's purpose.

★ When this WOULD be the correct answer

A question asks: 'Which AWS service automates application code deployments to EC2 instances, Lambda functions, or on-premises servers, supporting rolling updates and blue/green deployments?' Then CodeDeploy is correct.

Why candidates choose this

Candidates confuse deployment of application code with deployment of infrastructure, or think 'deploy' in the question refers to code deployment rather than infrastructure provisioning.

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

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

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.