Friday, September 29, 2017

AWS Command Line Interface (CLI) tool.

What is AWS CLI ?

The AWS Command Line Interface (CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts.

Why do you use AWS CLI ?

We have been using AWS services for a long time. We are communicating those services through API build on different languages. AWS also provides a command line tool to use those services.
Many of us know that and using it some extent but many of us might not know about this tool. It’s very excellent tool.
You don’t need to write a program to access those services. They provide huge command references; you will get them all from here.

Install and Configure AWS CLI

You can download the AWS Command Line Interface from here.
You can also installed using pip command pip install awscli

Once the instalation is done you need to configure it. You will get the details of configuration from here

Usefulness of AWS CLI with an example

Let me give an example how it very much useful. Suppose you are using an Employee DynamoDb table and you want to know the date and time of the last provisioned throughput increase or decrease for this table or the number of provisioned throughput decreases for the table during this UTC calendar day. How can you get that information? There are basically two ways to get it:
  • Write a small program using AWS API to get the desired information.
  • Login to the AWS console and go to the Metrics tab of that DynamoDB table and find out your desired data. Though sometimes it’s very hard to find some specific data from the console.
But you can get that information by using a simple command in your command prompt without writing a small application!!!!
aws dynamodb describe-table --table-name Employee

No comments:

Post a Comment