Training / Certifications / AWS Cloud Practitioner / Console, CLI, SDKs and Infrastructure as Code

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.

Domain 3: Cloud Technology and Services (34%)Task 3.1About 5:54CaptionsStatic view for reduced motion
Lesson 8: Console, CLI, SDKs and Infrastructure as Code Illustrative example: the store is a sample company Ways to access AWSThe console, the AWS CLI,CloudShell and the SDKs, andthe API behind all of themOne-time or repeatable?When to click, when to script,and infrastructure as code withAWS CloudFormationManagement ConsoleClick in a web browser>_AWS CLIType commands, run scripts{ }AWS SDKsCall AWS from your codeInfrastructure as codeDescribe it in a templateAWS APIsEvery action becomes anauthenticated API call,sent over HTTPSAmazon EC2Amazon S3Amazon RDSDifferent doors,same buildingLaunch an instanceNameweb-test-1Instance typea small general-purpose sizeNetworkdefault settingsLaunchVisual: no code to writeGreat for exploringBest for one-time tasksSlow to repeat by handEasy to miss a settingClicks aren't saved as a recipe you can replayTerminal$ aws s3 ls$ aws s3 cp receipt.pdf s3://shop-receipts/$ aws ec2 describe-instancesSave the commands in a script, run them againAWS CloudShellA shell in your browser,opened from the consoleAlready signed in with yourconsole credentialsAWS CLI pre-installedNo additional chargeThe CLI gives direct access to the public APIs of AWS servicesScripts make a task repeatable, but you still write every step yourselfStore checkout code (Python)import boto3s3 = boto3.client("s3")s3.upload_file("receipt.pdf", "shop-receipts", "order-1042.pdf")boto3 is the AWS SDK for PythonThe SDK does the plumbingSigns each requestFinds your credentialsRetries temporary failuresFits your language's styleSDKs for many languages, for example:PythonJavaScriptJava.NETGoand moreOne-time operationConsole, or a quick CLI commandExplore a new serviceRun a quick testChange one setting, onceRepeatable processScripts, SDKs, infrastructure as codeSame setup in dev, test and prodSeveral Regions or accountsMany people making changesMust match exactly every timeThe more often you repeat a task, the more it pays to automate itstore.yaml (simplified)Resources: LoadBalancer: # Elastic Load Balancing WebServers: # Auto Scaling group OrdersDB: # Amazon RDS databaseCloudFormationStack: store-prodone unitLoad balancerWeb serversDatabaseTemplateA YAML or JSON blueprintStackCreated, updated, deleted togetherChange setPreview changes before applyingOnetemplatestore.yamlDev stackfor developersTest stackfor testingProd stackfor shoppersIdentical every timeNo forgotten settingsRebuild in minutesSame template, any RegionWhy teams use infrastructure as codeKeep templates in version controlReview changes like application codeGo back to an earlier versionPreview updates with change setsAutomatic rollback on errorDelete the stack, delete its resources1Your codeTypeScript, Python, Java, C#, Go2AWS CDKturns it into a template3CloudFormationdeploys the stackThe CDK doesn't replace CloudFormation: it deploys through itIf the question says……think“Explore a service or do a one-time task”Management Console“Automate with commands and scripts”AWS CLI“Call AWS from application code”AWS SDKs“CLI in a browser, nothing to install”AWS CloudShell“Repeatable, consistent environments”AWS CloudFormation“Infrastructure in a programming language”AWS CDK“Preview changes to a stack”Change setsWays to access AWSConsole: visual, one-time tasksCLI: commands and scriptsCloudShell: the CLI in a browserSDKs: AWS inside your codeAll of them call the AWS APIsRepeatable: IaCCloudFormation: template → stackTemplates are YAML or JSONSame template, identical stacksChange sets preview updatesCDK: code → CloudFormationOne-time task: the console is fine.Repeatable and consistent: infrastructure as code.

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 codeAWS Management Console
Automate tasks from a terminal; shell scriptsAWS CLI
Run AWS CLI commands from the browser without installing anythingAWS CloudShell
Integrate AWS services into application codeAWS SDKs
Repeatable, consistent environments; templates; provision resources as a unitAWS CloudFormation (infrastructure as code)
Define infrastructure in TypeScript, Python or another programming languageAWS 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?

  1. Through the AWS Management Console
  2. By using an AWS SDK in the application code
  3. By using AWS CloudShell
  4. 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?

  1. AWS Management Console
  2. Amazon CloudWatch
  3. AWS CloudFormation
  4. 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.)

  1. AWS Command Line Interface (AWS CLI)
  2. AWS Management Console
  3. AWS SDKs
  4. AWS Artifact
  5. 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?

  1. AWS CloudFormation
  2. The AWS SDK for Python
  3. Amazon CloudWatch
  4. 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?

  1. Use the AWS Management Console
  2. Write an AWS CloudFormation template
  3. Build an application with the AWS SDK for Java
  4. 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.

Download captions (WebVTT)

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.

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.