Extend Your IT Infrastructure With Amazon VPC
Extend Your IT Infrastructure With Amazon VPC
December 2013
Page 1 of 17
Extend Your IT Infrastructure with Amazon Virtual Private Cloud December 2013
Table of Contents
Introduction ............................................................................................................................................................................ 3
Understanding Amazon Virtual Private Cloud ........................................................................................................................ 4
Different Levels of Network Isolation ................................................................................................................................. 4
Example Scenarios .................................................................................................................................................................. 8
Host a PCI-Compliant E-Commerce Website ...................................................................................................................... 8
Build a Development and Test Environment ...................................................................................................................... 9
Plan for Disaster Recovery and Business Continuity......................................................................................................... 10
Extend Your Data Center into the Cloud ........................................................................................................................... 10
Create Branch Office and Business Unit Networks ........................................................................................................... 12
Best Practices for Using Amazon VPC ................................................................................................................................... 14
Automate the Deployment of Your Infrastructure ........................................................................................................... 14
Use Multi-AZ Deployments in VPC for High Availability ................................................................................................... 14
Use Security Groups and Network ACLs ........................................................................................................................... 15
Control Access with IAM Users and Policies ..................................................................................................................... 15
Use Amazon CloudWatch to Monitor the Health of Your VPC Instances and VPN Link ................................................... 15
Conclusion ............................................................................................................................................................................. 16
References and Further Reading........................................................................................................................................... 17
Version History ...................................................................................................................................................................... 17
Page 2 of 17
Extend Your IT Infrastructure with Amazon Virtual Private Cloud December 2013
Introduction
With Amazon Virtual Private Cloud (Amazon VPC), you can provision a private, isolated section of the Amazon Web
Services (AWS) cloud where you can launch AWS resources in a virtual network that you define. With Amazon VPC, you
can define a virtual network topology that closely resembles a traditional network that you might operate in your own
data center. You have complete control over your virtual networking environment, including selection of your own IP
address range, creation of subnets, and configuration of route tables and network gateways. For example, with VPC you
can:
This paper highlights common use cases and best practices for Amazon VPC and related services.
Page 3 of 17
Extend Your IT Infrastructure with Amazon Virtual Private Cloud December 2013
In Amazon VPC, each Amazon Elastic Compute Cloud (Amazon EC2) instance has a default network interface that is
assigned a primary private IP address on your Amazon VPC network. You can create and attach additional elastic
network interfaces (ENI) to any Amazon EC2 instance in your VPC. Each ENI has its own MAC address. It can have
multiple private IP addresses, and it can be assigned to a specific security group. The total number of supported ENIs and
private IP addresses per instance depends on the instance type. The ENIs can be created in different subnets within the
same Availability Zone and attached to a single instance to build, for example, a low-cost management network or
network and security appliances. The secondary ENIs and private IP addresses can be moved within the same subnet to
other instances for low-cost, high-availability solutions. To each private IP address, you can associate a public elastic IP
address (EIP) to make the instance reachable from the Internet. You can also configure your Amazon EC2 instance to be
assigned a public IP address at launch. Public IP addresses are assigned to your instances from Amazon's pool of public IP
addresses; they are not associated with your account. With support for multiple IPs and EIPs, you can, among other
things, use multiple SSL certificates on a single server and associate each certificate with a specific IP address.
There are some default limits on the number of components you can deploy in your VPC, as documented in Amazon VPC
Limits. To request an increase in any of these limits, fill out the Amazon VPC Limits form.
Page 4 of 17
Extend Your IT Infrastructure with Amazon Virtual Private Cloud December 2013
Internet
VPC Subnet
10.0.0.0/24
AWS Region
For private subnets, traffic to the Internet can be routed through a special network address translation (NAT) instance
with a public EIP, which resides in a public subnet. This configuration allows your resources in the private subnet to
connect outbound traffic to the Internet without allocating EIPs or accepting direct inbound connections. AWS provides
a preconfigured NAT server image or you can use a custom AMI that supports NAT. Figure 2 shows an example of a VPC
with both public and private subnets.
VPC Router
Internet Gateway
AWS Region
By attaching a virtual private gateway to your VPC, you can create a VPN connection between your VPC and your own
data center, as shown in Figure 3. The VPN connection uses industry-standard IPsec tunnels (IKEv1-PSK, AES-128, HMAC-
SHA-1, PFS) to mutually authenticate each gateway and to protect against eavesdropping or tampering while your data
Page 5 of 17
Extend Your IT Infrastructure with Amazon Virtual Private Cloud December 2013
is in transit. For redundancy, each VPN connection has two tunnels, with each tunnel using a unique virtual private
gateway public IP address.
AWS Region
Figure 3: Example of a VPC isolated from the Internet and connected through VPN to a corporate data center
You have two routing options for setting up a VPN connection: Border Gateway Protocol (BGP) or static routing. For
BGP, you need the IP address and the BGP autonomous system number (ASN) of the customer gateway before attaching
it to a VPC. Once you have provided this information, you can download a configuration template for a number of
different VPN devices and configure both VPN tunnels. For devices that do not support BGP, you may set up one or more
static routes back to your on-premises network by providing the corresponding CIDR ranges when you configure your
VPN connection. You then configure static routes on your VPN customer gateway and on other internal network devices
to route traffic to your VPC via the IPsec tunnel.
If you choose to have only a virtual private gateway with a connection to your on-premises network, you can route your
Internet-bound traffic over the VPN and control all egress traffic with your existing security policies and network
controls.
You can also use AWS Direct Connect to establish a private logical connection from your on-premises network directly to
your Amazon VPC. AWS Direct Connect provides a private, high-bandwidth network connection between your network
and your VPC. You can use multiple logical connections to establish private connectivity to multiple VPCs while
maintaining network isolation.
With AWS Direct Connect, you can establish 1 Gbps or 10 Gbps dedicated network connections between AWS and any of
the AWS Direct Connect locations. A dedicated connection can be partitioned into multiple logical connections by using
industry standard 802.1Q VLANs. In this way, you can use the same connection to access public resources, such as
objects stored in Amazon Simple Storage Service (Amazon S3) that use public IP address space, and private resources,
such as Amazon EC2 instances that are running within a VPC using private IP space—all while maintaining network
separation between the public and private environments. You can choose a partner from the AWS Partner Network
(APN) to integrate the AWS Direct Connect endpoint in an AWS Direct Connect location with your remote networks.
Figure 4 shows a typical AWS Direct Connect setup.
Page 6 of 17
Extend Your IT Infrastructure with Amazon Virtual Private Cloud December 2013
Client Client
EC2 Instances
VPC Subnet 1
Customer
Availability Zone A
WAN
802.1q
VLAN Virtual
AWS Direct
Connect Private Gateway
AWS Region
Figure 4: Example of using VPC and AWS Direct Connect with a customer remote network
Finally, you may combine all these different options in any combination that make the most sense for your business and
security policies. For example, you could attach a VPC to your existing data center with a virtual private gateway and set
up an additional public subnet to connect to other AWS services that do not run within the VPC, such as Amazon S3,
Amazon Simple Queue Service (Amazon SQS) or Amazon Simple Notification Service (Amazon SNS). In this situation, you
could also leverage IAM Roles for Amazon EC2 for accessing these services and configure IAM policies to only allow
access from the elastic IP address of the NAT server.
Page 7 of 17
Extend Your IT Infrastructure with Amazon Virtual Private Cloud December 2013
Example Scenarios
Because of the inherent flexibility of Amazon VPC, you can design a virtual network topology that meets your business
and IT security requirements for a variety of different use cases. To understand the true potential of Amazon VPC, let’s
take a few of the most common use cases:
Because AWS is accredited as a Level 1 service provider under PCI DSS, you can run your application on PCI-compliant
technology infrastructure for storing, processing, and transmitting credit card information in the cloud. As a merchant,
you still have to manage your own PCI certification, but by using an accredited infrastructure service provider, you don’t
need to put additional effort into PCI compliance at the infrastructure level. For more information about PCI compliance,
go to the AWS Compliance Center.
For example, you can create a VPC to host the customer database and manage the checkout process of your
e-commerce website. To offer high availability, you set up private subnets in each Availability Zone within the same
region and then deploy your customer and order management databases in each Availability Zone. Your checkout
servers will be in an Auto Scaling group over several private subnets in different Availability Zones. Those servers will be
behind an elastic load balancer that spans public subnets across all used Availability Zones. By combining VPC, subnets,
network ACLs, and security groups, you have fine-grained control over access to your AWS infrastructure. You’ll be
prepared for the main challenges—scalability, security, elasticity, and availability—for the most sensitive part of
e-commerce websites. Figure 5 shows an example of a checkout architecture.
Page 8 of 17
Extend Your IT Infrastructure with Amazon Virtual Private Cloud December 2013
Availability Zone B
Users Clients
Internet Gateway
Availability Zone A
To build such a test environment in-house, you would have to provision a lot of hardware that would go unused most of
the time. Sometimes this unused hardware is subsequently repurposed, leaving you without your test environment
when you need it. Amazon VPC can help you build an economical and functional test environment that simulates your
live production environment that can be launched when you need it, and shut down when you’re finished testing. You
don’t have to buy expensive hardware; you are more flexible and agile when your environment changes; your test
environment can transparently interact within your on-premises network by using LDAP, messaging, and monitoring;
and you pay AWS only for what you actually use. This process can even be fully automated and integrated into your
software development process. Figure 6 shows an example of a development and test environment.
Page 9 of 17
Extend Your IT Infrastructure with Amazon Virtual Private Cloud December 2013
Elastic IP
Source code
repository
Developers Customer
Gateway Storage Volumes
Development team A
VPN Connection
VPC Router
VPN Connection
Elastic IP
The same logic applies to experimental applications. When you are evaluating a new software package that you want to
keep isolated from your production environment, you can install it on a few Amazon EC2 instances inside your test
environment within a VPC and then give access to a selected set of internal users. If all goes well, you can transition
these images into production and terminate unneeded resources.
Start by identifying the IT assets that are most critical to your business. As in the test environment described earlier in
this paper, you can automate the replication of your production environment to duplicate the functionality of your
critical assets. Using automated processes, you can back up your production data to Amazon Elastic Block Store (Amazon
EBS) volumes or Amazon S3 buckets. You can write declarative AWS CloudFormation templates to describe your VPC
infrastructure stack, which you can launch automatically in any AWS region or Availability Zone.
In the event of a disaster, you can quickly launch a replication of your environment in the VPC and then direct your
business traffic to those servers. If a disaster involves only the loss of data from your in-house servers, you can recover it
from the Amazon EBS data volumes that you’ve been using as backup storage.
For more information, read Using Amazon Web Services for Disaster Recovery, which is available at the AWS
Architecture Center.
Page 10 of 17
Extend Your IT Infrastructure with Amazon Virtual Private Cloud December 2013
even routine operations will eventually reach the capacity limits of your data center, and you’ll have to decide how to
extend that capacity. Building a new data center is one way, but it is expensive and slow, and the risk of
underprovisioning or overprovisioning is high. In both of these cases, Amazon VPC can help you by serving as an
extension of your own data center.
Amazon VPC allows you to specify your own IP address range so you can extend your network into AWS in much the
same way you would extend an existing network into a new physical data center or branch office. VPN and AWS Direct
Connect connectivity options allow these networks to be seamlessly and securely integrated to create a single corporate
network capable of supporting your users and applications regardless of where they are physically located. And, just like
a physical extension of a data center, IT resources hosted in VPC will be able to leverage existing centralized IT systems,
like user authentication, monitoring, logging, change management, or deployment services, without the need to change
how users or systems administrators access or manage your applications.
External connectivity from this extended, virtual data center is also completely up to you. You may choose to direct all
VPC traffic to traverse your existing network infrastructure to control which existing internal and external networks your
Amazon EC2 instances can access. This approach, for example, allows you to leverage all of your existing Internet-based
network controls for your entire network. Figure 7 shows an example of a data center that has been extended into AWS.
Internet
VPN Connection
VPN-Only Subnet
10.100.1.0/24
User Networks Data Center
10.50.0.0/16 10.10.0.0/16
Virtual Private Cloud
10.100.0.0/16
Figure 7: Example of a data center extended into AWS that leverages a customer’s existing connection to the Internet
Additionally, you could also choose to leverage AWS Internet pipes when appropriate for a subset of Internet-facing
traffic that you want to serve directly from your VPC to your customers, while leveraging a VPN connection to backend
resources to provide a seamless end-user experience, as shown in Figure 8.
Page 11 of 17
Extend Your IT Infrastructure with Amazon Virtual Private Cloud December 2013
Internet
Public EC2 instance
VPC Conceptual 10.100.0.5 198.51.100.3 (EIP)
Internet Gateway
Router Public VPC Subnet
10.100.0.0/24
Figure 8: Example of a data center extended into AWS that leverages multiple connections to the Internet
Customer
Berlin Office
Gateway
Customer
London Office
Gateway AWS resources
AWS resources
Customer
New York Office NY VPN-only Subnet
Gateway
AWS resources
Figure 9: Example of using VPC and VPN for branch office scenarios
Page 12 of 17
Extend Your IT Infrastructure with Amazon Virtual Private Cloud December 2013
The main advantages of using Amazon VPC over provisioning dedicated on-premises hardware in a branch office are
similar to those described elsewhere: you can elastically scale resources up, down, in, and out to meet demand,
ensuring that you don’t underprovision or overprovision. Adding capacity is easy: launch additional Amazon EC2
instances from your custom Amazon Machine Images (AMIs). When the time comes to decrease capacity, simply
terminate the unneeded instances manually or automatically using Auto Scaling policies. While the operational tasks
may be the same to keep assets running properly, you won’t need dedicated remote staff, and you’ll save money with
the AWS pay-as-you-use pricing model.
Page 13 of 17
Extend Your IT Infrastructure with Amazon Virtual Private Cloud December 2013
By automating the deployment with AWS CloudFormation, you can describe your infrastructure in a declarative way by
writing a template. You can use the template to deploy predefined stacks within a very short time in any AWS region.
The template can fully automate creation of subnets, routing information, security groups, provisioning of AWS
resources—whatever you need. By using AWS CloudFormation helper scripts, you can use standard Amazon Machine
Images (AMIs) that will, upon startup of Amazon EC2 instances, install all the software at the right version required for
your deployment.
Automated infrastructure deployment should be fully integrated into your processes. You should treat your automation
scripts like software that needs to be tested and maintained according to your standards and policies. Most VPC use
cases will benefit from a good automation strategy. Thoroughly tested automated processes are often faster, cheaper,
more reliable, and more secure than processes that rely on many manual steps.
Although a VPC can span multiple Availability Zones, each subnet within the VPC is restricted to a single Availability
Zone. In order to deploy a multi-AZ Amazon RDS DB Instance, for example, you first have to configure VPC subnets in
each Availability Zone within the region where the database instances will be launched. Likewise, Auto Scaling groups
and elastic load balancers can span multiple Availability Zones by being deployed across VPC subnets that have been
created for each zone.
Page 14 of 17
Extend Your IT Infrastructure with Amazon Virtual Private Cloud December 2013
A network ACL is an additional layer of security that acts as a firewall to control traffic into and out of a subnet. You can
define access control rules for each of your subnets. Although a VPC security group operates at the instance level, a
network ACL operates at the subnet level. For a network ACL, you can specify both allow and deny rules for both ingress
and egress. Network ACLs are stateless firewalls.
As a best practice, you should secure your infrastructure with multiple layers of defense. By running your infrastructure
in a VPC, you can control which instances are exposed to the Internet in the first place, and you can define both security
groups and network ACLs to further protect your infrastructure at the infrastructure and subnet levels. Additionally, you
should secure your instances with a firewall at the operating system level and follow other security best practices as
outlined in AWS Security Resources.
We recommend that you use IAM to implement a least privilege security strategy. For example, you should not use your
main AWS account to manage all aspects of your AWS infrastructure. Instead, we recommend that you define user
groups for the different tasks that have to be performed on AWS and restrict each user to exactly the functionality he or
she requires to perform that role. For example, you can create a network admin group of users in IAM and then give only
that group the rights to create and modify the VPC. For each user group, define restrictive policies that grant each user
access only to those services he or she needs. Make sure that only authorized people in your organization have access to
these users, and change the credentials at regular intervals to reduce the risk of compromising your infrastructure.
For more information on how to define IAM users and policies, see Controlling Access to Amazon VPC Resources.
Use Amazon CloudWatch to Monitor the Health of Your VPC Instances and VPN Link
Just as you do with public Amazon EC2 instances, you can use Amazon CloudWatch to monitor the performance of the
instances running inside your VPC. Amazon CloudWatch provides visibility into resource utilization, operational
performance, and overall demand patterns, including CPU utilization, disk reads and writes, and network traffic. The
information is displayed on the AWS Management Console and is also available through the Amazon CloudWatch API so
you can integrate into your existing management tools.
You can also view the status of your VPN connections by using either the AWS Management Console or making an API
call. The status of each VPN tunnel will include the state (up/down) of each VPN tunnel, as well as, applicable error
messages if a VPN tunnel is down.
Page 15 of 17
Extend Your IT Infrastructure with Amazon Virtual Private Cloud December 2013
Conclusion
Amazon VPC offers a wide range of tools that give you more control over your AWS infrastructure. Within a VPC, you can
define your own network topology by defining subnets and routing tables, and you can restrict access at the subnet level
with network ACLs and at the resource level with VPC security groups. You can isolate your resources from the Internet
and connect them to your own data center through a VPN. You can assign elastic IP addresses to some instances and
connect them to the public Internet through an Internet gateway, while keeping the rest of your infrastructure in private
subnets. VPC makes it easier to protect your AWS resources while you keep the benefits of AWS with regards to
flexibility, scalability, elasticity, performance, availability, and the pay-as-you-use pricing model.
Page 16 of 17
Extend Your IT Infrastructure with Amazon Virtual Private Cloud December 2013
Version History
December 2013
Initial release
Page 17 of 17