Hands-On Exercises Cloud Fundamentals

Transcription

191213iltCloud Fundamentals:Hands-On ExercisesTable of ContentsGeneral Notes . 1Hands-On Exercise: Accessing the Amazon Cloud . 2Hands-On Exercise: Estimating and Viewing Costs . 7Hands-On Exercise: Securing the Amazon Cloud . 12Hands-On Exercise: Working with Regions and AZs . 24Hands-On Exercise: Configuring Your Network . 28Hands-On Exercise: Launching EC2 Instances . 32Hands-On Exercise: Setting Up Security Groups and Network ACLs . 37Hands-On Exercise: Storing Data in the Cloud . 41Hands-On Exercise: Setting up RDS and DynamoDB . 49Hands-On Exercise: Deploying Infrastructure with CloudFormation . 54

1General NotesCloudera’s Cloud Fundamentals training course requires a cloud account (Amazon WebServices) and a terminal with SSH.The steps required to open an account are covered in the exercises. However if youalready have an account, feel free to use it throughout the course.Points to Note for Cloud Fundamentals Even though there is a free tier, infrastructure costs real money. Be careful withresources that you create in the cloud; always terminate or delete them when youhave completed the exercises. Safeguard your credentials. Any person that obtains your credentials can createresources, which you will have to pay for. Do not share or commit your credentialsinto a repository.Points to Note during the ExercisesStep-by-Step InstructionsAs the exercises progress, and you gain more familiarity with the management console,we provide fewer step-by-step instructions; as in the real world, we merely give youa requirement and it’s up to you to solve the problem! You should feel free to refer tothe materials provided, ask your instructor for assistance, or consult with your fellowstudents. Copyright 2010–2020 Cloudera. All Rights Reserved.Not to be reproduced or shared without prior written consent from Cloudera.1

2Hands-On Exercise: Accessing the Amazon CloudURIs Used in This ExerciseAmazon Web Serviceshttps://aws.amazon.com/Management consolehttps://console.aws.amazon.com/In this exercise, you will sign-up to Amazon Web Services (AWS) and explore theavailable services via the management console.Creating an AccountThe first step to access the cloud is to create an account. In this section you will createthe primary cloud account, known as a root account.If you registered previously using your email, log in using your existing account andskip to the next exercise. If you do not remember the password, you can reset it byclicking the Forgot password link.1. Open a browser and navigate to the Amazon Web Services main page:https://aws.amazon.com/2. Click Create an AWS Account3. Fill in the requested information and click on Continue: Email, password, and account name The account name corresponds to a non-unique identifier that represents thecurrent account. It can be modified after the account has been created. Use cf Copyright 2010–2020 Cloudera. All Rights Reserved.Not to be reproduced or shared without prior written consent from Cloudera.2

3and your name. For example, if your name is Katherine then your name wouldbe cfkatherine.4. Provide the information shown below. Once ready, click on Create Account andContinue: Your full name Select Professional account type and add your company name; this option is notavailable in a Personal account Your current address Read and accept the AWS Customer Agreement5. AWS requires a valid method of payment; it can be a credit or debit card. Provide itin the Payment Information step. You will be charged 1 or EUR 1 for verification It is possible to enter a new billing address or use your current address6. Provide your phone number. It will be used immediately for verification via a phonecall or a text message. Copyright 2010–2020 Cloudera. All Rights Reserved.Not to be reproduced or shared without prior written consent from Cloudera.3

4 Proceed the verification process and enter the confirmation code. Once this stephas been completed, your account has been verified7. Finally, you need to choose a support plan. Select the free basic plan.You have successfully created your root account.Accessing the Management ConsoleIn this section you will access the management console and explore where to findservices and account-related information.1. Open a browser and navigate to the following URL:https://console.aws.amazon.com2. Log in using your root account, using the email address and password that you usedto create your account.This is the management console, where you access all AWS services and youraccount information.3. The management console provides a search functionality to access services. Copyright 2010–2020 Cloudera. All Rights Reserved.Not to be reproduced or shared without prior written consent from Cloudera.4

5 Type in a service name, for example, EC2, and select it from the drop-down4. Review the options available in the console for the EC2 service: Navigation pane on the left (a) Service information, including list of resources in the center of the screen (b) A button to launch a new instance (c) System health information (d)5. Now you will access your account information. At the top right in the menu bar,click on your name. A drop-down opens with multiple options.6. Click My Account. This is your account information. The navigation pane on the left contains links to pages used to manage youraccount, including billing and preferences Copyright 2010–2020 Cloudera. All Rights Reserved.Not to be reproduced or shared without prior written consent from Cloudera.5

6You have created an account in AWS and accessed the management console. You alsolearned how to access one cloud service.You are ready to start using the cloud.This is the end of the exercise. Copyright 2010–2020 Cloudera. All Rights Reserved.Not to be reproduced or shared without prior written consent from Cloudera.6

7Hands-On Exercise: Estimating and Viewing CostsURIs Used in This ExercisePricing ng & n this exercise, you will estimate, monitor, and control costs using the AWSpricing calculator.Estimating Cost with the Pricing CalculatorIn this section you will estimate the cost of one or more services in the cloud.1. Open a browser and navigate to the pricing e are two steps required to create an estimate for a service: Select a service Configure the serviceOnce the service has been configured, it is added to the estimate and any otherservices you want to include are added.2. Type in the name of the service that you want to estimate; use EC2.EC2 is Elastic Cloud Compute, the service used to launch virtual machines in thecloud.3. Select the service by clicking on Configure under Amazon EC2 Copyright 2010–2020 Cloudera. All Rights Reserved.Not to be reproduced or shared without prior written consent from Cloudera.7

