先问“它解决什么问题”
比如 SQS 不是“一个队列”,而是用异步消息把生产者和消费者解耦;NAT Gateway 不是“网络组件”,而是让私有子网单向出网。
这个页面根据你的《COMP5349 期末复习总结》和课件资料整理。目标不是把所有内容再堆一遍,而是教你按“概念图 → 对比表 → 场景题输出 → 主动回忆”的顺序真正掌握。
每个知识点都按同一套流程处理,避免只背定义。
比如 SQS 不是“一个队列”,而是用异步消息把生产者和消费者解耦;NAT Gateway 不是“网络组件”,而是让私有子网单向出网。
考试喜欢问相似概念:Multi-AZ vs Read Replica、ALB vs NLB、Versioning vs Replication、Container vs VM。必须背差异,不只背定义。
场景题要写出顺序:请求从哪里来、经过什么服务、需要哪条路由/权限/安全组规则、失败时谁接管。
按考试高频程度组织。每张卡片都包含“学会的标准”。
重点是从传统 Hypervisor 学到 AWS Nitro 为什么更快、更安全。
重点是版本控制、冗余、复制和删除行为。
重点是三层架构、路由表、公有/私有子网、SG 来源写法。
重点是权限判断流程和服务间调用的权限放在哪里。
重点是托管数据库的责任边界和 Aurora 的存储层创新。
重点是弹性伸缩、健康检查和请求分发算法。
重点是从 VM 到 Container,再到 Lambda MicroVM 与 K8s 编排。
重点是异步解耦、Fan-out 和消息失败后的生命周期。
每一章都按“先理解问题、再背定义、再练输出”的顺序学。下面的绿色框就是你考试可以直接改写的答案。
云计算不是“把服务器放到别人那里”,而是把计算、存储、网络这些资源做成可按需申请、可弹性扩缩、按使用付费的服务。后面所有 AWS 服务都在回答同一个问题:某个 IT resource 应该由谁管理,用户还负责什么。
Cloud computing provides ubiquitous, on-demand network access to a shared pool of configurable computing resources. AWS organizes infrastructure as Regions, Availability Zones, and data centers. A Region is geographically isolated, while an AZ is an independent failure domain inside a Region.
一台物理机如果只跑一个系统,资源会浪费;如果让多个 VM 共享同一硬件,又必须保证彼此隔离。Hypervisor 就是夹在硬件和 VM 之间的控制层,负责分配 CPU、内存、磁盘、网络,并阻止一个 VM 看到或影响另一个 VM。
AWS Nitro System consists of the Nitro Hypervisor, Nitro Cards, and a Nitro Security Chip. The Nitro Hypervisor is lightweight and purpose-built; it only handles CPU and memory partitioning and scheduling. Network, storage, instance management, monitoring, and security are offloaded to Nitro Cards. Therefore AWS no longer needs a Dom0, reducing attack surface and giving near bare-metal performance.
如果题目问“批处理临时数据,硬件故障后数据全丢是什么存储”,答 Instance Store。如果问“备份已配置 EC2 以便批量启动相同实例”,答 Create AMI。
S3 是 object storage。Object = key + metadata + content;Bucket 是 object 容器,bucket name 全局唯一。S3 没有真正文件夹,所谓 folder 是 key prefix 模拟出来的。
If an object is deleted without specifying a version ID in a version-enabled bucket, S3 creates a delete marker with the same key. The previous versions remain stored. The delete marker becomes the current version, so normal GET returns 404. Removing the delete marker restores access to the previous version.
问自己:上传 report.csv 三次后,不指定版本删除一次,源桶里有什么?目标桶里有什么?怎么恢复?如果你能闭卷讲出这三问,就算掌握 S3 版本题。
VPC 是 Region 级逻辑隔离网络;Subnet 是 AZ 级,不能跨 AZ;CIDR 创建后不可改,Subnet CIDR 不能重叠。每个 subnet 还会保留 5 个 IP:network、VPC router、DNS、reserved、broadcast。
Public subnet 不是因为名字叫 public,而是它关联的 route table 有 0.0.0.0/0 → IGW,并且实例有 public IP。Private subnet 没有直接到 IGW 的默认路由,出网通常走 NAT Gateway。
10.0.0.0/16,跨多个 AZ。0.0.0.0/0 → IGW,给 ALB 或 Web 层接 Internet。0.0.0.0/0 → NAT Gateway。Client → Internet → IGW → Public route table → ALB/Web SG inbound 80/443 → App SG inbound source = ALB/Web SG → DB SG inbound source = App SG。
Start with default deny. If any applicable policy contains an explicit deny, the request is denied immediately. Otherwise, AWS checks whether there is an explicit allow. If there is an allow, the request is allowed; if not, it remains implicitly denied.
Explicit Deny > Explicit Allow > Default/Implicit Denyarn:aws:s3:::my-bucket 是 bucket 本身,用于 ListBucket 等 bucket-level action;arn:aws:s3:::my-bucket/* 是 bucket 里的 objects,用于 GetObject/PutObject/DeleteObject。
s3.amazonaws.com。sns.amazonaws.com。RDS 是 managed relational database。AWS 管底层硬件、数据库软件安装、补丁、备份、主机故障替换;你仍然要管 schema、查询、索引、访问控制、扩缩容选择和应用连接。
Aurora separates compute from storage. Data is divided into 10 GB segments. Each segment has six copies across three AZs, two copies per AZ. Aurora uses quorum: a write succeeds after 4 of 6 acknowledgements, and a read needs 3 of 6. The primary sends redo log records to the storage layer; storage nodes materialize data pages independently. This is why Aurora is often described as “log is the database”.
LSN 单调递增;VCL 是存储层连续收到的最高 LSN;CPL 是数据库声明的事务一致点;VDL 是小于等于 VCL 的最高 CPL。
VCL=1007, CPL=900/1000/1100 → VDL=1000 → truncate 1001-1007不要说 Aurora 数据存在 DB instance 的 EBS 上。Aurora 的关键创新就是计算和存储分离,数据在共享分布式 storage layer。
Scalability 是系统处理增长工作负载的能力;Elasticity 是云环境里根据需求自动、细粒度地扩容和缩容。垂直扩展是升级单机规格,水平扩展是增加机器数量。
CloudWatch collects CPU utilization metrics. When the metric exceeds the target threshold, an alarm or target tracking policy triggers the Auto Scaling Group. The ASG launches new EC2 instances from the launch template, registers them with the ALB target group, and the ALB starts distributing traffic to healthy targets.
Round-robin 只是轮流发请求,不知道每个请求处理多久。请求耗时差异大时选 LOR,因为它看每个目标当前 outstanding requests 数量。
Infrastructure as Code 把基础设施写成模板,带来 repeatability、reusability、maintainability。同一份 template 可以创建多个 stack,减少手工点控制台带来的不一致。
!Ref:返回物理 ID 或资源默认返回值。!GetAtt:返回资源属性,如 EC2 PublicIp、RDS Endpoint。!FindInMap:从 Mapping 里查值。!If / !Equals:用于条件逻辑。Use CloudFormation stack events or describe-stack-events to find the failed resource and ResourceStatusReason. Use validate-template to catch syntax problems. For updates, create a change set first to preview what resources will be changed.
Pipeline → Stage → Action → Artifact。Source 取代码,CodeBuild 构建测试,CodePipeline 负责编排但不亲自 build/deploy,Deploy 可以交给 CodeDeploy 或 CloudFormation。
Continuous Delivery 是自动到可发布状态或 repository,生产部署通常需要人工审批;Continuous Deployment 是测试通过后自动部署到生产。
Lambda has two permission directions. A resource-based policy controls who can invoke the function, such as S3, EventBridge, API Gateway, or SNS. The execution role controls what the function can access while running, such as S3, DynamoDB, SQS, CloudWatch Logs, or Secrets Manager.
ECS Task ≈ Kubernetes Pod;ECS Service ≈ Deployment;Task Definition ≈ Pod Template;ALB Target Group / ECS service discovery 的稳定访问能力 ≈ Kubernetes Service。
Visibility timeout 不是消息保留期,也不是处理时间上限。它只是“别人暂时看不到这条消息”的时间。必须设置得长于正常处理时间,并让处理逻辑幂等,因为 Standard Queue 可能重复投递。
s3:PutObject。s3.amazonaws.com 执行 sns:Publish,并用 SourceArn 限定源 bucket。sns.amazonaws.com 执行 sqs:SendMessage,并用 SourceArn 限定源 topic。sqs:ReceiveMessage、sqs:DeleteMessage、sqs:GetQueueAttributes。s3:GetObject 和 s3:PutObject。左边帮你理解,右边帮你写英文答案。考试时不用逐字背,但要能保留这些关键词和逻辑顺序。
云计算的核心不是“租服务器”,而是通过网络按需访问共享的、可配置的计算资源池。你要知道资源责任边界:IaaS 用户管 OS 及以上,PaaS 用户主要管代码和数据,SaaS 用户只使用软件。
Cloud computing provides on-demand network access to a shared pool of configurable computing resources. In IaaS, the customer manages the OS and above. In PaaS, the customer mainly manages application code and data. In SaaS, the provider manages almost the entire stack.
虚拟化让多个 VM 共享同一台物理机,同时通过 Hypervisor 保证资源分配和隔离。Nitro 的重点是把传统 hypervisor 的很多工作卸载到专用硬件卡,所以不再需要 Xen 的 Dom0,攻击面更小,性能接近裸机。
Virtualization allows multiple VMs to share the same physical host while the hypervisor allocates resources and enforces isolation. AWS Nitro offloads networking, storage, management, monitoring, and security to dedicated hardware, so it no longer needs a privileged Dom0.
S3 是对象存储,Object 由 key、metadata、content 组成。Versioning 用来防误删和覆盖;不指定版本删除时不会真正删旧数据,而是加 delete marker。CRR 是跨区域复制,源桶和目标桶都必须开 versioning。
S3 is object storage. An object consists of a key, metadata, and content. Versioning protects against accidental deletion and overwrite. If an object is deleted without a version ID, S3 creates a delete marker instead of deleting previous versions. Cross-Region Replication requires versioning on both buckets.
VPC 是 Region 级隔离网络,Subnet 是 AZ 级。Public subnet 的本质是路由表有 0.0.0.0/0 → IGW;Private subnet 通常通过 NAT Gateway 单向出网。Security Group 是实例级、stateful、只有 allow 没有 deny。
A VPC is a regional isolated network, while a subnet is scoped to one Availability Zone. A public subnet is public because its route table has a default route to an Internet Gateway. Private subnets usually use a NAT Gateway for outbound Internet access. Security Groups are instance-level, stateful, and allow-only.
IAM 题要按身份、动作、资源、条件来拆。权限判断顺序是:默认 Deny;如果有 Explicit Deny,直接 Deny;否则看有没有 Explicit Allow;没有 Allow 就是 Implicit Deny。
For IAM policy questions, analyze the identity, action, resource, and condition. Authorization starts with default deny. An explicit deny overrides everything. If there is no explicit deny, AWS checks for an explicit allow. Without an allow, the request is implicitly denied.
RDS 是托管关系数据库,AWS 管硬件、补丁、备份、故障替换。Multi-AZ 解决高可用,Read Replica 解决读扩展。Aurora 的核心创新是计算和存储分离,数据切成 10GB segments,每段 6 份,跨 3 AZ。
RDS is a managed relational database service. AWS manages hardware, patching, backups, and host replacement. Multi-AZ is for high availability, while Read Replicas are for read scaling. Aurora separates compute from storage. Data is split into 10 GB segments, with six copies across three AZs.
弹性题按时序写:CloudWatch 收集指标,Alarm 或 Target Tracking 触发 ASG,ASG 用 Launch Template 启新 EC2,实例注册进 ALB Target Group,健康检查通过后 ALB 开始分流。
For elasticity questions, describe the sequence: CloudWatch collects metrics; an alarm or target tracking policy triggers the Auto Scaling Group; the ASG launches new EC2 instances from the launch template; the instances are registered with the ALB target group; after health checks pass, the ALB distributes traffic to them.
CloudFormation 是 AWS 原生 IaC。Template 像类,Stack 像对象。Resources 是唯一必填 section。CodePipeline 是编排服务,层级是 Pipeline → Stage → Action → Artifact。
!Ref 返回物理 ID 或默认值。!GetAtt 返回资源属性。CloudFormation is AWS-native Infrastructure as Code. A template is like a class, and a stack is like an object. Resources is the only required section. CodePipeline is an orchestration service, organized as Pipeline → Stage → Action → Artifact.
!Ref returns a physical ID or the default return value.!GetAtt returns a resource attribute.Container 是 OS 级虚拟化,共享宿主内核,用 namespace 隔离视图,用 cgroup 限制资源。Lambda 是 serverless FaaS,适合事件驱动、低频或不可预测流量。Kubernetes 是容器编排系统,Pod 是最小调度单元。
Containers are OS-level virtualization. They share the host kernel, use namespaces for isolation, and cgroups for resource limits. Lambda is serverless FaaS and fits event-driven, low-duty-cycle, or unpredictable workloads. Kubernetes is a container orchestration system, and Pod is the smallest scheduling unit.
SQS 是 point-to-point queue,consumer 主动 pull;SNS 是 pub/sub topic,主动 push 给多个 subscriber。Fan-out 用 SNS 广播到多个 SQS,每个下游拿到独立副本,可以独立扩缩、独立失败重试。
SQS is a point-to-point queue where consumers pull messages. SNS is a pub/sub topic that pushes messages to multiple subscribers. The fan-out pattern uses SNS to broadcast to multiple SQS queues, so each downstream service receives its own copy and can scale and retry independently.
按 6 月 6 日到 6 月 15 日设计。每天都要有“输出任务”,不是只看笔记。
把 17 个章节压成 6 条主线:计算、存储、网络、安全、数据库、解耦/现代应用。
从“为什么要虚拟化”学到“为什么 AWS Nitro 替代 Xen”。
用“删除一个 report.csv 后发生什么”练习版本题。
这部分要边画图边学,否则很容易背散。
重点训练 JSON policy 解释能力。
把托管责任和 HA/Scale 的目标分开。
按“监控 → 决策 → 新实例 → 注册 → 分流”的链路记。
用“解耦”和“运行时隔离”串起来。
不要再补新资料,重点查漏补缺。
场景题要让阅卷人看到你知道“谁调用谁、凭什么调用、失败后怎么办”。
0.0.0.0/0 → IGW。s3:PutObject。s3.amazonaws.com 调 sns:Publish。sns.amazonaws.com 调 sqs:SendMessage。点击卡片显示答案。先闭眼说一遍,再翻答案。
全部勾完后,你应该已经能闭卷解释主要知识点。