Amazon VPC
Cloud service · AWS · Updated

Amazon VPC

In short

Amazon VPC (Virtual Private Cloud) is a service that allows users to launch AWS resources in a logically isolated virtual network that they can define and control, including IP address ranges, subnets, route tables, and gateways.

Cloud Services Hub →

Free Amazon VPC tools

10 key features of Amazon VPC

Amazon VPC offers a secure and isolated network that is customizable, supports multiple connectivity options, includes robust security controls, and is designed for ease of use.

01
Secure and Isolated Network

Amazon VPC allows users to provision a logically isolated section of the Amazon Web Services (AWS) cloud where they can launch AWS resources in a virtual network that they define. This provides a secure and isolated environment that can be customized as needed.

02
Customizable IP Address Range

Users can select their own IP address range, create subnets, and configure route tables and network gateways. This level of control ensures that networks can be tailored to specific requirements and preferences.

03
Multiple Connectivity Options

Amazon VPC offers various connectivity options including connecting to the internet, to user’s existing IT infrastructure via a VPN, or to Amazon Web Services (AWS) resources through private endpoints, offering flexibility in how services and resources are accessed.

04
Security Controls

With VPC, users can leverage multiple layers of security, including security groups and network access control lists (ACLs), to help control access to AWS resources within each subnet, thereby enhancing the security posture of their network.

05
Simple to Use

Amazon VPC is designed to be easy to configure and manage, even for complex network topologies, through the AWS Management Console, the AWS Command Line Interface (CLI), or SDKs, simplifying the process of setting up and managing a virtual network.

06
IPv4, IPv6, and Bring Your Own IP

VPCs and subnets support IPv4 and IPv6 addressing. You can bring public IPv4 and IPv6 GUA addresses to AWS and allocate them to VPC resources such as EC2 instances, NAT gateways, and Network Load Balancers.

07
Private Service Connectivity

VPC endpoints connect to AWS services privately without an internet gateway or NAT device.

08
Traffic Mirroring

Traffic Mirroring copies traffic from network interfaces to security and monitoring appliances for deep packet inspection.

09
Transit Gateway Connectivity

A transit gateway acts as a central routing hub between VPCs, VPN connections, and Direct Connect connections.

10
VPC Flow Logs

VPC Flow Logs capture information about IP traffic going to and from network interfaces in a VPC.

Where Amazon VPC is used

Amazon VPC use cases include hosting secure and scalable web applications, extending on-premise networks to the cloud, enabling disaster recovery strategies, and facilitating development and testing environments.

  1. 01
    Host Secure and Scalable Web Applications

    Amazon VPC provides a secure and isolated section of the AWS cloud where you can host web applications. It allows you to control network access to your instances, including selecting your IP address range, creating subnets, and configuring route tables and network gateways. This ensures that your web applications are scalable and isolated from other network traffic, enhancing security and performance.

  2. 02
    Extend Your On-Premise Network to the Cloud

    Using Amazon VPC, businesses can extend their on-premise networks into the cloud through a VPN connection. This is beneficial for seamless hybrid cloud deployments, where applications or resources are distributed across on-premise data centers and the AWS cloud, allowing for secure communication between these environments as if they were part of a single, private network.

  3. 03
    Disaster Recovery

    By leveraging Amazon VPC, organizations can implement a variety of disaster recovery (DR) strategies. It enables them to quickly replicate their production environment in AWS, facilitating rapid recovery of their IT infrastructure in case of a disaster. This not only minimizes downtime but also ensures that the recovery process is cost-effective and scalable, depending on the criticality of the applications.

  4. 04
    Development and Testing Environments

    Amazon VPC allows developers to easily create isolated networks for development and testing purposes. These environments can mimic production environments, ensuring that testing is accurate and effective. The ability to quickly spin up and tear down these environments in a cost-effective manner makes it an ideal choice for continuous integration and continuous deployment (CI/CD) workflows.

How Amazon VPC is priced

