AWS CLI - Part 1: Install

 
aws-cli.png
 

Update 16 May 2022: Added information on how to swap from the zsh prompt “~ %” (this became the new default in 10.15) back to the old bash “$”

One of the main issues encountered with hosting 360˚ panoramas on AWS buckets is the time it takes to upload the thousands of multiresolution tiles that make up the panoramas. Using the AWS Console to upload 360˚ Panorama projects can be incredibly slow however using AWS CLI the speed of the upload process can be dramatically increased.

Using CLI also negates the need to open up the console to update files as the project evolves or changes.

Note: this tutorial requires you have administration access to an AWS Account if you don’t have an account see my tutorial ‘Create an AWS Account’.

It also requires you have an S3 bucket configured as a static website. If you don’t have an S3 bucket see my tutorial ‘Configure S3 for 360˚ Panoramas’

Part 1: Install takes you through Download, Installing and Testing the AWS CLI Application

Part 2: Configure shows you how to create an Identity Access Management (IAM) user, collect configuration data and configure the CLI.

Part 3: Upload shows how to upload your local files to your S3 Bucket/s and highlights some other useful Command line operations.

What is CLI

CLI stands for Command Line Interface and it's a tool you download and install on your computer that allows you to control multiple AWS services using the Mac Terminal app and command lines.

For the non-technical people among us, evil has a name: The “command line.” 

In reality, there’s really nothing to fear because once you've used it a couple of times it is instantly demystified.

How does it work?

So rather than opening a browser window and logging into AWS using your account you open the Terminal App and connect using a few simple commands.

Once you've connected then you can do all sorts of things like creating or deleting an S3 bucket, uploading files, viewing files, etc.

Just like using the Management Console only quicker.

Setting up AWS CLI on a Mac

In three steps: Download, Install, and Test you will have AWS CLI running on your Mac

Download

1. Browse to https://aws.amazon.com/cli/

2. Click on MacOS PKG to download it (figure #2)

Figure #1: Download location

3. Select a location to save it to and click on Save (figure #3)

AWS_CLI_1.png

Install

1. Double Click on the AWSCLIV2.pkg icon to start the install (figure #4)

 

Figure #4: App

 

2. Step through the 9 Install windows (figures #5-#13)

Note: in figure #8 Installation Type the install action says ‘Upgrade’ as I have previously installed the app. Yours should say ‘Install’

 

3. Close the Installer window once the installation is finished.

Test

4. Open the Terminal App. If you don’t know where it is use Spotlight Search and enter ‘Terminal’ (figure #14)

 

Figure #14: Terminal app in Spotlight Search

 

Note: at this point it’s a good idea to select it and ‘Keep in Dock’ as you will be accessing it frequently

5. The Terminal window displays your Last login, and, by default, you are logged in with your OS X user account (in my case Tony). A grey box, at the end of the text, indicates the insertion point for a command. (figure #15)

Figure #15: Open terminal screen

Note: if you do not see the “$” sign and instead see “~ %” this is the new default prompt in 10.15. The entries will work in the same way just don’t add the “$”. If you want to go back to the old prompt copy and paste this command ‘chsh -s /bin/bash’ (no quotes) after the “~ %”. Enter your password, quit and reopen the Terminal

Note: if the window is active you can start typing without having to click in the window. In this next step we will test that the application is installed properly.

6. Type in the following command: aws -- version (figure #16)

Figure #16: Command to test the application

7. Select return and in a second or two the information on the application will be displayed (figure #17)

Figure #17: Application version displayed

Note: this brings us to the end of Part 1: Install, and we are ready to move onto Part 2: Configure where we will set up an IAM user, retrieve some data and configure the CLI Application

Summary

I hope you have enjoyed the tutorial and it has helped you to achieve the best possible project outcome. If it has please take a second to consider a donation so that I can continue to add more tutorials.

I'd like to Donate