Get startedGet started for free

Billing

1. Billing

Because the consumption of all resources under a project accumulates into one billing account, let's talk billing. To help with project planning and controlling costs, you can set a budget. Setting a budget lets you track how your spend is growing toward that amount. This screenshot shows the budget creation interface. First, you set a budget name and specify which project this budget applies to. Then, you can set the budget at a specific amount or match it to the previous month's spend. After you determine your budget amount, you can set the budget alerts. These alerts send emails to Billing Admins after spend exceeds a percent of the budget or a specified amount. In our case, it would send an email when spending reaches 50%, 90%, and 100% of the budget amount. You can even choose to send an alert when the spend is forecasted to exceed the percent of the budget amount by the end of the budget period. In addition to receiving an email, you can use Pub/Sub notifications to programmatically receive spend updates about this budget. You could even create a Cloud Run function that listens to the Pub/Sub topic to automate cost management. Here's an example of an email notification. The email contains the project name, the percent of the budget that was exceeded, and the budget amount. Another way to help optimize your Google Cloud spend is to use labels. For example, you could label VM instances that are spread across different regions. Maybe these instances are sending most of their traffic to a different continent, which could incur higher costs. In that case, you might consider relocating some of those instances or using a caching service like Cloud CDN to cache content closer to your users, which reduces your networking spend. I recommend labeling all your resources and exporting your billing data to BigQuery to analyze your spend. BigQuery is Google's scalable, fully managed enterprise data warehouse with SQL and fast response times. Creating a query is as simple as shown in this screenshot, which you'll explore in the upcoming lab. You can even visualize spend over time with Looker Studio. Looker Studio turns your data into informative dashboards and reports that are easy to read, easy to share, and fully customizable. For example, you can slice and dice your billing reports using your labels.

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.