Lesson 1 of 2 Accessing and Deploying on AWS

Choosing Between the Console, CLI, SDKs and APIs

This lesson explains the ways to work with AWS. Underneath, they all call the same AWS APIs, so the choice depends on whether you are exploring, automating or building applications.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish the AWS Management Console, the AWS CLI, the AWS SDKs and the APIs.
  • Identify the credentials used for console access and for programmatic access.
  • Explain when automated access is preferable to manual work in the console.

Ways to access AWS

There are several ways to work with AWS, and all of them call the same AWS APIs underneath. The AWS Management Console is a web interface for managing services visually; it suits learning, one-off tasks and viewing dashboards, and a mobile app lets you check resources and alarms. The AWS CLI runs commands in a terminal, such as aws s3 ls, which can be saved in scripts to automate repetitive tasks.

The AWS SDKs are libraries for programming languages such as Python, Java and JavaScript, which let application code call AWS, for example to upload a photo to S3. The APIs themselves are the HTTPS interface that the console, CLI and SDKs all use, and can be called directly. The following table summarises the methods.

MethodWhat it isBest for
AWS Management ConsoleWeb interface for managing services visually; a mobile app lets you monitor resources and alarmsLearning, one-off tasks, dashboards
AWS CLICommands in a terminal, such as aws s3 ls, that can be saved in scriptsAutomating repetitive tasks
AWS SDKsLibraries for Python (Boto3), Java, JavaScript, Go, .NET and moreCalling AWS from application code, e.g. uploading photos to S3
APIsThe HTTPS interface that the console, CLI and SDKs all useDirect integration
Sort into groups

Console, CLI or SDK?

Exam skills 3.1.1 · 3.1.2

Choose the best way to access AWS for each task.

Log in to try this activity Interactive activities are free with an account.

Credentials

How you prove your identity depends on how you use AWS. Signing in to the console uses a user name and password, protected with multi-factor authentication (MFA). Programmatic access, through the CLI, SDKs or APIs, uses access keys. Long-term access keys can leak, so the better practice is temporary credentials, obtained from an IAM role or by signing in through IAM Identity Center, which expire automatically. The following table summarises the two.

AccessAuthenticates with
ConsoleUser name and password, with MFA
Programmatic (CLI, SDKs, APIs)Access keys or, better, temporary credentials from IAM roles or IAM Identity Center
True or false

Credentials for access

Exam skills 3.1.1 · 2.3.1

Check how people and programs authenticate to AWS.

Log in to try this activity Interactive activities are free with an account.

Manual versus automated

Use the console to learn and for occasional tasks. Use the CLI, SDKs or infrastructure as code for anything that must be repeated reliably, because manual clicking is slow and error-prone.

Worked example

One task, three ways

A team needs to list the files in an S3 bucket. The same request can be made three ways, and they all call the same S3 API underneath:

MethodHowWhen it makes sense
Management ConsoleOpen S3, click the bucketLooking once, or learning
AWS CLIaws s3 ls s3://team-reports/Repeating the task or putting it in a script
SDK in application codeA few lines of Python with Boto3When an application needs the list
import boto3

s3 = boto3.client("s3")
for obj in s3.list_objects_v2(Bucket="team-reports").get("Contents", []):
    print(obj["Key"])

If the team needed this list every morning, clicking in the console would be slow and error-prone; a short CLI script or a scheduled function does it reliably.

Check yourself

What is the difference between the AWS CLI and an AWS SDK?

Show answer

The AWS CLI runs AWS commands in a terminal or script. An AWS SDK is a library that lets application code, written in a language such as Python or Java, call AWS services.

Exam Tips

Remember for the exam

  • Programmatic access means the CLI, the SDKs or the APIs.
  • The console suits learning and one-off tasks; the CLI suits scripts.
  • To call AWS from application code, use an SDK.
  • Tasks that must be repeated should be scripted or automated, not done by hand.
  • Prefer temporary credentials from roles to long-term access keys.