What I learned by reading the AWS CLI codebase

aws

I’m a big fan of Amazon, specially the Amazon Web Services. In this post I want to share what I learned by reading the AWS CLI code base. For those of you not familiar with those acronyms, it stands for Amazon Web Services Command Line Interface. AWS CLI allows you to manage your AWS services through a command line interface. You can download the cli at http://aws.amazon.com/cli/. If you are using windows, there is an installer available. If you are using Mac or Linux, you can install it with pip by running this command

pip install awscli

After installing and configuring it, you can use the different services available to manage your resources. For example to list all of my s3 buckets, I can run this command, “aws s3 ls”. See the picture below to see the results.

aws cli

Now that you know more about the aws cli, let’s dive into the code base. The project is hosted at github and you can read the code at https://github.com/aws/aws-cli. It is written in Python. It has unit, functional, and integration tests. It has an extensive set of examples on how to run commands.

The code is integrated with travis ci and it is tested against 4 versions of Python. The code runs against 2.6, 2.7, 3.3, and 3.4 versions. This file also run the installation script and tests scripts.

There is also a CLI Dev Version section on the home page of the project. It gives you enough information to setup your project and start contributing back to the project.

And finally, the project has documentation available. I hope this posts give you a brief introduction to Amazon Web Services Command Line Interface’s code base.