Hiện tại, Amazon Q đã được tích hợp với AWS Cost Explorer khoảng đầu năm 2025, giúp người dùng dễ dàng nắm rõ, phân tích chi phí hạ tầng hàng tháng bằng ngôn ngữ tự nhiên.
Mình xin phép chia sẻ 5 câu prompt mà mình sử dùng hằng ngày, dùng để quản lý chi phí hằng tháng cho nhiều dự án trên infra AWS.
1. Phân tích chi phí theo dịch vụ (Service-level cost analysis)
Đây là câu hỏi cơ bản nhất, giúp bạn có cái nhìn tổng quan về các dịch vụ đang chiếm nhiều chi phí nhất.
Prompt: “Provide a detailed breakdown of last month’s AWS costs, categorized by service. Identify the top 5 costliest services and highlight the cost trend for each of them over the past 3 months to understand any significant spikes or drops.”


2. Phân tích chi phí theo tài nguyên (Resource-level cost analysis)
Câu prompt này đi sâu hơn vào từng tài nguyên cụ thể, rất hữu ích cho việc tìm kiếm những tài nguyên bị lãng phí hoặc không được sử dụng.
Prompt: “Analyze last month’s costs for our EC2 and RDS instances. Group the costs by instance type, region, and tag (e.g., ‘project’, ‘department’). Specify which instances incurred the highest costs and recommend potential cost-saving opportunities like switching to a different instance family or leveraging Reserved Instances.”
3.Phân tích chi phí theo dự án/nhóm (Project/Team-based cost analysis)
Prompt này sử dụng các thẻ (tags) để phân bổ chi phí, rất quan trọng đối với các tổ chức lớn có nhiều đội nhóm hoặc dự án.
Prompt: “Generate a comprehensive cost report for last month, segmented by the ‘Project’ and ‘Team’ tags. For each project, break down the costs by AWS service. Highlight any project with a cost variance of more than 15% compared to the previous month and explain the likely causes.”
4. Phân tích chi phí theo loại loại hình (Cost type analysis – On-demand, Reserved, Savings Plan)
Câu hỏi này giúp bạn hiểu rõ tỷ lệ sử dụng giữa các loại hình chi trả khác nhau, từ đó tối ưu hóa chiến lược của mình.
Prompt: “Provide a breakdown of our last month’s costs based on the pricing model: On-Demand, Reserved Instances, and Savings Plans. Calculate the total savings achieved through RIs and SPs. Identify any underutilized or unused RIs and suggest a strategy for optimizing future purchases.”
5. Phân tích chi phí theo dự báo và bất thường (Forecasting and Anomaly detection)
Prompt này tập trung vào việc phát hiện sớm các bất thường về chi phí (ví dụ: quên tắt sagemaker endpoint, quên tắt sagemaker canvas,…), giúp bạn phòng chống kịp thời trước khi vấn đề trở nên nghiêm trọng, không có khả năng chi trả ![]()
Prompt: “Analyze the last month’s AWS cost data to detect any significant cost anomalies or unexpected spikes. Compare the actual costs with the forecasted budget for each major service. Highlight the specific dates and resources responsible for the anomalies and provide a root cause analysis to prevent future occurrences.”











Leave a Reply