Amazon VPC pricing models include charges for data transfer, VPC Endpoints, NAT Gateways, Elastic IPs, and VPN connections, focusing on resource usage, data volume, and the types of endpoints and connections.

Data Transfer Pricing

Amazon VPC does not charge for creating and using a VPC itself, but charges may apply for VPC-related resources and data transfer. Outbound data transfers from a VPC to the internet, and data transfers between VPCs in different regions, are priced based on the total amount of data transferred, with prices decreasing as data volume increases.

VPC Endpoint Pricing

Using VPC Endpoints allows private connections between your VPC and supported AWS services and VPC endpoint services powered by PrivateLink. Pricing for VPC Endpoints varies depending on the type of endpoint (Interface, Gateway, or Gateway Load Balancer), the region, and the amount of data processed.

NAT Gateway Pricing

NAT Gateways enable instances in a private subnet to connect to the internet or other AWS services, but prevent the internet from initiating a connection with those instances. Pricing for NAT Gateway is based on the hourly rate for the NAT Gateway itself, and the volume of data processed by the gateway.

Public IPv4 Address Pricing

In-use and idle public IPv4 addresses both cost $0.005 per address-hour. Usage is calculated in one-second increments with a minimum of 60 seconds.

VPN Connection Pricing

Amazon VPC offers the option to create an IPsec VPN connection between your VPC and your corporate network. Pricing for VPN connections is based on a per-hour charge for each VPN connection and the data transfer rate.

Regional NAT Gateway Pricing

Regional NAT Gateways incur an hourly charge for each Availability Zone in which they are configured, plus charges per gigabyte processed. Partial gateway-hours are billed as full hours, and hourly billing adjusts when an Availability Zone is removed.

IPAM Pricing

IPAM Free Tier has no IPAM usage charge; other AWS service charges still apply. IPAM Advanced Tier costs $0.00027 per active IP address managed per hour.

Traffic Mirroring Pricing

The ENI owner pays hourly for each network interface enabled for Traffic Mirroring. Charges continue until the associated traffic mirror sessions are deleted, even if the source instance is stopped or terminated.

Reachability Analyzer Pricing

Reachability Analyzer charges per connectivity analysis processed.

Network Access Analyzer Pricing

Network Access Analyzer charges for the number of EC2 elastic network interfaces analyzed in each network assessment.

Amazon-Provided Contiguous IPv4 Block Pricing

Each public IPv4 address in an Amazon-provided contiguous IPv4 block costs $0.008 per hour, with partial hours billed as full hours. All addresses are charged when the block is provisioned, without separate in-use or idle public IPv4 charges.

VPC Route Server Pricing

VPC Route Server is billed per endpoint-hour.

VPC Peering Pricing

VPC peering traffic crossing Availability Zones within the same AWS Region costs $0.01 per GB in both the inbound and outbound directions.

ODB Peering Pricing

ODB peering traffic crossing Availability Zones within the same AWS Region costs $0.01 per GB in both the inbound and outbound directions.

VPC Encryption Controls Pricing

VPC Encryption Controls charges a Region-dependent hourly rate for each non-empty VPC running in monitor or enforce mode. VPC owners are also charged for every VPC attached to a Transit Gateway with encryption support, regardless of whether that VPC has Encryption Controls enabled; attachment to multiple such Transit Gateways does not multiply the hourly VPC charge.

Services Amazon VPC works with

CloudFront VPC origins allow applications in private subnets to be served through CloudFront without exposing the origins directly to the public internet.

Amazon EC2Amazon EC2

Amazon Elastic Compute Cloud (EC2) instances can be launched within a VPC, providing secure and scalable computing capacity.

Amazon RDSAmazon RDS

Amazon Relational Database Service (RDS) instances can run within a VPC, ensuring your databases are isolated and secure.

Amazon S3Amazon S3

Amazon Simple Storage Service (S3) can be accessed privately from within your VPC using VPC endpoints.

AWS LambdaAWS Lambda

