AWS Classroomnotes 04/Aug/2022

AWS VPC Contd..

  • All the subnets in the AWS VPC are private by default, they dont have internet access.
  • The internet access can be enabled to the vpc by using internet gateway. Now the route table entry has to be added to forward the network packets to internet gateway.
    Preview
  • Create a vpc and verify for the existence of the default route table.
  • This default route table allows all the traffic with in vpc.
    Preview
  • Lets create a internet gateway
    Preview
    Preview
    Preview
    Preview
  • The ip address restrictions in cidr notation
10.10.0.0/16 => 10.10.x.x (specific network)

10.10.0.5/32 => 10.10.0.5 (specific ip)

0.0.0.0/0 => x.x.x.x (Any ip)
  • Lets add a route between route table and igw for internet access
    Preview
  • Route table can be associated to the subnet. The default route table will act as a route table for all the subnets which are not associated to a specific route table.
    Preview
  • Public Subnet: A subnet which can access internet and can be accessed from internet
  • Private Subnet: A subnet which cannot be accessed from internet.
  • A subnet can be made public if it is associated with route table which has access to internet gateway and private if not.
  • Lets create a new route table in the vpc

    • private rt
      Preview
    • public rt
      Preview
  • Subnets can be made public by associating with public route table
    Preview
    Preview
    Preview
    Preview
  • Now lets create an ec2 instance in public subnet
    Preview
  • Try to login using ssh command => It should allow
  • Create an ec2 instance in private subnet, enable public ip (for testing) & try to login using ssh command => connection is timed out.
  • Try to create the following from AWS CLI

    • VPC
    • 2 subnets
    • create internet gateway and attach to vpc
    • Create a public rt
    • Create a private rt

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner