1
---
2
name: google-cloud-waf-cost-optimization
3
metadata:
4
version: "1.0.2"
5
category: WellArchitectedFramework
6
description: Evaluates Google Cloud workloads for cost efficiency and FinOps alignment using the Google Cloud Well-Architected Framework Cost Optimization pillar. Use when the user asks to analyze Google Cloud spend, reduce cloud bills, rightsize resources (for example, Compute, GKE, Storage, Databases), evaluate discount options (for example, CUDs, SUDs, Spot VMs), or eliminate idle capacity. Do not use for standalone product pricing lookups or non-cost architecture design.
7
---
8
9
# Google Cloud Well-Architected Framework skill for the Cost Optimization pillar
10
11
## Attribution
12
13
**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you
14
MUST read and follow the instructions in
15
[Usage Attribution](references/attribution.md).
16
17
## Overview
18
19
The Cost Optimization pillar of the Google Cloud Well-Architected Framework
20
provides a structured approach to optimize the costs of your cloud workloads
21
while maximizing business value. Cloud costs differ significantly from
22
on-premises capital expenditure (CapEx) models, requiring a shift to operational
23
expenditure (OpEx) management and a culture of accountability (FinOps).
24
The FinOps lifecycle consists of three iterative phases:
25
- **Inform**: Visibility and allocation. Always start with **Cloud Billing
26
reports** for built-in console visibility (filtered by department labels).
27
Complement with **Looker Studio** for custom, shareable cross-departmental
28
dashboards.
29
30
- **Optimize**: Rates and usage. Eliminate waste, right-size resources, and leverage commitments (**CUDs**, **SUDs**).
31
- **Operate**: Continuous improvement. Integrate cost management into delivery pipelines and establish governance.
32
33
## Operational instructions
34
35
- **Comprehensive First**: Always provide a complete list of standard recommendations/strategies relevant to the service or scenario mentioned. Do not limit the scope or omit standard elements just because you are proposing follow-up questions.
36
- **Full Conjunction**: When an instruction bundles multiple actions (e.g., "A **AND** B"), you must mention and explain **BOTH** actions in your response explicitly.
37
- **Conditional Assessment**: Only use the 'Workload assessment questions' to refine advice *after* providing standard framework recommendations, unless the user explicitly asks for an interview or assessment first.
38
39
## Core principles
40
41
The recommendations in the cost optimization pillar of the Well-Architected
42
Framework are aligned with the following core principles:
43
44
- **Align cloud spending with business value**: Ensure that your cloud
45
resources deliver measurable business value by aligning IT spending with
46
business objectives. Prioritize investments that directly contribute to
47
revenue, customer satisfaction, or operational efficiency. Grounding
48
document:
49
https://docs.cloud.google.com/architecture/framework/cost-optimization/align-cloud-spending-business-value.md.txt
50
51
- **Foster a culture of cost awareness**: Ensure that people across your
52
organization consider the cost impact of their decisions and activities.
53
Provide teams with the visibility and information they need to make informed,
54
cost-conscious choices. Grounding document:
55
https://docs.cloud.google.com/architecture/framework/cost-optimization/foster-culture-cost-awareness.md.txt
56
57
- **Optimize resource usage**: Provision only the resources that you need and
58
pay only for what you consume. Select the most cost-effective resource types,
59
sizes, and locations that meet your technical and business requirements.
60
Grounding document:
61
https://docs.cloud.google.com/architecture/framework/cost-optimization/optimize-resource-usage.md.txt
62
63
- **Optimize continuously**: Continuously monitor your cloud resource usage and
64
costs, and proactively make adjustments as needed to optimize your spending.
65
This iterative approach helps identify and address inefficiencies before they
66
become significant. Grounding document:
67
https://docs.cloud.google.com/architecture/framework/cost-optimization/optimize-continuously.md.txt
68
69
## Relevant Google Cloud products
70
71
The following are _examples_ of Google Cloud products and features that are
72
relevant to cost optimization:
73
74
- **Visibility and monitoring**:
75
76
- **Cloud Billing reports**: Built-in dashboards for visualizing spending and
77
trends. **Essential for visibility within the console.**
78
- **BigQuery billing export**: Enables granular, custom analysis of billing
79
data using SQL and BI tools.
80
- **Looker Studio**: Used for creating detailed, shared cost dashboards and
81
reports. **Use alongside Cloud Billing reports for custom visual insights.**
82
- **Billing alerts and budgets**: Automated notifications when spending
83
reaches predefined thresholds.
84
- **Storage Insights**: Used to analyze Cloud Storage access patterns and identify
85
cost-saving opportunities.
86
87
- **Automation and optimization tools**:
88
89
- **Recommender / Active Assist**: Automatically identifies idle resources,
90
rightsizing opportunities, and unused commitments.
91
- **Cloud Hub Optimization**: Integrates billing and resource utilization data
92
to help developers and application owners quickly identify their most
93
expensive, fluctuating, or underutilized cloud resources.
94
- **FinOps hub**: Presents active savings and optimization opportunities in
95
one dashboard.
96
- **Billing quotas**: Limits on resource consumption to prevent unexpected
97
cost spikes.
98
99
- **Efficient infrastructure**:
100
101
- **Managed services and serverless services**: Services like Cloud Run, Cloud
102
Run functions, and GKE Autopilot reduce operational overhead and pay-per-use
103
scaling.
104
- **Compute Engine**:
105
- **Committed Use Discounts (CUDs)**: Best for predictable, steady-state workloads.
106
- **Spot VMs**: Best for fault-tolerant, interruptible, or unpredictable batch tasks.
107
- **Sustained Use Discounts (SUDs)**: Passive, automatic discounts for instances running a significant portion of the month without commitments. **Always mention this as a passive alternative or complement to CUDs.**
108
109
- **Cloud Storage Lifecycle Policies**: Automated moves data to lower-cost
110
storage classes (Nearline, Coldline, Archive) based on age or access.
111
**Note**: Always recommend **Storage Insights** first to understand current
112
access patterns before defining lifecycle rules.
113
114
- **Networking and Content Delivery**:
115
- **Location awareness**: Keep traffic within a single region where possible to avoid inter-region data transfer costs.
116
- **Cloud CDN**: Caches content to reduce data egress from the origin.
117
- **Network Service Tiers**: Offers **Standard Tier** as a lower-cost option compared to **Premium Tier** for latency-tolerant traffic.
118
- **Cloud Interconnect / Direct Peering**: Optimizes costs for high-volume data transfer to on-premises environments. **Note**: Always clarify hybrid connectivity options when discussing egress control, as on-premises sync is often a factor in multi-regional designs.
119
- **Managed Databases**:
120
- **Instance sizing**: Right-size CPU and memory based on Cloud Monitoring metrics.
121
- **High Availability (HA)**: Implement HA only for production environments to avoid doubling node costs for all environments.
122
- **Storage Optimization**: Optimize storage costs by managing backup retention policies **AND** explicitly identifying and deleting unused or idle resources (like unused and orphaned disks, expired snapshots, or idle instances).
123
124
125
- **Organization and governance**:
126
127
- **Resource Manager**: Logical structure (Organizations, Folders, Projects)
128
for cost attribution.
129
- **Labels**: Metadata tags for categorizing and filtering costs by
130
environment, team, or application.
131
- **Organization Policy Service**: Enforces constraints (e.g., restricted
132
regions or machine types) to control costs.
133
134
## Workload assessment questions
135
136
Ask appropriate questions to understand the cost-related requirements and
137
constraints of the workload and the user's organization. Choose questions from
138
the following list:
139
140
- How do you incorporate cost considerations into your cloud architecture design
141
process?
142
- How do you foster a culture of cost awareness among your development teams?
143
- How do you monitor and manage cloud costs across different projects or
144
departments?
145
- What strategies do you use to optimize the cost of your compute resources?
146
- How do you balance cost optimization with the need for agility and innovation?
147
- How do you ensure that you are not over-provisioning cloud resources?
148
- How do you use data and analytics to drive cost optimization decisions?
149
- How do you optimize costs in different environments (e.g., development,
150
testing, production)?
151
- How do you ensure that your cost optimization efforts are sustainable and
152
ongoing?
153
- How do you measure the success of your cloud cost optimization initiatives?
154
155
## Validation checklist
156
157
Use the following checklist to evaluate the architecture's alignment with
158
cost-optimization recommendations:
159
160
- **Cost Attribution**: 100% of resources are labeled with key metadata
161
(e.g., `env`, `team`, `app`).
162
- **Granular Visibility**: BigQuery billing export is enabled and used for
163
regular cost reviews.
164
- **Budgets and Alerts**: Every project or business unit has defined budgets
165
and active alerts.
166
- **Rightsizing**: Resources are regularly adjusted based on rightsizing
167
suggestions provided by Active Assist Recommender.
168
- **Commitment Strategy**: Spend is reviewed monthly to optimize Committed Use Discount (CUD) coverage. For non-committed workloads, verify if **Sustained Use Discounts (SUDs)** are being captured automatically.
169
- **Idle Resource Management**: Unused disks, IP addresses, and idle VMs are
170
identified and removed monthly.
171
- **Managed Services**: Serverless options are preferred for new workloads
172
unless specific technical constraints exist.
173
- **Storage Tiers**: Lifecycle policies are active for all major storage
174
buckets to minimize archival costs. Be aware of **retrieval fees**
175
associated with Nearline, Coldline and Archive storage classes.
176
- **Network Egress**: Data transfer is minimized by keeping traffic regional,
177
using **Cloud CDN**, and leveraging **Standard Network Tier** where
178
appropriate. High-volume on-premises traffic uses **Direct Peering** or
179
**Cloud Interconnect** (always verify if hybrid connectivity is involved).
180
- **Native Reporting**: **Cloud Billing reports** must be used for standard
181
views of spending trends in the console.
182
- **Custom Dashboards**: **Looker Studio** is used for advanced, shareable, and
183
customized reporting.
184
185
186
187