SkarpSkarp

Chapter 3 of 27

Billing Accounts, Cost Controls, and the Google Cloud Pricing Calculator

Cost surprises can derail any cloud initiative; build the skills to wire billing correctly, set guardrails, and estimate spend before you deploy.

27 min readen

Big Picture: Why Billing and Cost Controls Matter

Why Cost Skills Matter

In Google Cloud, good architecture includes performance, security, and cost. As an Associate Cloud Engineer you must be able to predict, monitor, and control spend for real workloads.

Three Big Ideas

This module connects three ideas: billing accounts and project linkage, budgets and alerts as guardrails, and the Google Cloud pricing calculator for pre‑deployment cost estimates.

What You Will Be Able To Do

You will configure billing accounts, set budgets and alerts, estimate costs for key products, and recognize basic cost optimization tools like committed use discounts and rightsizing.

Exam Context

Your exam role: An Associate Cloud Engineer deploys and secures applications, services, and infrastructure, monitors operations of multiple projects, and maintains enterprise solutions to ensure that they meet target performance metrics.

Billing Accounts, Payment Profiles, and Project Linkage

Who Owns vs Who Pays

Google Cloud separates who owns resources from who pays. Organizations, folders, and projects hold resources; billing accounts and payments profiles pay for their usage.

Payments Profile and Billing Account

A Google payments profile holds your legal and payment info. A billing account in Cloud Billing links to one payments profile and pays for usage from linked projects.

Project Linkage Rules

Each project can link to zero or one active billing account. Multiple projects may share a billing account, but a single project cannot span multiple billing accounts.

Location and Ownership

The payments profile country affects tax and currency options. Billing admins control who can link projects and view costs. If billing is missing or disabled, most paid resources stop running.

Step‑by‑Step: Creating and Linking a Billing Account

Creating a Billing Account

In the console, go to Billing → Manage billing accounts → Create account. Name it, set the country, choose a currency, and add a payment method linked to your payments profile.

Linking a Project

Select your project, open Billing, and if billing is not set choose Link a billing account. Pick an existing billing account and click Set account to start charging usage there.

Changing Billing for a Project

To move a project to a different billing account, open the project’s Billing page, click Change billing account, select the new one, and confirm the change.

Permissions Concept

Billing permissions are separate from project IAM. Billing Account Creators/Admins manage accounts and linkages, while project roles alone do not guarantee billing control.

Budgets and Alerts: Your First Cost Guardrail

What is a Budget?

A budget monitors actual and optional forecasted costs on a billing account. You can scope it to specific projects, services, or labels and have it trigger alerts when thresholds are reached.

How Alerts Work

Budgets send alerts at percentage thresholds (like 50%, 90%, 100%). Alerts do not stop resources; they notify you by email or Pub/Sub so you can manually respond.

Scopes and Use Cases

Budgets are defined at the billing account level but can monitor multiple projects or just one. Use shared budgets for overall control and project‑specific ones for risky workloads.

Exam Trap

On the exam, remember: budgets and alerts are monitoring tools, not enforcement tools. They do not automatically shut down Compute Engine, GKE, or other resources.

Hands‑On Walkthrough: Creating a Budget and Alerts

Scenario

You manage a training project and want to keep monthly spend under $200. You decide to create a budget with alerts at 50%, 90%, and 100% to avoid surprises.

Defining Scope and Amount

In Billing → Budgets & alerts → CREATE BUDGET, scope the budget to your billing account and specific project. Set a Specified amount of 200 in your currency, with a Monthly period.

Configuring Alerts

Add thresholds at 50, 90, and 100 percent for Actual spend, optionally also for Forecast. Confirm email recipients for these alerts.

Outcome

As spend reaches the thresholds, Cloud Billing sends alerts so you can pause experiments, adjust resources, or investigate anomalies before hitting your $200 target.

The Google Cloud Pricing Calculator: Core Concepts

What the Calculator Is

The Google Cloud pricing calculator is a tool that lets you add and configure products to get a cost estimate to share with your team. It is free and works even before resources exist.

