尧图网络 高端网站定制 · 原创设计
免费咨询热线
400-888-6620
免费获取方案
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.
RELATED

相关推荐

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

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

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

📅 2026/10/6 22:34:07
C# 将逗号分割的字符串转换为long,并添加到List<long>

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

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

📅 2026/10/26 11:05:18
努比亚NaviX Ultra亮相WAIC,智能体手机能否让用户生活更简单?

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

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

📅 2026/10/29 21:32:30
MORE NEWS

更多资讯

📰

丹凤能考电工证网上查询怎么操作,证书过期了别慌!

丹凤能考电工证网上查询怎么操作,证书过期了别慌! 证书过期了不知道怎么复审延期,这事儿真不能拖!尤其你要是正在做电工相关工作, 丹凤能考电工证 这个证要是没按时复审,不仅影响收入,还可能被单位追责。别慌,今天就教你 网上查询…

📰

孙龙超电工证复审情况:上岗必备的电工证复审怎么操作

孙龙超电工证复审情况:上岗必备的电工证复审怎么操作 怕考不过白交培训费?你不是一个人。很多电工学员在报名培训前,最担心的就是钱花了、时间花了,结果考试没过,证书没拿到。尤其是像孙龙超这样的电工证复审情况,很多人并不清楚具体流程,更别提怎么操…

📰

3个月考不过山工机械特种兵训练营?你不是一个人!全国通用证书怎么拿更稳?

3个月考不过山工机械特种兵训练营?你不是一个人!全国通用证书怎么拿更稳? 怕考不过白交培训费?别再被培训机构忽悠了!山工机械特种兵训练营最近火了,不少学员反映报名后培训内容杂乱、考试通过率低,还有的连考试题都不给练。但如果你手里握着一张全国…

📰

宁明县报考电工证哪里靠谱?考前押题怎么找?

宁明县报考电工证哪里靠谱?考前押题怎么找? 不知道去哪报名怕被中介坑,宁明县报考电工证的你是不是也这样?现在市面上培训机构五花八门,有些人交了钱连考试都没能参加,有些人拿到证才发现是假的,还有人被各种“包过”“保过”的话术忽悠得晕头转向。今…

📰

淮安哪里考电工证保姆级教程:别被中介骗了,自己搞定全流程

淮安哪里考电工证保姆级教程:别被中介骗了,自己搞定全流程 你是不是也在为“淮安哪里考电工证”这个问题头疼?网上一搜,信息五花八门,中介电话不断,但真假难辨。作为刚毕业的郑州金水区应届工程类毕业生,我深知证书在求职路上的分量,也经历过被中介套…

📰

电工证取消复审了怎么应对?上岗必备信息全在这儿

电工证取消复审了怎么应对?上岗必备信息全在这儿 你是不是正愁不知道去哪儿报名,怕被中介骗钱?现在电工证取消复审了,很多人一头雾水,不知道该怎么办。别慌,这篇文章就是为你准备的,从报名、考试、执业风险到复审新政策,讲得明明白白,全是实打实的干…

TODAY

今日更新

THIS WEEK

本周精选

THIS MONTH

本月热门

读完文章,想聊聊您的网站?

告诉我们您的行业与需求,资深顾问一对一梳理方案与报价,全程免费。

📞 💬