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.
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
Modify the route table to attach the internet gateway to the
- Create a Peering Connection
Peer the newly created
- 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
- 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.