Professional Documents
Culture Documents
Welcome to AWS Essentials! This guide will walk you through the hands-on lab
portions of this course. If you have any questions as you move through these
hands-on labs, please dont hesitate to ask your instructor for assistance.
Training Agenda
Amazon Glacier
Extremely low-cost storage
Secure, durable storage for data archiving and backup
Optimized for data that is infrequently accessed
Archives data
Create a Bucket:
Every object in Amazon S3 is stored in a bucket. Before you can store data in
Amazon S3 you must create a bucket.
Note: You are not charged for creating a bucket; you are only charged for storing
objects in the bucket and for transferring objects in and out of the bucket.
1. Sign into the AWS Management Console and open the Amazon S3 console at
https://console.aws.amazon.com/s3.
3. Enter a bucket name in the Bucket Name field. The bucket name you choose
must be unique across all existing bucket names in Amazon S3. One way to do
AWS ESSENTIALS STUDENT GUIDE 1.8 3
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
that is to prefix your bucket names with your company's name. Bucket names
must comply with the following requirements. Bucket names:
Can contain lowercase letters, numbers, periods (.) and dashes (-)
5. Click Create. When Amazon S3 successfully creates your bucket, the console
displays your empty bucket in the Buckets panel.
6. In the Amazon S3 console click the bucket you want to upload an object into
and then click Upload in the Objects and Folders panel. The Upload - Select
Files wizard opens (appearance may differ slightly in different borwsers):
7. If you want to upload a folder you must click Enable Enhanced Uploader for
the Java applet. After you download the Java applet, the Enable Enhanced
Uploader link disappears from the wizard. You only need to do this once per
console session and you can transfer entire folders.
Note: If you are behind any corporate firewall you will need to install your
corporate supported proxy client for the Java applet to work.
Tip: If you enabled advanced uploader in step 2, you see a Java file
selection dialog box. If not, you see an operating system specific dialog
box.
9. The following image shows a sample Java file selection dialog box.
10. Select a sample graphic that came with your computer to upload and click
Open. The Upload - Select Files wizard shows the files and folders you've
selected to upload.
View an Object:
12. Now that you've added an object to a bucket, you can open and view it in a
browser. In the Amazon S3 console, right-click the objects you want to open.
13. Click Properties to browse the URL for the item you added.
Note: By default your Amazon S3 buckets and objects are private. To view
object using a URL, for example, https://s3.amazonaws.com/Bucket/Object the
object must be publicly readable. Otherwise, you will need to create signed
URL that includes a signature with authentication information. You can
Move an Object:
Now that you've added an object to a bucket and viewed it, you might like to move
the object to a different bucket or folder.
14. In the Amazon S3 console, right-click the object you want to move.TipYou
can use the SHIFT and CRTL keys to select multiple objects and perform the
same action on them simultaneously.
16. Navigate to the bucket (and folder) you want to move the object to, and right-
click the folder or bucket you want to move the object to.
Tip: You can monitor the progress of the move on the Transfers panel. To hide
or show the Transfer panel, click the Transfers button at the top right of the
console page.
If you no longer need to store the objects you uploaded and moved while going
through this guide, you should delete them so you do not incur further charges on
those objects.
18. In the Amazon S3 console, right-click on the object you want to delete. A
dialog box shows the actions you can take on the selected object(s).
Tip: You can use the SHIFT and CRTL keys to select multiple objects and
perform the same action on them simultaneously.
Tip: To delete a bucket, you must first delete all of the objects in it. If you
haven't deleted all of the objects in your bucket, do that now.
20. Confirm the deletion when the console prompts you to.
21. Right-click the bucket you want to delete. A dialog box shows the actions you
can take on the selected bucket.
22. Click Delete. Confirm the deletion when the console prompts you to.
1. Once logged in to AWS Console, navigate to the EC2 Section of the console.
5. In the next screen, copy & paste the following initialization script (you may need
to type this into a text editor and copy & paste the results) into the User Data field
(this will automatically install and start Apache on launch).
#!/bin/sh
yum -y install httpd php
chkconfig httpd on
/etc/init.d/httpd start
8. Next, choose a friendly name for your AMI. This name, more correctly known
as a tag, will appear in the console once the instance launches. It makes it easy
to keep track of running machines in a complex environment. We named ours
AWS Essentials Lab Instance; however the only thing that matters is whether
10. Then create a new key pair, and download it to a suitable directory on your
hard drive. In the example below, we named the key pair EssentialsLab. The
name is up to you. Just remember the name, and where (file path) it is saved.
11. Create a security group, which will be your firewall rules. We named this one
EssentialsLab. Again, the name is up to you. Make sure to open two ports: 22
(SSH) and 80 (HTTP). Port 22 is there by default. Select Custom TCP Rule,
13. Launch the instance and monitor it to make certain its running by navigating
to Services/EC2 and the Instances. Click refresh in the event the instance is not
running
14. Once the instance is running, right-click on the instance and select Connect:
It can take some time for the Java applet to download and run. If this is the first
time you have used this particular Java SSH client (MindTerm), you may be
prompted to accept the MindTerm license. Additionally you may be asked a series
of questions such as:
- Create known hosts directory?
- Grant access to the app?
Click Yes or Accept for these prompts. Keep in mind, depending on your
configuration and whether MindTerm has been used before on your computer or
not, you may or may not get all of these prompts.
19. You may also be asked if you want to store the host key for your Instance. At
this point you have the option to verify the host key MindTerm is seeing with the
host key provided by the AWS console to verify that you are connecting directly to
your EC2 instance and not some third-party in the middle. Select Yes if
prompted.
Hint: For the following sections, it might be useful for you to use the
Edit Paste command from the MindTerm menu.
cd /var/www/html
sudo vi index.php
23. If you are an experienced Linux user, you should know the basics of vi, the
default text editor. Otherwise you may want to check out some vi basics.
Enter the following. If copying, you might want to cut and paste to notepad first,
then copy an paste from notepad to MindTerm:
to save and quit after you add the PHP code above. This code will display the
web servers ID and Availability Zone.
26. Lets assign an EIP to your instance. Click on the Elastic IPs link in the AWS
Console and allocate a new address:
28. After confirmation, youll see your newly allocated EIP. Right-click on it and
choose Associate from the pop-up menu:
29. A popup will allow you to associate the EIP with one of your running
instances. Choose the instance that you just launched and click Yes, Associate:
30. And your instance should now report its new IP address in the console:
Amazon CloudWatch
Visibility into resource utilization, operational
performance, and overall demand patterns
Metrics including CPU utilization, disk reads and writes,
and network traffic
Custom application-specific metrics of your own
Accessible via AWS Management Console, APIs, SDK, or
CLI
Overview
This lab will walk you through the process of creating an Elastic Load Balancer
(ELB) to load balance traffic across several EC2 instances in a single Availability
Zone. You will deploy a simple application on EC2 instances over which you will
distribute load by viewing the application in your browser.
In this lab we will launch a 2 server Amazon Linux farm with an Apache PHP web
1. To start your instances navigate to the EC2 page in the AWS Console
Note: Please ensure your region is set to US East (N. Virginia). In the upper right
corner of the page, you can choose the region using the selector in the console
shown below:
3. Next select Launch Classic Wizard and click Continue. It is possible to start
your instances using the QuickLaunch wizard, but for the purposes of this lab we
want to see all the settings step by step, which is the way the Classic Wizard
captures instance information.
4. Now select the Basic 64-bit Amazon Linux AMI. This is a machine image from
5. We want to start more than one instance for this lab, so change the number of
instances to 2 and click Continue.
7. To do this, copy & paste the following initialization script (you can use Shift-
Enter to get to a new line in the text box) into the User Data field and click
Continue:
#!/bin/sh
curl -L http://bootstrapping-assets.s3.amazonaws.com/bootstrap-elb.sh | sh
8. As an FYI - the shell script at the url above downloads from S3 and then
executes the following command:
This downloads and installs various components, starts them, and installs our
sample application.
12. For this lab, we will reuse the key pair we created in the earlier lab. You also
have the option of creating a new key pair.
14. Review your choices, and then click Launch. Your instances will now start.
15. First check the instances we started have finished their creation cycle by
monitoring them to make certain they are running. Youll notice that the instances
will be in a running state with 2/2 checks passed
16. Now we can grab the public DNS entry allocated to each server so that we
can use this to hit the server in our web browser. Click on the first Web Server,
locate the servers DNS name, select and copy the servers name.
You now have two web servers, but you need a load balancer in front of these
servers to give your users a single location for accessing both servers and to
balance user requests across your simple web server farm.
19. In the EC2 console, click on the Load Balancers link, and click on Create
Load Balancer button.
20. For this lab we will be creating a simple HTTP load balancer, so give your
21. On the next screen change Ping Path to / (delete index.html) and change
the Healthy Threshold to 3. The ping path is the location on our web servers the
ELB will check is returning a healthy response to keep instances in service or not.
In our example / will return the default page our PHP generated page seen
earlier. The Healthy Threshold is the number of successful checks the ELB
expects to see in a row before bringing an instance into service behind the ELB.
We are lowering this to speed things up for our lab.
23. Select your Web Servers to add them to your ELB and click Continue.
25. AWS is now creating your ELB. It will take a couple of minutes to spin up your
load balancers, attach your web servers, and pass the health checks.
Click on your load balancer, select the Instances tab, and wait until the
instances status changes from Out of Service to In Service. Also note that the
overall Healthy? column turns from N0 to Yes. Your ELB is ready when this
happens.
Note: ELBs work across availability zones and they also scale elastically as
demand dictates. They therefore do not have IP addresses but rather a URL to
hit.
27. Open the ELB URL in another browser tab. Hit the browser refresh button a
few times and you should cycle through your web servers such as the following
In CloudWatch, click on the ELB link on the left, and select the metric you would
like to view. ELB reports request latency, requestcount, heathy & unhealthy host
counts, and a number of additional metrics. The metrics are reported as they are
encountered and can take several minutes to show up in CloudWatch. The
following screenshot shows CloudWatch graphing the HealthyHostCount, which
transitioned from zero healthy hosts to two shortly after the ELB was created for
this lab.
Glossary
7. In the Enter a new password text box, type a password and again in Type it
again text box below to confirm you have a the same password in both text boxes.
8. Click Continue.
9. On the Contact Information page, type in your information: your address,
phone number, company or web site name, and web site URL. Boxes marked
with * are mandatory.
10. In the Amazon Web Services Customer Agreement section, select the check
box to indicate that you accept the terms of the agreement.
11. Click
13. Once done, click Continue to move on to the next step verify identity by
telephone.
14. There are 3 steps in the Identity Verification by Telephone. 1. Provide a
telephone number and click Call Me Now to move on to the next step. 2. Call in
progress 3. Identity verification complete.
Tip: Your Account Number is the same as your AWS Account ID.
6. Click Access Credentials to view your Access Keys, X.509 Certificates, and
Key Pairs.
3. Use the drop down button to select the appropriate AWS Region. This is
located in the top right hand corner in between your user name and help.
4. In the navigation panel on the left under NETWORK & SECURITY click Key
6. Enter ec2KeyPair for Key Pair Name and click Create and your private key
should begin downloading in a few seconds. Depending on the browser, the
downloaded .pem file will be saved in your Downloads folder.
Note: If you have an existing EC2 Key Pair that you would like to use, these steps
may be skipped. Future lessons in this course will refer to the key pair named
ec2KeyPair created in this section. Replace that value with the name of your
existing key pair if you choose that option.