Introduction to EC2

30 minutes
  • 4 Learning Objectives

About this Hands-on Lab

AWS EC2 is one of the core services of the AWS ecosystem that you absolutely must know to be successful in a cloud-related career. Even if your app doesn’t run on EC2, utilizing EC2 instances for development and to perform other tasks is critical to a well-architected AWS solution. In this learning activity, we are going to create an EC2 instance, create and customize a security group to allow access, and createa key pair in order to ensure our access is secure.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create an EC2 instance
  • Navigate to EC2 Dashboard by clicking the Services dropdown menu from the navigation bar at the top of the AWS website. Click EC2 under the Compute section to launch the EC2 Dashboard.

  • Use the Launch Instance button to create a new instance.

  • Select the Amazon Linux AMI at the top of the list (if you don’t see it immediately, click the Quick Start tab on the left).

  • Leave the default selection of t2.micro Instance Type and click the Next: Configure Instance Details button in the bottom right.

  • Take note of the Network and Subnet settings, but they should remain unchanged for this lab. Ensure the Auto-assign Public IP setting is set to Enable. All other settings can remain unchanged. Once you’ve verified these details, click the Next: Add Storage button in the bottom right.

  • This page would allow us to automatically provision additional Elastic Block Storage volumes and connect them to our EC2 instance, which we could use to configure additional storage. Check the Elastic Block Storage section later in this written guide for more information. For this lab, we can leave the defaults and click the Next: Add Tags button in the bottom right.

  • We can use the default entry with the "Name" key to give our instance a fitting name. Given the nature of this lab in particular, "learning-ec2" seems to be an appropriate name. In the "Value" column, type the name learning-ec2. Click the Next: Configure Security Group button in the bottom right.

  • Near the top of the page, you should see the Assign a security group label that lets us choose to create a new security group or select an existing one. For this lab, we will want the Create a new security group option. Since an SSH rule is included by default, we can move on. (Note: In practice, it is safer to restrict the Source setting. The default setting allows all sources.)

  • Click the Review and Launch button in the bottom right.

  • Review the settings and click the Launch button in the bottom right. We will receive a prompt about a key pair.

  • Choose to Create a new key pair and type in a Key pair name of first-instance.

  • Use the Download button and save the file to your Downloads directory.

  • Finally, click the Launch Instances button to instruct AWS to launch an instance with the setting’s we’ve defined. Once you see it, click the View Instances button.

Use the t2.micro instance type

During the process of creating the EC2 instance, Step #2 requires you to select an instance type.

Leave the default selection of t2.micro Instance Type and click the Next: Configure Instance Details button in the bottom right.

Create a security group

During the process of creating the EC2 instance, Step #6 requires you to select an instance type.

Near the top of the page, you should see the Assign a security group label that lets us choose to create a new security group or select an existing one. For this lab, we will want the Create a new security group option. Since an SSH rule is included by default, we can move on. (Note: In practice, it is safer to restrict the Source setting. The default setting allows all sources.)

Create a key pair to SSH into the instance

During the last steps of the instance creation process, review the settings and click the Launch button in the bottom right. You will receive a prompt about a key pair.

Choose to Create a new key pair and type in a Key pair name of first-instance.

Use the Download button and save the file to your Downloads directory.

Additional Resources

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


$2,495.00

Checkout
Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!