What is a VPC in AWS
A Virtual Private Cloud (VPC) is a virtual network that you create in AWS. It’s logically isolated from other AWS accounts, and you can optionally connect it to your on-premises network.
A VPC enables you to launch AWS resources, such as Amazon EC2 instances, into a virtual network that you’ve defined. You can use a VPC to provide security for your AWS resources and to connect with other AWS services, such as Amazon DynamoDB, Amazon Elasticsearch Service, and Amazon Kinesis Firehose.
You can create a VPC in minutes by using the AWS Management Console. The console provides an easy way to create a VPC, add subnets, and configure security settings.
You can also use the AWS Command Line Interface (AWS CLI), AWS CloudFormation templates, or other SDKs to create a VPC.
How to create a VPC in AWS
Creating a VPC using the AWS Management Console
You can create a VPC using the AWS Management Console. The console provides an easy way to create a VPC and add subnets.
To get started, sign in to the AWS Management Console and open the Amazon VPC console at https://console.aws.amazon.com/vpc/.
- In the navigation pane, choose Your VPCs. Then, Choose Create VPC. Enter the following information:
- CIDR block – The range of IP addresses for your VPC in CIDR notation (for example, 10.0.0.0/16). The CIDR block you specify must not overlap with the CIDR block for any of your other VPCs, and it must fall within the overall allowable range for VPCs (see Amazon VPCs IP Address Ranges).
- Tenancy – The tenancy options are default or dedicated. For more information, see Dedicated Instances in the Amazon EC2 User Guide for Linux Instances.
- VPC name – A name for your VPC.
- Description – A brief description of your VPC.
- Subnets – You can create one or more public subnets and one or more private subnets. For more information, see Subnets in the Amazon VPC User Guide.
- Click Create VPC.
- After you create the VPC, it appears in the list of Your VPCs on the Amazon VPC console.
The benefits of a VPC
Security – You can use security features such as security groups and network ACLs to secure your resources.
Isolation – A VPC enables you to logically isolate your resources from other AWS accounts.
Connectivity – You can use a VPC to connect your resources to on-premises networks.
Multicast – You can use multicast routing to enable communication between instances in your VPC without the need for an external router.
Improved availability – You can use multiple Availability Zones to create a scalable and fault-tolerant architecture.
The components of a VPC
Route tables – A route table contains a set of rules, called routes, that determine how traffic is routed through your VPC.
Gateways – A gateway is a network interface between your VPC and another network, such as on-premises or another AWS account.
Networks – Each VPC has its own virtual network, which is a collection of all the resources that you’ve created in that VPC.
Subnets – A subnet is a subdivision of a network in a VPC. You can create one or more public subnets and one or more private subnets.
Elastic IP addresses – An Elastic IP address is an IPv4 address that you can reserve from AWS to use as your own permanent public address.
Network access control lists – A network ACL is a stateless list of rules that you can use to filter traffic coming into or out of your subnets.
A VPC provides a number of benefits, including security, isolation, and connectivity. You can use a VPC to logically isolate your resources from other AWS accounts and to connect your resources to on-premises networks. You can also use a VPC to create a scalable and fault-tolerant architecture by using multiple Availability Zones.