hands-on lab

Optimizing Cloud Costs with Azure Automation

Difficulty: Intermediate
Duration: Up to 1 hour
Students: 3
On average, students complete this lab in45m
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

This lab focuses on automating Azure cost optimization tasks with Azure Automation. It is valuable because it turns common, repeatable “cost hygiene” activities (shutting down unused compute, and cleaning up detached storage) into reliable, scheduled, and auditable automation.

Learning this topic helps you reduce unnecessary spend, enforce consistent operational practices, and improve sustainability outcomes by minimizing wasted compute and storage resources.

In this lab, you will create an Azure Automation Account, configure an identity and permissions, and build runbooks that deallocate a virtual machine on a schedule and detect and delete detached managed disks.

Learning objectives

Upon completion of this intermediate level lab, you will be able to:

  • Create an Azure Automation Account and configure identity-based access to resources in a resource group
  • Author and test Automation runbooks to perform cost-optimization tasks
  • Schedule runbooks to run at specific times or intervals
  • Understand how runbooks can be used to respond to cost-related alerts or events

Intended audience

  • FinOps practitioners
  • DevOps Engineers
  • IT Operations engineers
  • Software Engineers

Prerequisites

Familiarity with the following will be beneficial but is not required:

  • Azure Virtual machine and managed disks concepts
  • Basic understanding of role-based access control (RBAC) and least-privilege access

The following content can be used to fulfill the prerequisites:

Environment before

Environment after

Covered topics

Hands-on Lab UUID

Lab steps

0 of 7 steps completed.Use arrow keys to navigate between steps. Press Enter to go to a step if available.
  1. Logging in to the Microsoft Azure Portal
  2. Reviewing the Cost Optimization Scenario
  3. Creating an Azure Automation Account
  4. Using Azure Automation to Schedule VM Shutdowns
  5. Testing the Azure Automation Runbook
  6. Scheduling the Azure Automation Runbook
  7. Cleaning Up Detached Disks