How You Use It

You add one or more products (like VMs, Cloud SQL, Cloud Storage) as line items, configure their settings, and see an estimated monthly cost for the whole solution.

Strengths

The calculator uses current public pricing and can model discounts like sustained use and committed use. You can share estimates via links or email for team review.

Limitations

It is only an estimate. Actual bills can differ due to real usage, egress, or changes. Incorrect assumptions about size or traffic lead to inaccurate estimates.

Estimating Common Workloads in the Pricing Calculator

Compute Engine and GKE

In the calculator, add Compute Engine or Google Kubernetes Engine. Configure machine type, region, number of instances or nodes, hours per month, and any persistent disks or load balancers.

Serverless: Cloud Run & Cloud Functions

Add Cloud Run or Cloud Functions. Set memory, vCPU (for Cloud Run), invocations or requests per month, and average execution duration to estimate pay‑per‑use compute costs.

Storage and Databases

For Cloud Storage, choose class, region, GB stored, and egress. For Cloud SQL, pick engine, instance size, region, storage, and HA. These drive most of the estimated monthly cost.

BigQuery

With BigQuery, estimate both storage (GB or TB) and query processing (on‑demand TB scanned or capacity slots) to see how analytical workloads affect your bill.

Cost Optimization Basics: Discounts and Rightsizing

Committed and Sustained Use Discounts

Committed use discounts give lower prices when you commit to steady usage for 1 or 3 years. Sustained use discounts apply automatically when eligible VMs run most of the month.

Rightsizing Resources

Rightsizing means matching resource size to actual utilization. If a VM uses only 5% CPU, downsize it or reduce replicas to cut cost without hurting performance.

Preemptible / Spot VMs

Preemptible or Spot VMs are cheap but can be terminated at any time. Use them for fault‑tolerant, non‑urgent workloads like batch processing or CI builds.

Storage Class Choices

Pick Cloud Storage classes (Standard, Nearline, Coldline, Archive, Regional Persistent Disk) based on how often data is accessed, and use lifecycle rules to move or delete older data.

Quick Check: Budgets and Billing Behavior

Test your understanding of billing accounts and budgets.

Your team accidentally deployed a large number of expensive VMs. A budget alert fired at 90% of your monthly budget. What does this alert do by default?

  1. It automatically stops all VMs in the project to prevent further charges.
  2. It sends notifications (for example, email or Pub/Sub), but resources continue running until you manually change them.
  3. It detaches the project from the billing account, causing all resources to be deleted.
  4. It rolls back the environment to the previous month’s configuration.
Show Answer

Answer: B) It sends notifications (for example, email or Pub/Sub), but resources continue running until you manually change them.

Budgets and alerts are monitoring tools. By default, they send notifications when thresholds are reached but do not automatically stop or delete resources. You must take manual action (or build automation that reacts to Pub/Sub messages).

Quick Check: Pricing Calculator and Optimization

Confirm your understanding of the calculator and cost optimization basics.

You have a steady, always‑on production workload running on Compute Engine. You want to reduce cost without changing performance. Which option is the BEST primary strategy?

  1. Use preemptible or Spot VMs for all production instances.
  2. Rely only on sustained use discounts and ignore other options.
  3. Purchase committed use discounts sized to your steady usage.
  4. Move all workloads to Cloud Functions to avoid VM charges.
Show Answer

Answer: C) Purchase committed use discounts sized to your steady usage.

Committed use discounts are designed for steady, predictable workloads and can significantly reduce cost. Preemptible/Spot VMs are not appropriate for all production instances due to potential termination, and moving everything to Cloud Functions may not fit the architecture.

Thought Exercise: Designing Guardrails for a New Project

Imagine you are the first Associate Cloud Engineer on a small startup team. You are asked to set up a new Google Cloud project for a prototype web app. The founders are very worried about surprise bills.

