A Practical Tour of AWS Networking: VPCs, Subnets, Gateways, and More
A Practical Tour of AWS Networking: VPCs, Subnets, Gateways, and MoreIf youre new to AWS, networking is one of the first — and most confusing — topics youll run into. There are subnets, gateways, route tables, security groups, NACLs... and its not always obvious how they fit together. This article walks through the core building blocks of AWS networking, piece by piece, so you can build a clear mental model of how traffic actually flows in and out of your cloud environment.The Foundation: VPC (Virtual Private Cloud)Think of aVPCas your own private data center in the cloud. Its an isolated network environment where you control the IP address ranges, subnets, route tables, and gateways.A few key things to know about VPCs:Connections into a VPC can be secured using VPN protocols.Within a VPC, you createsubnets, which can be designated as public or private.Multiple VPCs can talk to each other throughVPC peering.Everything else in this article — subnets, gateways, NAT, security groups — existsinsideorarounda VPC.Subnets: Public vs. PrivateA VPC is carved up into subnets, and each subnet falls into one of two categories:Public Subnets (DMZ)— reachable from the internetPrivate Subnets— isolated from direct internet accessWhether a subnet is public or private isnt an inherent property — its determined by its route table (more on that below). A subnet is public specifically because its route table sends internet-bound traffic to an Internet Gateway.VPC Endpoints: Reaching AWS Services Without the InternetNormally, if a resource inside your VPC wants to talk to a service like S3 or Lambda, that traffic would need to leave your VPC.VPC Endpointslet you connect directly to AWS services without routing traffic over the public internet — keeping traffic inside the AWS network and reducing exposure.Security Groups: Instance-Level FirewallsSecurity Groupsare one of the most commonly used — and misunderstood — controls in AWS networking. A few important clarifications:Security groups arenotfor user or IAM management — thats a separate concern entirely.They work like a firewall attached to an EC2 instance.They only supportallowrules — anything not explicitly allowed is implicitly denied.Rules can be defined separately forinbound (ingress)andoutbound (egress)traffic.Security groups apply at theinstance level, not the subnet level.That last point matters: two instances in the same subnet can have completely different security group rules.Network ACLs (NACLs): Subnet-Level FirewallsWhile security groups protect instances,Network Access Control Lists (NACLs)protect subnets. Key differences from security groups:Applied at thesubnetlevel, not the instance level.Support bothallow and denyrules.Rules are evaluated in order —first match wins.Because NACLs operate at a different layer than security groups, theyre often used together: NACLs as a coarse-grained subnet perimeter, and security groups as fine-grained, per-instance rules.Route Tables: The Traffic DirectorARoute Tabledefines the rules AWS uses to decide where network traffic gets sent. Each route table is associated with a VPC and specific subnets within it.In a typical setup, youll see at least two entries:Alocal routethat routes traffic within the VPC.A route forinternet access, typically pointing to an Internet Gateway (for public subnets) or a NAT device (for private subnets).NAT: Letting Private Resources Reach the InternetPrivate subnets, by definition, arent directly reachable from the internet — but their instances often still need outbound access (thinkyum update, hitting an external database,wgetcalls, OS patching). Thats whereNetwork Address Translation (NAT)comes in.NAT interconnects private and public networks.AnElastic IPis attached to the NAT device on its public-facing side.Its strictlyone-way: instances in a private subnet can reach the internet through NAT, but the internet cannot initiate connections back into your private resources through it.NAT can be implemented as a self-managedNAT instanceor as a managedAWS NAT Gateway.NAT gateways operate within a single Availability Zone, so for high availability youll want oneper AZ.Heres how the traffic flow looks in practice:Internet Gateway: The Front DoorAnInternet Gateway (IGW)is the logical connection between a VPC and the public internet. A few things worth remembering:Its a logical construct, not a physical appliance.Without an IGW, nothing in your VPC is reachable from the internet (unless traffic arrives via a corporate network, VPN, or Direct Connect).An IGW enables traffic inbothdirections — but only if a route table entry points the subnet at it.This is exactly what makes a subnet public: a route table entry sending traffic to the IGW.To see how NAT and IGW relate to each other architecturally:VPN Connections: Bridging to On-PremisesWhen you need a secure connection between your AWS VPC and an on-premises network, AWS provides VPN gateways for exactly that:AWS supports gateways that connect a VPC to local, on-premises networks.These gateways are, effectively, VPN endpoints.TheVirtual Private Gateway (VPG)lives on the AWS side, in the cloud.TheCustomer Gateway (CGW)lives on the customers side, in their own network.Transit Gateway: Simplifying Complex Network TopologiesAs your AWS footprint grows — more VPCs, more accounts, more VPN connections — managing point-to-point connections between everything becomes unwieldy.Transit Gatewaysolves this by acting as a central hub:Centralizes regional network management.Connects to multiple VPCs at once.Can be peered across multiple AWS accounts.Supports multiple VPN connections simultaneously.Supports multiple AWS Direct Connect gateways simultaneously.Putting It All TogetherOnce you understand each piece individually, they combine into a coherent architecture: VPCs contain public and private subnets, route tables direct traffic to IGWs or NAT gateways depending on subnet type, security groups and NACLs layer defense at the instance and subnet level, and Transit Gateway or VPN connections extend the network beyond a single VPC.Heres what a typical AWS VPC network architecture looks like when all of these components come together:Wrapping UpAWS networking can feel overwhelming at first because so many components interact: VPCs, subnets, route tables, gateways, NAT, security groups, and NACLs. But once you see how each piece routes or filters traffic — and how they layer together — the whole picture becomes much clearer. Start with the VPC as your container, understand how route tables decide where traffic goes, and layer security controls (NACLs at the subnet level, security groups at the instance level) on top. From there, the rest — NAT, IGW, VPN, Transit Gateway — are just different ways of extending that network to the outside world.

