The AWS Command Line Interface (CLI) allows you to manage your Amazon Web Services account directly from the command line. This guide will help you set it up quickly, even if you're new to AWS or command-line tools.
Step 1: Make Sure You Have an AWS Account
You need an active AWS account to use AWS CLI. If you don’t have one, go to AWS and create an account first.
Need help setting up AWS?
Our AWS Server Management team can help configure and maintain your AWS environment for optimal performance and security.
Step 2: Create a User and Get Access Keys
To connect AWS CLI to your account, you’ll need an Access Key and Secret Key:
- Log in to the AWS Management Console.
- Go to IAM (Identity and Access Management) and create a new user.
- Add the user to a group with the permissions you need.
- Copy the Access Key and Secret Key that AWS provides for the user.
Step 3: Set Up a Python Environment
AWS CLI works with Python, so it’s good to create a virtual environment to keep it separate from other software:
- Connect to your server using SSH.
Create a new environment called amazon:
cd ~
virtualenv amazon - Activate it:
source ~/amazon/bin/activate - Your command prompt will now show (amazon), meaning the environment is active.
Step 4: Install AWS CLI
With the environment active, install AWS CLI:
pip install awscli
Make the AWS CLI command executable:
chmod +x ~/amazon/bin/aws
Step 5: Connect AWS CLI to Your Account
Run the configuration command:
aws configure
Enter the following information when prompted:
- AWS Access Key ID → Paste your Access Key
- AWS Secret Access Key → Paste your Secret Key
- Default region → Press Enter to leave it blank, or type your preferred region
- Output format → Press Enter to leave it blank
Once completed, AWS CLI is ready to interact with your AWS account.
Step 6: Verify Installation
To see a list of AWS CLI commands, run:
aws help
You can now manage AWS resources directly from the command line.
Always keep your Access Key and Secret Key secure and avoid sharing them publicly.
Need Help?
If you need professional assistance with installing and configuring AWS CLI or troubleshooting, our expert administrators are here to help. You can hire one of our system administrators for dedicated support. Feel free to contact us for expert assistance anytime.