Think through and jot down answers to these questions (you do not need to code anything):

  1. Billing account and project linkage
  • Will you create a new billing account or use an existing one? Why?
  • Who should have Billing Account Administrator permissions, and who should only see cost reports?
  1. Budgets and alerts
  • What monthly budget amount would you start with for the prototype?
  • Which thresholds will you configure (for example, 25%, 50%, 75%, 100%) and who should receive alerts?
  • Would you use forecast alerts as well as actuals? In what scenario might forecast alerts be especially useful?
  1. Pricing calculator usage
  • Before deploying, which components will you model in the Google Cloud pricing calculator? Consider Compute Engine or Cloud Run, Cloud SQL, Cloud Storage, and maybe BigQuery.
  • How will you use this estimate in conversations with the founders (for example, to agree on a maximum expected monthly cost)?
  1. Cost optimization from day one
  • Where can you start small and rightsize (e.g., smaller machine types, lower‑tier Cloud SQL, cheaper storage classes for logs)?
  • Which workloads, if any, could safely use preemptible or Spot VMs?

After you write your answers, compare them against the concepts in this module and adjust. This kind of reasoning is close to scenario questions you will see on the certification exam.

Key Term Review: Billing and Cost Controls

Flip these cards to reinforce core definitions and concepts.

Google Cloud pricing calculator
The Google Cloud pricing calculator is a tool that lets you add and configure products to get a cost estimate to share with your team.
Billing account
A Cloud Billing object linked to a Google payments profile that pays for usage from one or more Google Cloud projects.
Project–billing linkage rule
Each project can be linked to zero or one active billing account at a time, while a billing account can fund multiple projects.
Budget
A Cloud Billing configuration that tracks actual and optionally forecasted costs for a billing account and triggers alerts when thresholds are reached.
Budget alerts behavior
Budget alerts send notifications (email or Pub/Sub) at configured thresholds but do not automatically stop or delete resources.
Committed use discounts
Discounts you receive by committing to use a certain amount of resources (such as vCPU or memory) or specific services for 1 or 3 years.
Rightsizing
The practice of adjusting resource sizes (for example, VM machine types, storage capacity) to better match actual utilization and reduce waste.
Preemptible / Spot VMs
Heavily discounted Compute Engine VMs that can be terminated by Google Cloud when it needs the capacity, suitable for fault‑tolerant workloads.
Cloud Storage class selection
Choosing among Standard, Nearline, Coldline, Archive, and Regional Persistent Disk classes based on how frequently and quickly you need to access stored data.
Scope of a budget
The set of resources a budget monitors, such as an entire billing account, selected projects, specific services, or resources with certain labels.

Key Terms

Budget
A Cloud Billing configuration that tracks actual and optionally forecasted costs for a billing account and triggers alerts when thresholds are reached.
Rightsizing
The practice of adjusting resource sizes (for example, VM machine types, storage capacity) to better match actual utilization and reduce waste.
Billing account
A Cloud Billing object linked to a Google payments profile that pays for usage from one or more Google Cloud projects.
Scope of a budget
The set of resources a budget monitors, such as a billing account, selected projects, specific services, or resources with particular labels.
Preemptible / Spot VMs
Heavily discounted Compute Engine VMs that can be terminated by Google Cloud when it needs the capacity, suitable for fault‑tolerant, non‑critical workloads.
Committed use discounts
Discounts you receive by committing to use a certain amount of resources (such as vCPU or memory) or specific services for 1 or 3 years.
Google payments profile
A Google‑wide profile that stores legal entity, address, tax information, and payment methods used by Google Cloud billing accounts and other Google services.
Sustained use discounts
Automatic discounts applied to eligible Compute Engine VMs when they run for a significant portion of the billing month without requiring a commitment.
Associate Cloud Engineer
An Associate Cloud Engineer deploys and secures applications, services, and infrastructure, monitors operations of multiple projects, and maintains enterprise solutions to ensure that they meet target performance metrics.
Google Cloud pricing calculator
The Google Cloud pricing calculator is a tool that lets you add and configure products to get a cost estimate to share with your team.

Finished reading?

Test your understanding with a custom practice exam on this chapter.

Test yourself