Cloud service · Azure · Updated

Automation - Azure Automation is a managed service for running operational runbooks across Azure, on-premises systems, and other cloud environments.

In short

Azure Automation centralizes the execution, scheduling, and monitoring of PowerShell and Python scripts used for infrastructure operations. It provides managed cloud execution, Hybrid Runbook Workers, shared automation assets, and identity-based access to support repeatable administration and remediation.

Cloud Services Hub →

8 key features of Automation

01
PowerShell and Python runbooks

Execute operational scripts as centrally managed jobs with parameters, execution status, and output streams. Test and publish runbooks before using them in production schedules or external integrations.

02
Managed runtime environments

Control the language version and package dependencies used by runbooks through runtime environments. Validate module compatibility in a separate test environment before upgrading production scripts.

03
Hybrid Runbook Workers

Run jobs on supported machines in Azure or on Azure Arc-enabled servers to reach private services and use local dependencies. Use extension-based workers and provision sufficient worker capacity for the expected workload.

04
Scheduling and external invocation

Start runbooks on demand, through APIs or webhooks, or on recurring schedules with time-zone support. Pass parameters for each workload and implement overlap protection when a previous job might still be running.

05
Managed identities and access control

Authenticate to supported Azure services without storing application credentials in runbook code. Apply least-privilege Azure RBAC assignments and verify which identity is used for each execution environment.

06
Shared automation assets

Store reusable variables, credentials, certificates, and connection definitions at the Automation account level. Use these assets for shared configuration, and use Key Vault when centralized secret governance or rotation is required.

07
Job history and diagnostic logging

Inspect job states, output, and error streams to troubleshoot execution failures. Export job logs and streams to Azure Monitor Logs for centralized queries, retention, and operational alerts.

08
Source control and deployment automation

Integrate supported repositories with Automation or deploy runbooks through CI/CD pipelines. Require review and testing before publishing changes that scheduled or externally triggered jobs will execute.

Where Automation is used

  1. 01
    Scheduled resource lifecycle management

    Start and stop tagged development virtual machines according to business hours, or remove expired temporary resources. Include exclusion tags, dependency checks, and explicit subscription scoping to avoid affecting production workloads.

  2. 02
    Alert-driven remediation

    Connect Azure Monitor alerts to a runbook that performs a bounded recovery action, such as restarting an approved service or collecting diagnostics. Validate the alert context, check the current resource state, and restrict the runbook identity to the permitted targets.

  3. 03
    Hybrid infrastructure administration

    Use Hybrid Runbook Workers to administer internal systems such as Active Directory or SQL Server through locally available tools. Separate worker groups by network boundary or privilege level to limit the impact of a compromised script.

  4. 04
    Inventory and governance reporting

    Query resource configuration, identify missing tags or unexpected settings, and write reports to storage. Run initially in report-only mode before enabling corrective changes, and retain records of the resources modified.

  5. 05
    Coordinated maintenance and recovery

    Orchestrate application-specific steps such as draining traffic, stopping services, validating dependencies, and restoring service after maintenance. Use Azure Update Manager for patching and Azure Backup or Azure Site Recovery for their respective protection functions rather than reimplementing those services in scripts.

How Automation is priced

Consumption-based job runtime

Process automation is metered by job execution time for cloud and Hybrid Runbook Worker jobs. Estimate costs from job frequency and duration, including retries and child jobs, and use the current Azure pricing page for applicable currency and agreement rates.

Monthly included runtime

Azure Automation includes a monthly allowance of 500 process-automation job runtime minutes per subscription, with additional runtime charged at the applicable rate. The allowance is shared across eligible Automation usage in the subscription rather than granted separately to each account.

Supporting infrastructure and service charges

Hybrid worker virtual machines, disks, networking, Log Analytics ingestion and retention, storage, and Key Vault operations are billed separately under their respective services. Include these dependencies when comparing cloud execution with a dedicated hybrid worker deployment.

Services Automation works with

A common architecture uses Azure Monitor for detection and Azure Automation for bounded operational response. An action group starts a runbook, the runbook validates the target and performs an approved action, and job diagnostics flow to a Log Analytics workspace. Use managed identities with narrowly scoped permissions, and correlate alert identifiers with job output so operators can trace each automated change.

For private or on-premises workloads, place extension-based Hybrid Runbook Workers on Azure virtual machines or Azure Arc-enabled servers with access to the target network. Retrieve necessary secrets from Key Vault and write reports or durable checkpoints to Blob Storage. Verify DNS, routing, firewall rules, and data-plane authorization separately; permission to manage a resource does not necessarily permit access to its contents.

When an operation requires approvals, ticket routing, or multiple application connectors, use Logic Apps as the outer workflow and invoke Automation for script-based infrastructure tasks. Track the asynchronous job to completion rather than treating successful job submission as successful execution. Across these patterns, design for duplicate requests, partial failure, bounded retries, and explicit escalation when automated recovery fails.

Azure Monitor

Use an Azure Monitor action group to start an Automation runbook in response to an alert, and export Automation job logs and streams to a Log Analytics workspace. For example, an alert can trigger a runbook that collects diagnostics and restarts a specifically authorized resource after checking its current state. Add alerts for failed or suspended jobs so remediation failures are visible.

Azure Key Vault

Retrieve secrets or certificates at runtime using an identity authorized for the required Key Vault operations. For example, a runbook can fetch an external system's API credential immediately before generating an inventory report. For a private vault endpoint, select an execution environment with the necessary network access and DNS resolution.

