AWS Cloud Practitioner (CLF-C02) · Lesson 8 of 26
Console, CLI, SDKs and Infrastructure as Code
Choose between the AWS Management Console, the AWS CLI, AWS CloudShell, the AWS SDKs and infrastructure as code, and decide when a task should be a one-time operation or a repeatable process built with AWS CloudFormation or the AWS CDK.
Tip: turn your phone sideways or use full screen for larger labels.
Captions match the narration word for word. Press Space to play or pause and the arrow keys to change scenes.
Learning objective
Choose between the AWS Management Console, the AWS CLI, AWS CloudShell, the AWS SDKs and infrastructure as code, and decide when a task should be a one-time operation or a repeatable process built with AWS CloudFormation or the AWS CDK.
Exam mapping
Domain 3: Cloud Technology and Services (34%). Task statement 3.1 in the official exam guide.
Key takeaways
- Every action in AWS is an API call. The Management Console, the AWS CLI, the SDKs and infrastructure as code are different ways to make those calls.
- The AWS Management Console is a browser-based interface with no code to write. It's best for exploring, learning and one-time tasks, but clicks can't be replayed.
- The AWS CLI runs commands in a terminal and gives direct access to the public APIs of AWS services; save commands in scripts to repeat them. AWS CloudShell is a browser-based shell, launched from the console, that's pre-authenticated, has the CLI pre-installed and costs nothing extra.
- The AWS SDKs let developers call AWS from application code in languages such as Python, JavaScript, Java, .NET and Go. They sign requests and retry temporary failures for you.
- One-time operations suit the console or a single command. Repeatable processes (several environments, Regions or teams) call for automation, ideally infrastructure as code.
- AWS CloudFormation turns a YAML or JSON template into a stack of resources managed as one unit, with change sets to preview updates and rollback on error. The AWS CDK lets you write infrastructure in a programming language and deploys it through CloudFormation.
Exam tips
How the exam asks about this
Questions describe a situation and expect you to recognize the concept behind it.
| If the question mentions… | Think |
|---|---|
| Explore a service visually; a one-time task; no code | AWS Management Console |
| Automate tasks from a terminal; shell scripts | AWS CLI |
| Run AWS CLI commands from the browser without installing anything | AWS CloudShell |
| Integrate AWS services into application code | AWS SDKs |
| Repeatable, consistent environments; templates; provision resources as a unit | AWS CloudFormation (infrastructure as code) |
| Define infrastructure in TypeScript, Python or another programming language | AWS Cloud Development Kit (AWS CDK) |
Common traps
- AWS CloudFormation provisions resources from templates. Don't confuse it with Amazon CloudWatch (monitoring) or AWS CloudTrail (API activity logs): the names look alike.
- The AWS CDK doesn't replace CloudFormation. It turns your code into CloudFormation templates and deploys them through CloudFormation.
- The console isn't a wrong answer in general: for a one-time task or exploring, it's the right one. When a question stresses repeatable, consistent or multiple environments, the answer is infrastructure as code.
- AWS CloudShell isn't a separate way into AWS: it's a browser-based shell for running AWS CLI commands, already signed in with your console credentials.
Practice
Exam-style questions
Answer each one before you open the explanation.
Question 1. A developer is adding a feature to an online store's application that saves each order receipt to Amazon S3. How should the application access Amazon S3?
- Through the AWS Management Console
- By using an AWS SDK in the application code
- By using AWS CloudShell
- By opening a ticket with AWS Support
Show answer
B. By using an AWS SDK in the application code. The AWS SDKs let application code call AWS services directly, handling request signing and retries. CloudShell is tempting because it's programmatic, but it's an interactive shell for people running CLI commands, not a way for an application to call AWS. The console needs a person clicking.
Question 2. A company must create identical development, test, and production environments, and later copy them to a second AWS Region, with as little human error as possible. Which AWS service should it use?
- AWS Management Console
- Amazon CloudWatch
- AWS CloudFormation
- AWS CloudShell
Show answer
C. AWS CloudFormation. CloudFormation provisions resources from a template, so the same template creates identical stacks in every environment and Region. CloudWatch is tempting because the name is similar, but it monitors resources rather than creating them. The console works for one-time tasks, but repeating every step by hand invites errors.
Question 3. Which are ways to access AWS services programmatically? (Select TWO.)
- AWS Command Line Interface (AWS CLI)
- AWS Management Console
- AWS SDKs
- AWS Artifact
- AWS Marketplace
Show answer
A. AWS Command Line Interface (AWS CLI) and C. AWS SDKs. The AWS CLI (commands and scripts) and the AWS SDKs (application code) are programmatic access methods; both call the AWS APIs. The Management Console is tempting because it also reaches every service, but it's a graphical, point-and-click interface. Artifact provides compliance reports and Marketplace sells third-party software.
Question 4. An administrator wants to run a few AWS CLI commands from a web browser without installing software or configuring credentials on a laptop. What should the administrator use?
- AWS CloudFormation
- The AWS SDK for Python
- Amazon CloudWatch
- AWS CloudShell
Show answer
D. AWS CloudShell. AWS CloudShell is a browser-based shell launched from the console. It's pre-authenticated with the console sign-in and has the AWS CLI pre-installed. The SDK is tempting because it's programmatic, but it needs to be installed and used from code. CloudFormation deploys templates rather than running ad hoc commands.
Question 5. A new employee wants to look around Amazon EC2 and launch a single test instance once, to learn how the options work. Which approach is most suitable?
- Use the AWS Management Console
- Write an AWS CloudFormation template
- Build an application with the AWS SDK for Java
- Create an AWS CDK app in TypeScript
Show answer
A. Use the AWS Management Console. For exploring and one-time tasks, the console's visual interface is the quickest and simplest choice. A CloudFormation template is tempting because infrastructure as code is a best practice, but it pays off for repeatable processes, not for a single learning exercise. The SDK and CDK need code for the same reason.
Transcript
Lesson transcript
The full narration, scene by scene. The captions file contains the same text with timings.
Scene 1 · 0:00
Lesson 8: Console, CLI, SDKs and Infrastructure as Code. Our store now knows where it will run on AWS. The next question is how the team actually works with AWS. This lesson covers task 3.1 in Domain 3: methods of deploying and operating in the AWS Cloud. We'll cover two ideas. First, the ways to access AWS: the console, the command line and software development kits. Second, how to choose between a one-time operation and a repeatable process built with infrastructure as code.
Scene 2 · 0:32
Every action is an API call. Start with one key fact: every action in AWS is an API call. Whether the team clicks a button in the console, types a command, runs application code or deploys a template, the request reaches the same AWS service APIs, sent over HTTPS and signed with the caller's credentials. So these tools aren't different powers. They're different doors into the same building, and the right door depends on the task.
Scene 3 · 1:03
The AWS Management Console. The first door is the AWS Management Console, a web interface you sign in to with a browser. Say the team wants to try Amazon EC2. In the console, they pick options from menus and launch a test server without writing any code. It's ideal for exploring, learning and one-time tasks. The downside: clicks aren't saved as a recipe. Doing the same thing again means repeating every step by hand, and it's easy to miss a setting.
Scene 4 · 1:36
The AWS CLI and AWS CloudShell. The second door is the AWS Command Line Interface, the AWS CLI. You type commands in a terminal, like aws s3 cp to copy a file into a bucket. The CLI gives direct access to the public APIs of AWS services, and you can save commands in scripts to run again. Don't want to install anything? AWS CloudShell is a browser-based shell you open from the console. It's already signed in, has the CLI installed, and costs nothing extra.
Scene 5 · 2:10
The AWS SDKs. The third door is the AWS SDKs, software development kits that let developers call AWS from their own code, in languages such as Python, JavaScript, Java, .NET and Go. When a shopper checks out, the store's code uses the SDK for Python to save the receipt in Amazon S3. The SDK does the plumbing: it finds the credentials, signs each request and retries requests that fail for temporary reasons, so developers can focus on the store's features.
Scene 6 · 2:44
One-time operation or repeatable process?. Now the second idea: one-time operations versus repeatable processes. A one-time task, like exploring a new service, running a quick test or changing one setting, is fine in the console or with a single CLI command. But when the same setup must be built again and again, in development, test and production, in several Regions, or by many people, doing it by hand gets slow and risky. The more often you repeat a task, the more it pays to automate it.
Scene 7 · 3:19
Infrastructure as code with AWS CloudFormation. That's where infrastructure as code comes in, and on AWS the core service is AWS CloudFormation. You describe your resources in a template, a text file written in YAML or JSON. Our store's template lists a load balancer, web servers and a database. CloudFormation reads it and creates everything as a stack: a group of resources you create, update and delete as a single unit. Before an update, a change set previews what will change.
Scene 8 · 3:51
One template, identical environments. Here's the payoff. The same template creates a development stack, a test stack and a production stack, and they come out identical every time, with no forgotten settings. Need the store in a second Region for disaster recovery? Deploy the same template there. And if an environment breaks, the team can rebuild it from the template in minutes, instead of trying to remember what someone clicked months ago.
Scene 9 · 4:21
Version control, rollback and the AWS CDK. Because templates are text files, teams keep them in version control, review changes like application code and can go back to an earlier version. If creating or updating a stack fails, CloudFormation rolls back. Developers who prefer a programming language can use the AWS Cloud Development Kit, the CDK. They write TypeScript, Python, Java, C# or Go, and the CDK turns that code into a CloudFormation template and deploys it through CloudFormation.
Scene 10 · 4:52
How the exam asks about this. Here's how the exam asks about this. Explore a service or do a one-time task: the Management Console. Automate with commands and scripts: the AWS CLI. Call AWS from application code: the SDKs. Run CLI commands in a browser with nothing to install: CloudShell. Repeatable, consistent environments from templates: CloudFormation. Define infrastructure in a programming language: the CDK. Preview changes to a stack before applying them: change sets.
Scene 11 · 5:22
Recap: ways to use AWS. To recap: every way of using AWS ends in an API call. The console is visual and best for one-time tasks; the CLI and CloudShell run commands and scripts; the SDKs put AWS inside your code. For repeatable, consistent environments, use infrastructure as code: CloudFormation turns a YAML or JSON template into a stack, and the CDK generates those templates from code. Next, we'll see who secures what in the cloud: the shared responsibility model.
Sources and accuracy
Checked against AWS documentation and the official CLF-C02 exam guide on October 18, 2026. AWS changes often, so confirm details in the current documentation. Diagrams and numbers in the animation are illustrative.
- What is the AWS Command Line Interface?
- What is AWS CloudShell?
- How AWS CloudFormation works: templates, stacks and change sets
- What is the AWS CDK?
- CLF-C02 exam guide: Domain 3, Cloud Technology and Services
This free course is independent and isn't affiliated with or endorsed by Amazon Web Services. AWS and AWS Certified Cloud Practitioner are trademarks of Amazon.com, Inc. or its affiliates.
Preparing a team for AWS certification?
I run hands-on AWS training for teams, from Cloud Practitioner basics to architecture, built around your own environment.