AWS Lambda functions can be configured to run within a VPC, allowing them to access VPC resources securely.

Amazon CloudFrontAmazon CloudFront

Amazon CloudFront distributions can be used with VPC origins for secure content delivery from VPC resources.

Amazon API GatewayAmazon API Gateway

Your VPC can access private REST APIs through interface VPC endpoints, and API Gateway VPC links connect APIs to supported private backends inside your VPC.

Amazon AppFlowAmazon AppFlow

Your VPC can provide private connectivity for supported Amazon AppFlow integrations through AWS PrivateLink, keeping supported SaaS data transfers off the public internet.

Amazon AthenaAmazon Athena

Your VPC can use an interface endpoint to access Athena APIs privately, without an internet gateway or NAT gateway.

Amazon Augmented AI (Amazon A2I)Amazon Augmented AI (Amazon A2I)

Your VPC can access Amazon A2I runtime APIs through an interface endpoint, allowing applications to start and manage human review loops privately.

Amazon VPC exam questions

Real practice exam questions on Amazon VPC, with the correct answer and its explanation. Answer them with every option in the exam simulator.

AIB-C01 (beta)

A healthcare company is moving an AI forecasting pilot into production on AWS. The application must query a database that will remain in the company's data center and has no public endpoint. A readiness review finds that the pilot's AWS network uses the same private IP address range as the data center. The data center's addressing cannot change. Leadership requires encrypted, privately addressed connectivity before production approval. Which infrastructure plan best meets these requirements?

Show answerCORRECT ANSWER

Move the application into a new Amazon VPC with a non-overlapping address range, establish AWS Site-to-Site VPN connectivity, and configure routes and security controls for the required database traffic.

A non-overlapping address plan enables unambiguous routing between AWS and the data center. Site-to-Site VPN provides encrypted connectivity using private addresses, while routes and security controls enable and restrict the required database access.

MLA-C02 (beta)

A company runs a self-managed ML inference service on Amazon EC2 instances in a dedicated subnet. Application instances in subnet 10.40.2.0/24 initiate TCP connections to the inference service on port 8443, using client source ports 49152–65535. The inference instances must return prediction results over these connections but must not initiate any TCP connections to the application subnet, including connections to ports 49152–65535.

The inference instances have one security group that allows inbound TCP port 8443 from the application's security group and has no outbound rules. Routing is configured correctly, and the application subnet's security controls permit the required traffic. A new network ACL for the inference subnet will deny all traffic except explicitly allowed traffic.

Which configuration meets these requirements?

Show answerCORRECT ANSWER

Keep the inference security group unchanged. Configure the inference subnet's network ACL to allow inbound TCP destination port 8443 from 10.40.2.0/24 and outbound TCP destination ports 49152–65535 to 10.40.2.0/24.

The security group automatically permits responses to allowed inbound connections, even without outbound rules. Its lack of outbound rules prevents the inference instances from initiating new TCP connections. The stateless network ACL separately permits incoming requests to port 8443 and outgoing responses to the clients' ephemeral ports.

SAP-C03

A company uses AWS Organizations with AWS RAM organizational sharing enabled. A network account owns a customer-managed Amazon VPC prefix list containing approved service CIDR blocks. An application account references this prefix list in security group rules through an existing AWS RAM resource share that names the application account directly.

The company will divest the application account to another organization. Under a transition agreement, the application account must retain shared access to the same prefix list, receive subsequent prefix list updates, and remain able to create new security group rules that reference it. The existing share was created without retention enabled. All sharing changes and any required consumer acceptance must be completed before the account leaves, with no interruption in shared access. The prefix list supports sharing with external accounts, and applicable policies permit the arrangement.

Which solution meets these requirements?

Show answerCORRECT ANSWER

Create a new resource share for the same prefix list with the application account ID as the principal. Set RetainSharingOnAccountLeaveOrganization to True and allowExternalPrincipals to True. Have the application account accept the invitation, verify access through the new share, and then remove the old share.

