Skip to main content

Working with AWS Networking & Amazon VPC

Being able to architect your own isolated segment of AWS is a simple process using VPCs; understanding how to architect its related networking components and connectivity architecture is key to making it a powerful service.

Many services within Amazon Web Services (AWS) require you to create and configure a VPC to provision and distribute your resources. Using the AWS global infrastructure, you can architect high availability and resilience into your deployment using availability zones and regions. For more information on the AWS global infrastructure, read my blog about availability zones, regions, edge locations, and regional edge caches.

When designing your VPC to isolate your resources, you need to ask yourself a number of questions to help with the architectural decisions that are related to VPC design.  These might include:

  • What IP Classless Inter-Domain Routing (CIDR) block should I use?
  • How many VPCs do I need?
  • Can I segment my traffic, and how?
  • Do I need to use multiple availability zones?
  • How do I manage the routing of traffic between network segments?
  • How do I connect my VPC to the internet?
  • How can I enforce security within my VPC both at the instance and network layer?
  • How can I connect to my VPC from my on-premises data center?
  • How can I connect to my VPC from another VPC?

All of these questions are important factors when creating your VPC. To help answer them, you need to be aware of some AWS services and components that relate to VPC management, control, and operation. 

Internet Gateway

An internet gateway (IGW) is an AWS-managed component that is attached to your VPC.  This provides a connection between your isolated VPC and the outside world, essentially the internet. When an IGW is attached to your VPC, subnets can set a route to the IGW for traffic residing outside of the VPC. Subnets with this configured route are defined as public subnets.

Subnet

A VPC subnet allows you to segment your VPC CIDR block into smaller network segments across multiple availability zones with your VPC region.  This then helps you to isolate, organize, and manage your resources in addition to helping you implement resilience and high availability.

Route Tables

Within your VPC, you can create multiple route tables. These enable you to configure where and how to route your network traffic based on its destination via different targets, such as internet gateways, network address translation (NAT) gateways, or customer gateways.

Network Access Control Lists (NACLs)

NACLs act as a logical firewall that provide network level security, operating at the subnet layer.  They provide a stateless rulebase, allowing you to stipulate both the ingress and egress traffic based on protocols that allow or deny access in or out of the subnet.  

Security Groups

Much like NACLs, security groups are also like a firewall; however, these operate at the instance layer, providing a level of protection to instances residing within your subnets based on defined protocols. Security groups are stateful by design and rules within the rulebase are considered “allowed” — security groups do not offer a “deny” function like NACLs do.

NAT Gateways

NAT gateways are managed services that allow instances located within a private subnet to access the internet, enabling them to download and perform patch updates and maintenance. NAT gateways prevent inbound connections that are initiated from the internet, helping to protect private resources.

Bastion Hosts

A bastion host is a secure, hardened instance that resides within the public subnet of your VPC.  It has very restrictive security controls, allowing restricted inbound connections from known and trusted IP addresses — usually using SSH or RDP protocols. These security controls allow engineers to perform a remote and secure connection to the Bastion Host where the instance acts as a “jump server” allowing the engineers to SSH or RDP to instances residing within private subnets.

VPN Connection

A virtual private network (VPN) connection allows two remote networks to securely connect to each other across the internet. You could use a VPN connection to allow your remote office or data center to connect to your VPC allowing traffic to move between both networks.

Direct Connect

A direct connect (DC) connection also allows you to connect your VPC to your remote office/data center. This connection is established across a secure, dedicated infrastructure rather than the internet. A connection is established to a direct connection location usually managed by an AWS partner using dedicated infrastructure. From here, the connection is made to the AWS network, allowing a secure and private connection to your VPC.

VPC Peering

VPC peering allows you to connect two VPCs together using the internal AWS infrastructure as if they were on the same network. There are some key points to bear in mind. Mainly, the two VPCs are not allowed to have overlapping CIDR blocks. VPC peering provides a one-to-one connection only and does not allow transitive peering to a third VPC.  

For example, if you had three VPCs connected (VPC1 connected to VPC2 and VPC2 connected to VPC3), then VPC1 will not be able to talk to VPC3. You would have to either set up another peering connection from VPC1 to VPC3 or implement the AWS Transit Gateway.

AWS Transit Gateway

AWS transit gateway (TGW) allow you to perform a one-to-many relationship with your VPCs in addition to your remote networks as well. The TGW acts as a central hub within your network, allowing all VPCs, remote offices, and data center to connect to it. This configuration simplifies multiple peering connections and reduces overall connectivity from remote locations to your VPCs.

If you are new to AWS, then it’s important that you understand each of these components and the part they play within your architectural design of your VPC. To learn more about each of these components, you can take a look at our new course which will provide a deeper explanation of each via graphical explanations and designs allowing you to easily follow the concepts and principles of each.

Learn More

If you’re interested to learn how to architect a VPC across multiple availability zones within a Region, how to secure your VPCs, and assess which method of connectivity to your VPCs is more appropriate for your organization, enroll on the Working with AWS Networking and Amazon VPC Course. I’ve built this whole course through the experience of a drawing pad.

To have a taste of what the course experience is like, watch this video on NAT Gateways.

Avatar

Written by

Stuart Scott

