AWS Resource Access Manager · RAM
Own a resource once, let other accounts use it. No copy, no peering, no cross-account role to assume. The owner keeps the lifecycle and the bill; the consumer just references it by ID as if it were local.
Sở hữu một resource một lần, cho account khác dùng nó. Không copy, không peering, không role cross-account phải assume. Chủ sở hữu giữ vòng đời và hoá đơn; bên dùng chỉ tham chiếu bằng ID như thể nó là của mình.
Share the right to use vs create the thingShare quyền dùng vs tạo ra thứ đó
Multi-account questions almost always need two answers, because two separate jobs are happening. RAM grants permission; StackSets put resources into each account. Choosing only one is why "choose two" questions look ambiguous. Câu hỏi đa account gần như luôn cần hai đáp án, vì có hai việc riêng biệt. RAM cấp quyền; StackSets đặt resource vào từng account. Chọn thiếu một cái là lý do câu "choose two" trông mơ hồ.
The attachment needs both: RAM says "you're allowed to touch tgw-0123", the StackSet actually builds the VPC and the attachment — and it must be given the TGW ID as a parameter, because !Ref can't reach a resource in another stack, let alone another account.
Attachment cần cả hai: RAM nói "bạn được phép đụng tgw-0123", StackSet mới thật sự dựng VPC và attachment — và nó phải được truyền TGW ID qua parameter, vì !Ref không với tới resource ở stack khác, nói gì đến account khác.
Patterns worth recognisingCác mẫu nên nhận ra
pl-global-offices) owned by the network team, shared org-wide. Security-group rules and route tables reference the ID; edit the list once and every referencing rule follows. This is the answer to "centrally manage a list of internal IP ranges".Một túi CIDR có tên (pl-global-offices) do network team sở hữu, share toàn org. Rule security group và route table tham chiếu ID; sửa list một lần là mọi rule đang trỏ vào đều theo. Đây chính là đáp án cho "quản lý tập trung danh sách dải IP nội bộ".
- A prefix list is Regional — recreate or sync it per Region. And its
MaxEntriescounts against the security-group rule quota: a list sized for 20 entries consumes 20 rule slots even if it holds 4.Prefix list là Regional — phải tạo lại hoặc đồng bộ theo từng Region. VàMaxEntriescủa nó tính vào quota rule của security group: list đặt 20 entry chiếm 20 slot dù chỉ chứa 4. - Referencing security group B from security group A does not inherit B's CIDR rules — it allows traffic from network interfaces that have B attached. On-prem offices have no ENI, so a nested SG reference can never represent them.Tham chiếu security group B từ security group A không kế thừa các CIDR rule của B — nó cho phép traffic từ network interface đang gắn B. Văn phòng on-prem không có ENI, nên SG reference lồng nhau không bao giờ đại diện được cho chúng.
- Automated RDS/Aurora snapshots cannot be shared. Copy to a manual snapshot first (and share the KMS key if encrypted).Snapshot tự động của RDS/Aurora không share được. Phải copy thành snapshot manual trước (và share cả KMS key nếu có mã hoá).
RAM vs the look-alikesRAM vs những cái trông giống
| You want to…Bạn muốn… | UseDùng |
|---|---|
| Let account B use a TGW / subnet / prefix list you ownCho account B dùng TGW / subnet / prefix list của bạn | RAM |
| Let account B read your S3 bucket / use your KMS key / invoke your LambdaCho account B đọc S3 bucket / dùng KMS key / gọi Lambda của bạn | Resource-based policy (bucket policy, key policy, function policy)Resource-based policy (bucket policy, key policy, function policy) |
| Create resources inside every accountTạo resource bên trong mọi account | CloudFormation StackSetsCloudFormation StackSets |
| Offer an approved, self-service templateCung cấp template đã duyệt, tự phục vụ | Service Catalog |
| Stop accounts doing somethingCấm account làm gì đó | SCP |
| Connect two VPCs' networksNối mạng hai VPC | Peering / TGW |
Exam reflexesPhản xạ thi
- "Centrally manage internal office CIDRs that developers reference in security groups, least ops" → customer-managed prefix list + RAM. Not S3 JSON + SNS + Lambda, not a Config rule, not a nested SG reference."Quản lý tập trung CIDR văn phòng để dev tham chiếu trong security group, ít vận hành nhất" → customer-managed prefix list + RAM. Không phải S3 JSON + SNS + Lambda, không phải Config rule, không phải SG reference lồng nhau.
- "Connect every member account's VPC to a shared TGW, automate for new accounts" (choose two) → RAM share + StackSet that creates the VPC and the VPC attachment. A "peering attachment" is TGW↔TGW and is the wrong shape."Nối VPC của mọi member account vào TGW dùng chung, tự động cho account mới" (chọn hai) → RAM share + StackSet tạo VPC và VPC attachment. "Peering attachment" là TGW↔TGW, sai hình dạng.
- "Move Lambda + Aurora to another account, minimise downtime" → redeploy the Lambda package (RAM can't share Lambda) + RAM-share the Aurora cluster and clone it."Chuyển Lambda + Aurora sang account khác, tối thiểu downtime" → deploy lại package Lambda (RAM không share được Lambda) + RAM share Aurora cluster rồi clone.
- Any answer using SCP or Service Catalog as the way to "share the transit gateway" is wrong — SCP blocks, Service Catalog publishes products.Đáp án nào dùng SCP hay Service Catalog để "share transit gateway" là sai — SCP chặn, Service Catalog phát hành product.