DevOpsLesson
DevOpsLesson

Free, comprehensive DevOps tutorials and learning roadmaps. Master Docker, Kubernetes, CI/CD, and more.

Stay Updated

Get notified about new tutorials and features.

Tutorials

  • What is DevOps?
  • Docker Tutorial
  • Terraform Tutorial
  • CI/CD Pipeline
  • All Tutorials

Roadmaps

  • DevOps Engineer
  • Cloud Engineer
  • SRE Path
  • All Roadmaps

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 DevOpsLesson. All rights reserved.

DOCKERKUBERNETESTERRAFORMAWSCI/CDLINUXGITDEVOPS ROADMAPCLOUD ROADMAPSRE ROADMAPGIT CHEATSHEETDOCKER CHEATSHEETK8S CHEATSHEETTF CHEATSHEETLINUX CHEATSHEETDOCKERFILE LINTERYAML VALIDATORCRON PARSERREGEX TESTER

Aws Tutorial

Introduction to AWS
AWS Global Infrastructure
Setting Up AWS
AWS IAM
AWS EC2
AWS VPC
AWS S3
AWS RDS
AWS Lambda
AWS ECS and EKS
AWS CloudWatch
AWS CodePipeline
AWS Cost Optimization
AWS Elastic Load Balancing
AWS Auto Scaling
AWS CloudFront
AWS Route 53
AWS DynamoDB
AWS ElastiCache
AWS SQS
AWS SNS
AWS EventBridge
AWS Step Functions
AWS API Gateway
AWS ECR
AWS EKS
AWS CloudFormation
AWS Elastic Beanstalk
AWS KMS
AWS Secrets Manager
AWS WAF and Shield
AWS CloudTrail
AWS Config
AWS Systems Manager
AWS Organizations
AWS EFS
AWS EBS Deep Dive
AWS Kinesis
AWS Athena
AWS CodeDeploy
AWS CodeCommit
AWS CDK
AWS SAM

AWS CLI Setup

PreviousPrev
Next

Install and configure AWS CLI v2 on macOS, Linux, or Windows, then verify credentials and use profiles for multiple AWS accounts.

The AWS CLI is one of the most useful tools in a DevOps workflow because it turns console actions into repeatable commands. Once installed, you can query infrastructure, automate deployments, inspect logs, and test permissions from a terminal or CI pipeline. AWS CLI v2 is the current standard and works on macOS, Linux, and Windows.

Installation is platform-specific but conceptually simple: download the AWS-provided package, install it, and verify with aws --version. The next step is aws configure, which asks for an access key ID, secret access key, default Region, and output format. Those values are stored locally so later commands can authenticate without you retyping credentials each time.

SettingPurpose
Access key IDIdentifies the IAM credential
Secret access keyProves you control that credential
Default RegionSets the Region used when a command omits one
Output formatChooses json, table, or text formatting

Profiles make multi-account work safer. Instead of overwriting one set of credentials, create named profiles such as dev, staging, and prod. Then run commands with --profile prod when needed. This reduces mistakes and makes scripts more explicit about which account they target.

Two first commands are worth memorizing. aws sts get-caller-identity shows which identity the CLI is currently using. aws s3 ls is a quick sanity check that credentials and connectivity work. If either command fails, troubleshoot configuration before trying anything more complex.

Pair this lesson with AWS Account Setup so your CLI credentials come from a properly secured identity rather than the root user.

aws --version
aws configure
aws sts get-caller-identity
aws s3 ls
aws configure --profile prod

Operational note

Early AWS success usually comes from repeatable habits rather than memorizing every service. Use tags, consistent naming, and a short checklist for account setup, region awareness, and access patterns so new environments feel predictable instead of improvised. That discipline makes later automation, cost control, and incident response much easier. Shared standards like this make future environments easier to launch, review, and support.

Exercise

CLI basics

What command is commonly used to set the default AWS Region and credentials locally?

Exercise

Profile usage

Why are AWS CLI profiles useful?

PreviousPrev
Next

Continue Learning

Setting Up AWS

See the core setup steps for a new AWS environment, including account creation, secure access patterns, and the first tools DevOps engineers use every day.

10 min·Easy

AWS Account Setup

Create a secure AWS account foundation by enabling MFA on the root user, setting a billing alarm, and establishing safer daily access patterns.

10 min·Easy

AWS Console Tour

Get comfortable with the AWS Management Console by learning the services menu, search bar, region switcher, and recent history navigation.

8 min·Easy

Explore Related Topics

Te

Terraform Tutorials

Manage AWS infrastructure as code

Li

Linux Tutorials

Essential Linux skills for working with EC2

On This Page

Operational note