Anda di halaman 1dari 7

Version 1.

0






Training and
Certification
Introduction to Amazon Elastic
Compute Cloud (Amazon EC2)
Introduction to Amazon EC2 Lab
v. 3.0 2013_06_18 Copyright 2013 Amazon Web Services, Inc. and its affiliates. All rights reserved. Page 2
Table of Contents
Introduction ................................................................................................................................................................ 3
Overview ................................................................................................................................................................ 3
What is Amazon Elastic Compute Cloud? ............................................................................................................. 3
Topics Covered ...................................................................................................................................................... 3
Login to the AWS Management Console .................................................................................................................. 3
Using qwikLAB to login to the AWS Management Console ................................................................................... 3
Gather Your qwikLAB Key ................................................................................................................................. 4
Create an Amazon Linux Instance from an Amazon Machine Image (AMI) ............................................................. 4
Logging In to Your Instance ...................................................................................................................................... 5
Additional Resources ................................................................................................................................................ 6
Conclusion ................................................................................................................................................................. 7
For feedback, suggestions, or corrections, please email: aws-course-feedback@amazon.com. ......................... 7



Copyright 2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
This work may not be reproduced or redistributed, in whole or in part,
without prior written permission from Amazon Web Services, Inc.
Commercial copying, lending, or selling is prohibited.
For feedback, suggestions, or corrections, please email: aws-course-feedback@amazon.com.

Introduction to Amazon EC2 Lab
v. 3.0 2013_06_18 Copyright 2013 Amazon Web Services, Inc. and its affiliates. All rights reserved. Page 3
Introduction
Overview
This guide introduces you to Amazon Elastic Compute Cloud (Amazon EC2) using the AWS Management
Console.
What is Amazon Elastic Compute Cloud?
Amazon EC2 is a web service that provides resizable compute capacity in the cloud. It is also designed to make
web-scale computing easier for everyone.
Amazon EC2 is more than just a virtual machine. The Amazon EC2 service offers a variety of benefits and
features, such as elasticity, complete user control of resources, flexibility, reliability and security. It is also quick
and easy to get up and running with Amazon EC2.
Topics Covered
This lab will introduce you to basic Amazon EC2 activities, including:
Logging into the Amazon Management Console
Creating an Amazon Linux Instance from an Amazon Machine Image (AMI)
Finding Your Instance in the Amazon Management Console
Logging into Your Instance

Login to the AWS Management Console
Using qwikLAB to login to the AWS Management Console
1. From your QwikLab Lab screen, click Start Lab.

2. You will need the QwikLab-generated username and password to access the AWS Management
Console, so Copy the password into the clipboard.


3. Click Open Console
4. Login to the console:
a. User Name: !"##$%&'($
b. Password: Use the password in your clipboard


Introduction to Amazon EC2 Lab
v. 3.0 2013_06_18 Copyright 2013 Amazon Web Services, Inc. and its affiliates. All rights reserved. Page 4

Gather Your qwikLAB Key
5. Return to the qwikLAB web page and click the Download PEM dropdown box

6. Choose PPK if you will be connecting through PuTTY on a Windows system, or PEM if you will be connecting
with a Mac or Linux system.
Make note of the file location, as you will need it for connecting to your new instance!
Create an Amazon Linux Instance from an Amazon Machine
Image (AMI)
To get started creating your first Amazon Instance, you will need to access the Amazon EC2 icon on the Amazon
Management Console, and utilize the wizard.
7. Return to the AWS Management Console which should still be open in your browser.
8. Click Amazon EC2 Icon on the AWS Management Console homepage.
9. Click the Instances link to create an instance.
10. Click Launch Instance button, to begin the process.
Note: There are many, different operating systems to leverage.
11. In the first dialogue window, Step 1: Choose an Amazon Machine Image, choose the Amazon Linux AMI
instance by clicking Select next to that AMI.
Note: You can leave the default 64-bit radio button selected.
12. Step 2: Leave the instance type set to the default, which is t1.micro. To continue, click Next: Configure
Instance Details.
13. Step 3: Configure Instance Details, we will leave all of the default options and click Next: Add Storage.
Tip: It is worthwhile to note the various options here. This is the location where you would set access, network
settings, monitoring, and other options.
Introduction to Amazon EC2 Lab
v. 3.0 2013_06_18 Copyright 2013 Amazon Web Services, Inc. and its affiliates. All rights reserved. Page 5
14. Step 4: Add Storage, keep the default virtual hard drive. Click Next: Tag Instance.
Note: You can easily add more virtual hard drives or change the drive size here.
15. Step 5: Tag Instance, name your instance by using the tag instance interface. Youll notice that the left hand
text box is populated with the key Name and the right hand text box is empty. In the empty box, type a
name such as EC2 Free Lab and click Next: Configure Security Group.
Tip: This is a great place to put a name for your virtual server in the Value field... maybe something creative?
16. Step 6: Configure Security Group, accept the default security group, as it allows port 22 (SSH) from anywhere
to this Linux instance. Click Review and Launch.
17. Step 7: With Review Instance Launch you get an overview of all the settings of your instance. Click Launch to
continue.
18. A key pair, which QwikLab has automatically created for you, should auto-populate in the second drop down
box.
19. Click the acknowledgement checkbox stating that you have access to the private key.
20. Now, click Launch Instance!
Tip: Key pairs are how you access your instance after it is created. If you do not have a key pair, you will NOT
be able to access the instance.
21. Click View Instances to take a look at the new instance.
Tip: Did you know that this can all be done via the command line?