84. The next step is to select the region. Please take into account that pricing varies pergeographic location. Leave the current default region.5. There are two ways to create an estimate for a service: Quick, for a rough estimate Advanced, for a detailed estimate based on your knowledge of how the service isusedSelect Quick estimate.6. Configure the machine with the following specifications: Select Linux as operating system Use the following machine requirements: Four vCPUs 16 GiB of RAM One Amazon EC2 instanceThe instance type is t4g.xlarge. Select On-Demand Instances for Pricing Strategy Copyright 2010–2020 Cloudera. All Rights Reserved.Not to be reproduced or shared without prior written consent from Cloudera.8

9 Change storage amount to 80 GiB7. Review the cost estimate.Cost may vary slightly as prices are updated constantly to be more competitive.Prices shown above may be different in your estimate.8. Click Add to my estimate and view the 12 month and montly total9. Add other services at your discretion and examine the resultsYou have learned how to create an estimate using the pricing calculator.Viewing and Controlling CostIn this section you will discover where to view cost and how to create a budget tocontrol cost.1. Open a browser and navigate to the management consolehttps://console.aws.amazon.com/2. Type cost explorer in the search area and select AWS Cost Management from thedrop-down.This is the cost explorer service: Copyright 2010–2020 Cloudera. All Rights Reserved.Not to be reproduced or shared without prior written consent from Cloudera.9

10If this is your first time using the cost explorer, it will take some time to prepareyour cost and usage data. Please check back in 24 hours.3. Create a budget to monitor cost.Click Budgets in the left navigation pane.From this screen, you can create new budgets, refine budgets, and create alerts.4. Click the Create a budget button5. There are different types of budgets Select Cost budget and click on Set your budgetYou will create a budget to notify you when more than one hundred dollars havebeen spent.6. Provide the budget details: Name your budget, use One hundred dollars Set the period as monthly and specify your current month as starting period Select recurring budget Specify the Budgeted amount, in this case 100 Copyright 2010–2020 Cloudera. All Rights Reserved.Not to be reproduced or shared without prior written consent from Cloudera.10

11 The Budget parameters lets you select which services to include; leave as-is toinclude all The Advanced options lets you aggregate and include costs at a granular level;leave as-is7. Click Configure alerts. Set the alert to be sent on Actual costs Set the threshold to 80 percent Add the email address where you would like to be notified Click Confirm budget8. Review and click on Create.The budget has been created.You estimated and viewed the cost of infrastructure using an AWS-provided tool andcreated a budget to receive an alarm when a certain treshold has been met.This is the end of the exercise. Copyright 2010–2020 Cloudera. All Rights Reserved.Not to be reproduced or shared without prior written consent from Cloudera.11

12Hands-On Exercise: Securing the Amazon CloudURIs Used in This In this exercise, you will secure your account in AWS.This exercise covers security credentials, permissions and policies, identity and accessmanagement, access keys, and key pairs.Security CredentialsIn this section you will inspect the security credentials section and update your accountname.1. Open a browser and navigate to the management consolehttps://console.aws.amazon.com/2. In the menu bar, click your account name and select My Security Credentials.If this is the first time accessing this option or you have not dismissed the messagebefore, you will get a dialog box that reminds you that root credentials provideunlimited access; instead it is recommended to follow the best practice of using IAMinstead.3. Click Continue to Security Credentials to dismiss the message and continue to thecredentials page.The recommended approach is to use identity and access management instead ofroot credentials. But now you are going to work with the root account.4. There are several options in your security credentials page. The first one section,Password, allows you to change your account’s password, name, or email. There is a link in the Click here to change the password, name, or emailaddress for your root AWS account message. Click the link and if necessary,authenticate again. Copyright 2010–2020 Cloudera. All Rights Reserved.Not to be reproduced or shared without prior written consent from Cloudera.12

135. In Update account settings, click Edit for your password. Change your password and click Save changes.Click Done to go back to the management console. If necessary, log in again.6. Another useful functionality is multi-factor authentication. Click this option andselect Activate MFA; it shows the available options to enable this functionality.There are several ways, some that are free while others have an associated cost. Donot enable these yet. Close the dialog box.7. Open the account identifiers section. View your account ID and canonical user ID.These identifiers are used for multiple actions, including building resource names.8. Review the other available options.You have learned where to find your account-related information. You updated thepassword for your account, learned where to enable MFA, and how to find your accountID and canonical user ID.Permissions and PoliciesIn this section, you will create a policy that contains permissions to list resources inobject storage, known as S3.1. From the console, in the left navigation menu, select Policies.This is the list of currently available policies. Many of these policies are managed byAWS. Others are user-created. You can select them to perform an action, like attachto an identity. You can also expand each one to review the permissions attached toeach policy. Copyright 2010–2020 Cloudera. All Rights Reserved.Not to be reproduced or shared without prior written consent from Cloudera.13

142. Now, you are going to create a policy and attach a permission. Click Create policy.At this point you have two options, you can use the visual editor to create the policyor you can specify the permissions directly using the JSON tab.You are going to create a policy using the visual edit

Cloudera’s Cloud Fundamentals training course requires a cloud account (Amazon Web Services) and a terminal with SSH. The steps required to open an account are covered in the exercises. However if you already have an account, feel free to use it throughout the course. Points to