Launch A Linux Virtual Machine
Launch A Linux Virtual Machine
Launch A Linux Virtual Machine
Amazon's trademarks and trade dress may not be used in connection with any product or service that is not
Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or
discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may
or may not be affiliated with, connected to, or sponsored by Amazon.
AWS Quick Start Guide Launch a Linux Virtual Machine
Table of Contents
AWS Quick Start Guide: Launch a Linux Virtual Machine ......................................................................... 1
Step 1: Launch an Amazon EC2 Instance ....................................................................................... 1
Step 2: Connect to Your Amazon EC2 Instance ............................................................................... 8
Connect from Windows using PuTTY .................................................................................... 9
Connect from Mac or Linux Using an SSH Client ................................................................... 10
Connect Using Your Browser .............................................................................................. 11
Step 3: Clean Up Your Amazon EC2 Instance ............................................................................... 12
Version
iii
AWS Quick Start Guide Launch a Linux Virtual Machine
Step 1: Launch an Amazon EC2 Instance
To complete this quick start guide, you must have an Amazon Web Services (AWS) account. When you
sign up for AWS, your AWS account is automatically signed up for all services in AWS, including Amazon
EC2. If you don't have an AWS account, use the following procedure to create one.
1. Open https://portal.aws.amazon.com/billing/signup.
2. Follow the online instructions.
Part of the sign-up procedure involves receiving a phone call and entering a verification code on the
phone keypad.
For more information about Amazon EC2, see the Amazon Elastic Compute Cloud documentation.
Because this guide is intended to help you launch your first instance quickly, it does not describe all the
available configuration options for EC2 instances. For more information about advanced options, see
Launching an Instance.
Important
This quick start guide uses a new version of the AWS Management Console that is currently in
preview release and is subject to change.
If you are using the Show All Services view, your screen looks like this:
Version
1
AWS Quick Start Guide Launch a Linux Virtual Machine
Step 1: Launch an Amazon EC2 Instance
If you are using the Show Categories view, your screen looks like this with Compute expanded:
Version
2
AWS Quick Start Guide Launch a Linux Virtual Machine
Step 1: Launch an Amazon EC2 Instance
Version
3
AWS Quick Start Guide Launch a Linux Virtual Machine
Step 1: Launch an Amazon EC2 Instance
4. The Choose an Amazon Machine Image (AMI) page displays a list of basic configurations called
Amazon Machine Images (AMIs) that serve as templates for your instance. Select the HVM edition of
the Amazon Linux AMI. Notice that this configuration is marked Free tier eligible.
Version
4
AWS Quick Start Guide Launch a Linux Virtual Machine
Step 1: Launch an Amazon EC2 Instance
5. On the Choose an Instance Type page, choose t.2micro as the hardware configuration of your
instance and Review and Launch.
Note
T2 instances, such as t2.micro, must be launched into a virtual private cloud (VPC). If you
don't have a VPC, you can let the wizard create one for you. For more information, see step
6 in Launching an Instance.
Version
5
AWS Quick Start Guide Launch a Linux Virtual Machine
Step 1: Launch an Amazon EC2 Instance
Version
6
AWS Quick Start Guide Launch a Linux Virtual Machine
Step 1: Launch an Amazon EC2 Instance
7. In the Select an existing key pair or create a new key pair dialog box, choose Create a new key
pair, enter a name for the key pair, and then choose Download Key Pair. This is the only chance for
you to save the private key file, so be sure to download it. Save the private key file in a safe place.
You can use C:\user\yourusername\.ssh\myfirstkey.pem if you are on a Windows machine,
and ~/.ssh/myfirstkey.pem if you are on a Mac or Linux machine. You need to provide the name
of your key pair when you launch an instance, and the corresponding private key each time you
connect to the instance.
Note
A key pair enables you to connect to a Linux instance through SSH. If you launch your
instance without a key pair, then you can't connect to it. We recommend against choosing
the Proceed without a key pair option.
Version
7
AWS Quick Start Guide Launch a Linux Virtual Machine
Step 2: Connect to Your Amazon EC2 Instance
When you are ready, select the acknowledgment check box, and then choose Launch Instances.
8. A confirmation page lets you know that your instance is launching. Choose View Instances to close
the confirmation page and return to the console.
On the Instances page, you can view the status of your instance. It takes a short time for an instance
to launch. When you launch an instance, its initial state is pending. After the instance starts, its state
changes to running, and it receives a public DNS name. (If the Public DNS column is hidden, choose the
Show/Hide icon.)
Version
8
AWS Quick Start Guide Launch a Linux Virtual Machine
Connect from Windows using PuTTY
3. In the Category pane, choose Connection, SSH, and Auth. Complete the following:
• Choose Browse, select the .ppk file that you generated for your key pair, and then choose Open.
• Choose Open to start the PuTTY session.
Version
9
AWS Quick Start Guide Launch a Linux Virtual Machine
Connect from Mac or Linux Using an SSH Client
4. If this is the first time you have connected to this instance, PuTTY displays a security alert dialog box
that asks whether you trust the host you are connecting to. Choose Yes. A window opens and you
are connected to your instance.
1. Open your command line shell and change the directory to the location of the private key file that
you created when you launched the instance.
Use the chmod command to make sure your private key file isn't publicly viewable. For example, if
the name of your private key file is my-key-pair.pem, use the following command:
Version
10
AWS Quick Start Guide Launch a Linux Virtual Machine
Connect Using Your Browser
Note
For this quick start, you used the Amazon Linux AMI for your instance, so the user name is
ec2-user.
Note
You can get the public DNS for your instance using the Amazon EC2 console. (If the Public
DNS column is hidden, choose the Show/Hide icon.)
Version
11
AWS Quick Start Guide Launch a Linux Virtual Machine
Step 3: Clean Up Your Amazon EC2 Instance
5. If necessary, choose Yes to trust the certificate and Run to run the MindTerm client.
6. If this is your first time running MindTerm, a series of dialog boxes asks you to accept the license
agreement, to confirm setup for your home directory, and to confirm setup of the known hosts
directory.
7. A dialog box prompts you to add the host to your set of known hosts. If you do not want to store the
host key information on your local computer, choose No.
8. A window opens and you are connected to your instance.
Note
If you chose No in the previous step, you see the following message, which is expected:
"Verification of server key disabled in this session."
Terminating an instance effectively deletes it because you can't reconnect to an instance after you've
terminated it. This differs from stopping the instance; when you stop an instance, it is shut down and you
are not billed for hourly usage or data transfer (but you are billed for any Amazon EBS volume storage).
Version
12
AWS Quick Start Guide Launch a Linux Virtual Machine
Step 3: Clean Up Your Amazon EC2 Instance
Also, you can restart a stopped instance at any time. For more information about the differences
between stopping and terminating an instance, see Stopping Instances.
To terminate an instance
1. In the Amazon EC2 console, on the Instances page, locate your instance.
2. Open the context (right-click) menu for the instance and choose Instance State, Terminate.
Amazon EC2 shuts down and terminates your instance. After your instance is terminated, it remains
visible on the console for a short while, and then the entry is deleted.
Version
13