Skip to main content

AWS CLI Guide

This guide provides all the key information and getting-started instructions after a successful AWS Command Line Interface (CLI) v2 installation via DeploySage-CLI.

Initial Configuration

Before using the AWS CLI, you must configure it with your AWS credentials. The recommended way is to use the aws configure command.

This command will prompt you for four pieces of information:

aws configure
ItemValue
AWS Access Key IDYour personal access key.
AWS Secret Access KeyYour secret key.
Default region namee.g., us-east-1
Default output formate.g., json, text, table

Basic Commands

Using Profiles

Once configured, you can start managing your AWS resources.

You can configure multiple profiles for different users or roles.

# Verify your identity and configuration
aws sts get-caller-identity

# List all of your S3 buckets
aws s3 ls

# List all of your EC2 instances in the default region
aws ec2 describe-instances
# Configure a named profile (e.g., 'work')
aws configure --profile work

# Use the named profile for a command
aws s3 ls --profile work

Configuration Files

Your credentials and configuration settings are stored in the ~/.aws directory.

ItemValue
Credentials File~/.aws/credentials
Config File~/.aws/config