Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Configuring Centralized Access to the Internet with Transit Gateway

Welcome to this challenge lab! In this lab, you will be creating a centralized egress internet environment. You will be given access to two VPCs. In the workload VPC, a subnet will be provisioned and an EC2 instance will be available in this subnet for you to connect to. You will start off by deploying three subnets and an internet gateway. Once deployed, you will proceed with deploying a transit gateway and a NAT gateway before finishing the configuration with route table modifications. Finally, you'll test web site access from an EC2 instance in one of the VPCs. To complete this lab, you should have an understanding of all of the technologies mentioned above, as well as knowledge of the AWS Management Console. Good luck, Cloud Gurus!

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 1h 30m
Published
Clock icon May 19, 2023

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Configure VPC Route Tables

    In this objective, we will configure the route tables for traffic to flow from the EC2 instance through the environment to the target website. For the transit gateway, make sure you add this as a static route.

    WorkloadVPCPrivateRouteTable

    0.0.0.0/0 --> Transit Gateway

    EgressVPCTransitRouteTable

    0.0.0.0/0 --> NAT Gateway

    EgressVPCNATRouteTable

    0.0.0.0/0 --> Internet Gateway
    10.0.0.0/16 --> Transit Gateway
    

    Configure Transit Gateway Route Table

    Transit Gateway Route Table

    0.0.0.0/0 --> EgressVPC-TGW-Att

  2. Challenge

    Create Transit Gateway and Attach to the New Transit Gateway Subnets in Each VPC

    In this objective, you will be creating a transit gateway. Once this has been created, you will then create transit gateway attachments and configure these for the newly created subnets in the WorkloadVPC and EgressVPC.

    Use the following information for this objective:

    Creating a transit gateway

    Name = Transit-Gateway-01
    Description = WorkloadVPC-EgressVPC
    

    WorkloadVPC transit gateway attachment

    Name = WorkloadVPC-TGW-Att
    Transit gateway ID = Transit-Gateway01
    Attachment type = VPC
    VPC ID = WorkloadVPC
    Subnet ID = WorkloadVPCTransitUsEast1a
    
    

    EgressVPC transit gateway attachment

    Name = EgressVPC-TGW-Att
    Transit gateway ID = Transit-Gateway01
    Attachment type = VPC
    VPC ID = EgressVPC
    Subnet ID = EgressVPCTransitUsEast1a
    
    
  3. Challenge

    Test Website Connectivity from EC2Instance1

    Using EC2Instance1 test connectivity to https://acloudguru.com.

    Connect to EC2Instance1 using the connection option in the EC2 console and selct the Session Manager tab. Once connected, issue the following commands to test.

    curl https://acloudguru.com

    Issue this command:

    curl ifconfig.me

    Verify IP address displayed is the same as the public IP address of the NAT gateway.

  4. Challenge

    Create NAT Gateway

    In this objective, we will be deploying a NAT gateway called EgressVPCNGW in the public subnet of our VPC.

    Use the following settings for this objective:

    Name = EgressVPCNGW
    Subnet = EgressVPCNATUsEast1a
    Connectivity type = Public
    Elastic IP allocation ID = Allocate Elastic IP
    
  5. Challenge

    Create VPC Subnets and Link to Route Tables

    In this objective, you will create the foundations for the lab by provisioning the subnets required for the lab.

    Create Subnet in Workload VPC

    VPCID = WorkloadVPC
    SubnetName = WorkloadVPCTransitUsEast1a
    Availability Zone = us-east-1a
    IPv4 CIDR Block = 10.0.0.0/28
    

    Map to route table WorkloadVPCTransitRouteTable.

    Create Subnets in Egress VPC

    VPCID = EgressVPC
    SubnetName = EgressVPCTransitUsEast1a
    Availability Zone = us-east-1a
    IPv4 CIDR Block = 10.1.0.0/28
    
    

    Map to route table EgressVPCTransitRouteTable.

    VPCID = EgressVPC
    SubnetName = EgressVPCNATUsEast1a
    Availability Zone = us-east-1a
    IPv4 CIDR Block = 10.1.0.16/28
    

    Map to route table EgressVPCNATRouteTable.

  6. Challenge

    Create Internet Gateway and Attach to the Egress VPC

    In this objective, you will need to create an Internet Gateway and attach this to the Egress VPC.

    Name = EgressVPCIGW
    
    Attach to VPC = EgressVPC
    

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

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.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans