Monday 23 September 2024

VPC AWS lab

 AWS VPC (Virtual Private Cloud) allows you to create a virtual network within AWS, providing a secure and isolated environment for your resources.

1. Create a VPC

  • Navigate to VPC: In the AWS Management Console, search for "VPC" and select the service.
  • Create a VPC: Click on "Create VPC".
  • Provide details: Specify the CIDR block range for your VPC.
  • Create the VPC: Click "Create VPC".
  • Image of creating a VPC in AWS

2. Create a Subnet

  • Select your VPC: Click on the VPC you just created.
  • Create a subnet: Click on "Create subnet".
  • Provide details: Specify the CIDR block range for your subnet and choose an availability zone.
  • Create the subnet: Click "Create subnet".
  • Image of creating a subnet in AWS

3. Create an Internet Gateway

  • Navigate to VPC: In the AWS Management Console, search for "VPC" and select the service.
  • Create an internet gateway: Click on "Create internet gateway".
  • Create the gateway: Click "Create internet gateway".
  • Image of creating an internet gateway in AWS

4. Attach the Internet Gateway to Your VPC

  • Select your VPC: Click on the VPC you created.
  • Attach internet gateway: Click on "Attach internet gateway".
  • Choose the gateway: Select the internet gateway you created.
  • Attach the gateway: Click "Attach".

5. Create a Route Table

  • Select your VPC: Click on the VPC you created.
  • Create a route table: Click on "Create route table".
  • Create the route table: Click "Create route table".
  • Image of creating a route table in AWS

6. Associate the Route Table with Your Subnet

  • Select your subnet: Click on the subnet you created.
  • Associate route table: Click on "Associate route table".
  • Choose the route table: Select the route table you created.
  • Associate the route table: Click "Associate".

7. Create a Route

  • Select your route table: Click on the route table you created.
  • Create a route: Click on "Create route".
  • Provide details: Specify the destination CIDR block (e.g., 0.0.0.0/0 for internet traffic) and the target (the internet gateway).
  • Create the route: Click "Create route".
  • Image of creating a route in AWS

8. Launch an EC2 Instance

  • Navigate to EC2: In the AWS Management Console, search for "EC2" and select the service.
  • Launch an instance: Click on "Launch instance".
  • Choose an AMI: Select an Amazon Machine Image (AMI).
  • Configure instance details: Specify instance type, key pair, security group, and network settings.
  • Launch the instance: Click "Launch instances".
  • Image of launching an EC2 instance in AWS

9. Test Connectivity

  • Connect to your instance: Connect to your EC2 instance using SSH.
  • Test internet connectivity: Try accessing websites or other internet resources from your instance.

No comments:

Post a Comment