AWS CLI: We all know that Amazon web services is the market leader and top service provider in Cloud computing. AWS really helps companies with numerous workload patterns like game development data processing, archiving and much more.
AWS not only provide eye catching browser based console but also Command line interface which is known as AWS command line interface. Before knowing how to use let’s have a look at following topics.
AWS CLI is nothing but a Command line Interface which is helpful in dealing with your AWS administration services from a terminal session on your own customer, it enables you to control and design Several AWS administrations.
Possibly this is the time you have to check the AWS CLI (Command Line Interface). The CLI is unified tool, with this tool we can able to manage and check all our AWS services from Terminal or command line session on customers desk.
Here, in theawsblog I’m going to discuss you the best way to utilize CLI and how to add it on your Windows, Mac, UNIX, and Linux Operating Systems. The more you utilize the amazon web service CLI, the more you’ll get to know that how amazing it is.
Here at CLI it is possible to do with a single step installation and very few configuration steps, you can able to start using all of the features offered by the AWS Management Console using the terminal program.
- Windows Command Line: On Windows desktop or PC, you can easily run your commands in Windows command prompt.
- Linux Terminal (shells): On Linux Operating system you can use command shell programs like tsch, bash and zsh to run your commands.
- Remotely: With this option you can able to run your commands on Amazon EC2 instances with the help of a remote terminal. For example PuTTY or SSH. You can also use AWS Systems Manager to do automatic operational tasks across your AWS resources.
Aside from this, it likewise gives direct access to AWS administrations to Public APIs. Notwithstanding the low-level API identical directions, the AWS CLI offers customization for a few services.
In This Blog will let you know everything that you have to know to begin with the AWS Command Line Interface and to utilize its benefits in your day by day activities.
Following are Benefits of using Aws CLI.
Easy to Install:
Before CLI was presented, the establishment of toolboxes like old AWS API included an excessive number of complex advances. Clients needed to set up different condition factors. Be that as it may, establishment of AWS Command Line Interface is speedy, straightforward and institutionalized.
Saves Lot of time:
Notwithstanding being easy to use, AWS Management Console is having significant problem now and then. Assume you are attempting to locate an expansive Amazon S3 folder. You need to sign in to your account, scan for the correct S3 bucket, locate the correct folder and search for the correct file. In any case, with CLI, in the event that you know the correct command the whole tasks will take only a couple of moments.
CLI provides you to do computerize the whole procedure of controlling and overseeing AWS benefits through scripts. These scripts make it simple for clients or users to completely automate cloud computing.
Supports all AWS:
Way before AWS Command line interface, clients are required a dedicated command line interface device for simple EC2 service. That worked legitimately, yet it didn’t give clients a chance to control other Amazon Web Services, as for example the AWS Relational Database Service. Be that as it may, AWS CLI gives you a chance to control every one of the services from one basic tool.
Check below steps to install AWS command line interface in your PC.
- Download the necessary MSI installer.
- Run the setup file.
- Follow the onscreen instructions to complete installation.
To get confirmation on the installation, use aws –version command at a command prompt.
On 64 Bit Version
The CLI installs to C:\Program Files\Amazon\AWSCLI
C:\Program Files\Amazon\AWSCLI>aws --version
aws-cli/1.7.24 Python/2.7.9 Windows/8
On 32 Bit Version
The CLI installs to C:\Program Files (x86)\Amazon\AWSCLI
C:\Program Files (x86)\Amazon\AWSCLI>aws --version
aws-cli/1.7.24 Python/2.7.9 Windows/7
Once you have successfully installed CLI on your desktop, You just need one more simple step to be able to connect to your AWS account.
aws configure, command the CLI will give you for four pieces of info. The first two are necessary and These are your AWS Access Key ID and AWS Secret Access Key, which serve as your account credentials.
You can regenerate new ids within AWS Identity and Access Management (IAM) if you do not already have them. The other information you will need is region and output format, which you can leave as default for the starting time.
# aws configure
AWS Access Key ID [None]: WUEW22JFDJSIWBUCP32J
AWS Secret Access Key [None]: QKRzbphWlpk8WmHZiGF4VawiQnoR0qO2FhU5ptEi Default region name [None]: us-west-1
Default output format [None]:
That’s fine One command you can execute from your command prompt is to list any S3 buckets you have.
aws s3 ls
Install the AWS CLI on Linux, Mac or Unix Operating System
- Linux or Unix.
- Python 2.6.3 or later
Check Python installation:
$ python --version
If Python is not already installed on your PC then you need to install a recent version of Python in Your PC.
Follow these Simple steps from the command line to install the AWS CLI:
$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
$ unzip awscli-bundle.zip
$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
Add your Access Key ID and Secret Access Key to ~/
.aws/config using this format:
aws_access_key_id = <access key id>
aws_secret_access_key = <secret access key>
region = us-east-1
Protect the config file:
chmod 600 ~/.aws/config
Alternatively, you can set a environment variable indicating the config document. This is particularly essential on the off chance that you need to keep it in a non-standard area. For future comfort, additionally add this line to your ~/.bashrc file:
Experiment with the following from your command line and in the event that you have any S3 buckets you should see them listed.
aws s3 ls
Here we got simple AWS CLI command structure. you should remember that any commands you enter in the CLI will have the following standard format:
aws <command> <subcommand> [options and parameters*]