0
0
AWScloud~30 mins

CIDR blocks and IP addressing in AWS - Mini Project: Build & Apply

Choose your learning style9 modes available
CIDR Blocks and IP Addressing in AWS VPC
📖 Scenario: You are setting up a simple AWS Virtual Private Cloud (VPC) for a small company. The company wants to create a network with a specific IP address range using CIDR blocks. You will create the VPC and define its CIDR block, then add a subnet with a smaller CIDR block inside the VPC.
🎯 Goal: Build an AWS VPC with a CIDR block of 10.0.0.0/16 and add a subnet inside it with a CIDR block of 10.0.1.0/24. This will help the company organize its network and control IP addressing.
📋 What You'll Learn
Create a VPC with the exact CIDR block 10.0.0.0/16
Create a subnet inside the VPC with the exact CIDR block 10.0.1.0/24
Use AWS CloudFormation syntax for resource definitions
Name the VPC resource MyVPC and the subnet resource MySubnet
💡 Why This Matters
🌍 Real World
Setting up a VPC with proper CIDR blocks is essential for organizing network IP addresses in AWS cloud environments.
💼 Career
Cloud engineers and architects often create and manage VPCs and subnets using CIDR blocks to control network segmentation and security.
Progress0 / 4 steps
1
Create the VPC with CIDR block
Create a resource called MyVPC of type AWS::EC2::VPC with the property CidrBlock set to "10.0.0.0/16".
AWS
Need a hint?

Use the Resources section and define MyVPC with the correct type and CIDR block.

2
Add a subnet CIDR block variable
Add a parameter called SubnetCIDR with the default value "10.0.1.0/24" to hold the subnet's CIDR block.
AWS
Need a hint?

Use the Parameters section to define SubnetCIDR as a string with the default value.

3
Create the subnet using the CIDR parameter
Create a resource called MySubnet of type AWS::EC2::Subnet. Set its VpcId to reference MyVPC and its CidrBlock to use the parameter SubnetCIDR.
AWS
Need a hint?

Use !Ref to reference the VPC and the subnet CIDR parameter.

4
Add a tag to the subnet for identification
Add a Tags property to MySubnet with a tag that has Key set to Name and Value set to MySubnet.
AWS
Need a hint?

Tags are a list of key-value pairs under the Tags property.