Table of Contents
Introduction
In the ever-evolving landscape of technology, mastering the skills and knowledge of AWS solution architecture is more crucial than ever. Understanding and practicing exercises related to Amazon Virtual Private Cloud (VPC) is a key component in becoming an AWS Certified Solutions Architect. This article, the third installment in our series, will guide you through essential exercises involving Amazon VPC. We will help you grasp how to set up and manage VPCs, understand their core components, and create a secure, flexible networking environment for your applications.
In this article, we’ll learn about Amazon VPC, the best way to become familiar with Amazon VPC is to build your own custom Amazon VPC and then deploy Amazon EC2 instances into it. AWS Certified Solutions Architect Exercises- part 3 Amazon VPC
1. Today’s tasks
- Create a Custom Amazon VPC
- Create Two Subnets for Your Custom Amazon VPC
- Connect Your Custom Amazon VPC to the Internet and Establish Routing
- Launch an Amazon EC2 Instance and Test the Connection to the Internet.
2. Before you begin AWS Certified Solutions Architect
- Command-line tool to SSH into the Linux instance.
3. Let’s do it
EXERCISE 1:
Create a Custom Amazon VPC
1. Open the Amazon VPC console
2. In the navigation pane, choose Your VPCs, and Create VPC.
3. Specify the following VPC details as necessary and choose to Create.
- Name tag: My First VPC
- IPv4 CIDR block: 192.168.0.0/16
- IPv6 CIDR block: No IPv6 CIDR Block
- Tenancy: Default
EXERCISE 2:
Create Two Subnets for Your Custom Amazon VPC
To add a subnet to your VPC using the console
1. Open the Amazon VPC console
2. In the navigation pane, choose Subnets, Create subnet.
3. Specify the subnet details as necessary and choose to Create.
- Name tag: My First Public Subnet.
- VPC: Choose the VPC from Exercise 1.
- Availability Zone: Optionally choose an Availability Zone in which your subnet will reside, or leave the default No Preference to let AWS choose an Availability Zone for you.
- IPv4 CIDR block: 192.168.1.0/24.
4. Create a subnet with a CIDR block equal to 192.168.2.0/24 and a name tag of My First Private Subnet. Create the subnet in the Amazon VPC from Exercise 1, and specify a different Availability Zone for the subnet than previously specified (for example, ap-northeast-1c). You have now created two new subnets, each in its own Availability Zone.
EXERCISE 3:
Connect Your Custom Amazon VPC to the Internet and Establish Routing
1. Create an IGW with a name tag of My First IGW and attach it to your custom Amazon VPC.
2. Add a route to the main route table for your custom Amazon VPC that directs Internet traffic (0.0.0.0/0) to the IGW.
3. Create a NAT gateway, place it in the public subnet of your custom Amazon VPC, and assign it an EIP.
4. Create a new route table with a name tag of My First Private Route Table and place it within your custom Amazon VPC. Add a route to it that directs Internet traffic (0.0.0.0/0) to the NAT gateway and associate it with the private subnet.
EXERCISE 4:
Launch an Amazon EC2 Instance and Test the Connection to the Internet
1. Launch a t2.micro
Amazon Linux AMI as an Amazon EC2 instance into the public subnet of your custom Amazon VPC, give it a name tag of My First Public Instance and select your key pair for secure access to the instance.
2. Securely access the Amazon EC2 instance in the public subnet via SSH with a key pair.
3. Execute an update to the operating system instance libraries by executing the following command:
sudo yum update -y
4. You should see an output showing the instance downloading software from the Internet and installing it.
5. Delete all resources created in this exercise.
Conclusion
Mastering exercises related to Amazon VPC not only prepares you better for the AWS Certified Solutions Architect exam but also equips you with vital skills for deploying and managing cloud infrastructure effectively. From creating and configuring VPCs to setting up route tables and network ACLs, each step in this process contributes to building a robust and secure network system. We hope this article boosts your confidence in applying the knowledge gained and continues your journey toward becoming an AWS expert.
If you have any questions or need further assistance, don’t hesitate to reach out to us. Best of luck on your path to becoming an AWS Certified Solutions Architect! AWS Certified Solutions Architect Exercises- part 3 Amazon VPC. Happy Clouding!!! Thank you for reading the DevopsRoles page!