3.3 Elastic Compute Cloud (EC2) virtual instances

Learning Objectives

By the end of this lesson you will be able to:

Launch an EC2 instance

  1. Go to the EC2 tab on the management console: https://console.aws.amazon.com/ec2/.
  2. Click the Launch Instance button.
  3. Click the Continue button from the Classic wizard.
  4. Click on the Select button for the 64-bit version of the Amazon Linux AMI
  5. Use the default instance type: t1.micro and click Continue.
  6. Use the default in "Advanced Instance Options" step and click Continue.
  7. Enter ssh in the Name tag value and click Continue.
  8. Select the Create a new Key Pair radio button and enter "ditc" in the "Enter a name for your key pair" field and click the " Create and Download your Key Pair" link. Save the file onto your computer for future use. Click the Continue button.
  9. Select the ssh security group that you created in sublesson 3.3 and click the Continue button.
  10. Click the Launch button.

Access your EC2 instance

Access the instance you previously launched.

  1. Find the "ditc.pem" file on your computer. If you are are a *nix-based computer, you will need to modify the permissions to 400.
  2. Select the checkbox next to the instance you launched in the previous set of steps.
  3. Click on Instance Actions button and select Connect from the menu.
  4. From the "Connect from your browser using the Java SSH Client (Java Required)" section, enter the fully qualified path in the "Private key path" field where your ditc.pem file is located and click the Launch SSH client button
  5. Type a few commands from the console.

Terminate an EC2 instance

Terminate an EC2 instance.

  1. Again, select the checkbox next to the instance you launched in the previous set of steps and click on Instance Actions button and select Terminate from the menu. Then, click the Yes, Terminate button.