AWS Certified SysOps Administrator Official Study Guide. Cole Stephen

Чтение книги онлайн.

Читать онлайн книгу AWS Certified SysOps Administrator Official Study Guide - Cole Stephen страница 16

AWS Certified SysOps Administrator Official Study Guide - Cole Stephen

Скачать книгу

style="font-size:15px;">      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.

      Review Questions

      1. Which of the following is a dependency of the AWS CLI for Mac and Linux?

      A. C++

      B. Python

      C. Java

      D.NET SDK

      2. Which of the following AWS CLI output formats is best geared toward human viewing?

      A. Table

      B. JSON

      C. Text

      3. How can one split apart a long AWS CLI command line to make it more easily readable by the operator?

      A. Use the semi-colon (;) between statements, with a newline after each backslash.

      B. Press Enter after every three words, followed by the Enter key twice at the end of the statement.

      C. Use backslashes (\) every few words, with a newline after each backslash.

      D. Use the tab key between each word.

      4. For which languages are AWS SDKs available? (Choose all that apply.)

      A. Ruby

      B. Basic

      C. Perl

      D. Python

      E. Pascal

      5. Which command can you run to find more information about the proper syntax and options for AWS IoT commands from the CLI?

      A. aws help

      B. aws-iot list-commands

      C. aws iot help

      D. aws – help

      6. What does the waiter allow you to do in Boto?

      A. Order a pool of Amazon EC2 instances to be delivered to your Auto Scaling group.

      B. Delete all unused Security Groups in your Amazon Virtual Private Cloud (Amazon VPC).

      C. Wait for ordered infrastructure to become available before continuing.

      D. Automatically distribute Amazon S3 data across regions.

      7. In which situation would you use the AWS IoT Device SDK?

      A. To order AWS IoT Buttons

      B. To create a new AWS account to use for IoT

      C. As a dashboard for performing analytics upon your IoT messages

      D. To simplify the process of connecting things to the AWS IoT service

      8. For the CLI commands that accept formatted files as input, the input file must be in which of the following formats?

      A. Text format

      B. JSON

      C. Comma Separated Values (CSV)

      D. XML

      E. HTML

      9. Which option allows you to filter output?

      A. – filter

      B. – find

      C. – sort

      D.

Скачать книгу