Amazon Virtual Private Cloud (VPC): Overview and Setup

Learn about Amazon Virtual Private Cloud (VPC), including how to create a VPC, configure security groups, launch instances, and manage Elastic IP addresses. Discover the key features of VPC and its compatibility with various AWS services.



Amazon Virtual Private Cloud (VPC): Overview and Setup

Amazon Virtual Private Cloud (VPC) allows users to create a private network within the AWS cloud, where you can launch AWS resources in a virtualized environment. You can define your network settings, such as IP address ranges, subnets, route tables, and gateways.

AWS Services Compatible with VPC

Amazon VPC works with a range of AWS services, including:

  • Amazon EC2
  • Amazon Route 53
  • Amazon WorkSpaces
  • Auto Scaling
  • Elastic Load Balancing
  • AWS Data Pipeline
  • Elastic Beanstalk
  • Amazon ElastiCache
  • Amazon EMR
  • Amazon OpsWorks
  • Amazon RDS
  • Amazon Redshift

How to Use Amazon VPC

Creating a VPC

  1. Open the Amazon VPC Console: Navigate to the Amazon VPC console.
  2. Start Creating a VPC: Select the option to create a VPC from the navigation bar. Ensure the region matches the one used for other services.
  3. Use the VPC Wizard: Click on "Start VPC Wizard" and choose the "VPC with single public subnet" option.
  4. Configure Your VPC: Enter details such as VPC name and subnet name. Keep other fields as default and click "Create VPC".
  5. Completion: After creation, a confirmation dialog will appear. Select "OK" to view your available VPCs. Modify settings as needed.

Creating a Security Group

  1. Open the VPC Console: Go to the Amazon VPC console.
  2. Create a Security Group: Choose "Security Groups" and click "Create Security Group."
  3. Fill in Details: Enter the group name, tag, and select the appropriate VPC ID. Click "Yes, Create."
  4. Set Security Rules: Configure the necessary security rules and click "Save" when done.

Launching an Instance into VPC

  1. Open the VPC Console: Go to the Amazon VPC console.
  2. Select the Region: Ensure the region matches your VPC and security group.
  3. Launch Instance: Click "Launch Instance" from the navigation bar.
  4. Select AMI: Choose an Amazon Machine Image (AMI).
  5. Choose Instance Type: Select the instance type and click "Next: Configure Instance Details."
  6. Configure Instance Details: Choose your VPC and subnet. Keep other settings as default and click "Next" until you reach the Tag Instance page.
  7. Tag the Instance: Add a name tag to identify your instance. Click "Next: Configure Security Group."
  8. Configure Security Group: Choose the previously created security group and click "Review and Launch."
  9. Review and Launch: Confirm instance details and click "Launch."
  10. Key Pair: Select or create a key pair and click "Launch Instances."
  11. Confirmation: A confirmation page will appear with instance details.

Assigning an Elastic IP Address

  1. Open the VPC Console: Go to the Amazon VPC console.
  2. Allocate Elastic IP: Select "Elastic IPs" and click "Allocate New Address." Confirm by clicking "Yes, Allocate."
  3. Associate Elastic IP: Select the Elastic IP, click "Actions," and choose "Associate Address."
  4. Associate with Instance: Choose the instance to associate with the Elastic IP and confirm.

Deleting a VPC

  1. Open the VPC Console: Go to the Amazon VPC console.
  2. Terminate Instances: Choose "Instances," select the instance, and go to Actions → Instance State → Terminate.
  3. Release Elastic IP: Expand "Release attached Elastic IPs" and select the checkbox next to the IP address. Click "Yes, Terminate."
  4. Delete the VPC: Select the VPC, choose "Actions," and click "Delete VPC."
  5. Confirm Deletion: Confirm by clicking "Yes, Delete."

Features of VPC

  • Flexible Connectivity: Connect directly to the internet via public subnets, use private subnets with NAT for internet access, securely connect to on-premises data centers via IPsec VPN, and more.
  • Ease of Use: Simplified VPC creation with automated setups for subnets, IP ranges, route tables, and security groups.
  • Data Backup: Easily back up data from data centers to Amazon EC2 using Amazon EBS volumes.
  • Scalable Network Extension: Scale applications by adding web servers, storage, and extending your network with VPC connectivity.