In this hands-on exercise, you will launch a virtual server in the cloud within a secure network. You will also manage additional storage options for your server.
Prerequisites: AWS Account
By the end of this lab, you will be able to:
- Launch a secure EC2 (Elastic Cloud Compute) instance within a VPC (Virtual Private Cloud)
- Manage an EBS volume
Step 1. Create a VPC
- From the AWS Management Console page, select the VPC service.
- Use the Launch VPC Wizard to create a VPC with a Single Public Subnet. You can use the following field-values, and leave the remaining values as the defaults:
||Select the first AZ from the dropdown|
- Verify that you should see the newly created VPC in the Your VPCs service shown on the VPC Dashboard. Note the Name / VPC ID of the newly created VPC.
Step 2. Launch an EC2 instance, and attach an EBS volume
Navigate to the EC2 console page: Click on Services in the upper left-hand menu, type
EC2in the text box, and select the
On the EC2 Dashboard page, select the Instances services in the left-hand navigation pane.
- Use the Launch Instance wizard to launch an instance with the following configuration, and leave the remaining values as the defaults:
|1.||Amazon Machine Image (AMI)||
Note: You have chosen a Free Tier Eligible AMI
|3.||Configure Instance Details|
|a. Number of Instances||1|
|b. Network||Select the VPC that was created in the previous step|
|a. Root volume||Default|
|a. Additional volume||EBS volume
(8GiB, General purpose SSD-gp2, deletes on termination)
|6.||Security Group||Default. Rule with
addresses to access your instance.
Generate and download a new key pair, at the last stage of the Launch Instance wizard.
Important: This key-pair will allow you to log into your instance, using SSH, from your local machine. Save the key-pair carefully, because the same private key cannot be re-generated.
Verify that you should see the newly created EC2 instance in the Instances services. Check the instance state, it should say
Congratulations! You’ve launched your first virtual server in the cloud.
Step 3. Cleanup & Disable EC2 Instance
To avoid recurring charges for leaving an instance running, let’s disable the EC2 instance and terminate the VPC
- From the EC2 Dashboard, select the instance just created, click on the Instance State button on top-right, and then select Terminate instance.
- From the EC2 Dashboard, select the Volumes services on the left navigation pane, and view the list of all existing EBS volumes in your account. You must delete the volumes created during the current exercise.
- From the VPC Dashboard, select the VPC just created, click on the Actions button on top-right, then select Delete VPC.