Exam reflexesPhản xạ thi
Patterns distilled from practice questions. Revise the reflexes and lookup tables — not the questions. Each question just adds a trap line or a table row; the raw question sits collapsed at the bottom.
Các mẫu chắt ra từ câu hỏi luyện. Ôn phản xạ và bảng tra cứu — không ôn từng câu. Mỗi câu mới chỉ thêm một dòng bẫy hoặc một hàng bảng; đề gốc nằm thu gọn ở dưới.
Reflexes · DR & multi-RegionPhản xạ · DR & đa Region
"fail over" is the tell. Failover routing = one Region at a time. multivalue/weighted/latency all keep both live — wrong for DR failover. "fail over" là dấu hiệu. Failover routing = mỗi lúc một Region. multivalue/weighted/latency đều để cả hai sống — sai cho DR failover.
API / app must "fail over to another Region"API / app phải "fail over sang Region khác"
Duplicate the regional stack in Region B (new API Gateway + Lambda) · Route 53 failover record + health check on the primary · DynamoDB Global Tables for data. Nhân đôi stack regional ở Region B (API Gateway + Lambda mới) · Route 53 failover record + health check ở primary · DynamoDB Global Tables cho data.
- Multivalue answer = returns several records, client picks randomly → active-active load-balancing, sends traffic to both even when healthy. Not failover.Multivalue answer = trả nhiều record, client chọn ngẫu nhiên → active-active, gửi cả hai kể cả lúc khỏe. Không phải failover.
- Edge-optimized endpoint = one Region fronted by CloudFront for latency. Not a multi-Region / failover mechanism.Edge-optimized endpoint = một Region có CloudFront phía trước để giảm latency. Không phải cơ chế multi-Region / failover.
- "Change Lambda to global functions" — no such thing. Lambda is regional."Đổi Lambda thành global functions" — không có. Lambda là regional.
Only failover routes to one Region at a time — the others keep every Region live.Chỉ failover mới trỏ tới một Region tại một thời điểm — các loại kia để mọi Region cùng sống.
Reflexes · Organizations & SCPsPhản xạ · Organizations & SCP
An SCP applies to every account BELOW where it's attached. A Deny at the root hits every OU — even a brand-new one. A child-OU Allow can never override a parent Deny. SCP áp cho mọi account NẰM DƯỚI chỗ nó gắn. Deny ở root áp cho mọi OU — kể cả OU vừa tạo. Allow ở OU con không bao giờ đè được Deny ở cha.
Let one account escape an org-wide Deny SCP temporarily, without dropping the guardrail for everyone elseCho một account thoát Deny SCP toàn org tạm thời, mà không bỏ guardrail cho các account khác
Move the Deny SCP off the root and attach it to the OU that should keep it (e.g. Production). Put the exempt account in a sibling OU that has an Allow. Move it back into the guarded OU when done. Gỡ Deny SCP khỏi root và gắn vào OU cần giữ (vd Production). Đặt account cần miễn trừ vào một OU anh em có Allow. Xong việc thì chuyển nó về OU có guardrail.
- Allow SCP on a new/child OU while the Deny stays at root — useless. Explicit Deny inherited from root always wins; the account is still blocked. (The classic trap.)Allow SCP trên OU mới/con trong khi Deny vẫn ở root — vô dụng. Deny kế thừa từ root luôn thắng; account vẫn bị chặn. (Bẫy kinh điển.)
- Deny list → allow list rework — flips the whole model, you must enumerate every allowed service org-wide = big long-term maintenance.Đổi deny list → allow list — lật cả mô hình, phải liệt kê mọi service được phép toàn org = bảo trì dài hạn nặng.
- Remove the SCP / replace with Service Catalog — drops enforcement of the current policy. Not "continue to enforce".Xoá SCP / thay bằng Service Catalog — mất luôn việc enforce policy hiện tại. Không phải "tiếp tục enforce".
Effective SCP = the AND of every policy from root down to the account. To exempt an account, the Deny must not sit on its path.SCP hiệu lực = AND của mọi policy từ root xuống account. Muốn miễn trừ một account, Deny không được nằm trên đường của nó.
Reflexes · Load balancing & scalingPhản xạ · Load balancing & scaling
Stateful web tier → ALB + sticky sessions. DB read scaling → Aurora Auto Scaling on Replicas (readers), never "writers". NLB has no round-robin / least-outstanding — those are ALB-only. Web tier stateful → ALB + sticky sessions. Scale đọc DB → Aurora Auto Scaling trên Replicas (reader), không bao giờ "writers". NLB không có round-robin / least-outstanding — đó là của riêng ALB.
Stateful web app must scale AND keep a consistent user experience (Aurora + EC2 Auto Scaling + ELB)App web stateful phải scale VÀ giữ trải nghiệm nhất quán (Aurora + EC2 Auto Scaling + ELB)
EC2 ASG behind an Application Load Balancer (round robin, the default) with sticky sessions for the stateful tier · Aurora Auto Scaling on Aurora Replicas for the read tier. EC2 ASG sau Application Load Balancer (round robin, mặc định) + sticky sessions cho tier stateful · Aurora Auto Scaling trên Aurora Replicas cho tier đọc.
- "Aurora Auto Scaling for Aurora writers" — distractor. A provisioned cluster has one writer; auto scaling adds/removes read replicas only. (Multi-master isn't an option here.)"Aurora Auto Scaling cho Aurora writers" — bẫy. Cluster provisioned chỉ có một writer; auto scaling chỉ thêm/bớt read replica. (Multi-master không có trong đề.)
- NLB with "round robin" or "least outstanding requests" — self-contradictory. NLB (L4) uses a flow-hash algorithm; those two are ALB-only.NLB với "round robin" hay "least outstanding requests" — tự mâu thuẫn. NLB (L4) dùng flow-hash; hai thuật toán đó là của riêng ALB.
- Dropping sticky sessions on a stateful app → session lost when a user hits a different instance. Stateful ⇒ affinity.Bỏ sticky sessions ở app stateful → mất session khi user rơi vào instance khác. Stateful ⇒ affinity.
Reflexes · Serverless APIs & edgePhản xạ · Serverless API & edge
"Serverless" + expose Lambda over HTTP ⇒ API Gateway, not ALB. Reshape headers/body: HTTP API parameter mapping or REST mapping templates — not "gateway responses" (those are error responses only). "Serverless" + expose Lambda qua HTTP ⇒ API Gateway, không phải ALB. Sửa header/body: HTTP API parameter mapping hoặc REST mapping templates — không phải "gateway responses" (chỉ là response lỗi).
Serverless HTTP endpoint for Lambda that must strip / rewrite response headers (e.g. per User-Agent, to support old clients)Endpoint HTTP serverless cho Lambda cần gỡ / sửa response header (vd theo User-Agent, để support client cũ)
API Gateway HTTP API → Lambda (route per request type) + response parameter mapping to remove the problematic headers. Serverless, no load balancer to run. API Gateway HTTP API → Lambda (route theo loại request) + response parameter mapping để remove header lỗi. Serverless, không phải nuôi load balancer.
- CloudFront + ALB → Lambda — ALB is a provisioned resource (hourly, always-on), so it fails the "adopt serverless" requirement. API Gateway is the serverless-native front for Lambda.CloudFront + ALB → Lambda — ALB là tài nguyên provisioned (tính giờ, chạy liên tục), nên trượt yêu cầu "adopt serverless". API Gateway mới là front serverless-native cho Lambda.
- Modify "gateway responses" — those only apply to responses API Gateway itself generates (4xx/5xx, auth failure, throttle), not your Lambda's normal responses. Wrong feature.Sửa "gateway responses" — chỉ áp cho response do chính API Gateway sinh ra (4xx/5xx, auth fail, throttle), không phải response bình thường từ Lambda. Sai công cụ.
- Lambda@Edge on "viewer requests" — you strip response headers on a response event, not a request event (and it still drags in the non-serverless ALB).Lambda@Edge trên "viewer requests" — bạn gỡ response header ở event response, không phải event request (và vẫn kéo theo ALB không-serverless).
Reflexes · Governance verbsPhản xạ · Động từ quản trị
Read the verb before anything else. Detect and prevent are answered by different services, and no amount of cleverness makes one do the other's job. Đọc động từ trước tiên. Detect và prevent do hai loại service khác nhau trả lời, và không có mẹo nào bắt cái này làm việc của cái kia.
Must "detect" resources that are non-compliant (unencrypted RDS, public bucket, missing tag)Phải "detect" resource không tuân thủ (RDS chưa mã hoá, bucket public, thiếu tag)
AWS Config rule — or, under a landing zone, the equivalent Control Tower detective control from the strongly recommended set, applied to the OU. Add SSM Automation remediation if it must also self-heal. Rule của AWS Config — hoặc, trong một landing zone, detective control của Control Tower tương ứng thuộc nhóm strongly recommended, áp lên OU. Thêm SSM Automation remediation nếu còn phải tự sửa.
- "Turn on mandatory guardrails and apply them to the OU" — mandatory controls are already on everywhere and you don't get to choose them."Bật guardrail mandatory rồi áp lên OU" — mandatory control đã bật sẵn ở mọi nơi và bạn không được chọn.
- "Use AWS Config to create a new mandatory guardrail" — no such operation exists."Dùng AWS Config tạo một mandatory guardrail mới" — không có thao tác đó.
- A custom SCP — that's prevent. It never scans anything that already exists.Một SCP tuỳ chỉnh — đó là prevent. Nó không bao giờ quét thứ đã tồn tại.
Must stop anyone creating a security-group rule whose source is 0.0.0.0/0Phải chặn không cho ai tạo rule security group có source 0.0.0.0/0
Least ops, reactive: EventBridge on the API event → Lambda revokes + notifies. Org-wide with less code: Firewall Manager security-group content-audit policy with auto-remediation. Genuinely preventive: SCP restricting ingress APIs to one deployment role + policy-as-code in the pipeline (CloudFormation Hooks / cfn-guard / OPA). Ít vận hành, phản ứng sau: EventBridge bắt API event → Lambda revoke + báo. Toàn org, ít code hơn: policy Firewall Manager kiểu content-audit cho security group kèm auto remediation. Thật sự phòng ngừa: SCP giới hạn API ingress cho một deployment role + policy-as-code trong pipeline (CloudFormation Hooks / cfn-guard / OPA).
aws:SourceIpis the caller's IP, not the CIDR being written into the rule. An SCP cannot read parameters out of the request body.aws:SourceIplà IP của người gọi, không phải CIDR đang được ghi vào rule. SCP không đọc được tham số trong thân request.IpAddress: {"aws:SourceIp": "0.0.0.0/0"}matches every IPv4 caller alive — that SCP denies the action outright, including safe internal CIDRs.IpAddress: {"aws:SourceIp": "0.0.0.0/0"}khớp với mọi caller IPv4 trên đời — SCP đó deny sạch action, kể cả CIDR nội bộ an toàn.- An
Allowin an SCP grants nothing; SCPs only cap.Allowtrong SCP không cấp quyền gì; SCP chỉ đặt trần. - The Config rule
vpc-sg-open-only-to-authorized-portschecks ports, can still pass0.0.0.0/0, and only flags unless remediation is attached.Config rulevpc-sg-open-only-to-authorized-portskiểm tra port, vẫn có thể cho qua0.0.0.0/0, và chỉ đánh dấu trừ khi có gắn remediation.
Give each developer account a fixed monthly budget and stop runaway spendCho mỗi developer account một ngân sách tháng cố định và chặn tiêu quá đà
Three parts, and questions ask for all three: an AWS Budget per account at provisioning time · an SCP denying the expensive services/regions · a budget alert → SNS → Lambda that stops or deletes the experiment resources. Ba phần, và đề hỏi cả ba: một AWS Budget cho mỗi account ngay khi cấp phát · một SCP chặn các service/region đắt · budget alert → SNS → Lambda để dừng hoặc xoá tài nguyên thử nghiệm.
- "An SCP that sets a fixed monthly usage limit" — SCPs cannot see money. There is no spend condition key."Một SCP đặt giới hạn sử dụng theo tháng" — SCP không nhìn thấy tiền. Không có condition key nào về chi tiêu.
- "A budget alert action that terminates all services" — Budgets Actions only apply a targeted IAM policy/SCP or stop specific EC2/RDS instances. Broad cleanup needs your own Lambda."Một budget alert action terminate mọi service" — Budgets Actions chỉ áp một IAM policy/SCP cụ thể hoặc stop vài EC2/RDS. Dọn dẹp diện rộng phải tự viết Lambda.
- IAM policies attached per user instead of an SCP — easy to miss a principal, and the account admin can undo them.Gắn IAM policy cho từng user thay vì dùng SCP — dễ sót principal, và account admin gỡ được.
- Remember it is not a hard cap: billing data lags, so spend can overshoot before the Lambda runs. The SCP is what limits the damage.Nhớ rằng nó không phải trần cứng: dữ liệu billing có độ trễ, nên chi tiêu có thể vượt trước khi Lambda chạy. SCP mới là thứ giới hạn thiệt hại.
Custom SCP is attached, but users can still call other servicesĐã gắn custom SCP, mà user vẫn gọi được service khác
Detach FullAWSAccess from that OU. Allows attached at the same node are a union, so Allow * beside Allow ec2/s3/dynamodb still permits everything. Narrowing only happens between parent and child.
Gỡ FullAWSAccess khỏi OU đó. Các Allow gắn ở cùng một node là phép hợp, nên Allow * đứng cạnh Allow ec2/s3/dynamodb vẫn cho phép tất cả. Việc thu hẹp chỉ xảy ra giữa cha và con.
- "Edit
FullAWSAccess" — it's AWS-managed and not editable."SửaFullAWSAccess" — nó là AWS-managed, không sửa được. - Replace it with
Deny "*"— an explicit Deny beats every Allow, so the three services you wanted die too.Thay bằngDeny "*"— Deny tường minh đè mọi Allow, nên ba service bạn muốn giữ cũng chết theo. - Enumerate a Deny for every other service — hundreds of entries and stale on AWS's next launch.Liệt kê Deny cho mọi service còn lại — hàng trăm dòng và lỗi thời ngay lần AWS ra service mới.
Reflexes · Encryption & keysPhản xạ · Mã hoá & key
Two questions decide every S3 encryption item: who manages the key, and what happens to objects that already exist. Hai câu hỏi quyết định mọi item về mã hoá S3: ai quản lý key, và object đã tồn tại thì sao.
"All current and future objects must be encrypted with keys the security team manages""Mọi object hiện tại và tương lai phải mã hoá bằng key do security team quản lý"
Default encryption = SSE-KMS with a customer-managed key (future objects) + re-upload / copy every existing object (current ones) + a bucket policy denying PutObject that doesn't specify that key.
Default encryption = SSE-KMS với customer-managed key (object tương lai) + upload/copy lại mọi object cũ (object hiện tại) + bucket policy deny PutObject nếu không chỉ đúng key đó.
- "SSE-S3 with a customer managed key" — doesn't exist. SSE-S3 means S3 owns the key;
AES256in the console is SSE-S3."SSE-S3 với customer managed key" — không tồn tại. SSE-S3 nghĩa là S3 sở hữu key;AES256trong console chính là SSE-S3. - "A bucket policy that automatically encrypts on
GetObjectandPutObject" — a policy can only reject, never transform. Reading never re-encrypts."Bucket policy tự mã hoá khiGetObjectvàPutObject" — policy chỉ từ chối được, không biến đổi. Đọc không bao giờ mã hoá lại. - Changing default encryption and stopping there — existing objects keep their old encryption forever.Đổi default encryption rồi dừng — object cũ giữ nguyên mã hoá cũ mãi mãi.
- SSE-C — the client must send the key on every single request. That's the opposite of centralised key management.SSE-C — client phải gửi key trong từng request. Ngược hẳn với quản lý key tập trung.
Strong random DB password, rotated on a schedule, deployed by CloudFormation, least overheadPassword DB ngẫu nhiên mạnh, xoay theo lịch, deploy bằng CloudFormation, ít overhead nhất
Secrets Manager secret + rotation Lambda + a native RotationSchedule. If ManageMasterUserPassword is on the menu, that's the even-lower-overhead answer — RDS rotates it with no Lambda at all.
Secret của Secrets Manager + rotation Lambda + RotationSchedule native. Nếu có ManageMasterUserPassword trong thực đơn, đó là đáp án còn ít overhead hơn — RDS tự xoay, không cần Lambda nào.
- "Parameter Store
SecureString+ a Parameter StoreRotationSchedule" — that resource type doesn't exist. Parameter Store has no rotation."Parameter StoreSecureString+RotationSchedulecủa Parameter Store" — resource type đó không tồn tại. Parameter Store không có rotation. - EventBridge schedule → Lambda works, but re-implements a native feature — it loses on "least operational overhead".EventBridge schedule → Lambda chạy được, nhưng là làm lại một tính năng có sẵn — thua ở tiêu chí "ít vận hành nhất".
- AppSync, Config, or anything else "rotating a password" — not a capability those services have.AppSync, Config, hay bất kỳ thứ gì khác "xoay password" — các service đó không có khả năng ấy.
Reflexes · Static IPs & egressPhản xạ · IP tĩnh & chiều ra
First ask which direction the traffic runs. Inbound (clients reaching you) and outbound (you reaching a partner) have completely different answers, and questions deliberately blur them. Trước hết hỏi traffic đi chiều nào. Chiều vào (client tìm đến bạn) và chiều ra (bạn gọi đối tác) có đáp án hoàn toàn khác nhau, và đề cố tình làm mờ ranh giới.
Outbound: the third party allow-lists one public CIDR, and our app is behind an ALB in private subnetsChiều ra: bên thứ ba allow-list một CIDR public, còn app của ta nằm sau ALB trong private subnet
The partner sees the NAT gateway's Elastic IP. Register the company's own CIDR with BYOIP, allocate EIPs from that pool, and attach one to the NAT gateway in each AZ. Đối tác nhìn thấy Elastic IP của NAT gateway. Đăng ký CIDR của chính công ty bằng BYOIP, cấp EIP từ pool đó, và gắn một cái vào NAT gateway ở mỗi AZ.
- Assigning EIPs to the ALB — impossible, and irrelevant: the ALB handles inbound, not the outbound call.Gán EIP cho ALB — không làm được, và cũng không liên quan: ALB lo chiều vào, không lo lời gọi đi ra.
- Global Accelerator in front of the ALB — accelerates traffic into you; outbound still leaves via NAT.Global Accelerator đặt trước ALB — tăng tốc traffic đi vào; chiều ra vẫn đi qua NAT.
- "Enable public IP addressing on the public subnets" — does nothing for instances in private subnets."Bật public IP addressing cho public subnet" — chẳng ảnh hưởng gì tới instance ở private subnet.
Inbound: TCP on a static port, multi-AZ, DNS name, and partners must allow-list fixed addressesChiều vào: TCP trên một port cố định, đa AZ, có DNS name, và đối tác phải allow-list địa chỉ cố định
Internet-facing NLB, one Elastic IP per AZ, targets registered in a target group, and a Route 53 A (Alias) record for the name. Hand the partner every EIP. NLB internet-facing, mỗi AZ một Elastic IP, target đăng ký trong target group, và một record Route 53 A (Alias) cho tên miền. Đưa đối tác tất cả các EIP.
- DNS pointing straight at the instances' EIPs — bypasses the load balancer and loses health checks.DNS trỏ thẳng vào EIP của instance — bỏ qua load balancer và mất health check.
- An
NSrecord to "map the name to IPs" —NSdesignates name servers. Mapping a name to an address is anArecord.Dùng recordNSđể "map tên sang IP" —NSchỉ định name server. Map tên sang địa chỉ là recordA. - ALB for raw TCP — ALB is HTTP/HTTPS/gRPC only.ALB cho TCP thuần — ALB chỉ HTTP/HTTPS/gRPC.
- A
CNAME"containing the IP addresses" — a CNAME points at a hostname, never a list of IPs.MộtCNAME"chứa các địa chỉ IP" — CNAME trỏ tới một hostname, không bao giờ tới danh sách IP. - Static public IPs for a container "cluster" — public IPs belong to tasks/hosts and change on redeploy.IP public tĩnh cho một "cluster" container — IP public thuộc về task/host và đổi khi redeploy.
A VPC-attached Lambda must call an external API from one fixed public IPMột Lambda gắn VPC phải gọi API bên ngoài từ một IP public cố định
Private subnet → NAT gateway with an Elastic IP → internet gateway. Every concurrent execution shares that one address. Private subnet → NAT gateway có Elastic IP → internet gateway. Mọi execution đồng thời dùng chung đúng địa chỉ đó.
- Attach an EIP to the internet gateway — an IGW has no ENI, no IP and no subnet. There is nothing to attach to.Gắn EIP vào internet gateway — IGW không có ENI, không IP, không subnet. Không có chỗ nào để gắn.
- Attach an EIP to the Lambda's ENI — it's a shared, Lambda-managed Hyperplane ENI with a private IP only.Gắn EIP vào ENI của Lambda — đó là Hyperplane ENI dùng chung, do Lambda quản lý, chỉ có private IP.
- Put the function in a public subnet — a public subnet is just a route table; without a public IPv4 the IGW is unusable.Đặt function vào public subnet — public subnet chỉ là một route table; không có public IPv4 thì IGW vô dụng.
- Egress-only internet gateway — IPv6 only, and it takes no Elastic IP.Egress-only internet gateway — chỉ IPv6, và không nhận Elastic IP.
Reflexes · Multi-account plumbingPhản xạ · Đường ống đa account
Connect every member account's VPC to a shared Transit Gateway, and automate it for accounts created laterNối VPC của mọi member account vào một Transit Gateway dùng chung, và tự động cho account tạo sau
Two answers, because two jobs: RAM-share the TGW with the organization + a service-managed StackSet from the management account, with automatic deployment, creating the VPC and the TransitGatewayVpcAttachment — with the TGW ID passed in as a parameter.
Hai đáp án, vì có hai việc: Share TGW bằng RAM cho organization + một StackSet service-managed từ management account, bật automatic deployment, tạo VPC và TransitGatewayVpcAttachment — với TGW ID truyền vào qua parameter.
- "Share the TGW using an SCP" — SCPs block API actions; they never share resources."Share TGW bằng SCP" — SCP chặn API action; nó không bao giờ share resource.
- "Share the TGW using Service Catalog" — Service Catalog publishes approved products, it isn't a sharing mechanism."Share TGW bằng Service Catalog" — Service Catalog phát hành product đã duyệt, không phải cơ chế share.
- A peering transit gateway attachment — that connects TGW ↔ TGW, not VPC ↔ TGW.Một transit gateway attachment kiểu peering — cái đó nối TGW ↔ TGW, không nối VPC ↔ TGW.
- Creating the stack set in the member accounts, or using drift detection to cover new accounts — drift detection only reports.Tạo stack set trong các member account, hoặc dùng drift detection để phủ account mới — drift detection chỉ báo cáo.
Centrally manage a list of internal office IP ranges that developers reference in security groupsQuản lý tập trung danh sách dải IP văn phòng để dev tham chiếu trong security group
Customer-managed prefix list in the network account, shared org-wide with RAM. Security-group rules reference the prefix-list ID; updating the list updates every rule at once. Customer-managed prefix list ở network account, share toàn org bằng RAM. Rule security group tham chiếu ID của prefix list; sửa list là mọi rule cập nhật cùng lúc.
- JSON in S3 + SNS + a Lambda per account rewriting security groups — a lot of machinery to rebuild a native feature.JSON trong S3 + SNS + mỗi account một Lambda ghi lại security group — cả một bộ máy để làm lại một tính năng có sẵn.
- "A Config managed rule containing all the ranges" — Config evaluates, it isn't a source of CIDRs to reference."Một Config managed rule chứa tất cả các dải" — Config đánh giá, nó không phải nguồn CIDR để tham chiếu.
- A nested security-group reference —
SG-A allows SG-Bmeans "from ENIs carrying SG-B", not "SG-B's CIDR list". On-prem offices have no ENI.SG reference lồng nhau —SG-A allow SG-Bnghĩa là "từ các ENI đang mang SG-B", không phải "danh sách CIDR của SG-B". Văn phòng on-prem không có ENI.
Move a Lambda-based app and its Aurora database to another account with minimal downtimeChuyển một app dùng Lambda và database Aurora sang account khác với downtime tối thiểu
Download the deployment package and redeploy the functions in the target account, RAM-share the Aurora cluster, and let the target create a cross-account clone (copy-on-write, so near-instant regardless of size). Tải deployment package và deploy lại function ở account đích, share Aurora cluster qua RAM, và để account đích tạo một clone cross-account (copy-on-write, nên gần như tức thì bất kể dung lượng).
- "Share the Lambda functions with RAM" — Lambda is not a RAM-shareable resource type."Share Lambda function bằng RAM" — Lambda không phải resource type share được qua RAM.
- "Share the automated Aurora snapshot" — automated snapshots can't be shared; copy to a manual snapshot first."Share snapshot Aurora tự động" — snapshot tự động không share được; phải copy thành manual snapshot trước.
- Restoring from a snapshot at all — slower than a clone, which matters when the requirement is minimal downtime.Restore từ snapshot nói chung — chậm hơn clone, mà điều đó quan trọng khi yêu cầu là downtime tối thiểu.
Reflexes · Right-sizing the computePhản xạ · Chọn đúng compute
Lambda now times out at its 15-minute maximum as inputs grew; no infrastructure to manageLambda giờ timeout ở mức tối đa 15 phút vì input lớn dần; không muốn quản lý hạ tầng
Containerise the worker → push to ECR, and create a Fargate task definition; the Lambda shrinks to a dispatcher that calls ecs:RunTask per job. One task per job, exits when done.
Đóng gói worker thành container → đẩy lên ECR, và tạo task definition Fargate; Lambda thu lại thành một dispatcher gọi ecs:RunTask cho mỗi job. Mỗi job một task, xong thì tự dừng.
- A Lambda container image — still a Lambda, still 15 minutes.Lambda dạng container image — vẫn là Lambda, vẫn 15 phút.
- ECS on the EC2 launch type — you're back to managing instances, capacity and patching.ECS với launch type EC2 — lại phải quản lý instance, capacity và vá lỗi.
- Step Functions
Parallel+ provisioned concurrency — parallelism doesn't extend a single execution's timeout, and provisioned concurrency only removes cold start.Step FunctionsParallel+ provisioned concurrency — chạy song song không kéo dài timeout của một lần thực thi, còn provisioned concurrency chỉ bỏ cold start. - Swapping S3 for EFS and DynamoDB for RDS — moves the storage, doesn't touch the 15-minute wall.Đổi S3 sang EFS và DynamoDB sang RDS — dời chỗ lưu trữ, không đụng gì tới bức tường 15 phút.
Too many Lambdas opening database connections; Aurora is drowningQuá nhiều Lambda mở connection tới database; Aurora ngộp
Two answers together: RDS Proxy pooling in front of the database (point it at the reader endpoint for read-only workloads) + open the connection outside the handler so a warm environment reuses it. Hai đáp án đi cùng: RDS Proxy gom pool trước database (trỏ vào reader endpoint nếu workload chỉ đọc) + mở connection bên ngoài handler để environment còn ấm dùng lại.
- The cluster endpoint sends reads to the writer — a read-only function should use the reader endpoint.Cluster endpoint đưa lệnh đọc vào writer — function chỉ đọc nên dùng reader endpoint.
- Provisioned concurrency — fixes cold starts, not connection counts; it may hold more connections open.Provisioned concurrency — sửa cold start, không sửa số connection; nó còn có thể giữ nhiều connection mở hơn.
- Edge-optimized API Gateway — a network-path change; it does nothing to database connections, and it's pointless when clients are near the Region anyway.API Gateway edge-optimized — đổi đường mạng; không ảnh hưởng gì tới connection database, và vô nghĩa khi client vốn đã ở gần Region.
Sensor/IoT ingestion: API servers constantly overloaded and RDS write latency is high; must scale as devices growIngest sensor/IoT: API server liên tục quá tải và RDS write latency cao; phải scale khi số thiết bị tăng
Fix both tiers: Kinesis Data Streams + Lambda to absorb and batch the ingest, and DynamoDB (partition key deviceId, sort key timestamp) so writes scale horizontally.
Sửa cả hai tầng: Kinesis Data Streams + Lambda để hấp thụ và gom lô phần ingest, và DynamoDB (partition key deviceId, sort key timestamp) để ghi scale ngang.
- "Aurora + read replicas" — Aurora writes are fine, but replicas only scale reads and there is still one writer."Aurora + read replica" — Aurora ghi tốt, nhưng replica chỉ scale đọc và vẫn chỉ có một writer.
- "Grow the gp2 volume to raise IOPS" — vertical, temporary, and doesn't touch the API tier."Tăng dung lượng volume gp2 để nâng IOPS" — theo chiều dọc, tạm thời, và không đụng tới tầng API.
- "X-Ray to debug and add more API servers" — observability plus more of the same bottleneck."Dùng X-Ray debug rồi thêm API server" — thêm quan sát cộng thêm chính cái nút thắt cũ.
Reference · Global vs RegionalTra cứu · Global vs Regional
If it routes, authorizes, or bills → usually global. If it runs code or stores data → regional (often AZ-scoped underneath). Nếu nó định tuyến, phân quyền, hay tính tiền → thường global. Nếu chạy code hay lưu data → regional (bên dưới thường bó theo AZ).
| ScopePhạm vi | ServicesDịch vụ |
|---|---|
| GlobalGlobal | Route 53 · IAM · CloudFront · WAF (CloudFront scope) · Shield · AWS Organizations · Billing / Cost Explorer / Budgets · Marketplace |
| RegionalRegional | EC2 · Lambda · API Gateway · DynamoDB · RDS / Aurora · ELB · ASG · SQS · SNS · ECS / EKS · KMS keys · VPC · Secrets Manager |
| AZ-scopedTheo AZ | (under a Region)(bên trong 1 Region) EC2 instance · EBS volume · Subnet |
Reference · Route 53 routing policiesTra cứu · Route 53 routing policies
| PolicyLoại | What it doesLàm gì | Reach for it whenChọn khi |
|---|---|---|
| Simple | One record, no health checkMột record, không health check | Single resourceMột tài nguyên duy nhất |
| Failover | Active-passive; health check flips to standbyActive-passive; health check chuyển sang standby | Regional DR / "fail over"DR theo Region / "fail over" |
| Weighted | Split traffic by assigned weight (%)Chia traffic theo trọng số (%) | Canary, blue/green, A-B testingCanary, blue/green, test A-B |
| Latency | Route to lowest-latency RegionTrỏ tới Region latency thấp nhất | Global app, performanceApp toàn cầu, tối ưu tốc độ |
| Geolocation | Route by user's locationTrỏ theo vị trí người dùng | Compliance, language, licensingTuân thủ, ngôn ngữ, bản quyền |
| Geoproximity | By geographic distance, with a bias dialTheo khoảng cách địa lý, có núm bias | Shift traffic toward/away from a RegionKéo traffic về/rời một Region |
| Multivalue | Up to 8 healthy records, client picks randomlyTối đa 8 record khỏe, client chọn ngẫu nhiên | Cheap client-side spread — not a load balancer, not failoverRải phía client rẻ tiền — không phải load balancer, không phải failover |
Reference · ELB types & algorithmsTra cứu · Các loại ELB & thuật toán
Algorithm names in the options tell you the LB type: round robin / least outstanding = ALB. flow hash = NLB. If an option pairs NLB with an ALB algorithm, it's wrong. Tên thuật toán trong đáp án lộ luôn loại LB: round robin / least outstanding = ALB. flow hash = NLB. Đáp án ghép NLB với thuật toán của ALB là sai.
| ALB | NLB | |
|---|---|---|
| LayerTầng | L7 · HTTP/HTTPSL7 · HTTP/HTTPS | L4 · TCP/UDP/TLSL4 · TCP/UDP/TLS |
| AlgorithmsThuật toán | Round robin (default) · least outstanding requests · weighted target groupsRound robin (mặc định) · least outstanding requests · weighted target group | Flow hash only (5-tuple)Chỉ flow hash (5-tuple) |
| RoutingĐịnh tuyến | Host / path / header / queryHost / path / header / query | By port; no content routingTheo port; không route theo nội dung |
| StickinessSticky | Cookie (duration / app-based)Cookie (theo thời lượng / app) | Source IPTheo source IP |
| Static IPIP tĩnh | No (DNS name)Không (dùng DNS name) | Yes · Elastic IP per AZ · ultra-low latency, millions rpsCó · Elastic IP mỗi AZ · latency cực thấp, hàng triệu rps |
| Reach for itChọn khi | Web apps, microservices, cookie stickyWeb app, microservice, sticky cookie | Extreme throughput, static IP, non-HTTPThroughput cực lớn, IP tĩnh, không phải HTTP |
Which mechanism each load balancer actually offers — target-selection algorithm + stickiness. Mỗi loại load balancer thực sự có cơ chế gì — thuật toán chọn target + stickiness.
| LB typeLoại LB | Target-selection algorithmThuật toán chọn target | StickinessStickiness |
|---|---|---|
| ALB · L7 | Round robin (default) · least outstanding requests · weighted target groups (split by weight)Round robin (mặc định) · least outstanding requests · weighted target group (chia theo trọng số) | Cookie — duration (AWSALB) or app-basedCookie — theo thời lượng (AWSALB) hoặc theo app |
| NLB · L4 | Flow hash only — protocol + src IP/port + dst IP/port (+ TCP seq). No round robin, no LOR.Chỉ flow hash — protocol + src IP/port + dst IP/port (+ TCP seq). Không round robin, không LOR. | Source IPTheo source IP |
| GWLB · L3 | Flow hash (5-tuple / 3-tuple) over GENEVE — pins a flow to one applianceFlow hash (5-tuple / 3-tuple) qua GENEVE — ghim một flow vào một appliance | Flow stickiness (built in)Flow stickiness (mặc định) |
| CLB · legacy | Round robin (TCP listener) · least outstanding requests (HTTP/HTTPS listener)Round robin (listener TCP) · least outstanding requests (listener HTTP/HTTPS) | Cookie — duration or app-basedCookie — theo thời lượng hoặc theo app |
- Least outstanding requests (LOR) — send each new request to the target with the fewest in-flight requests (the least-busy one). Beats round robin when request cost varies or connections are long-lived (WebSocket, HTTP/2, streaming). Least outstanding requests (LOR) — gửi request mới tới target đang ít request đang xử lý nhất (rảnh nhất). Hơn round robin khi request nặng-nhẹ chênh nhau hoặc kết nối lâu (WebSocket, HTTP/2, streaming).
- Weighted target groups — one listener rule forwards to several target groups, each with a weight (%); ALB splits traffic by ratio. For blue/green, canary, A/B (e.g. 90% v1 / 10% v2). Splits at the ALB, unlike Route 53 weighted (splits at DNS). Weighted target groups — một listener rule forward tới nhiều target group, mỗi cái một trọng số (%); ALB chia traffic theo tỉ lệ. Dùng cho blue/green, canary, A/B (vd 90% v1 / 10% v2). Chia ở ALB, khác Route 53 weighted (chia ở DNS).
-
Sticky · ALB duration cookie (
AWSALB) — ALB generates the cookie, encodes the chosen target; client returns it → same target for a set duration (1 s–7 days). LB-managed. Sticky · ALB duration cookie (AWSALB) — ALB tự sinh cookie, mã hoá target đã chọn; client gửi lại → về cùng target trong thời hạn đặt (1 giây–7 ngày). LB quản lý. -
Sticky · ALB application cookie (
AWSALBAPP) — your app sets a custom-named cookie; ALB uses it to pin the target, so stickiness follows the app's session lifecycle. Sticky · ALB application cookie (AWSALBAPP) — app tự set cookie (bạn đặt tên); ALB dùng nó để ghim target, stickiness bám theo vòng đời session của app. - Sticky · NLB = source IP (no cookies at L4). GWLB = flow stickiness (a 5-tuple flow always hits the same appliance so stateful inspection works). Sticky · NLB = source IP (L4 không cookie). GWLB = flow stickiness (một flow 5-tuple luôn về cùng appliance để inspection giữ state).
- Gotcha — once a session is sticky, the LB skips the algorithm and returns straight to the pinned target. Round robin / LOR only decide where a new session lands. Điểm dễ quên — khi session đã sticky, LB bỏ qua thuật toán và về thẳng target đã ghim. Round robin / LOR chỉ quyết định cho session mới.
Reference · API Gateway response transformsTra cứu · API Gateway sửa response
Three different features — only two touch your Lambda's real responses. "Gateway responses" is the classic wrong answer. Ba tính năng khác nhau — chỉ hai cái đụng tới response thật của Lambda. "Gateway responses" là đáp án sai kinh điển.
| FeatureTính năng | What it changesSửa cái gì | WhereỞ đâu |
|---|---|---|
| Parameter mappingParameter mapping | append / overwrite / remove request & response headers, query, path, statusappend / overwrite / remove header request & response, query, path, status | HTTP API |
| Mapping templates (VTL)Mapping templates (VTL) | Transform body + headers on integration / method responseBiến đổi body + header ở integration / method response | REST API |
| Gateway responsesGateway responses | Only responses API Gateway generates: DEFAULT_4XX / 5XX, auth failure, throttle — never a successful Lambda responseChỉ response API Gateway sinh ra: DEFAULT_4XX / 5XX, auth fail, throttle — không bao giờ là response thành công từ Lambda | REST API |
Reference · CloudFront Functions vs Lambda@EdgeTra cứu · CloudFront Functions vs Lambda@Edge
| CloudFront Functions | Lambda@Edge | |
|---|---|---|
| EventsSự kiện | Viewer request / response onlyChỉ viewer request / response | Viewer + origin request / responseViewer + origin request / response |
| RuntimeRuntime | JS, sub-ms, <1 ms CPUJS, dưới ms, <1 ms CPU | Node / Python, up to 5 s (viewer) / 30 s (origin)Node / Python, tới 5 s (viewer) / 30 s (origin) |
| Can accessTruy cập được | Headers, URL, cookies. No body, no networkHeader, URL, cookie. Không body, không network | Body, network calls, larger depsBody, gọi network, thư viện lớn |
| Reach for itChọn khi | Header rewrite, redirects, URL rewrite, token check — high scale, cheapRewrite header, redirect, rewrite URL, check token — scale lớn, rẻ | Heavier logic, body manipulation, calls to origins / other servicesLogic nặng, sửa body, gọi origin / service khác |
Reference · Which services are serverlessTra cứu · Service nào là serverless
Serverless = no capacity to size + auto-scales (often to zero) + pay-per-use. The trap: managed ≠ serverless. Each serverless service has a provisioned "twin" the exam swaps in. Serverless = không phải chọn capacity + tự scale (thường về 0) + trả theo dùng. Bẫy: managed ≠ serverless. Mỗi service serverless có một "bản sinh đôi" provisioned mà đề hay tráo vào.
| ServerlessServerless | CategoryNhóm | Provisioned / managed twinBản provisioned / managed |
|---|---|---|
| Lambda | ComputeCompute | EC2 · ECS/EKS on EC2 |
| Fargate | ContainersContainer | EC2 launch type · EKS nodesEC2 launch type · node EKS |
| API Gateway | HTTP frontCổng HTTP | ALB · NLB |
| AppSync | GraphQL | Self-run GraphQL serverGraphQL tự dựng |
| S3 | Object storageLưu trữ object | EBS |
| EFS | File storageLưu trữ file | EBS · FSx |
| DynamoDB (on-demand)(on-demand) | NoSQL | Cassandra/Mongo on EC2Cassandra/Mongo trên EC2 |
| Aurora Serverless v2 | Relational DBDB quan hệ | RDS · Aurora provisionedRDS · Aurora provisioned |
| Redshift Serverless | Data warehouseData warehouse | Redshift provisioned clusterCluster Redshift provisioned |
| Athena | Query (SQL on S3)Truy vấn (SQL trên S3) | EMR · Redshift |
| Glue | ETL | EMR (Spark on EC2)EMR (Spark trên EC2) |
| Kinesis Data Firehose | Stream deliveryGiao stream | MSK · KDS provisioned shardsMSK · KDS provisioned shard |
| SQS · SNS · EventBridge | Messaging / eventsMessaging / event | MSK · self-run brokerMSK · broker tự dựng |
| Step Functions | OrchestrationĐiều phối | Self-hosted workflow engineWorkflow engine tự dựng |
| Cognito | Auth / user directoryAuth / thư mục user | Self-managed IdP · ADIdP tự quản · AD |
| OpenSearch Serverless | Search / analyticsTìm kiếm / analytics | OpenSearch provisionedOpenSearch provisioned |
Reference · Which service answers which questionTra cứu · Service nào trả lời câu hỏi nào
The single most useful table on this page. Almost every "advisor / analyzer / optimizer" distractor is resolved by asking what data does it read. Bảng hữu ích nhất trang này. Gần như mọi bẫy kiểu "advisor / analyzer / optimizer" được giải bằng cách hỏi nó đọc dữ liệu gì.
| The question being askedCâu hỏi đang được đặt ra | ServiceService | Data it readsDữ liệu nó đọc |
|---|---|---|
| Any obvious best-practice violations or waste?Có vi phạm best practice hay lãng phí rõ ràng nào không? | Trusted Advisor | resource config + AWS's own checks (cost · perf · security · fault tolerance · limits · ops)cấu hình resource + các check của AWS (cost · perf · security · fault tolerance · limit · ops) |
| Is this instance/volume/function the wrong size?Instance/volume/function này có sai cỡ không? | Compute Optimizer | CloudWatch utilization (≈14 days; 93 with enhanced metrics)utilization từ CloudWatch (≈14 ngày; 93 ngày với enhanced metrics) |
| Who outside my account/org is permitted to reach my resources?Ai ngoài account/org của tôi được phép với tới resource của tôi? | IAM Access Analyzer | IAM & resource-based policies (automated reasoning)IAM & resource-based policy (suy luận tự động) |
| Is this resource configured the way policy requires — and how was it configured last week?Resource này có cấu hình đúng policy không — và tuần trước nó cấu hình thế nào? | AWS Config | configuration items over timeconfiguration item theo thời gian |
| Who called the API that changed it?Ai gọi API làm nó đổi? | CloudTrail | API call historylịch sử lời gọi API |
| Is someone attacking, or is a credential behaving strangely?Có ai đang tấn công, hay một credential đang hành xử lạ? | GuardDuty | CloudTrail, VPC Flow Logs, DNS logs, EKS/S3/RDS activityCloudTrail, VPC Flow Logs, DNS log, hoạt động EKS/S3/RDS |
| Is there a known CVE in this EC2 / container image / Lambda?EC2 / container image / Lambda này có CVE đã biết không? | Inspector | software inventory vs vulnerability databasesdanh mục phần mềm đối chiếu cơ sở dữ liệu lỗ hổng |
| Is there sensitive data (PII) sitting in S3?Có dữ liệu nhạy cảm (PII) nằm trong S3 không? | Macie | object contentsnội dung object |
| One console for all security findings across accountsMột console cho mọi security finding trên các account | Security Hub | findings from the services abovefinding từ các service phía trên |
| Can this specific source reach that specific destination — and where does it stop?Nguồn cụ thể này có với tới đích cụ thể kia không — và tắc ở đâu? | VPC Reachability Analyzer | route tables, SGs, NACLs, TGW, endpointsroute table, SG, NACL, TGW, endpoint |
| Is there any unintended network path from the internet into my VPC?Có bất kỳ đường mạng ngoài ý muốn nào từ internet vào VPC của tôi không? | VPC Network Access Analyzer | the whole network configurationtoàn bộ cấu hình mạng |
| How is S3 being stored and accessed across the whole estate, over months?S3 đang được lưu và truy cập thế nào trên toàn hệ thống, qua nhiều tháng? | S3 Storage Lens | usage + activity metrics, 15 months with advanced metricsmetric usage + activity, 15 tháng với advanced metrics |
| When should this bucket/prefix move Standard → Standard-IA?Khi nào bucket/prefix này nên chuyển Standard → Standard-IA? | S3 Storage Class Analysis | access patterns from the moment you enable it (≈30 days to be useful)access pattern tính từ lúc bạn bật (cần ≈30 ngày mới hữu ích) |
| How much did we spend, and how is it trending?Chúng ta tiêu bao nhiêu, và xu hướng thế nào? | Cost Explorer | billing data · ~13 months back · 12-month forecastdữ liệu billing · lùi ~13 tháng · dự báo 12 tháng |
| Which resource/team/account produced each individual line of the bill?Resource/team/account nào tạo ra từng dòng của hoá đơn? | CUR | hourly line items with resource IDs and tags, in S3line item theo giờ kèm resource ID và tag, nằm trong S3 |
| What is the list price of an EC2 instance?Giá niêm yết của một EC2 là bao nhiêu? | Price List API | public price catalogue — no usage, no account databảng giá công khai — không có usage, không có dữ liệu account |
Reference · Detect vs prevent vs proactiveTra cứu · Detect vs prevent vs proactive
| Wording in the stemCách diễn đạt trong đề | Control typeLoại control | Built withXây bằng |
|---|---|---|
| "detectdetect" · "identifyidentify" · "report onbáo cáo" · "flagđánh dấu" | detective | Config rule · CT detective control (+ SSM remediation) |
| "preventprevent" · "must not be able tokhông được phép" · "denydeny" · "restrictgiới hạn" | preventive | SCP / RCP · IAM · CT preventive control |
| "block the deploymentchặn deployment" · "fail the stack before resources are createdfail stack trước khi tạo resource" | proactive | CloudFormation Hooks · cfn-guard · CT proactive control |
| "react within secondsphản ứng trong vài giây" · "automatically remediatetự động khắc phục" | reactive | EventBridge → Lambda/SSM · Firewall Manager auto-remediation |
- Config's proactive evaluation returns a verdict; it does not block on its own. Blocking needs a Hook or a pipeline gate.Proactive evaluation của Config trả về kết quả; tự nó không chặn. Muốn chặn phải có Hook hoặc cổng pipeline.
- If the requirement is "must never exist, not even briefly", every detective/reactive option is disqualified by the exposure window.Nếu yêu cầu là "không được tồn tại dù chỉ trong chốc lát", mọi option detective/reactive đều bị loại vì có cửa sổ phơi nhiễm.
Reference · Cost & billing plumbingTra cứu · Đường ống chi phí & billing
| ActionHành động | Management accountManagement account | Member accountMember account |
|---|---|---|
| Create a CURTạo CUR | ✓ covers the whole organization✓ phủ toàn organization | ✓ but only its own costs✓ nhưng chỉ chi phí của chính nó |
| Activate a user-defined cost allocation tagKích hoạt cost allocation tag do người dùng định nghĩa | ✓ | ✗ |
| Apply a tag to a resourceGắn tag lên resource | ✓ | ✓ |
| Create a CUR "for an OU"Tạo CUR "cho một OU" | ✗ — an OU is not an account. Create one org-wide CUR and split by UsageAccountId.✗ — OU không phải account. Tạo một CUR toàn org rồi tách theo UsageAccountId. | |
tag the resources → management account activates the tag key → org-wide CUR lands in S3 → Athena over the CUR → QuickSight dashboard with row-level security per team. When the stem says "self-managed application" or "the finance team builds their own reports", that's CUR + Athena + QuickSight — not Cost Explorer, which is a fixed console tool.
gắn tag lên resource → management account activate tag key → CUR toàn org đổ vào S3 → Athena query CUR → dashboard QuickSight có row-level security theo team. Khi đề nói "self-managed application" hay "team tài chính tự dựng báo cáo", đó là CUR + Athena + QuickSight — không phải Cost Explorer, vốn là công cụ console cố định.
- Tagging alone does nothing for billing. The tag key must be activated in the management account before it appears in CUR or Cost Explorer, and activation is not retroactive.Chỉ gắn tag thì billing không thấy gì. Tag key phải được activate ở management account thì mới xuất hiện trong CUR hay Cost Explorer, và việc activate không hồi tố.
- Cost Categories are for when different teams tag differently — map accounts/tags/services into one business-level grouping. With consistent tags already in place, they're extra work.Cost Categories dùng khi các team tag khác nhau — gom account/tag/service vào một nhóm ở mức nghiệp vụ. Nếu tag đã nhất quán sẵn thì nó là việc thừa.
- Budgets alert and act on a threshold; they don't produce historical comparison reports. Cost Explorer compares and forecasts. CUR is the raw ledger.Budgets cảnh báo và hành động ở một ngưỡng; nó không tạo báo cáo so sánh lịch sử. Cost Explorer so sánh và dự báo. CUR là sổ cái thô.
- IAM users can't open the Billing console until the root user turns on IAM access to Billing information — and that switch only enables delegation; you still attach the policies.IAM user không mở được Billing console cho tới khi root user bật IAM access to Billing information — và công tắc đó chỉ mở khả năng phân quyền; vẫn phải attach policy.
- Shared costs (NAT gateway, data transfer, support) don't carry a per-team tag — absolute chargeback needs an allocation rule on top.Chi phí dùng chung (NAT gateway, data transfer, support) không mang tag theo team — chargeback tuyệt đối cần thêm quy tắc phân bổ.
Reference · Four ways to get closer to the userTra cứu · Bốn cách tới gần người dùng hơn
All four enter AWS at the nearest edge and then ride the backbone. They differ in what they carry and whether anything is cached. Cả bốn đều vào AWS ở edge gần nhất rồi đi trên backbone. Chúng khác nhau ở thứ chúng chở và ở chỗ có cache hay không.
| CarriesChở gì | CachesCache | Use whenDùng khi | |
|---|---|---|---|
| CloudFront | HTTP(S) | ✓ | websites, static assets, video, read-heavy APIs, WAF at the edgewebsite, asset tĩnh, video, API nhiều đọc, WAF ở edge |
| API Gateway edge-optimizededge-optimized | API requestsrequest API | ✗ | a REST API in one Region with globally spread clientsmột REST API ở một Region với client rải toàn cầu |
| S3 Transfer Acceleration | object uploads/downloadsupload/download object | ✗ | large files to one central bucket from far away (use an accelerated presigned URL)file lớn gửi tới một bucket tập trung từ xa (dùng presigned URL accelerated) |
| Global Accelerator | TCP · UDP | ✗ | gaming, VoIP, write-heavy APIs, static IPs, multi-Region failover without DNSgame, VoIP, API nhiều ghi, IP tĩnh, failover đa Region không qua DNS |
- None of them makes the backend faster. The compute and the database stay exactly where they were — only the network path improves.Không cái nào làm backend chạy nhanh hơn. Compute và database vẫn nằm nguyên chỗ cũ — chỉ đường mạng tốt lên.
- A global document-upload app usually needs two of them: Transfer Acceleration for the files and edge-optimized (or CloudFront) for the API calls. Don't push large files through API Gateway and Lambda.Một app upload tài liệu toàn cầu thường cần hai trong số đó: Transfer Acceleration cho file và edge-optimized (hoặc CloudFront) cho lời gọi API. Đừng đẩy file lớn qua API Gateway và Lambda.
- Global Accelerator does not accept CloudFront or API Gateway as an endpoint. RDS Proxy fixes connection storms, not user latency.Global Accelerator không nhận CloudFront hay API Gateway làm endpoint. RDS Proxy sửa cơn bão connection, không sửa latency của người dùng.
Reference · Doing something in every accountTra cứu · Làm một việc trong mọi account
| VerbĐộng từ | ServiceService | Watch forCần để ý |
|---|---|---|
| Block an API actionChặn một API action | SCP / RCP | grants nothing · skips the management account · can't read request-body parameterskhông cấp quyền · bỏ qua management account · không đọc được tham số trong thân request |
| Share a resource you ownShare resource bạn sở hữu | RAM | TGW · subnets · prefix lists · Resolver rules · Aurora clusters · not LambdaTGW · subnet · prefix list · Resolver rule · Aurora cluster · không có Lambda |
| Create resources in each accountTạo resource trong từng account | StackSets | management/delegated-admin account · service-managed · automatic deployment covers new accountsmanagement/delegated-admin account · service-managed · automatic deployment phủ account mới |
| Grant cross-account access to dataCấp quyền truy cập dữ liệu cross-account | Resource-based policyResource-based policy | S3 · KMS · SQS · Lambda · Secrets Manager — plus the KMS grant if encryptedS3 · KMS · SQS · Lambda · Secrets Manager — cộng grant KMS nếu có mã hoá |
| Offer approved templatesCung cấp template đã duyệt | Service Catalog | self-service products; not a sharing or blocking mechanismproduct tự phục vụ; không phải cơ chế share hay chặn |
| Vend whole new accountsPhát hành account mới | Account Factory / AFT | baselined at birth: OU, controls, Identity Center, networkbaseline ngay từ đầu: OU, control, Identity Center, mạng |
| Watch compliance everywhereTheo dõi compliance khắp nơi | Config aggregator | read-only roll-up — the rules still have to be deployed by a conformance pack or StackSetgộp chỉ đọc — rule vẫn phải được deploy bằng conformance pack hoặc StackSet |
Question logNhật ký câu hỏi
Raw source. Collapsed — the distilled version lives in the reflexes above.Nguồn thô. Thu gọn — bản chắt lọc ở phần reflex phía trên.
Weather REST API · multi-Region failoverAPI REST thời tiết · failover đa Region
A company serves weather data over a REST API on API Gateway, integrated with a Lambda function per operation. DNS is Route 53 (record weather.example.com); data is in DynamoDB. Need the ability to fail over to a different AWS Region. Which solution?
Công ty phục vụ dữ liệu thời tiết qua REST API trên API Gateway, mỗi operation gắn một Lambda. DNS là Route 53 (record weather.example.com); data ở DynamoDB. Cần khả năng fail over sang Region khác. Chọn giải pháp nào?
- A. Edge-optimized endpoint with Lambda from both Regions as targets; DynamoDB global tables. — one Region + CloudFront, not multi-Region; can't target Lambda from two Regions; no failover.A. Edge-optimized endpoint lấy Lambda từ cả hai Region làm target; DynamoDB global tables. — chỉ một Region + CloudFront, không phải multi-Region; không thể nhắm Lambda từ hai Region; không có failover.
- B. New API Gateway + Lambda in another Region; Route 53 multivalue answer with both APIs; health monitoring; global tables. — multivalue is active-active random spread, sends traffic to both Regions always. Not "fail over".B. API Gateway + Lambda mới ở Region khác; Route 53 multivalue answer gồm cả hai API; health monitoring; global tables. — multivalue là rải ngẫu nhiên active-active, luôn gửi traffic tới cả hai Region. Không phải "fail over".
- C. New API Gateway + Lambda in another Region; Route 53 failover record; target health monitoring; DynamoDB global tables. — failover = active-passive, health check flips to Region B only when A is down. Correct.C. API Gateway + Lambda mới ở Region khác; Route 53 failover record; target health monitoring; DynamoDB global tables. — failover = active-passive, health check chuyển sang Region B chỉ khi A hỏng. Đúng.
- D. New API in a new Region; change Lambda to global functions; Route 53 multivalue answer; global tables. — "global Lambda functions" don't exist, and multivalue again (same flaw as B).D. API mới ở Region mới; đổi Lambda thành global functions; Route 53 multivalue answer; global tables. — "global Lambda functions" không tồn tại, và lại multivalue (cùng lỗi với B).
Organizations · new account blocked by a root Deny SCPOrganizations · account mới bị Deny SCP ở root chặn
AWS Organizations, a single OU Production holding all accounts. Deny-list SCPs at the org root restrict services. A newly acquired account is invited in; its admins then can't update AWS Config rules. Which option lets them make changes and keep enforcing current policies without added long-term maintenance? AWS Organizations, một OU Production chứa tất cả account. Deny-list SCP ở root hạn chế service. Một account vừa mua được mời vào; admin của nó rồi không cập nhật được rule AWS Config. Phương án nào cho họ thay đổi mà vẫn enforce policy hiện tại, không thêm bảo trì dài hạn?
- A. Remove the root SCPs limiting Config; use Service Catalog products for standard Config rules org-wide. — drops enforcement of the current deny; adds Service Catalog maintenance.A. Xoá SCP ở root đang giới hạn Config; dùng Service Catalog cho rule Config chuẩn toàn org. — mất enforcement của deny hiện tại; thêm bảo trì Service Catalog.
- B. Create a temporary Onboarding OU, apply an SCP there to allow Config, move the new account to Production when done. — the Deny is still at root, so it's inherited by the Onboarding OU too; an Allow can't override it. Account stays blocked. (The trap.)B. Tạo OU Onboarding tạm, gắn SCP allow Config ở đó, xong chuyển account về Production. — Deny vẫn ở root nên OU Onboarding vẫn kế thừa; Allow không đè được. Account vẫn bị chặn. (Bẫy.)
- C. Convert root deny-list SCPs to allow-list allowing only required services; temporarily allow Config for principals in the new account. — flips the whole model, must enumerate every allowed service = heavy long-term maintenance.C. Đổi deny-list ở root thành allow-list chỉ cho service cần; tạm allow Config cho principal ở account mới. — lật cả mô hình, phải liệt kê mọi service được phép = bảo trì dài hạn nặng.
- D. Create a temporary Onboarding OU with an Allow-Config SCP; move the root Deny SCP down to the Production OU; put the new account in Onboarding, then move it to Production when done. — the Deny is off the new account's path, so it can edit Config now; moving it into Production re-applies the guardrail. Correct.D. Tạo OU Onboarding tạm có SCP Allow-Config; chuyển Deny SCP từ root xuống Production OU; đặt account mới vào Onboarding, xong chuyển về Production. — Deny không còn nằm trên đường của account mới nên nó sửa được Config; chuyển vào Production thì guardrail áp lại. Đúng.
Two-tier stateful app · Aurora + ASG + ELB scalingApp 2 tầng stateful · scale Aurora + ASG + ELB
A two-tier web app moves on-prem → AWS. App tier = a single server running a stateful app; DB = PostgreSQL → Aurora PostgreSQL. User base will grow. Using Aurora PostgreSQL, EC2 Auto Scaling, and ELB — which solution gives a consistent user experience and lets both tiers scale? App web 2 tầng chuyển on-prem → AWS. App tier = một server chạy app stateful; DB = PostgreSQL → Aurora PostgreSQL. Lượng user sẽ tăng. Dùng Aurora PostgreSQL, EC2 Auto Scaling, ELB — phương án nào cho trải nghiệm nhất quán và cả hai tầng đều scale?
- A. Aurora Auto Scaling for Aurora Replicas; NLB with least-outstanding-requests + sticky. — NLB has no least-outstanding-requests (that's ALB); NLB is L4 flow-hash.A. Aurora Auto Scaling cho Aurora Replicas; NLB với least-outstanding-requests + sticky. — NLB không có least-outstanding-requests (đó là của ALB); NLB là L4 flow-hash.
- B. Aurora Auto Scaling for Aurora writers; ALB round robin + sticky. — you scale read replicas, not writers; a cluster has one writer.B. Aurora Auto Scaling cho Aurora writers; ALB round robin + sticky. — scale read replica chứ không phải writer; cluster chỉ có một writer.
- C. Aurora Auto Scaling for Aurora Replicas; ALB with round robin routing + sticky sessions. — ALB (L7) fits the web tier, round robin is a valid ALB algorithm, sticky handles the stateful app, replicas scale reads. Correct.C. Aurora Auto Scaling cho Aurora Replicas; ALB round robin + sticky sessions. — ALB (L7) hợp web tier, round robin là thuật toán hợp lệ của ALB, sticky lo app stateful, replica scale đọc. Đúng.
- D. Aurora scaling for Aurora writers; NLB with least-outstanding-requests + sticky. — writers wrong AND NLB + LOR wrong (both flaws of A and B).D. Aurora scaling cho Aurora writers; NLB với least-outstanding-requests + sticky. — sai writer VÀ sai NLB + LOR (dính cả lỗi của A lẫn B).
Serverless metadata API · strip response headers for old devicesAPI metadata serverless · gỡ response header cho thiết bị cũ
A metadata service is accessed by consumer devices (TVs, radios). Older devices error when certain HTTP headers are present in responses; the on-prem LB currently removes those headers for old devices, keyed on User-Agent. Migrate to AWS, adopt serverless, keep supporting old devices. Apps are already Lambda functions. Which solution? Một metadata service được thiết bị tiêu dùng (TV, radio) truy cập. Thiết bị cũ lỗi khi response có một số HTTP header; LB on-prem hiện gỡ các header đó cho thiết bị cũ, nhận diện qua User-Agent. Chuyển lên AWS, dùng serverless, vẫn support thiết bị cũ. App đã là Lambda. Chọn gì?
- A. CloudFront + ALB → Lambda; CloudFront function to remove headers by User-Agent. — ALB is provisioned, not serverless; the requirement says adopt serverless.A. CloudFront + ALB → Lambda; CloudFront function gỡ header theo User-Agent. — ALB là provisioned, không serverless; đề yêu cầu serverless.
- B. API Gateway REST API → Lambda; modify the default gateway responses to remove headers by User-Agent. — gateway responses only cover errors API Gateway generates, not Lambda's normal responses.B. API Gateway REST API → Lambda; sửa default gateway responses để gỡ header theo User-Agent. — gateway responses chỉ cho lỗi do API Gateway sinh ra, không phải response bình thường của Lambda.
- C. API Gateway HTTP API → Lambda; response mapping to remove the problematic headers (by User-Agent); associate the response data mapping with the HTTP API. — serverless + HTTP API parameter mapping is exactly the response-header tool. Correct.C. API Gateway HTTP API → Lambda; response mapping gỡ header lỗi (theo User-Agent); gắn response data mapping vào HTTP API. — serverless + parameter mapping của HTTP API đúng là công cụ sửa response header. Đúng.
- D. CloudFront + ALB → Lambda; Lambda@Edge to remove headers "in response to viewer requests" by User-Agent. — ALB isn't serverless, and you strip response headers on a response event, not a request.D. CloudFront + ALB → Lambda; Lambda@Edge gỡ header "in response to viewer requests" theo User-Agent. — ALB không serverless, và bạn gỡ response header ở event response chứ không phải request.