Being one of the top cloud providers, AWS has put significant efforts in strategizing security solutions for their clients. It has been a great concern for Amazon to ensure their clients don’t face data breaches using their services especially when the data or the resources have to be shared with third parties. In this AWS VPC and Peering tutorial, we will understand what is VPC in AWS in detail and learn how to create a logically isolated network or an area within the AWS cloud known as Amazon Virtual private cloud (VPC).
Before getting started, here’s a list of all the topics that will be covered in this AWS VPC tutorial, in case you need to jump to a specific one.
Watch this What is VPC in AWS – AWS VPC Tutorial video:
Without further delays, let’s move on.
What is VPC in AWS?
Among all services that AWS offers, Amazon VPC is one that provides an additional layer of security for all AWS services that you use. AWS defines VPC as ‘a service that enables users to launch AWS resources, such as instances, into a virtual network that users define.’ This basically means that this service lets you use any of the services by AWS according to your needs in a logically isolated space in the AWS Cloud that you define. It also gives you full control over routing traffic to and from your instances.
There are two types of VPCs in AWS, namely:
- Default VPC: Every account created after 2013 supports VPCs and all these accounts come up with a default VPC in every region.
- User-defined VPC: User-defined VPCs, as suggested by the name, are created by users as per their requirements.
AWS VPC Peering?
AWS VPC Peering is a functionality that enables two private networks to communicate with each other by building fast and reliable connections. AWS VPC peering connections can be used to route traffic from one VPC to another VPC network or to provide access to resources of one network to another.
Looking for the best AWS Training in your city? Enroll now in Intellipaat’s AWS Training in Chennai!
Components in Amazon VPC
To understand more about VPCs, go through all the core components of VPCs. Amazon VPC mainly consists of the following components
A subnet is a subdivision of a network. When a network is broken down into smaller sub-networks, or subnets, that process is called subnetting.
When dealing with networking, you’ll often have to deal with IP addresses too. For that, you will need to have a basic understanding of what an IP address is. An IP address is defined as a unique set of strings which is composed of period-separated numbers that identify each computer that they are associated with. Every instance in AWS gets two IP addresses, namely, a private IP address and a public IP address.
As mentioned earlier, VPC in AWS provide full control over the traffic. To do that you have route tables. A route table consists of rules that are used to determine how and to where the traffic will be directed in a network.
Every subnet in Amazon Virtual private Cloudshould be associated with a route table that will control the routing for their respective subnet. A route table can be associated with multiple subnets in a network.
Internet Gateway is what allows your instance, launched in a subnet in your VPC, to connect to the Internet. It lets the instance access the Internet and the Internet and other resources, outside of the VPC, access the instance. Internet Gateway is one of the most important components of VPC.
VPC Endpoints are used when you need to create a private network between your VPC and another AWS Service outside of your VPC without relying on the internet, VPN or NAT Devices. Once an endpoint is created, it cannot be transferred from one VPC to another one or to any other service.
Also, endpoints are only supported within the same region. Endpoints cannot be used to connect service and VPC is they are not in the same region.
Benefits of AWS VPC
The first and foremost benefit of VPC is security. VPC in AWS provides advanced security at the instance level and at the subnet level. With VPC, you can specify the users who are allowed to access cloud resources and who are not.
Easy to Set-up and Use
AWS VPC is as easy to set-up as any other services offered by AWS. Using the AWS Management Console, you can easily set-up Amazon VPC. As for the default VPC for your account, it is pre-configured, which lets you focus on building and deploying the application.
Application performance is largely affected by the congestion in the Internet. It can slow down the application traffic or even make the application slow. With VPC, the probability of application performance going down decreases as it helps in delivering the traffic with high priority, accordingly.
How to Create VPC in AWS Using AWS Console
Amazon has made it as easy as possible to create your VPC with just a few clicks. You can use your management console account and follow the following mentioned steps to get started with Amazon Virtual Private Cloud.
Step 1: When you log in to your Amazon account, just search for VPC in the search bar and you’ll see the following screen:
There will be a Launch VPC Wizard option as shown in the above screenshot, click on it
Step 2: After clicking on Launch VPC Wizard, you’ll be taken to a page that looks like the following screenshot and you’ll find the following four options there:
- VPC with a Single Public Subnet
- VPC with Public and Private Subnets
- VPC with Public and Private Subnets and Hardware VPN Access
- VPC with a Private Subnet Only and Hardware VPN Access
Start with the most basic option, that is, creating VPC with a Single Public Subnet. Click on Select
Step 3: In this next Page, you’ll have to fill in a few details such as VPC name, Availability Zone, etc.
You can leave the default settings as they are since they are the recommended settings by AWS. A subnet will be created for your VPC named Public Subnet, you can rename it in the subnet field.
After filling in the settings, click on Create VPC
Step 4: Once you click on the Create VPC option, a message will be displayed saying, ‘Your VPC has been successfully created’ as shown below. Here, click on OK
Step 5: To check the status of your VPC that you just created, navigate to the Your VPCs option. Here, you’ll see the VPC that you have created
Step 6: To check your subnet, navigate to the Subnets section. Here, you’ll see the subnet created in your VPC, named ‘Public Subnet’
You can also check the route table associated with your subnet by selecting your subnet and navigating to the Route Table option as shown in the following screenshot
This is how you can create a VPC in AWS, easily!
With this we come to an end of this AWS VPC and Peering tutorial, I hope you got a brief idea about what is VPC in AWS and how to create it.