CLF-C02 Cloud Technology and Services Practice Question
Which AWS service helps you manage and deploy infrastructure as code using templates?
⚠ Common exam trap
A common mix-up: candidates confuse AWS Elastic Beanstalk (which also uses a 'template' concept for environment configuration) with CloudFormation, but Elastic Beanstalk is a higher-level abstraction for application deployment, not a general-purpose IaC tool for managing all AWS resources.
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 model and provision AWS resources using declarative templates (JSON or YAML). This enables Infrastructure as Code (IaC) by treating infrastructure as version-controlled, repeatable code, which can be used to create, update, and delete entire stacks of resources in a predictable manner.
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
Elastic Beanstalk is a PaaS service that handles application deployment, capacity provisioning, load balancing, and auto scaling for you, but it abstracts the underlying architecture behind an environment. While you can provide configuration files, those influence settings rather than serve as a template that defines every resource's properties. It does not give you the template-driven, repeatable infrastructure-as-code model CloudFormation provides.
- ✓
AWS CloudFormation
Why this is correct
CloudFormation is AWS's native infrastructure-as-code service, where you define resources in a declarative JSON or YAML template and the service provisions, updates, and deletes the stack as a single unit. It manages resource dependencies and ordered operations automatically, making it the correct answer for template-based infrastructure provisioning. Administrators can version templates and use them across accounts and regions, giving deterministic infrastructure.
- ✗
AWS OpsWorks
Why it's wrong here
OpsWorks is a configuration-management service that uses Chef or Puppet and is centered on assigning recipes and scripts to EC2 instances, including lifecycle events such as setup, configure, and deploy. It automates server configuration and application state, not the static declaration of all infrastructure resources in a template. AWS has largely moved on to EC2 Image Builder and Systems Manager, but even functionally OpsWorks does not provide CloudFormation's template-driven IaC.
- ✗
AWS CodeDeploy
Why it's wrong here
CodeDeploy is a deployment service that moves application revisions from a source such as S3 to target compute resources, with features like rolling deployments and health checks. It operates after infrastructure has already been created and only handles the application installation and update phase. Since it never defines or provisions AWS resources like VPCs, EC2 instances, or databases, it is not an infrastructure-as-code provisioning tool.
Go deeper
Related to this question
About these practice questions
One of 988 original CLF-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.