Ngân hàng đề — AWS Certified Solutions Architect Professional
Tìm thấy 1221 câu.
The company runs the platform on an Amazon Elastic Container Service (Amazon ECS) cluster. The ECS cluster consists of Amazon EC2 On-Demand Instances that are in an Auto Scaling group. The Auto Scaling group uses a predictive scaling policy.
The ECS cluster makes frequent requests to an Amazon S3 bucket to download ticket assets. The ECS cluster and the S3 bucket are in the same AWS Region and the same AWS account. Traffic between the ECS cluster and the S3 bucket flows across a NAT gateway.
The company needs to optimize the cost of the platform without decreasing the platform's availability.
Which combination of steps will meet these requirements? (Choose two.)
- A Create a gateway VPC endpoint for the S3 bucket.
- B Add another ECS capacity provider that uses an Auto Scaling group of Spot Instances. Configure the new capacity provider strategy to have the same weight as the existing capacity provider strategy.
- C Create On-Demand Capacity Reservations for the applicable instance type for the time period of the scheduled scaling policies.
- D Enable S3 Transfer Acceleration on the S3 bucket.
- E Replace the predictive scaling policy with scheduled scaling policies for the scheduled events.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi mô tả một nền tảng bán vé sự kiện (ticketing platform) chạy trên Amazon ECS cluster sử dụng EC2 On-Demand Instances trong Auto Scaling Group (ASG) với predictive scaling policy. Nền tảng này chịu tăng đột biến traffic vào các thời điểm sự kiện đã được khách hàng lên lịch trước (biết chính xác ngày giờ).
ECS cluster thường xuyên tải tài nguyên vé từ S3 bucket cùng region và account, nhưng traffic đi qua NAT gateway → gây chi phí data transfer cao.
Mục tiêu: Tối ưu chi phí mà không giảm availability (tính sẵn sàng). Cần chọn 2 bước kết hợp phù hợp.
Vấn đề chính:
- Scaling chưa tối ưu dù dùng predictive (dựa ML dự đoán pattern lịch sử).
- Data transfer qua NAT → phí outbound traffic (khoảng 0.09$/GB intra-region qua NAT).
- Cập nhật AWS 2026: ECS hỗ trợ predictive scaling với Application Auto Scaling, nhưng scheduled scaling ưu tiên cho workload biết trước; VPC Gateway Endpoints miễn phí traffic đến S3.
📘 Tài liệu tham khảo:
✅ Đáp án đúng (Chọn 2)
Các bước đúng là:
- Create a gateway VPC endpoint for the S3 bucket.
- Replace the predictive scaling policy with scheduled scaling policies for the scheduled events.
Lý do chọn:
- Gateway VPC Endpoint: Loại bỏ traffic qua NAT/internet, traffic intra-VPC đến S3 miễn phí → tiết kiệm chi phí lớn (data transfer out từ NAT ~0.09$/GB). Không ảnh hưởng availability vì endpoint highly available. 🛠️ Tối ưu cost trực tiếp.
- Thay predictive bằng scheduled scaling: Biết trước exact thời gian event → scheduled scaling scale chính xác theo lịch (scale out trước event, scale in sau), giảm over-provisioning so với predictive (dự đoán ML có thể dư thừa). Giữ availability cao, tiết kiệm On-Demand costs. 🔄 Phù hợp workload predictable theo lịch.
Kết hợp 2 bước: Giảm data transfer + tối ưu capacity → cost down 20-50% tùy workload.
🛠️ Giải thích TẤT CẢ các phương án (Đúng/Sai)
-
✅ Create a gateway VPC endpoint for the S3 bucket.
Đúng: VPC Gateway Endpoint (interface cho S3) cho phép ECS truy cập S3 trực tiếp qua AWS private network, bỏ qua NAT gateway → data transfer miễn phí (no charge for intra-region VPC-to-S3). Deploy dễ dàng với route table update. Không giảm availability (multi-AZ). Tiết kiệm lớn vì "frequent requests". 📈 Best practice AWS Well-Architected Cost Optimization. -
❌ Add another ECS capacity provider that uses an Auto Scaling group of Spot Instances. Configure the new capacity provider strategy to have the same weight as the existing capacity provider strategy.
Sai: Thêm Spot provider với weight bằng nhau (50/50) giúp tiết kiệm (~70% rẻ hơn On-Demand), nhưng Spot Instances có thể bị interrupt → rủi ro giảm availability cao trong traffic spike (events lớn). Không phù hợp "without decreasing availability". Nên dùng Spot với base capacity On-Demand + Spot cho burst, hoặc low weight Spot. -
❌ Create On-Demand Capacity Reservations for the applicable instance type for the time period of the scheduled scaling policies.
Sai: Capacity Reservations đảm bảo capacity nhưng không giảm chi phí (vẫn trả full On-Demand rate, commit trước). Thậm chí tăng chi phí nếu không dùng hết. Không cần vì ASG + predictive/scheduled đã handle scaling; dùng Spot/Reserved Instances thay vì On-Demand Reservations cho cost save. -
❌ Enable S3 Transfer Acceleration on the S3 bucket.
Sai: Transfer Acceleration tăng tốc global transfers qua CloudFront edge (phí extra ~0.04$/GB + standard), nhưng ECS/S3 cùng region → không cần, không tiết kiệm cost (vẫn qua NAT phí outbound). Chỉ hữu ích cross-region/continent. Lãng phí, không giải quyết vấn đề NAT traffic.
📘 Kết luận & Best Practices
Kết hợp Gateway Endpoint + Scheduled Scaling là giải pháp tối ưu nhất theo AWS 2026 (hỗ trợ ECS Anywhere scaling, predictive cải tiến ML nhưng scheduled chính xác hơn cho known events). Test bằng CloudWatch metrics (CPU/Network) để verify. Tiếp theo: Xem Spot với Intelligent Scaling hoặc Savings Plans cho dài hạn. 🚀