相关新闻

学习C#开源报表组件Seal Report(6:Seal Report Designer界面布局-2)

学习C#开源报表组件Seal Report(6:Seal Report Designer界面布局-2)

Seal Report Designer界面中General节点用于设置报表的基本属性,包括下面截图所示的几个属性。Display name属性用于设置在报表页面中显示的报表名称,如果没有配置该值,则使用报表文件名称作为报表名称,如下图所示:Cur…

2026/7/21 9:00:03阅读更多 →
C# 将逗号分割的字符串转换为long,并添加到List<long>

C# 将逗号分割的字符串转换为long,并添加到List<long>

目录 方法1:使用Split和Convert.ToInt64 方法2:使用LINQ的Select和ToList 方法3:使用TryParse进行异常安全转换(推荐) 如果您喜欢此文章,请收藏、点赞、评论,谢谢,祝您快乐每一天…

2026/7/21 1:26:37阅读更多 →
努比亚NaviX Ultra亮相WAIC,智能体手机能否让用户生活更简单?

努比亚NaviX Ultra亮相WAIC,智能体手机能否让用户生活更简单?

努比亚NaviX Ultra:外观与功能双升级在2026 WAIC期间,首次亮相的努比亚NaviX Ultra吸引了众多目光。它是努比亚联合字节豆包打造的二代“豆包手机”,与一代努比亚M153相比,外观设计变化较大。其机身背部搭载横向排布的大尺寸影像模…

2026/7/21 4:08:38阅读更多 →
Spring Boot整合RabbitMQ:消息队列实战与性能优化

Spring Boot整合RabbitMQ:消息队列实战与性能优化

1. 项目概述:为什么选择Spring Boot整合RabbitMQ?消息队列作为分布式系统解耦的利器,已经成为现代Java开发的标配组件。而Spring Boot与RabbitMQ的组合,就像咖啡与奶泡的完美搭配——前者提供了便捷的开发脚手架,后者则…

2026/7/21 8:59:17阅读更多 →
时序紊乱、断星失准、合规难落地? 时统设备一站式解决全行业授时难题

时序紊乱、断星失准、合规难落地? 时统设备一站式解决全行业授时难题

一、行业普遍授时痛点及深层成因 当下工业自动化、通信、无线电监测、广电、计量测试等关键领域,均高度依赖统一高精度时间基准,但大量项目现场长期受时序故障困扰,核心痛点与根源分为五大类: 痛点 1:单一卫星参考源脆…

2026/7/21 8:59:17阅读更多 →
廖雪峰的GIT教程的笔记

廖雪峰的GIT教程的笔记

学习目标:新公司需要Git进行版本管理学习加记录;首先要安装Git这个百度这里就不讲;学习内容:一、建立仓库仓库就是保存你上传文件的地方,你可以简单理解成一个目录,这个目录里面的所有文件都可以被Git管理起…

2026/7/21 8:59:17阅读更多 →
HTML基础与实战:从标签到语义化开发

HTML基础与实战:从标签到语义化开发

1. HTML基础概念解析HTML(HyperText Markup Language)作为构建网页的基础语言,其核心功能在于定义文档的结构和内容。不同于CSS负责样式或JavaScript实现交互,HTML专注于内容的语义化组织。这种分工明确的架构使得Web开发能够保持…

2026/7/21 8:59:17阅读更多 →
Zepp Life自动刷步数终极指南:如何轻松实现健康数据管理

Zepp Life自动刷步数终极指南:如何轻松实现健康数据管理

Zepp Life自动刷步数终极指南:如何轻松实现健康数据管理 【免费下载链接】mimotion 小米运动刷步数(微信支付宝)支持邮箱登录 项目地址: https://gitcode.com/gh_mirrors/mimo/mimotion 你是否厌倦了每天手动记录步数的繁琐&#xff1…

2026/7/21 8:59:17阅读更多 →
DevC++ 64位OpenGL环境配置:MinGW-w64与FreeGLUT实战指南

