Build a network and deploy AWS SSM to securely connect to EC2 instances with Terraform
This lab environment provides you with the ability to deploy a full custom VPC network with public and private subnets, NAT Gateways, an Internet Gateway, route tables, security groups, SSM, and EC2 instances. This lab was create specifically for our Terraform project "Building a Network and Deploying AWS Systems Manager (SSM)." Please note that SSM can take 15 minutes to register instances, which is an AWS limitation outside of our control.
- 11 guided tasks
- Terminal in the browser

Scenario
This lab is part of the Terraform on AWS course. It is the LAB: Deploying our project lesson, and it deploys the project code that you write across these lessons:
- Our project details
- Getting started - building the VPC module
- Building Subnets, Route Tables, and NAT Gateway
- Building the SSM module
- Creating our VPC Endpoint for SSM
- Creating our EC2 instance module
- Creating and deploying security groups
If you completed those lessons in your own terminal, open your project directory and go to the Configure your CLI task.
You can also see the course project code on GitHub.
In this lab, you deploy the full Terraform project from the course. It builds a custom VPC with public and private subnets, NAT Gateways, SSM VPC endpoints, security groups, and an EC2 instance in each subnet type. Then you connect to the instances with AWS Systems Manager (SSM), without SSH keys or a bastion host, and destroy everything with Terraform.
Note: after you deploy the project, SSM can take up to 15 minutes to register the new instances. This is an AWS limitation that we cannot control.
What you will learn
- Write a Terraform project that uses VPC, SSM, and EC2 modules.
- Deploy a custom VPC with VPC endpoints, security groups, and EC2 instances.
- Connect to private and public EC2 instances with SSM Session Manager.
- Remove the whole project with terraform destroy.
Build a network and deploy AWS SSM to securely connect to EC2 instances with Terraform
Included in Cybr Premium.