Virtual Machines

Manage virtual machine lifecycle operations through Azure APIs, or host Hybrid Runbook Workers on supported Azure virtual machines. For example, schedule a runbook to deallocate development VMs selected by tags while excluding machines marked for continuous operation. When using worker VMs, manage their operating systems, installed dependencies, and availability separately from the Automation account.

Azure Arc

Use Azure Arc-enabled servers as hosts for extension-based Hybrid Runbook Workers outside Azure. For example, a worker on an on-premises server can run a maintenance script against an internal SQL Server endpoint that cloud jobs cannot reach. Configure the worker's permissions and outbound connectivity explicitly; Arc registration alone does not grant access to the target application.

Logic Apps

Use the Azure Automation connector in a Logic Apps workflow to create runbook jobs and retrieve their status or output. For example, a workflow can obtain an approval, start a provisioning runbook, wait for completion, and send the result to an operations channel. Keep business routing and approvals in the workflow while placing script-based infrastructure operations in the runbook.

Azure Storage

Read input data and write durable reports or execution artifacts using Azure Storage APIs or SDKs. For example, a nightly runbook can export resource inventory to a dated blob using a managed identity with a scoped data-plane role. Use durable storage for checkpoints when a workflow must resume across separate jobs rather than relying on local sandbox files.

Azure Advisor

An Automation runbook can respond to a new Azure Advisor recommendation when an Advisor alert invokes it through an Azure Monitor action group. For example, the runbook can collect configuration details for the affected resource before an operator reviews the recommendation.

Azure Automanage

Azure Automation supplied Update Management and Change Tracking and Inventory for legacy Azure Automanage machine best-practices profiles. Onboarding a machine with one of those profiles could enroll it in those Automation features without configuring each one separately.

Azure Blob Storage

Azure Automation can archive runbook job logs and job streams in Azure Blob Storage through diagnostic settings. Change Tracking and Inventory can also use Blob Storage to retain file contents for comparison when a tracked file changes.

Azure DevOps

Azure Automation can synchronize runbooks from an Azure Repos Git repository through its source control integration. A team can review runbook changes in pull requests and then synchronize the approved branch to its Automation account.

Alternatives to Automation in other clouds

AWS

AWS Systems ManagerAWS Systems Manager

AWS Systems Manager Automation and Azure Automation use runbooks to automate operations across cloud and on-premises environments. AWS bills by executed step, with an additional runtime charge for script steps, while Azure bills by job runtime and includes 500 minutes per subscription each month.

Compare fact by fact
AutomationAWS Systems Manager
Automation billingJob runtime; 500 min/month includedPer step, plus script runtime
Hybrid server setupJobs run on Hybrid Runbook WorkersSSM Agent on each managed node

What is Automation

2 min read

Azure Automation provides a managed execution and orchestration platform for operational scripts. Engineers store scripts as runbooks in an Automation account, configure dependencies and execution settings, and start jobs manually, on a schedule, through management APIs, or through webhooks. Typical workloads include resource lifecycle management, scheduled maintenance, operational reporting, and alert-driven remediation. Azure Automation is distinct from Azure Logic Apps and its Automation capabilities, which focus on connector-based workflows and business process orchestration.

An Automation account organizes runbooks, schedules, shared assets, identities, and job history. Author and test a runbook before publishing the version that production jobs execute. Use parameters to reuse the same runbook across environments, and keep environment-specific configuration outside the script where practical. Runtime environments let teams control supported language versions and package dependencies; available runtimes include PowerShell 7.6 and Python 3.10. Test scripts and their modules together before changing a production runtime.

Run jobs in the Azure-managed cloud environment when they can work within its execution constraints and reach the required endpoints. Use extension-based Hybrid Runbook Workers when scripts need private network access, locally installed software, operating-system capabilities, or execution characteristics that cloud sandboxes cannot provide. Workers can run on supported Azure virtual machines and Azure Arc-enabled servers. A worker group distributes jobs among its available workers; it does not automatically execute each job on every member. Administrators remain responsible for worker availability, operating-system maintenance, dependencies, and network connectivity.

Use managed identities and narrowly scoped Azure role assignments instead of embedding credentials in scripts. Configure the identity appropriate to the execution environment and explicitly select the intended tenant and subscription. Retrieve application secrets from Azure Key Vault when identity-based access to the target system is unavailable. Treat webhook URLs as secrets because possession of a valid URL can allow a caller to start the associated runbook. Validate incoming parameters and avoid accepting unrestricted commands or resource identifiers from external callers.

Design runbooks for partial failure, retries, and duplicate invocation. Check current resource state before changing it, use bounded retries for transient API failures, and prevent overlapping jobs when concurrent execution could cause damage. Cloud jobs have execution limits, so split large workloads into bounded units or select Hybrid Runbook Workers when appropriate. Check current account, subscription, and concurrent-job quotas before onboarding large workloads, and request eligible quota changes ahead of deployment.

Record useful output and error information without exposing credentials or sensitive payloads. Forward job logs and streams to Azure Monitor Logs for longer retention, investigation, and alerting. Keep production runbooks under source control and deploy reviewed changes through a controlled release process. For operating-system patch assessment and installation, use Azure Update Manager rather than the retired Azure Automation Update Management solution; runbooks can coordinate surrounding application-specific maintenance steps.

Azure architecture icons are the property of Microsoft. BlowStack is not affiliated with or endorsed by Microsoft.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.