Complete! Once the instance state has changed to running, your instance will be ready to use! Now, you will look
at logging into that instance.

Logging In to Your Instance
Now that you have launched your Amazon EC2 Instance, it is time to log into it.

22. As you are already at the Instances view within the Amazon EC2 dashboard, click the selection box next to
your Instance Name [i.e. EC2 Free Lab].
23. Find your Public DNS name on this screen, which look something like the following:
Public DNS: ec2-23-22-137-80.compute-1.amazonaws.com
Tip: Use everything to the right of Public DNS: as a connection string to connect to this instance.
24. Copy that connection string to your clipboard.

MAC and Linux instructions
25. On a Mac or Linux computer, modify the permissions of the downloaded PEM file to tighten the access
(security) of the file. Be sure to use the correct path to the location that you saved your .pem file earlier. Your
command line should look similar to: chmod 600 ~/Downloads/qwikLAB-l76-121457.pem
Introduction to Amazon EC2 Lab
v. 3.0 2013_06_18 Copyright 2013 Amazon Web Services, Inc. and its affiliates. All rights reserved. Page 6
26. On a Mac or Linux computer, use terminal to SSH to your instance connection string using the SSH identity
file noted earlier with the user name ec2-user. Be sure to use the correct Public DNS and the correct path to
your .pem file. Your SSH line will look similar to this:
ssh ec2-user@ ec2-23-22-137-80.compute-1.amazonaws.com -i ~/Downloads/qwikLAB-l76-121457.pem
27. Ensure you accept the authenticity statement.
28. Youre connected!

Windows instructions
29. Download PuTTY to a location of your choice using the following URL (unless you already have PuTTY):
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
30. Double-click putty.exe (your downloaded copy or your existing copy).
31. Type ec2-user@ into the Host Name field, then paste the Connection string you copied to your clipboard
into the Host Name input in Putty (using CTRL+V). Your full Host Name field will look something like this:
ec2-user@ ec2-23-22-137-80.compute-1.amazonaws.com
Note: If you didnt copy your Public DNS name earlier, you can find it in the AWS Management Console
Services > EC2 > Instances. Check the box next to your instance name and the Public DNS should appear
on the page.
32. Expand the SSH category by double-clicking it.
33. Select the Auth category by clicking on the word Auth (not the + symbol next to the word Auth).
34. Click Browse.
35. Navigate to the location where you saved the .ppk file earlier in the lab.
36. Select the .ppk file you downloaded.
37. Click Open.
38. In the PuTTY client, click Open.
39. When prompted, click Yes to allow PuTTY to cache the servers host key.
40. You are presented with a connected instance! Easy!

End Your Lab
41. Return to the QwikLab lab homepage and click End Lab to conclude your lab.

Additional Resources
For more information about Amazon EC2 and Amazon EC2 pricing, go to the Amazon EC2 product
page.
AWS Training and Certification.
Introduction to Amazon EC2 Lab
v. 3.0 2013_06_18 Copyright 2013 Amazon Web Services, Inc. and its affiliates. All rights reserved. Page 7

Conclusion
Congratulations! You now have successfully:
Logged into the Amazon Management Console
Created an Amazon Linux Instance from an Amazon Machine Image (AMI)
Found Your Instance in the Amazon Management Console
Logged into Your Instance
For feedback, suggestions, or corrections, please email: aws-course-feedback@amazon.com.