Build Solutions across VPCs with Peering

1 hour
  • 5 Learning Objectives

About this Hands-on Lab

A VPC peering connection is a networking connection between two VPCs that enables you to route traffic between them using private IPv4 addresses or IPv6 addresses. In this lab, we create a new VPC for our WordPress blog to run from. We then create a VPC peering connection between the new VPC and an existing database VPC. By the end of this lab, the user will understand how to create a new VPC from scratch, attach internet gateways, edit routing tables, and peer multiple VPCs together.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create Web_VPC Subnets and Attach a New Internet Gateway

Using the AWS console, create the Web_VPC VPC.

Create the WebIG internet gateway.

Modify the route table to attach the internet gateway to the Web_VPC

Create a Peering Connection

Peer the newly created Web_VPC with the DB_VPC.

Create an EC2 Instance and Configure WordPress

Launch a new EC2 instance using the provided bootstrap user data script. Log in to the system and configure WordPress to use the RDS database.

Modify the RDS Security Groups to Allow Connections from the Web_VPC VPC

The RDS instance requires a security group modification to allow access from 192.168.0.0/16.

Test WordPress

Visit the IP address of your EC2 instance in a web browser and confirm WordPress is working correctly and communicating with the RDS instance via VPC peering.

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.

Sign In
Welcome Back!

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

Get Started
Who’s going to be learning?