AWS CLI and CloudShell


We’re going to be primarily using the AWS Management Console but we will also use the Command Line. There’s a couple of ways that we can do this. One is that we can install the AWS command-line interface, the CLI on our own computers and the other way is that we can use a relatively new service that was released at the end of last year, which is AWS CloudShell. Search for the AWS CLI and click on the Installing or updating the latest version of the AWS CLI. Once you get there, on the left hand side you’ll see AWS CLI version 2. If you expand that, you’ll then get the instructions for different operating systems.

Once the install has finished, if we go to the search here and just type in CMD, you’ll find you get a Command Prompt. Open the Command Prompt and then type aws --version. If you get a response like this, then that means you’ve successfully installed the AWS Command Line Interface.

So for example, I could run aws s3 ls. What this does is it checks for any data on the Amazon S3 service and what’s going to happen is it’s not going to be able to locate any credentials. We don’t have a way at this point of authenticating and getting authorized to access the service.

I recommend you install Visual Studio Code. Now, this is also a free utility and you can just download it from this code.visualstudio.com. So just install using the simple user installer and once that’s downloaded and installed, then you’ll be ready for later on in the course.

AWS CloudShell

AWS CloudShell (Services > Developer Tools > CloudShell) is a service that we can find in the management console. It’s a browser-based shell with CLI access from the management console.

Now, one of the great benefits of this is sometimes if you’re running in a corporate environment, you may find a firewall stops you from running certain commands. With CloudShell, that means you’re not behind your firewall. You’re running this straight from AWS. As you’re already logged in, you’re already authenticated as well. So you don’t need to supply any extra information to be able to access AWS services.