Chapter 02 - 架构地图
本章目标
看完本章后,你应该可以回答:
- 一个典型 AWS 架构可以拆成哪些层?
- 每一层常见服务是什么?
- SAA-C03 题目怎么把服务放进架构位置?
- 后续章节要怎么沿着架构层次展开?
一句话
SAA-C03 不应该用「服务清单」读,而应该用「架构位置」读。
先知道服务在系统里扮演什么角色,再去背细节,会快很多。
text
Users
↓
Route 53 / CloudFront / WAF
↓
ALB / NLB / API Gateway
↓
EC2 / Auto Scaling / ECS / Lambda
↓
RDS / DynamoDB / S3 / EFS / ElastiCache
↓
SQS / SNS / EventBridge / Step Functions
↓
CloudWatch / CloudTrail / Config / GuardDuty1. 用户入口层
这一层处理「用户怎么进来」。
常见服务:
- Route 53
- CloudFront
- AWS WAF
- AWS Shield
- ACM
常考问题:
- 全球用户要低 latency:CloudFront
- DNS failover:Route 53
- 防止常见 Web 攻击:WAF
- TLS certificate:ACM
- DDoS protection:Shield
2. 网络层
这一层处理「资源放在哪里,谁可以连谁」。
常见服务与概念:
- VPC
- public subnet / private subnet
- route table
- internet gateway
- NAT gateway
- security group
- network ACL
- VPC endpoint
- VPC peering / Transit Gateway
- Site-to-Site VPN / Direct Connect
常考问题:
- private subnet 里的 EC2 要出网络更新软件包:NAT gateway
- S3 不走 public internet:Gateway endpoint
- 多个 VPC 集中连线:Transit Gateway
- security group 和 NACL 差异:stateful vs stateless
3. 计算层
这一层处理「程序在哪里跑」。
常见服务:
- EC2
- Auto Scaling Group
- Elastic Load Balancing
- Lambda
- ECS / Fargate
- EKS
- Elastic Beanstalk
常考问题:
- 需要完整控制操作系统:EC2
- 需要自动扩缩 EC2:Auto Scaling Group
- 短时间事件驱动任务:Lambda
- 容器但不想管 server:Fargate
- 分散流量:ALB / NLB
4. 数据层
这一层处理「数据放在哪里」。
常见服务:
- S3
- EBS
- EFS
- FSx
- RDS
- Aurora
- DynamoDB
- ElastiCache
- Redshift
常考问题:
- object storage:S3
- block storage 给 EC2:EBS
- shared file system:EFS
- relational database:RDS / Aurora
- key-value / serverless NoSQL:DynamoDB
- cache:ElastiCache
- analytics warehouse:Redshift
5. 整合与解耦层
这一层处理「服务之间怎么不要互相拖垮」。
常见服务:
- SQS
- SNS
- EventBridge
- Step Functions
- API Gateway
- Kinesis
常考问题:
- producer 和 consumer 解耦:SQS
- 一对多通知:SNS
- event bus / SaaS events:EventBridge
- 多步骤 workflow:Step Functions
- 对外提供 API:API Gateway
- streaming data:Kinesis
6. 安全与治理层
这一层处理「谁做了什么,数据是否安全,系统是否合规」。
常见服务:
- IAM
- KMS
- Secrets Manager
- Systems Manager Parameter Store
- CloudTrail
- AWS Config
- GuardDuty
- Security Hub
- Organizations / SCP
常考问题:
- 权限最小化:IAM policy / role
- 加密密钥管理:KMS
- 密码轮替:Secrets Manager
- API audit:CloudTrail
- 资源设置是否合规:Config
- 威胁侦测:GuardDuty
- 多账号管控:Organizations / SCP
7. 可观测性与运营层
这一层处理「怎么知道系统正在发生什么」。
常见服务:
- CloudWatch metrics
- CloudWatch logs
- CloudWatch alarms
- X-Ray
- AWS Health Dashboard
- Systems Manager
常考问题:
- CPU、latency、error rate:CloudWatch metrics
- log 查询:CloudWatch logs
- 触发告警:CloudWatch alarms
- 分布式 trace:X-Ray
- patch / run command:Systems Manager
读题定位法
看到题目时先问:
- 问的是入口问题,还是网络问题?
- 问的是计算选型,还是数据选型?
- 问的是解耦,还是同步回应?
- 问的是安全、可用性、性能,还是成本?
- 有没有「must」「least operational overhead」「most cost-effective」这类限制词?
只要先定位到架构层,选项通常会少一半。