发布时间:2026/7/20 0:02:51
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)
2026/7/20 0:02:51

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

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

阅读更多
C# 将逗号分割的字符串转换为long,并添加到List<long>
2026/7/20 0:02:51

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

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

阅读更多
努比亚NaviX Ultra亮相WAIC,智能体手机能否让用户生活更简单?
2026/7/20 0:02:51

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

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

阅读更多
为什么p5play是初学者学习游戏开发的完美选择?5大优势解析
2026/7/20 16:02:54

为什么p5play是初学者学习游戏开发的完美选择?5大优势解析

为什么p5play是初学者学习游戏开发的完美选择?5大优势解析 【免费下载链接】p5play JavaScript game engine that uses q5.js/p5.js for graphics and Box2D for physics. 项目地址: https://gitcode.com/gh_mirrors/p5/p5play p5play是一款基于p5.js图形库和…

阅读更多
django-parler缓存机制深度剖析:如何高效管理翻译数据的存储与读取
2026/7/20 16:02:54

django-parler缓存机制深度剖析:如何高效管理翻译数据的存储与读取

django-parler缓存机制深度剖析:如何高效管理翻译数据的存储与读取 【免费下载链接】django-parler Easily translate "cheese omelet" into "omelette au fromage". 项目地址: https://gitcode.com/gh_mirrors/dja/django-parler djang…

阅读更多
热修复技术:iOS-Tech-Weekly中的JSPatch与动态化方案深度解析
2026/7/20 16:02:54

热修复技术:iOS-Tech-Weekly中的JSPatch与动态化方案深度解析

热修复技术:iOS-Tech-Weekly中的JSPatch与动态化方案深度解析 【免费下载链接】iOS-Tech-Weekly 百度Hi团队 iOS 技术周报 项目地址: https://gitcode.com/gh_mirrors/io/iOS-Tech-Weekly iOS应用开发中,热修复技术是解决线上问题的关键手段&…

阅读更多
GitHub Copilot SDK工具权限管理:如何控制工具执行权限的完整指南 [特殊字符]️
2026/7/20 16:02:54

GitHub Copilot SDK工具权限管理:如何控制工具执行权限的完整指南 [特殊字符]️

GitHub Copilot SDK工具权限管理:如何控制工具执行权限的完整指南 🛡️ 【免费下载链接】copilot-sdk Multi-platform SDK for integrating GitHub Copilot Agent into apps and services 项目地址: https://gitcode.com/GitHub_Trending/co/copilot-s…

阅读更多
深入解析I2C控制器寄存器:从BUF、CON到SYSTEST的底层驱动实践
2026/7/20 16:02:54

深入解析I2C控制器寄存器:从BUF、CON到SYSTEST的底层驱动实践

1. I2C控制器寄存器全景概览与核心设计思路在嵌入式系统开发中,I2C总线因其简洁的两线制(SDA数据线、SCL时钟线)和灵活的多主多从架构,成为了连接传感器、EEPROM、RTC等外设的首选协议。然而,很多开发者仅仅停留在调用…

阅读更多
如何零成本构建AI股票分析系统:从入门到实战的完整指南
2026/7/20 15:02:54

如何零成本构建AI股票分析系统:从入门到实战的完整指南

如何零成本构建AI股票分析系统:从入门到实战的完整指南 【免费下载链接】daily_stock_analysis LLM 驱动的多市场股票智能分析系统:多源行情、实时新闻、决策看板与自动推送,支持零成本定时运行。 LLM-powered multi-market stock analysis s…

阅读更多
噗叽短视频界面分析
2026/7/19 0:02:46

噗叽短视频界面分析

1 和小红书类似,可以采用类似判断方法------------其实他比小红书好判断,因为他没有图片,控件位置几乎是固定的,都不用判断------------2 因为他没有点赞按钮------------而且几乎所有控件位置都是完全一样的,所以我就…

阅读更多
噗叽自动化评论脚本基本完成
2026/7/19 0:02:46

噗叽自动化评论脚本基本完成

整个开发过程,耗时2.5小时:

阅读更多
游戏服务器性能调优:基于 ECS 架构的确定性帧同步与 Go 协程并发模型实践
2026/7/19 0:02:46

游戏服务器性能调优:基于 ECS 架构的确定性帧同步与 Go 协程并发模型实践

游戏服务器性能调优:基于 ECS 架构的确定性帧同步与 Go 协程并发模型实践 一、游戏服务器的性能铁三角:帧率、延迟、并发数 游戏服务器与普通 Web 服务器的性能指标完全不同。Web 服务器关注 QPS 和 P99 延迟,游戏服务器关注帧速率&#xff0…

阅读更多
2026 WAIC:努比亚二代“豆包手机”NaviX Ultra亮相,智能体验全面升级!
2026/7/20 0:02:51

2026 WAIC:努比亚二代“豆包手机”NaviX Ultra亮相,智能体验全面升级!

7月18日智东西消息,在2026 WAIC期间,努比亚联合字节豆包打造的二代“豆包手机”努比亚NaviX Ultra首次亮相,相比一代有诸多升级。智能体手机理念中兴通讯终端事业部总裁、努比亚总裁倪飞表示,智能体手机要从人操作手机变为手机帮人…

阅读更多
努比亚NaviX Ultra亮相WAIC,智能体手机能否让用户生活更简单?
2026/7/20 0:02:51

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

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

阅读更多
C# 将逗号分割的字符串转换为long,并添加到List<long>
2026/7/20 0:02:51

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

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

阅读更多
基于Dify与DeepSeek构建私有知识库问答系统实战指南
2026/7/20 0:40:52

基于Dify与DeepSeek构建私有知识库问答系统实战指南

在业务中快速构建一个能理解私有文档、准确回答专业问题的智能助手,是很多开发团队面临的共同挑战。传统方案往往需要从零开始搭建复杂的 RAG(检索增强生成)系统,涉及文档解析、向量化、检索、大模型调用等多个环节,整…

阅读更多
FAE放射组学分析工具:医学影像特征探索的完整解决方案
2026/7/20 0:48:14

FAE放射组学分析工具:医学影像特征探索的完整解决方案

FAE放射组学分析工具:医学影像特征探索的完整解决方案 【免费下载链接】FAE FeAture Explorer 项目地址: https://gitcode.com/gh_mirrors/fae/FAE 你是否曾经面对海量医学影像数据感到无从下手?想要从CT、MRI等影像中提取有价值的定量特征&#…

阅读更多
DesktopNaotu:你的终极离线思维导图解决方案,告别网络依赖!
2026/7/20 0:45:44

DesktopNaotu:你的终极离线思维导图解决方案,告别网络依赖!

DesktopNaotu:你的终极离线思维导图解决方案,告别网络依赖! 【免费下载链接】DesktopNaotu 桌面版脑图 (百度脑图离线版,思维导图) 跨平台支持 Windows/Linux/Mac OS. (A cross-platform multilingual Mind Map Tool) 项目地址:…

阅读更多