Читать книгу AWS Certified SysOps Administrator Official Study Guide - Cole Stephen - Страница 23

Chapter 2
Working with AWS Cloud Services
Exercises

Оглавление

Throughout this book, you will be using the AWS CLI. These exercises serve as the instructions to install the CLI on Linux, Mac, and Windows.

By now you have set up an account in AWS. If you haven’t already, now would be the time to do so. It is important to note that these exercises are in your AWS account and thus are not free.

Use the Free Tier when launching resources. The AWS Free Tier applies to participating services across the following AWS regions: US East (Northern Virginia), US West (Oregon), US West (Northern California), Canada (Central), EU (London), EU (Ireland), EU (Frankfurt), Asia Pacific (Singapore), Asia Pacific (Tokyo), Asia Pacific (Sydney), and South America (Sao Paulo). For more information, see https://aws.amazon.com/s/dm/optimization/server-side-test/free-tier/free_np/.

EXERCISE 2.1

Install and Configure AWS CLI on Linux or Mac

In this exercise, you install the AWS CLI and configure it for use with your account.

1. Begin by logging in to the AWS Management Console with your user name, password, and MFA device (if applicable).

2. Navigate to the IAM service.

3. Select Security, and then click on your user name.

4. Under Security Credentials, click Create Access Key.

5. Before closing the dialog box that appears, save your access key and secret key in a safe place.

6. If Python isn’t installed on your system, install it using the directions at http://www.python.org/.

7. If pip isn’t installed on your system, install it using the directions at https://pip.pypa.io/en/stable/installing/.

8. Install the AWS CLI using the command pip install awscli – upgrade – user.

9. Configure the AWS CLI by running the command aws configure and filling in the access key and secret key that you obtained in Step 5. Optionally (but highly recommended), specify a default region, such as us-east-2. Also optionally, specify a default format type.

10. Test that you have set up the AWS CLI correctly and can connect to the AWS API endpoints by running the command aws ec2 describe-availability-zones. The AWS CLI should return a list of the available Availability Zones in your default region.

EXERCISE 2.2

Install and Configure AWS CLI on Windows with MSI

1. Begin by logging in to the AWS Management Console with your user name, password, and MFA device (if applicable).

2. Navigate to the IAM service.

3. Select Security, and then click on your user name.

4. Under Security Credentials, click Create Access Key.

5. Before closing the dialog box that appears, save your access key and secret key in a safe place.

6. Download the MSI Installer (https://s3.amazonaws.com/aws-cli/AWSCLI64.msi).

7. Run the downloaded MSI installer.

8. Follow the instructions that appear.

9. Open a command prompt.

10. Type aws –version.

11. Configure the AWS CLI by running the command aws configure and filling in the access key and secret key that you obtained in Step 5. Optionally (but highly recommended), specify a default region, such as us-east-2. Also optionally, specify a default format type.

12. Test that you have set up the AWS CLI correctly and can connect to the AWS API endpoints by running the command aws ec2 describe-availability-zones. The AWS CLI should return a list of the available Availability Zones in your default region.

AWS Certified SysOps Administrator Official Study Guide

Подняться наверх