AWS provide command line tools that are extremely powerful. These tools allow you to administer your AWS account. The tutorial below details how you can connect a Linux machine to your AWS account. There are two portions to this tutorial:
- Set up your AWS account to allow access from the command line.
- Installing the AWS command line tools on your machine and configuring it to access AWS.
Part 1. Setting up AWS to allow access from the command line.
Log into your AWS account.
Next click your user name, and in the menu that appears select “Security Credentials”.
In the screen that appears select “Users”.
Next click “Create new users”.
Give your account a name and insure that you have the check box ticked that states “Generate an access key for each user”. Then click “Create”.
In the screen that appears select “Downloads Credentials”. Be sure to take note of where the file saves to as we will need it later.
Click back to users and click on the user you have created.
Next click “Permissions” and the then “attach policy”.
Select the checkbox besides “Administrator Access” and click “Attach Policy”.
This completes the part of the tutorial that takes place on the AWS console. Next go to your Linux machine and open a terminal.
Part 2: Installing and configuring AWS CLI on your Linux machine.
We will first need to install PIP which will allow use to install the AWS CLI utility.
Type the command “curl -O https://bootstrap.pypa.io/get-pip.py” into the termainl
Next, type “sudo python get-pip.py” and hit the enter key.
Next run, “pip install awscli”
The AWS command line utility should now be installed. Now we need to configure the CLI so we can access our AWS account
Type “aws configure” into the termainl and press enter. You will now be promoted to enter the following information:
- AWS Access KEY ID
- AWS Secret Access Key
- Default region name
- Default output format
Enter your details from the CSV file that you saved.
You are now connected to the AWS via the command line!