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

Albert Qian
Albert Qian
— November 13, 2019

Advantages and Disadvantages of Microservices Architecture

What are microservices? Let's start our discussion by setting a foundation of what microservices are. Microservices are a way of breaking large software projects into loosely coupled modules, which communicate with each other through simple Application Programming Interfaces (APIs). ...

Read more
  • AWS
  • Docker
  • Kubernetes
  • Microservices
Nisar Ahmad
Nisar Ahmad
— November 12, 2019

Kubernetes Services: AWS vs. Azure vs. Google Cloud

Kubernetes is a popular open-source container orchestration platform that allows us to deploy and manage multi-container applications at scale. Businesses are rapidly adopting this revolutionary technology to modernize their applications. Cloud service providers — such as Amazon Web Ser...

Read more
  • AWS
  • Azure
  • Google Cloud
  • Kubernetes
Avatar
Stuart Scott
— October 31, 2019

AWS Internet of Things (IoT): The 3 Services You Need to Know

The Internet of Things (IoT) embeds technology into any physical thing to enable never-before-seen levels of connectivity. IoT is revolutionizing industries and creating many new market opportunities. Cloud services play an important role in enabling deployment of IoT solutions that min...

Read more
  • AWS
  • AWS IoT Events
  • AWS IoT SiteWise
  • AWS IoT Things Graph
  • IoT
Avatar
Cloud Academy Team
— October 23, 2019

Which Certifications Should I Get?

As we mentioned in an earlier post, the old AWS slogan, “Cloud is the new normal” is indeed a reality today. Really, cloud has been the new normal for a while now and getting credentials has become an increasingly effective way to quickly showcase your abilities to recruiters and compan...

Read more
  • AWS
  • Azure
  • Certifications
  • Cloud Computing
  • Google Cloud Platform
Valery Calderón Briz
Valery Calderón Briz
— October 22, 2019

How to Go Serverless Like a Pro

So, no servers? Yeah, I checked and there are definitely no servers. Well...the cloud service providers do need servers to host and run the code, but we don’t have to worry about it. Which operating system to use, how and when to run the instances, the scalability, and all the arch...

Read more
  • AWS
  • Lambda
  • Serverless
Avatar
Stuart Scott
— October 16, 2019

AWS Security: Bastion Hosts, NAT instances and VPC Peering

Effective security requires close control over your data and resources. Bastion hosts, NAT instances, and VPC peering can help you secure your AWS infrastructure. Welcome to part four of my AWS Security overview. In part three, we looked at network security at the subnet level. This ti...

Read more
  • AWS
Avatar
Sudhi Seshachala
— October 9, 2019

Top 13 Amazon Virtual Private Cloud (VPC) Best Practices

Amazon Virtual Private Cloud (VPC) brings a host of advantages to the table, including static private IP addresses, Elastic Network Interfaces, secure bastion host setup, DHCP options, Advanced Network Access Control, predictable internal IP ranges, VPN connectivity, movement of interna...

Read more
  • AWS
  • best practices
  • VPC
Avatar
Stuart Scott
— October 2, 2019

Big Changes to the AWS Certification Exams

With AWS re:Invent 2019 just around the corner, we can expect some early announcements to trickle through with upcoming features and services. However, AWS has just announced some big changes to their certification exams. So what’s changing and what’s new? There is a brand NEW ...

Read more
  • AWS
  • Certifications
Alisha Reyes
Alisha Reyes
— October 1, 2019

New on Cloud Academy: ITIL® 4, Microsoft 365 Tenant, Jenkins, TOGAF® 9.1, and more

At Cloud Academy, we're always striving to make improvements to our training platform. Based on your feedback, we released some new features to help make it easier for you to continue studying. These new features allow you to: Remove content from “Continue Studying” section Disc...

Read more
  • AWS
  • Azure
  • Google Cloud Platform
  • ITIL® 4
  • Jenkins
  • Microsoft 365 Tenant
  • New content
  • Product Feature
  • Python programming
  • TOGAF® 9.1
Avatar
Stuart Scott
— September 27, 2019

AWS Security Groups: Instance Level Security

Instance security requires that you fully understand AWS security groups, along with patching responsibility, key pairs, and various tenancy options. As a precursor to this post, you should have a thorough understanding of the AWS Shared Responsibility Model before moving onto discussi...

Read more
  • AWS
  • instance security
  • Security
  • security groups
Avatar
Jeremy Cook
— September 17, 2019

Cloud Migration Risks & Benefits

If you’re like most businesses, you already have at least one workload running in the cloud. However, that doesn’t mean that cloud migration is right for everyone. While cloud environments are generally scalable, reliable, and highly available, those won’t be the only considerations dri...

Read more
  • AWS
  • Azure
  • Cloud Migration
Joe Nemer
Joe Nemer
— September 12, 2019

Real-Time Application Monitoring with Amazon Kinesis

Amazon Kinesis is a real-time data streaming service that makes it easy to collect, process, and analyze data so you can get quick insights and react as fast as possible to new information.  With Amazon Kinesis you can ingest real-time data such as application logs, website clickstre...

Read more
  • amazon kinesis
  • AWS
  • Stream Analytics
  • Streaming data