Launching an EC2 Instance with CDK

1 hour
  • 3 Learning Objectives

About this Hands-on Lab

In this lab, we will deploy an EC2 instance within a public subnet of your VPC as part of a new CDK project. Upon completion of this lab, you will have launched a Cloud9 instance, edited terminal inputs, and created a new EC2 instance by deploying a CDK project.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Launch a Cloud9 Instance

In the AWS console, launch a Cloud9 instance.

Edit Your Terminal Inputs

Put together the code for CDK to be able to deploy the correct resources using the GitHub repo.

Create a New EC2

Deploy your CDK stack, and check that your EC2 instance was deployed correctly. The total number of EC2 instances that should exist is 2:

  • Cloud9
  • Ec2CDKStack

Additional Resources

Scenario

In this lab, you have been tasked by your company to create a new CDK project, where you will launch an EC2 instance into a public subnet within your VPC.


Before starting the lab, ensure you have the necessary files from GitHub.

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.

Sign In
Welcome Back!

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

Get Started
Who’s going to be learning?