A new account-to-account share configured with retention preserves the consumer's shared access after it leaves the organization. Retention requires allowExternalPrincipals to be True and triggers an invitation even for an account currently inside the organization. Accepting the new share before removing the old share maintains access to the same prefix list throughout the transition.

Practice Amazon VPC in a full exam

Questions on Amazon VPC in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is Amazon VPC

3 min read

Amazon Virtual Private Cloud (Amazon VPC) stands as a cornerstone service within the Amazon Web Services (AWS) offering, empowering users to provision a logically isolated section of the Amazon Web Cloud. This functionality is invaluable for businesses and developers aiming to launch and manage their applications in a secured, scalable, and highly customizable virtual networking environment. 

Amazon VPC lets customers dive into cloud computing while retaining a granular level of control over their virtual networking environment. This includes the selection of IP address ranges, creation of subnets, and configuration of route tables and network gateways. The heart of Amazon VPC lies in its ability to offer enhanced security. By enabling users to define a virtual network in their own logically isolated area within the AWS ecosystem, it ensures that access to resources is tightly regulated. Security groups provide stateful traffic filtering at the instance level, while network access control lists provide stateless filtering at the subnet level. 

VPC Encryption Controls centrally monitor and enforce traffic encryption within and across VPCs in a Region. Monitor mode identifies non-compliant resources and adds encryption status to VPC flow logs; enforce mode prevents creation or attachment of resources that allow unencrypted traffic within the VPC boundary.

The default quota is five IPv4 CIDR blocks per VPC, counting the primary and all secondary blocks; it can be increased to 50.

VPC IP Address Manager (IPAM) helps plan, track, and monitor IP addresses. Its Free Tier supports IP address management in a single AWS Region and account, including BYOIP and Amazon-provided contiguous IPv6 addresses. Its Advanced Tier supports management across multiple Regions or accounts and adds capabilities such as private IPv4 management and IP history auditing.

Amazon-provided contiguous IPv4 blocks provide sequential public IPv4 addresses to simplify networking and security allowlisting.

Furthermore, the option to connect a VPC to one's own corporate data center via an industry-standard encrypted IPsec VPN connection enhances the allure for enterprises looking to adopt a hybrid cloud approach. Besides security, the Amazon VPC architecture is meticulously designed for high availability and scalability. With the provision to create multiple subnets within a VPC across different Availability Zones, it ensures that applications remain resilient in the face of data center failures, thereby promoting high availability and fault tolerance. 

Each subnet must reside in a single Availability Zone.

NAT Gateways also support a regional availability mode: a single gateway automatically expands and contracts across Availability Zones in the VPC based on workload presence.

Scalability, another key facet, is addressed through the ability to start with a modestly sized network and expand as needed. This flexibility makes it an attractive proposition for startups and large enterprises alike. Networking features within Amazon VPC also include the ability to create a public-facing subnet for internet-facing resources like web servers, while maintaining backend systems such as databases or application servers in a private-facing subnet with no internet access. This separation further enhances the security and efficiency of operations within the cloud. Amazon VPCs integration with other Amazon Web Services is seamless, facilitating a comprehensive and robust ecosystem for deploying applications. 

Services such as Amazon EC2 instances can be securely tucked within a VPC, bolstering the networking functionality with the computational prowess of AWS. The ease of connecting VPCs across different regions to share resources securely, known as VPC peering, extends the capabilities of global enterprises by allowing them to operate in a globally distributed fashion. 

In essence, Amazon VPC is not just a feature of AWS; it represents a foundational component that encapsulates the essence of cloud computing - security, scalability, and flexibility. It provides businesses the tools and confidence to build sophisticated applications in the cloud, ensuring that their network architecture can support the demanding needs of today’s IT environments.

Learn Amazon VPC in lessons

34 short lessons on Amazon VPC in 11 certification courses.

and 28 more lessons

Open the lessons

Concepts related to Amazon VPC

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.