Stuart is the AWS content lead at Cloud Academy where he has created over 40 courses reaching tens of thousands of students. His content focuses heavily on cloud security and compliance, specifically on how to implement and configure AWS services to protect, monitor and secure customer data and their AWS environment.

Related Posts

Avatar
Stuart Scott
— July 18, 2019

AWS Fundamentals: Understanding Compute, Storage, Database, Networking & Security

If you are just starting out on your journey toward mastering AWS cloud computing, then your first stop should be to understand the AWS fundamentals. This will enable you to get a solid foundation to then expand your knowledge across the entire AWS service catalog.   It can be both d...

Read more
  • AWS
  • Compute
  • Database
  • fundamentals
  • networking
  • Security
  • Storage
Avatar
Adam Hawkins
— July 17, 2019

How to Become a DevOps Engineer

The DevOps Handbook introduces DevOps as a framework for improving the process for converting a business hypothesis into a technology-enabled service that delivers value to the customer. This process is called the value stream. Accelerate finds that applying DevOps principles of flow, f...

Read more
  • AWS
  • AWS Certifications
  • DevOps
  • DevOps Foundation Certification
  • Engineer
  • Kubernetes
Avatar
Stuart Scott
— July 2, 2019

AWS Machine Learning Services

The speed at which machine learning (ML) is evolving within the cloud industry is exponentially growing, and public cloud providers such as AWS are releasing more and more services and feature updates to run in parallel with the trend and demand of this technology within organizations t...

Read more
  • Amazon Machine Learning
  • AWS
  • AWS re:Invent
  • Machine Learning
Avatar
Stuart Scott
— June 27, 2019

AWS Control Tower & VPC Traffic Mirroring

AWS re:Inforce 2019 is a two-day conference for security, identity, and compliance learning and community building. This year's keynote, presented by AWS Vice President and CIO, Stephen Schmidt, announced the general availability of AWS Control Tower and the new VPC Traffic Mirroring fe...

Read more
  • AWS
  • re:Inforce 2019
  • traffic mirroring
  • VPC
Avatar
Stuart Scott
— June 19, 2019

AWS Compute Fundamentals Update

AWS is renowned for the rate at which it reinvents, revolutionizes, and meets customer demands and expectations through its continuous cycle of feature and service updates. With hundreds of updates a month, it can be difficult to stay on top of all the changes made available.   Here ...

Read more
  • AWS
Jeff Hyatt
Jeff Hyatt
— June 18, 2019

10 Steps for an Effective Reserved Instances Strategy

Amazon Web Services (AWS) offers three different ways to pay for EC2 Instances: On-Demand, Reserved Instances, and Spot Instances. This article will focus on effective strategies for purchasing Reserved Instances. While most of the major cloud platforms offer pre-pay and reservation dis...

Read more
  • AWS
  • EC2
Joe Nemer
Joe Nemer
— June 18, 2019

AWS Certification Practice Exam: What to Expect from Test Questions

If you’re building applications on the AWS cloud or looking to get started in cloud computing, certification is a way to build deep knowledge in key services unique to the AWS platform. AWS currently offers 11 certifications that cover major cloud roles including Solutions Architect, De...

Read more
  • AWS
  • AWS Certifications
Avatar
John Chell
— June 13, 2019

AWS Certified Solutions Architect Associate: A Study Guide

The AWS Solutions Architect - Associate Certification (or Sol Arch Associate for short) offers some clear benefits: Increases marketability to employers Provides solid credentials in a growing industry (with projected growth of as much as 70 percent in five years) Market anal...

Read more
  • AWS
  • AWS Certifications
Chris Gambino and Joe Niemiec
Chris Gambino and Joe Niemiec
— June 11, 2019

Moving Data to S3 with Apache NiFi

Moving data to the cloud is one of the cornerstones of any cloud migration. Apache NiFi is an open source tool that enables you to easily move and process data using a graphical user interface (GUI).  In this blog post, we will examine a simple way to move data to the cloud using NiFi c...

Read more
  • AWS
  • S3
Avatar
Chandan Patra
— June 11, 2019

Amazon DynamoDB: 10 Things You Should Know

Amazon DynamoDB is a managed NoSQL service with strong consistency and predictable performance that shields users from the complexities of manual setup. Whether or not you've actually used a NoSQL data store yourself, it's probably a good idea to make sure you fully understand the key ...

Read more
  • AWS
  • DynamoDB
Avatar
Andrew Larkin
— June 6, 2019

The 11 AWS Certifications: Which is Right for You and Your Team?

As companies increasingly shift workloads to the public cloud, cloud computing has moved from a nice-to-have to a core competency in the enterprise. This shift requires a new set of skills to design, deploy, and manage applications in cloud computing. As the market leader and most ma...

Read more
  • AWS
  • AWS Certifications
Sam Ghardashem
Sam Ghardashem
— May 15, 2019

Aviatrix Integration of a NextGen Firewall in AWS Transit Gateway

Learn how Aviatrix’s intelligent orchestration and control eliminates unwanted tradeoffs encountered when deploying Palo Alto Networks VM-Series Firewalls with AWS Transit Gateway. Deploying any next generation firewall in a public cloud environment is challenging, not because of the f...

Read more
  • AWS