ladderlore
  • Type a service name, like S3 or IAM.

Service · Developer Tools

AWS Command Line Interface (AWS CLI)

A command-line tool for controlling AWS services by typing commands or running scripts.

A command or a script
CLI
AWS APIs
S3
  1. 1You type a command, or run a script that holds many commands.
  2. 2The CLI signs the request with your credentials and sends it to the AWS API.
  3. 3IAM checks the permission, and Amazon S3 does the work, for example listing your buckets.
A CLI command on its way to Amazon S3.

Step by step

  1. 1You type a command, or run a script that holds many commands.
  2. 2The CLI signs the request with your credentials and sends it to the AWS API.
  3. 3IAM checks the permission, and Amazon S3 does the work, for example listing your buckets.

A CLI command on its way to Amazon S3.

What it is

The AWS Command Line Interface (AWS CLI) is a free, open-source tool that you install on your computer. It runs in a terminal on Windows, macOS or Linux. You type a command, for example one that lists your Amazon S3 buckets, and the CLI sends the matching request to the AWS API.

Most things you can do in the console, you can also do with a CLI command. The difference is speed and automation. Commands can be saved in a script and run again and again, on a schedule or for many resources at once, with the same result each time.

What it is

The CLI needs credentials to sign its requests. AWS recommends short-term credentials, for example from AWS IAM Identity Center, rather than long-term access keys.

Remember

  • Typed commands instead of clicks.
  • Commands can be saved in scripts, so routine work runs the same way every time.
  • Runs on Windows, macOS and Linux.
  • Signs requests with access keys. Short-term credentials are safer than long-term keys.

Remember

  • Each command is an API call: IAM checks it and CloudTrail records it.

On the exam

  • “Manage AWS from a terminal” or “automate tasks with scripts” points to the AWS CLI.
  • “Programmatic access” from a terminal or a script is the AWS CLI. From inside application code, it is an AWS SDK.