From the course: AWS for DevOps: High Availability and Elasticity

Setting up AWS CLI - Amazon Web Services (AWS) Tutorial

From the course: AWS for DevOps: High Availability and Elasticity

Start my 1-month free trial

Setting up AWS CLI

- [Instructor] In this section of the course, we're going to take a look at code tools. We're going to look at script tools, the AWS CLI. We're going to also look at the software development kit. And we're going to use the JavaScript or Node.js language. Now of course when you use the SCK you can use any programming language that works for you. Python, C#, Java, whatever. This is just to show you their patterns. So we're going to focus on the patterns around scripting and around programatic access, and in order to do this we need to first get the tools. So let's start with the CLI. So you want to start by going to the documentation page for installing the AWS command line interface or CLI tool. Now your particular implementation is going to differ depending on a couple of things. First which operating system you're installing on Linux, Windows, Mac or something else, and which version of Python you're using. Because there's so many different installation processes, I'm actually just going to point you to the documentation, tell you to follow the documentation. One thing you want to read in particular is which version of Python that you're working with, because the CLI has an underlying dependency on Python. Then follow through for your particular implementation. Once you install you will then have to configure using an account that has appropriate permissions. For the purposes of these exercises, I've created an IM user and configured the CLI with the full administrator permissions. You will probably use lesser permissions if you're doing this in any sort of production environment. Once you have completed the process, and I'll just come scroll down to give you an idea of what it might look like. So here they recommend you use PIP, I personally prefer Homebrew. And then you can verify using the aws--version. So I've already run this process, so I'm going to switch over to the terminal. So to verify I'm going to type, aws space --version, and you'll see that I'm working with the version of CLI 1.11.84 in Python 2.7. It's really important when you're working with newer services and this is a tip from the real world, from the Amazon services whether it's you know, something in the world of Lambda, or an entirely new service like X-ray as we saw, that you validate when you're scripting the version of the CLI that's expected. Because it's really important that you have the latest version when you're working with all services, but particularly the newest services. The check that I like to do just to make sure that we're working properly once you've done the configure command and entered in your keys, is just to list all of the buckets out of S3. This I kind of like a hello Amazon check. So if I run that, you can see that I have two buckets in S3. And if I switch back to the console, you can see how this relates. So again I'm thinking that many of you watching are familiar with the CLI and we're going to look at it in terms of some availability and elasticity scenarios and scripts and tools. But just in case you're not I just wanted to show you the connection between the two and I'll be flipping back and forth in subsequent movies.

Contents