DevC++ 64位OpenGL环境配置:MinGW-w64与FreeGLUT实战指南

1. 项目概述:为什么要在DevC上折腾64位OpenGL? 如果你是一个刚开始接触计算机图形学,或者想用C写点带窗口和3D效果小程序的初学者,OpenGL几乎是绕不开的名字。但很多朋友,包括当年的我,在第一步“搭环境”上…

2026/7/21 8:57:17阅读更多 →
Go语言静态资源打包方案对比与实践指南

Go语言静态资源打包方案对比与实践指南

1. 项目背景与核心需求在Go语言开发中,我们经常需要处理静态资源文件的打包问题。无论是Web应用的模板文件、前端资源,还是配置文件、证书等,都需要随程序一起分发。传统做法是将这些文件与编译后的二进制文件放在同一目录下,但这…

2026/7/21 0:51:49阅读更多 →
Go语言实现高性能LDAP认证服务的架构与实践

Go语言实现高性能LDAP认证服务的架构与实践

1. 项目背景与核心价值LDAP(轻量级目录访问协议)作为企业级身份认证的黄金标准,已经服务了超过80%的财富500强公司。我在金融科技领域实施统一认证体系时,发现传统Java方案存在启动慢、内存占用高等痛点。而Go语言凭借其协程并发模…

2026/7/21 0:51:49阅读更多 →
【AI面试官实战指南】:用ChatGPT模拟10类高频技术岗面试,3天提升应答精准度92%

【AI面试官实战指南】:用ChatGPT模拟10类高频技术岗面试,3天提升应答精准度92%

更多请点击: https://intelliparadigm.com 第一章:AI面试官实战指南的核心价值与适用场景 AI面试官并非替代人类HR的“黑箱工具”,而是以可解释、可审计、可迭代的方式,赋能招聘全链路的关键基础设施。其核心价值在于将主观经验沉…

2026/7/21 0:51:49阅读更多 →
Windows+macOS 通用 OpenClaw 部署流程,内置依赖一键启动智能桌面助手

Windows+macOS 通用 OpenClaw 部署流程,内置依赖一键启动智能桌面助手

📌教程适配:OpenClaw v2.7.9 | 兼容 Windows10/11、macOS 双系统 📖前言 当下各类本地 AI 工具层出不穷,多数产品仅能完成文字问答交互,很难直接操控电脑执行实际操作。OpenClaw,业内常称小龙虾 AI&#…

2026/7/21 0:01:46阅读更多 →
Codex 接入后 Bug 反增?复盘从个人演示到团队协作的“流程陷阱”

Codex 接入后 Bug 反增?复盘从个人演示到团队协作的“流程陷阱”

聊《一次Codex项目复盘,问题最后出在流程而不是模型》之前,先说一句实在的:别急着背概念,先看它在真实项目里到底解决什么问题。摘要先把这篇文章的目标说清楚:看完之后,你应该能判断这件事值不值得做&…

2026/7/21 0:01:46阅读更多 →
手把手搓一个五子棋游戏,零代码也能当“游戏开发者”

手把手搓一个五子棋游戏,零代码也能当“游戏开发者”

大家好,还是我。前几期带大家做了心情日记本和可视化大屏,后台有朋友留言:“能不能教点好玩的?我想做游戏,但一行代码都不会。”行,这期就安排。今天的目标:从零做一个五子棋游戏。 带AI对战、三…

2026/7/21 0:03:46阅读更多 →
YOLOv8推理性能优化:从1.2FPS到35FPS的全链路加速实践

YOLOv8推理性能优化:从1.2FPS到35FPS的全链路加速实践

如果你在部署 YOLOv8 时,发现推理速度只有可怜的 1-2 FPS,而别人的演示视频却能跑到 30 FPS 以上,那么问题很可能不在模型本身,而在于你的整个处理链路。很多开发者拿到一个训练好的 YOLOv8 模型后,会直接使用官方示例…

2026/7/20 22:51:39阅读更多 →
Coze与Dify对比指南:低代码AI应用开发从入门到实战

Coze与Dify对比指南:低代码AI应用开发从入门到实战

1. 从零到一:为什么你需要了解 Coze 和 Dify?如果你对 AI 应用开发感兴趣,但一看到“大模型”、“智能体”、“工作流”这些词就头疼,觉得门槛太高,那这篇文章就是为你准备的。很多开发者,包括我自己&#…

2026/7/20 18:51:18阅读更多 →
AI生图工具怎么选?2026年6月版实测对比

AI生图工具怎么选?2026年6月版实测对比

做自媒体的朋友应该都有体会:配图一直是个让人头疼的问题。2026年,AI生图工具已经非常成熟了,但工具太多反而不知道怎么选。以下是截至2026年6月我对主流AI生图工具的实测对比。Midjourney V8.1:速度之王2026年6月11日&#xff0c…

2026/7/20 18:51:18阅读更多 →