AWS Classroomnotes 03/Aug/2022

Creating Networks in AWS

  • Create a vpc in nvirginia with six subnets in six az’s, Each subnet should be able to accommodate 250 devices
  • Make a note of vpc id and subnet ids
  • VPC CIDR: 10.10.0.0/16 (vpc-0218f7ed5bc6844f4)
  • subnet 1: 10.10.0.0/24
  • subnet 2: 10.10.1.0/24
  • subnet 3: 10.10.2.0/24
  • subnet 4: 10.10.3.0/24
  • subnet 5: 10.10.4.0/24
  • subnet 6: 10.10.5.0/24
    Preview
  • AWS allows the users to interact in 3 different ways
    • Console (Website)
    • CLI (Build commands and store them in a script)
    • SDK (Write code in any language like python, java to automate)

Do the network creation from CLI

  • Launch AWS Cloud Shell
    Preview
  • Search for aws cli to create vpc
    Preview
  • Refer Here for the create-vpc documentation
  • Create vpc using command
aws ec2 create-vpc --cidr-block "10.10.0.0/16"

Preview
* Make a note of vpcId vpc-024ed3a4229091d54
* Now lets create a subnet1 cidr range = 10.10.0.0/24, az='us-east-1a'

aws ec2 create-subnet --vpc-id "vpc-024ed3a4229091d54" --cidr-block "10.10.0.0/24" --availability-zone "us-east-1a"
# subnet-06ac5ea3dd46770e9
aws ec2 create-subnet --vpc-id "vpc-024ed3a4229091d54" --cidr-block "10.10.1.0/24" --availability-zone "us-east-1b"
# subnet-002b56122d17bb032
aws ec2 create-subnet --vpc-id "vpc-024ed3a4229091d54" --cidr-block "10.10.2.0/24" --availability-zone "us-east-1c"
aws ec2 create-subnet --vpc-id "vpc-024ed3a4229091d54" --cidr-block "10.10.3.0/24" --availability-zone "us-east-1d"
aws ec2 create-subnet --vpc-id "vpc-024ed3a4229091d54" --cidr-block "10.10.4.0/24" --availability-zone "us-east-1e"
aws ec2 create-subnet --vpc-id "vpc-024ed3a4229091d54" --cidr-block "10.10.5.0/24" --availability-zone "us-east-1f"

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner