Modul 8 Managing Strage

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Firefox https://labs.vocareum.com/web/2142343/1103040.0/ASNLIB/public/doc...

Module 8: Lab 5 - Managing Storage


This lab is divided into two parts:

• In the Task portion of this lab, you will create:


◦ Amazon EC2 instance
◦ Setup AWS CLI
◦ Create snapshots
◦ Upload log files to Amazon S3
• In the Challenge portion of this lab, you will be challenged to synchronize
contents of a local directory to an Amazon S3 bucket

Objectives After completing this lab, you will be able to:

• Create and maintain snapshots for Amazon EC2 instances


• Upload files to and download files from Amazon S3

Duration

This lab will require approximately 45 minutes to complete.

Accessing the AWS Management Console


1. At the top of these instructions, click Start Lab to launch your lab.

A Start Lab panel opens displaying the lab status.

2. Wait until you see the message "Lab status: ready", then click the X to close the
Start Lab panel.

3. At the top of these instructions, click AWS

This will open the AWS Management Console in a new browser tab. The system
will automatically log you in.

Tip: If a new browser tab does not open, there will typically be a banner or icon at
the top of your browser indicating that your browser is preventing the site from
opening pop-up windows. Click on the banner or icon and choose "Allow pop
ups."

4. Arrange the AWS Management Console tab so that it displays along side these

1 dari 15 15/10/2022 09.48


Firefox https://labs.vocareum.com/web/2142343/1103040.0/ASNLIB/public/doc...

instructions. Ideally, you will be able to see both browser tabs at the same time, to
make it easier to follow the lab steps.

 Please do not change the Region during this lab.

Task 1: Creating and Configuring Resources


Scenario

Your lab environment (pictured below) consists of an Amazon VPC instance called Lab
VPC, which currently contains a single public subnet. Amazon EC2 instances named
Command Host and Processor have already been created for you as part of this lab.

The Command Host will be used to administer AWS resources including the Processor.

In this task, you will configure AWS CLI installed on the Command Host to create
Amazon EBS volume Snapshots for an instance labelled as Processor. You will then
set up processes on the instance for retrieving data from and uploading data to
Amazon S3.

Create an Amazon S3 bucket


In this subtask, you will create an Amazon S3 bucket

5. On the AWS Management Console, on the Services menu, click S3.

6. Click Create bucket.

2 dari 15 15/10/2022 09.48


Firefox https://labs.vocareum.com/web/2142343/1103040.0/ASNLIB/public/doc...

7. In the Create bucket dialog box, configure:

◦ Bucket name: Type a bucket name that will be unique across Amazon S3.
This value will be referred to as s3-bucket-name in subsequent procedures.
Make a note of the s3-bucket-name for future use.
◦ Region: Leave as default.
8. Click Create.

Attach Instance Profile to Processor


In this section you will attach a pre-created IAM Role as an Instance Profile to the
Processor Host, giving it the permissions to interact with your Amazon S3 bucket.

9. On the Services menu, click EC2.

10. In the navigation pane, click Instances.

11. Select the Processor.

12. Click on Actions then Security, followed by Modify IAM role.

13. Select the S3BucketAccess role under IAM role.

14. Click Apply and then Close.

Task 2: Taking Snapshots of Your Instance


In this section, you will learn how to use the AWS Command Line Interface (CLI) to
manage the processing of snapshots of an instance.

Your AWS account is limited in any region to holding 10,000 snapshots. Furthermore,
you are charged every month per gigabyte of snapshot data that you store. This charge
is minimized by the fact that AWS takes incremental snapshots of your instances after
the first snapshot, and also by the fact that snapshot data is compressed. However, to
optimize both maintenance and cost, we recommend that you monitor the number of
snapshots stored for each instance and routinely delete old snapshots that you no
longer need.

Connect to the Command Host

3 dari 15 15/10/2022 09.48


Firefox https://labs.vocareum.com/web/2142343/1103040.0/ASNLIB/public/doc...

The following instructions now vary slightly depending on whether you are using
Windows or Mac/Linux.

 Windows Users: Using SSH to Connect


 These instructions are for Windows users only.

If you are using macOS or Linux, skip to the next section.

15. In the AWS Management Console, on the Services  menu, click EC2.

16. In the left navigation pane, click Instances.

17. Select the Command Host.

18. Copy the IPv4 Public IP from the Description in the lower pane.

19. Read through the three bullet points in this step before you start to complete the
actions, because you will not be able see these instructions when the Details
panel is open.

◦ Click on the Details drop down menu above these instructions you are
currently reading, and then click Show . A Credentials window will open.

◦ Click on the Download PPK button and save the labsuser.ppk file.
Typically your browser will save it to the Downloads directory.

◦ Then exit the Details panel by clicking on the X.

20. Download needed software.

◦ You will use PuTTY to SSH to Amazon EC2 instances. If you do not have
PuTTY installed on your computer, download it here (https://the.earth.li
/~sgtatham/putty/latest/w64/putty.exe).
21. Open putty.exe

22. Configure PuTTY to not timeout:

◦ Click Connection
◦ Set Seconds between keepalives to 30
This allows you to keep the PuTTY session open for a longer period of time.

23. Configure your PuTTY session:

◦ Click Session

4 dari 15 15/10/2022 09.48

You might also like