AWS Cloud Practitioner CLF-C02 Sign in Try 10 free questions

Free CLF-C02 practice questions: AWS CloudFormation

Infrastructure as code, in one service. Six questions on templates, stacks and what CloudFormation is for — CLF-C02, 2026 edition.

Try 6 free AWS CloudFormation questions in the exam's own style — every answer explained, no sign-up.

Straight to the 6 free questions ↓

CloudFormation is the exam’s answer whenever a question is about infrastructure as code: describing your AWS resources in a file and letting AWS provision them for you. It is a small concept at this level, and it comes up reliably in the largest domain.

What it is

AWS CloudFormation lets you define your infrastructure in a template — a text file in YAML or JSON — and it creates those resources for you. The group of resources created from one template is a stack, managed together: create, update or delete the whole set in one action. Because the infrastructure is code, you can deploy it repeatably and consistently across accounts and Regions, and rebuild it exactly if you ever need to.

Why it matters

The benefit the exam tests is repeatability, not speed or cost. Building resources by hand in the console is fine once; doing it identically ten times, or recreating an environment after a mistake, is where a template wins. Any option claiming CloudFormation makes applications faster, makes resources free, or encrypts data automatically is a distractor — it provisions infrastructure, nothing more.

The distinction to keep straight

CloudFormation is often confused with Elastic Beanstalk:

  • CloudFormation provisions any AWS infrastructure from a template — the general-purpose infrastructure-as-code tool.
  • Elastic Beanstalk takes an application and runs it on a managed platform, handling the servers and scaling for you.

Provision infrastructure, versus run an application. If a question is about defining resources as code, it is CloudFormation; if it is about deploying an app without managing the platform, it is Beanstalk.

How to use the questions below

Answer each one before you reveal the explanation, and when you miss, read past the correct letter to why the other three fail. The distractors here are usually other services offered where infrastructure-as-code belongs, or an overstated benefit. Recognising “define infrastructure as a template” as CloudFormation is the whole skill, and the reasoning below drills it. For the wider picture, see the cheat sheet.

AWS CloudFormation as infrastructure as code: a template written in YAML or JSON describes the resources, CloudFormation provisions them as a stack, and updating or deleting the stack changes or removes those resources together — repeatable and consistent.

6 free CLF-C02 practice questions

Answers and explanations — no email wall
CLF-C02 Question 1 of 6

What does AWS CloudFormation let you do?

Answer: A — Define and provision your AWS infrastructure from a template, as code

CloudFormation is infrastructure as code: you describe the resources you want in a template and it provisions them for you. Why not the others: running virtual servers is EC2, object storage is S3, and sending email is SES. CloudFormation is about defining infrastructure, not being any single one of those resources.

CLF-C02 Question 2 of 6

In what format is a CloudFormation template written?

Answer: A — YAML or JSON

CloudFormation templates are text files written in YAML or JSON, which makes them easy to version-control and review. Why not the others: templates are not compiled binaries or spreadsheets, and they follow a defined structure, not free-form prose. Human-readable YAML or JSON is the format.

CLF-C02 Question 3 of 6

In CloudFormation, what is a 'stack'?

Answer: A — The collection of AWS resources created and managed together from a template

A stack is the set of resources CloudFormation creates from one template and manages as a single unit — create, update or delete them together. Why not the others: a single instance is one resource inside a stack, not the stack itself. A billing report and a storage volume are unrelated. The stack is the managed group.

CLF-C02 Question 4 of 6

What is a key benefit of using CloudFormation over creating resources by hand in the console?

Answer: A — You can provision the same infrastructure repeatably and consistently, and recreate it on demand

Because the infrastructure is defined as code, you can deploy it the same way every time, in any account or Region, and rebuild it exactly if needed. Why not the others: CloudFormation does not speed up applications, does not make resources free (you still pay for what it creates), and does not automatically encrypt data. Repeatable, consistent provisioning is the benefit.

CLF-C02 Question 5 of 6

What happens to the resources in a CloudFormation stack when you delete the stack?

Answer: A — CloudFormation removes the resources it created for that stack

Deleting a stack tells CloudFormation to remove the resources it provisioned, cleaning up in one action (some resources can be set to retain, but the default is to delete). Why not the others: resources are not kept forever, it is not only the template that goes, and nothing is moved to another account. Managing resources as a group — including teardown — is the point of a stack.

CLF-C02 Question 6 of 6

How does CloudFormation differ from AWS Elastic Beanstalk?

Answer: A — CloudFormation provisions any AWS infrastructure from a template; Elastic Beanstalk deploys and runs an application on a managed platform

CloudFormation is a general infrastructure-as-code tool — it can build almost any set of AWS resources. Elastic Beanstalk is a platform that takes your application and runs it, handling the servers, scaling and load balancing. Why not the others: they are distinct, CloudFormation does not run your app code itself, and neither is a database. Provision infrastructure versus run an application is the difference.

That is exactly how every question in the course works — answer, explanation, why-not. The real set continues in the practice player: 10 free questions, no sign-up.

Continue with the 10 free questions →

Those 6 questions were the start.

The exam does not test whether you recognise a term — it tests whether you can rule out three plausible answers under time pressure. That is what the explanations above are for, and there are 390 more questions built exactly like them.

Collecting questions yourself

  • Scattered across forums, of unknown age
  • Answer keys without reasoning
  • No idea which domain you are weak in

Practising with a system

  • 390 questions in 6 full tests, CLF-C02 (2026)
  • Every option explained — including the wrong ones
  • Readiness per exam domain, and drills for your weakest
Start free — 10 questions

Straight into the player. No account, no email.

Frequently asked questions

Is this the current CLF-C02 format?
Yes — these questions follow the CLF-C02 exam guide (2026 edition). CloudFormation sits in the Cloud Technology and Services domain, the largest on the exam at 34%, and infrastructure-as-code is a recurring concept.
Are these real exam questions?
No. They are our own questions, written in the style and difficulty of the exam. Reproducing real exam items violates the AWS certification agreement and can get your certification revoked, and a memorised item teaches you nothing about the one you have not seen.
Do I need to write a CloudFormation template for the exam?
No. CLF-C02 tests what CloudFormation is — infrastructure as code, templates, stacks — and its benefit of repeatable provisioning. You will not author YAML in the exam; you will recognise where infrastructure-as-code is the right answer.
What is the one-line summary?
CloudFormation turns your infrastructure into a template you can provision repeatably as a stack. Define once, deploy consistently, tear down in one action — that is the whole idea the exam tests.

Updated for CLF-C02 (July 2026). The sample questions above are our own work in the style of the exam — not real exam items. The exam itself is set and marked by the certification body.