Home page

 

MICROSOFT AZURE MANUAL

 

To learn how to use it, to get certified

 

 

The contents of this page correspond to 500 Word pages

 

 

FINAL PROJECT – E-commerce development. Brief illustration. 8

 

CHAPTER 1 – General Overview.. 9

General introduction to Azure. 9

Outline of chapter topics with illustrated slides. 10

1. Azure Core Services – Compute, Storage, Networking. 20

2. Organizing and managing resources with Resource Groups. 22

3. Azure Security – Posture, Identity, and Data Protection. 23

4. Networks in Azure – Secure and flexible connectivity. 24

5. Data Storage – Account Types and Redundancy. 26

6. Computing Services – Virtual Machines (VMs) in Detail 29

7. Monitoring and Observability with Azure Monitor. 31

8. Cost Management and Budgeting in the Azure Cloud. 33

9. Azure Marketplace – Ready-made partner solutions. 35

Conclusions. 36

Chapter Summary. 37

 

CHAPTER 2 – The main services. 39

Introduction. 39

Outline of chapter topics with illustrated slides. 39

1. Compute in Azure (Compute) 48

2. Storage. 50

3. Networking. 53

4. Managed databases. 55

5. Artificial Intelligence and Machine Learning. 58

6. DevOps and Application Lifecycle. 61

7. Security in Azure. 63

8. Automation and Integration. 66

9. Data Analysis (Analytics and Big Data) 69

10. Cloud Governance and Management 72

Conclusions. 75

Chapter Summary. 76

 

CHAPTER 3 – The calculation service. 77

Introduction. 77

Outline of chapter topics with illustrated slides. 79

1. Service models: IaaS, PaaS and Serverless. 88

2. Azure Virtual Machines (IaaS) – Control and Flexibility. 90

3. Containers and Orchestration with Azure Kubernetes Service (AKS) 91

4. Azure App Service – Hosting web applications and APIs (PaaS) 93

5. Azure Functions – Event-Driven Serverless Computing. 94

6. Scalability and high availability. 96

7. Operational management and automation. 98

8. Monitoring and security. 100

9. Use cases and cost optimization. 102

Conclusions. 104

Chapter Summary. 105

 

CHAPTER 4 – The storage service. 106

Introduction. 106

Outline of chapter topics with illustrated slides. 107

1. Storage Services: Blobs, Files, Queues, and Tables. 116

2. Storage account and basic configuration. 118

3. Data redundancy options. 120

4. Security and access control 122

5. Storage Tiers: Hot, Cool, Archive. 125

6. Tools for managing Azure Storage. 127

7. Integration with other Azure services. 129

8. Best practices for using Azure Storage. 131

9. Use cases and practical scenarios. 134

Conclusions. 136

Chapter Summary. 136

 

CHAPTER 5 – The networking service. 137

Introduction. 138

Outline of chapter topics with illustrated slides. 138

1. Virtual Networks (Azure Virtual Network - VNet) 148

2. Subnet (Logical Network Segmentation) 149

3. Network Security Groups (NSG) 150

4. Hybrid Connectivity (VPN Gateway and ExpressRoute) 152

5. Load Balancing (Load Balancer, Application Gateway, Front Door) 153

6. Advanced Network Security (Azure Firewall, DDoS Protection, Defender for Cloud) 155

7. Name Management (Azure DNS) 157

8. Monitoring and Troubleshooting (Network Watcher) 158

9. Architectural best practices for Azure Networking. 159

10. Azure Networking Services Summary Table. 161

Conclusions. 161

Chapter Summary. 162

 

CHAPTER 6 – The database service. 163

Introduction. 163

Outline of chapter topics with illustrated slides. 164

1. Database Types – Relational SQL vs. NoSQL. 174

2. Data Models – Relational, Document, and Graph. 176

3. Database Services Architecture in Azure. 178

4. Security in Azure Databases. 179

5. Backup and Restore (Disaster Recovery) 181

6. Scalability and Performance Monitoring. 183

7. Integration with Other Azure Services. 185

8. Use Cases – Application Scenarios. 188

Conclusions. 189

Chapter Summary. 190

 

CHAPTER 7 – The artificial intelligence and machine learning service. 191

Introduction. 191

Outline of chapter topics with illustrated slides. 193

1. AI and Machine Learning Concepts. 203

2. Types of Machine Learning. 204

3. ML Lifecycle Architecture. 207

4. Azure Machine Learning: Platform for the ML Cycle. 209

5. Azure Cognitive Services (Azure AI Services) 211

6. Azure OpenAI and Microsoft Foundry: Generative AI Solutions. 213

7. Integrating AI Solutions with Azure Services. 216

8. Responsible Artificial Intelligence (Responsible AI) 220

9. Developer Tools and Environments. 223

Conclusions. 224

Chapter Summary. 225

 

CHAPTER 8 – The DevOps Service. 226

Introduction. 226

Outline of chapter topics with illustrated slides. 227

1. Azure Repos: Version Control and Collaboration. 236

2. Azure Pipelines: Continuous Integration and Automated Delivery. 239

3. Release Strategies, Approvals and Quality Controls. 243

4. Azure Artifacts: Managing Packages and Dependencies. 246

5. Azure Boards: Agile Work Management and Collaboration. 249

6. Code Quality and Pipeline Security. 252

7. Infrastructure as Code ( IaC ) and Configuration as Code ( CaC ) 255

8. DevOps on Azure Kubernetes Service (AKS): Deployment and Observability. 258

9. Governance and Compliance with Azure DevOps and Azure. 262

10. Account Organization, Permissions, and Project Scalability. 265

11. Summary Table of Main DevOps Services. 269

Conclusions. 270

Chapter Summary. 271

 

CHAPTER 9 – The Security Service. 273

Introduction. 273

Outline of chapter topics with illustrated slides. 274

1. Overview and Operating Principles of Azure Security. 283

2. Zero Trust Model 284

3. Identity and Access Management 286

4. Data Encryption and Key Management 289

5. Network Security (Firewall, NSG and VPN) 290

6. Resource Protection and Backup. 292

7. Monitoring and Incident Response. 294

8. Application Security. 296

9. Compliance and Security Automation. 298

Conclusions. 300

Chapter Summary. 300

 

CHAPTER 10 – The automation service. 301

Introduction. 301

Outline of chapter topics with illustrated slides. 303

1. Runbooks and Task Automation. 312

2. Automation Account: The Central Container. 315

3. Hybrid Runbook Worker: Hybrid Automation. 318

4. Update Management: Managing VM Updates. 321

5. State Configuration: Azure Automation State Configuration (DSC) 323

7. Security and Governance Baseline for Automation. 330

8. Cost Optimization with Automation. 333

9. Azure Automation Best Practices and Final Thoughts. 336

Conclusions. 339

Chapter Summary. 340

 

CHAPTER 11 – The analysis service. 341

Introduction. 341

Outline of chapter topics with illustrated slides. 342

1. Azure Data Factory: Data Pipeline Orchestration. 351

2. Azure Data Lake Storage Gen2: Fundamentals and Best Practices. 354

3. Azure Synapse Analytics: SQL and Spark Integration. 356

4. Lakehouse and Medallion Architecture: Merging Data Lake and Data Warehouse. 358

5. Azure Stream Analytics: Real-Time Data Processing. 361

6. Power BI: Semantic Models for Self-Service Analytics. 363

7. Microsoft Purview: Data Catalog and Data Governance. 366

8. Mapping Data Flows: Scalable Visual Transformations. 368

9. Analytics Data Security in Azure. 371

10. Monitoring and Managing Costs in Azure. 373

Conclusions. 376

Chapter Summary. 376

 

CHAPTER 12 – The governance service. 377

Introduction. 377

Outline of chapter topics with illustrated slides. 379

1. Management Groups. 388

2. Azure Blueprints. 392

3. Access Control (RBAC) 394

4. Cost management and budget 397

5. Tags and organization. 400

6. Compliance and standards. 402

7. Monitoring, auditing and alerts. 405

8. Governance automation. 407

Chapter Summary. 410

 

FINAL PROJECT – Creation of an e-commerce site. 411

Checklist 411

1. Let's prepare a box to put things in (Governance) 412

2. We assign labels to objects to recognize them (Naming and Tags) 420

3. Who can enter? (Security and Users) 426

4. Let's build a safe to store the keys (Key Vault) 432

5. Let's build a defense system (Defender for Cloud) 439

6. We build roads that connect resources (Network) 445

7. Let's build the warehouse for our items (Storage) 452

8. We build the database for products, orders and customers (SQL) 459

9. Let's build the site: the e-commerce user interface (App Service) 465

10. Let's add a virtual computer for our operations (VM) 473

11. We keep everything under control (Monitor) 481

12. We keep costs under control (Cost Management) 488

 

CONCLUSIONS. 494

1. What you learn and what positions you can fill at work. 494

2. LinkedIn Profile – Cloud Governance Specialist on Microsoft Azure. 495

3. CV based on these skills. 496

4. Cover letter. 498

 

 

 Author's preface

We live in an era where cloud computing has become the engine of digital innovation. Among the most widespread and powerful platforms, Microsoft Azure stands out for its flexibility, scalability, and ability to support companies of all sizes in their digital transformation. But using the cloud effectively isn't just about moving resources online: it's also about knowing how to manage them.

This ebook aims to guide you through Azure governance, a set of tools and practices that allow you to maintain control over resources, costs, security, and compliance. You'll learn how to structure an orderly and secure Azure environment, enforce business rules through Azure Policies, manage access with RBAC, monitor costs, and ensure that each resource complies with required standards.

For companies, good governance in Azure means reducing risks, improving security, optimizing costs, and ensuring that each team works independently but respects shared rules. For you, reader, it means acquiring skills that are increasingly in demand in the workforce, in an ever-growing sector.

This ebook is designed for students, junior professionals, or anyone who wants to approach the world of cloud computing with a practical and structured approach. Each chapter addresses a key topic with clear language, concrete examples, and practical tips.

I encourage you to approach this reading with curiosity and a practical approach. You don't need to be an Azure expert to get started: the important thing is a desire to learn and understand how the cloud can be managed intelligently. By the end of the course, you'll have a comprehensive understanding of Azure governance and be ready to apply it to your projects or enter the workforce with greater confidence.

 

FINAL PROJECT – E-commerce development. Brief illustration.

 

Immagine che contiene testo, schermata, diagramma, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

 

There's nothing better than starting to study a topic like this with the idea of being able to create something we like and that can be useful at work or in finding a job. This ebook on Microsoft Azure was designed with precisely this philosophy: learning the tools and services and then putting them into practice in a concrete project.

In the final chapter, you'll find the final project, which involves creating an e-commerce site using everything you've learned. This isn't abstract theory, but clear operational steps, accompanied by explanatory images to guide you step by step.

The fundamental steps you will face are:

1.    Create boxes: Organize resources with Management Groups and Resource Groups.

2.    From names and tags: apply a logical and easily manageable structure.

3.    Set security rules: Configure Login ID and Multi- Factor Authentication (MFA).

4.    Create Key Vault: Protect your keys and secrets.

5.    Enable Defender for Cloud: Increase the security of your environment.

6.    Set up networks: Build your hub-and-spoke architecture and connect everything together.

7.    Create Storage: Archive your e-commerce images.

8.    Set up SQL Database: Manage product and order data.

9.    Create the App Service: host your e-commerce website.

10.     Add VM if needed: for special computing needs.

11.     Enable Monitor & Alerts: Check status and receive notifications.

12.     Control costs: optimize your budget and keep spending under control.

This path will allow you to concretely apply the skills acquired, transforming theory into a real and useful project. At the end, you will not only have learned Azure: you will have created a functioning e-commerce site, ready to be used or presented as a professional portfolio.

 

CHAPTER 1 – General Overview

 

General introduction to Azure

What is Azure? Microsoft Azure is Microsoft's cloud computing platform that offers a broad set of on-demand services for computing, data storage, networking, security, and management. Through the Azure portal (a unified web interface), you can deploy, configure, and monitor resources centrally. Compared to traditional on-premises data centers, Azure guarantees elastic scalability (resources can grow or shrink as needed), high availability (globally redundant infrastructure), and flexible pricing models (pay-as-you-go, subscriptions, savings plans). Essentially, Azure allows companies to focus on developing and managing applications without worrying about purchasing and maintaining the underlying hardware.

Azure Core Pillars: Azure services are organized into several key categories (sometimes called pillars ). Below are the key pillars with some examples of services included in each:

·      Compute – Services to run workloads: virtual machines, containers (e.g., Azure Kubernetes Service), and serverless functions (Azure Functions).

·      Storage – Data storage services: objects (Blob Storage), files (Azure Files), message queues (Queue Storage), NoSQL tables (Table Storage), and managed disks for VMs.

·      Networking – Network services: virtual networks (VNets) to connect cloud resources, load balancers, hybrid connections (VPN, ExpressRoute) to integrate with on-premises networks.

·      Security and Identity – Services to protect resources and manage identities: for example, Microsoft Defender for Cloud for security posture, Microsoft Entra ID (formerly Azure Active Directory) for authentication and authorization, and Key Vault for managing keys and secrets.

·      Monitoring and governance – Tools to control and optimize the environment: Azure Monitor to collect metrics and logs, Azure Policy to apply business rules, and Azure Advisor for optimization recommendations. Practical example: A company wants to publish an e-commerce portal on Azure without having to worry about physical infrastructure. For example, it could deploy an App Service to host the web application, use a managed Azure SQL Database for transactional data, store product images on Blob Storage, secure the environment with Defender for Cloud, and monitor performance and costs using Azure Monitor and Cost Management. All of this is done on-demand in Azure, freeing the company from purchasing and managing physical servers. Visualization tips: To introduce Azure and its pillars, a block diagram could be used representing the 5 main pillars (Compute, Storage, Networking, Security, Management) connected by arrows. This diagram would, for example, show the lifecycle of a cloud solution: deployment of resources → application of security measures → continuous monitoring → cost optimization.

 

Outline of chapter topics with illustrated slides

 

Immagine che contiene testo, schermata, software, Pagina Web

Il contenuto generato dall'IA potrebbe non essere corretto.

Microsoft Azure is Microsoft's cloud platform that offers compute, storage, networking, security, and management services for applications and infrastructure of any size. From the Azure portal, you can deploy, configure, and monitor all your resources. Compared to traditional datacenters, Azure guarantees elastic scalability, high availability, and flexible cost models. The five main pillars are: Compute, Storage, Networking, Security and Identity, Monitoring, and Governance. For example, a company can publish an e-commerce portal using App Service for the website, a managed SQL Database, image archiving in Blob Storage, protection with Defender for Cloud, and monitoring with Azure Monitor and Cost Management, without purchasing hardware.

 

Immagine che contiene testo, schermata, software, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Azure virtual machines offer on-demand compute with control over the operating system, network, and storage, allowing you to scale based on your workload and pay only for the resources you use. Storage accounts provide space for blobs, files, queues, and tables, with encryption, durability, and scalability. Virtual networks are essential for securely connecting Azure resources to each other, the internet, or on-premises environments, supporting subnets, NSG filters, and custom routing. A practical example is a management app that uses Windows VMs, Azure Files, VNets with separate subnets, NSGs for access rules, and a VPN Gateway to connect to the company headquarters.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Resource Groups are logical containers that group related resources, facilitating coordinated deployment, updates, and removal. Consistent naming, tagging by environment, service, and department, and a hierarchy organized into Management Groups, Subscription, Resource Group, and Resources aid governance and cost management. For example, you can separate resources with different lifecycles, such as a Resource Group for the front end and one for data, applying differentiated RBAC.

 

Immagine che contiene testo, schermata, software, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Microsoft Defender for Cloud is a CNAPP platform that unifies security posture, DevSecOps, and workload protection. It provides a Secure Score, recommendations, alerts, and regulatory compliance. With Microsoft Entra ID, you can apply RBAC and Zero Trust principles, enabling MFA and Conditional Access. Data is encrypted both at rest and in transit, and Azure Key Vault is used for secrets and keys management. For example, enabling Defender for Servers on a production Resource Group enables assessments, agentless scanning, recommendations, and integration with SIEMs like Microsoft Sentinel.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Azure's network design includes subnets to separate application tiers, NSGs to filter traffic, UDRs for custom routing, and Private Links for private access to PaaS services. Hybrid connectivity is achieved through VPN Gateways or ExpressRoute, while virtual network peering enables secure inter-region communication. Azure Virtual Network Manager enables large-scale management through hub-and-spoke topologies and centralized security rules. A practical example is a hub-and-spoke architecture with a central firewall, dedicated spokes, and private endpoints to services like Storage and SQL.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Azure offers several storage solutions: Blob Storage for objects, Azure Files for SMB or NFS shares, Queues for messaging, Tables for simple NoSQL, and Managed Disks for VMs. GPv2 accounts are recommended for most scenarios, while Premium offers higher performance. Redundancy can be configured as LRS, ZRS, GZRS, or RA-GZRS as needed. Security is ensured by automatic encryption and granular permissions via Microsoft Login ID; private access is provided via Private Endpoints. An image repository can be configured with GPv2, geo-redundancy, and lifecycle policies to optimize costs and performance.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Azure VMs are ideal for applications that require OS control or compatibility with legacy software. You can choose from different VM families to optimize resources and costs, and increase availability through Availability Zones or Scale Sets. Costs are reduced with Reserved. Instances and Savings Plans, while Spot VMs are suitable for non-critical work. A CAD environment, for example, can be built with NVads v5, Premium SSD disks, a dedicated VNet, secure access via Azure Bastion, and comprehensive monitoring.

 

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Azure Monitor collects metrics, logs, and traces from Azure, external cloud, and on-premises resources, providing advanced visualizations, alerts, and automation. Tools like VM Insights, Container Insights, and Network Insights make performance analysis easy. You can configure Data Collection Rules to send logs to Log Analytics, set alerts on critical thresholds, and use workbooks to monitor SLAs and response times.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Azure Monitor collects metrics, logs, and traces from Azure, external cloud, and on-premises resources, providing advanced visualizations, alerts, and automation. Tools like VM Insights, Container Insights, and Network Insights make performance analysis easy. You can configure Data Collection Rules to send logs to Log Analytics, set alerts on critical thresholds, and use workbooks to monitor SLAs and response times.

Immagine che contiene testo, schermata, Pagina Web, software

Il contenuto generato dall'IA potrebbe non essere corretto.

With Cost Management + Billing, you can analyze, monitor, and optimize cloud spending. You can create budgets with specific alerts, view analytics by resource or tag, set cost splits, and leverage reservations and savings plans. Best practices include the use of scope and tags, anomaly monitoring, and periodic reporting. For example, set a monthly budget, receive alerts at 80% and 100%, monitor costs per service, and follow Advisor recommendations to optimize resources.

 

1. Azure Core Services – Compute, Storage, Networking

Azure offers three categories of fundamental cloud services —compute, storage, and networking—that form the foundation for any cloud project. In this chapter, we'll examine each of these categories, describing the core services and their roles.

Compute – Virtual Machines: Azure virtual machines (VMs) provide on-demand compute capacity in the cloud with full control over the operating system, network configuration, and associated storage. You can choose VM sizes and types based on your workload needs: for example, balanced general- purpose VMs, memory- or compute- optimized VMs, or GPU- enabled VMs for AI or graphics-intensive rendering. Allocated resources (CPU, RAM, disk space) are billed on a pay -as- you -go basis, based on actual consumption (with active VMs billed by the hour or minute ). Azure also provides options for elastically scaling compute: you can manually add or remove VMs, or use managed services like Virtual Machine Scale Sets to automatically scale based on rules. (Source: Azure Virtual Machines Overview ).

Storage – Storage Accounts: An Azure Storage Account provides a single namespace in the cloud for various storage services: Blob (objects), File (SMB/NFS file shares), Queue (intercomponent messaging), and Table (NoSQL storage). All data stored in Azure Storage is redundant and transparently encrypted to ensure durability and security. The most common storage accounts are General -Purpose v2 (GPv2), which are suitable for most scenarios, while Premium accounts are optimized for high performance and low latency (for example, for ultra-SSD disks or file shares with high IO). When creating an account, you can choose the level of data redundancy (LRS, ZRS, GZRS, or RA-GZRS) based on your durability and business continuity requirements—these options will be described in detail in a later chapter. You can also set access rules (for example, restricting network access via firewalls or Private Endpoints ). (Sources: Introduction to Azure Storage, Storage Accounts Overview ).

Networking – Virtual Network (VNet): The Azure Virtual Network (VNet) is the basic component for building networks in Azure. A VNet allows you to securely connect cloud resources to each other, define isolated network segments ( subnets ), and control incoming and outgoing traffic through Network Security Group (NSG) rules. VNets can also be used to establish external connections: Internet access for resources that require it, peering between VNets in different regions, or hybrid connections to the company's on-premises network via IPSec VPN gateways or dedicated ExpressRoute links. VNets support custom routing (User- Defined Routes ) and integration with PaaS services via Azure Private Link (which allows you to access Azure PaaS services through private endpoints in your VNet, bypassing internet traffic). This ensures that networking in Azure is flexible and secure, enabling both all-cloud and hybrid architectures. (Source: What is an Azure Virtual Network? )

Practical example: Consider a traditional management application to be migrated to Azure. You can create a Windows VM in Azure to run the legacy application, use Azure Files to move the SMB file shares used by the app to the cloud, and configure a virtual network with two separate subnets (for example, one subnet for the application and one for the database). NSG rules ensure that only the application can communicate with the database, enhancing security. Finally, to connect the cloud environment to the company headquarters, you can set up a VPN Gateway that extends the on-premises network to the Azure virtual network. This allows the cloud application to communicate with the on-premises systems securely and transparently for users.

Visual cues: To represent these three core services ( Compute, Storage, Networking ) and their interactions, you could show a triangle diagram with each vertex representing one of the pillars (for example, a VM icon, a storage icon, and a network icon). Between these, arrows and captions could highlight how compute, data, and connectivity work together in Azure solutions, emphasizing key concepts such as integrated security, scalability, and the pay -as- you -go model.

 

2. Organizing and managing resources with Resource Groups

A fundamental element of resource management in Azure is the concept of Resource Groups (RGs). A Resource Group is essentially a logical container into which you can place related Azure resources, so you can manage them as a cohesive unit throughout their lifecycle. For example, you can group all the components of the same application (VMs, databases, storage accounts, networking, etc.) into a single RG, facilitating operations such as repeated deployment, applying access policies, or completely decommissioning the environment.

What is a Resource Group? In practice, a Resource Group groups together resources that share the same lifecycle and often the same application purpose. Resources within a Resource Group can be managed in a coordinated manner: for example, deleting a Resource Group deletes all the resources it contains. Furthermore, Resource Groups provide a boundary for access control (we can assign RBAC permissions to an entire group of resources) and for tagging ( key-value labels useful for categorizing resources by department, environment, project, etc.). Resource Groups reside within Azure Subscriptions, and subscriptions can in turn be organized into Management Groups to structure enterprise- scale governance. This hierarchy (Management Groups → Subscription → Resource Groups → Resources ) helps separate administrative scopes, costs, and security policies at different levels. (Source: Cloud Adoption Framework – Organize resources )

Best Practices in Resource Group Management: When designing resource divisions into Resource Groups, it is advisable to follow some best practices to maintain order and consistency in the cloud environment:

·      Consistent naming: Give Resource Groups (and resources) standardized, understandable names. For example, a convention might be <prefix>-<app>-<env> - <region>-<sequence>, resulting in names like rg-app-prod-euw-01. Solid naming helps quickly identify the purpose and location of a RG.

·      Using Tags: Assign tags to each RG (and resource) to indicate useful metadata such as the environment ( env: production/test), the service or project ( app: ecommerce ), the owning department ( dept: marketing), and the region ( region: West Europe). Tags facilitate filtering, cost reporting, and policy enforcement.

·      Hierarchical structure: Organize resources following the Azure hierarchy: Management Groups to group multiple company subscriptions; separate Subscriptions, for example, for environments ( prod, test) or business units ; within subscriptions, create RGs for each system/project. This separation allows you to apply governance and budget controls at different levels (e.g., management group-level policies; subscription -level spending limits ; specific RBAC on RGs). (Sources: Organize resources – naming and tagging ) Practical example: Consider a company that has a web application and a database. A good organization might include two separate Resource Groups: one for the front-end application (e.g., "web-app" RG), which contains the most frequently updated resources, such as the app service or web VMs, and another for the data (e.g., "data- platform " RG), which hosts the database and blob archives, which typically have different update cycles. This way, different access control policies can be applied: for example, the web development team will have full permissions on the app RG, while access to the data RG will be restricted to database administrators. Versioning and deleting resources are also simplified, as the RGs can be acted upon separately as needed. Visual cues: To illustrate the organization by Resource Groups, a hierarchical diagram showing the different levels is helpful: for example, a pyramid diagram with Management Groups at the top, then Subscriptions, various RGs below each, and finally the specific resources within each RG. Additionally, you could include an example tagging table listing some Resource Groups with their key tags (such as env, dept, owner, etc.), highlighting how the tags are applied to classify resources.

3. Azure Security – Posture, Identity, and Data Protection

Security is a crucial aspect of the Azure cloud: Microsoft provides a set of integrated services to secure cloud resources, manage user identities, and safeguard data, all in line with Zero Trust principles and corporate compliance. In this chapter, we'll see how Azure addresses security on multiple fronts: security posture monitoring, access management, and data protection.

Microsoft Defender for Cloud: This is Azure's unified native security platform, classified as a Cloud-Native Application Protection Platform (CNAPP) solution. Defender for Cloud includes Cloud Security Posture Management (CSPM) capabilities to assess the security posture of your Azure environment and Cloud Workload Protection Platform (CWPP ) to provide active protection for workloads such as VMs, containers, storage, and databases. This service provides a Secure Score that summarizes the security level of your resources, provides recommendations for configuration improvements, and generates alerts if threats or anomalies are detected. It also allows you to verify compliance with regulatory standards or best practices through continuous assessments. In practice, enabling Defender for Cloud on an Azure subscription provides a centralized view of the security and protection status of all your resources, with proactive recommendations to reduce the attack surface (e.g., unpatched virtual machines, public-access storage accounts, etc.). (Sources: Microsoft Defender for Cloud Overview, Defender for Cloud Documentation )

Identity and access control: Azure delegates identity management to Microsoft Entra ID, formerly known as Azure Active Directory. Entra ID manages user and principal authentication and enables the Role-Based Access Control (RBAC ) access model on Azure resources. RBAC assigns predefined or custom roles to users and groups, ensuring the principle of least privilege. Azure allows you to implement Zero Trust principles, such as requiring Multi- Factor Authentication (MFA ) for sign-ins and enforcing conditions via Conditional Access (policies that allow access to resources only if certain conditions are met, such as network location or compliant device). Additionally, Azure supports integration with external identities and federation, so users can use their corporate or social credentials to access Azure apps while maintaining centralized control. (Source: Azure Security Documentation – Identity and Zero Trust )

Data Protection: To protect data hosted in Azure, the platform implements data encryption at rest and in transit. This means that storage services (disks, files, databases, etc.) automatically encrypt the content saved on disk ( data at rest ) using Microsoft-managed keys or, optionally, customer-managed keys via Azure Key Vault. Similarly, communications to and between Azure services occur over encrypted channels (HTTPS/TLS), ensuring protection in transit. Azure Key Vault is the service dedicated to the centralized management of cryptographic keys, secrets, and certificates used by applications: the keys can be used to encrypt application data or to manage disk encryption (Azure Disk Encryption ) and Log Analytics workspaces, while secrets (such as connection strings, passwords) can be securely recalled by runtime applications. These measures ensure that only authorized users and applications can access sensitive data and mitigate risks in the event of unauthorized access or account compromise. (Source: Azure security documentation )

Practical example: One use case could be enabling Defender for Cloud on all of a company's production Resource Groups. Once enabled, Defender automatically assesses configurations (e.g., checks that internet-facing VM ports are protected by NSG, that storage accounts do not have public containers, etc.) and also initiates an agentless scan of VMs for known vulnerabilities. Suppose it detects outdated VMs: the platform will provide recommendations on how to address them (e.g., "Apply the latest security patches"). Furthermore, if we also enable integration with a SIEM like Microsoft Sentinel, any critical alerts (e.g., intrusion attempts, data exfiltration) are sent to Sentinel for centralized analysis and response. In parallel, for user access, the company implements mandatory MFA for all high-privileged accounts and defines Conditional Access policies to, for example, restrict access to the Azure portal only from corporate networks or compliant devices. With these configurations, the company's Azure environment is protected on multiple levels: basic secure configurations, continuous threat monitoring, and stringent access controls.

Visual cues: To represent security in Azure, a security dashboard could be used as an explanatory visual. For example, a dashboard showing the overall Secure Score, the number of open vs. resolved recommendations, and a graphical overview of the resources covered by Defender (perhaps a map of the infrastructure highlighting which resources have security alerts). Another visual could be a Zero Trust diagram, with a flow that starts with the user (to whom MFA is applied) and passes through Conditional Access controls before reaching internal resources.

 

4. Networks in Azure – Secure and flexible connectivity

networking capabilities enable you to build complex and secure network infrastructures, similar to on-premises infrastructure, but with the flexibility of the cloud. Azure provides tools for segmenting traffic, connecting different environments, and managing the network at scale. Let's look at some key aspects of Azure networking.

Virtual Networks and Segmentation: As mentioned previously, Azure Virtual Networks (VNets) allow you to create private networks in Azure to host your resources. Within a VNet, dividing the network into subnets helps isolate different application tiers—for example, a subnet for web servers, one for application servers, and one for databases. Each subnet can be associated with Network Security Groups (NSGs), which act as firewalls on ports and IPs. For example, an NSG can allow HTTP/HTTPS access only to the web subnet and block any unauthorized traffic to the database. To control traffic routing, Azure also allows user-defined routes (UDRs), which are useful for routing traffic through network appliances such as third-party firewalls. Finally, using Private Link, you can map PaaS services (such as Azure SQL, Storage, etc.) within the VNet, providing private access points to the network and preventing exposure via public IPs. This enables the construction of multi-tier architectures with granular network segmentation, improving both security and traffic management. (Sources: Azure Networking Overview, Virtual Network Overview )

Hybrid connectivity and interconnection: Many organizations need to connect their Azure environment with external environments, such as corporate data centers or other clouds. Azure supports this with two main solutions: VPN Gateway and Azure ExpressRoute. The VPN Gateway creates an encrypted ( IPsec ) tunnel across the Internet between the Azure VNet and the on-premises network, offering a secure connection but with variable latency depending on the Internet. ExpressRoute, on the other hand, provides a dedicated circuit (provided by a telecom provider ) between the on-premises infrastructure and Azure, ensuring a high-speed, low-latency private connection, ideal for tight integrations and large data transfers. Within Azure, multiple virtual networks can be connected together via VNet Peering, even if they are located in different regions, effectively creating a global interconnected network. This allows, for example, services in different geographical regions to communicate with each other on a private Azure network without going through the Internet. (Source: Azure Networking fundamentals )

Large-scale networking management: When you have dozens of VNets and repetitive network configurations, Azure provides services to simplify centralized management. Azure Virtual Network Manager is a tool that lets you apply network configurations and policies to multiple VNets in an orchestrated manner. For example, with Virtual Network Manager, you can define an enterprise-wide hub-and-spoke topology: designate a central hub network (where common services such as firewalls, management services, or a gateway to on- prem ) and connect multiple spoke networks (which host isolated applications for teams or departments) to it. You can define globally applicable Security Admin Rules (for example, completely prohibiting inbound RDP/SSH traffic on all spoke VNets regardless of NSG locale). Additionally, VNet Manager can manage connectivity between spokes, allowing or denying traffic based on central policies. This approach facilitates consistent network configurations in complex, multi-region environments. (Source: Azure Virtual Network Manager – Overview )

Practical example: A common cloud network architecture for a large organization is the hub-and-spoke model. It can be implemented by defining a hub VNet containing shared services such as Azure Firewall or Azure Front Door for perimeter protection and web application exposure. Multiple spoke VNets are then created, such as one for the financial application, one for the BI system, etc., each isolated with its own subnets. and NSG. The spokes are connected to the hub via peering or Virtual Network Manager, and the hub is in turn connected to the on-premises network via VPN Gateway or ExpressRoute to allow corporate users to reach cloud services. Additionally, where necessary, Private Endpoints are used on the spokes to PaaS services (such as a managed SQL database or a storage account) to ensure that data travels only within the private network. With this configuration, any traffic between on-premises and the cloud or between different spokes can be centrally controlled (passing through the firewall in the hub), ensuring both security and routing optimization.

Visual cues: A good visualization for this chapter is a network diagram illustrating the hub-and-spoke topology. In the diagram, the central hub could be highlighted, connected to multiple spokes, with symbols for the VPN Gateway and ExpressRoute connecting the hub to the outside world. Security controls could be indicated on the connections (e.g., a firewall icon on the hub, NSG symbols on the spoke subnets ). Additionally, the use of Private Endpoints could be visually highlighted by drawing a PaaS service (e.g., a database) connected to a private subnet within a spoke, distinct from a hypothetical Internet access (the latter crossed out to indicate that it does not occur). This would help illustrate how Azure enables hybrid and segmented connectivity with centralized control.

 

5. Data Storage – Account Types and Redundancy

The Azure platform offers various data storage solutions, each optimized for specific scenarios. Additionally, Azure Storage allows you to configure various levels of redundancy to ensure data availability and durability even in the event of failures. In this chapter, we'll analyze the main storage services and the resilience options they offer.

Azure data storage services: A single Azure storage account can contain different types of data. The main storage services are:

Blob Storage: Stores unstructured objects such as documents, images, videos, backups, or logs. It provides scalable, cost-effective storage for large amounts of data accessible via HTTP/HTTPS (e.g., via a REST API). It is ideal for static website content, data distributed via CDNs, log files, and backups.

Azure Files: Offers file shares accessible via SMB or NFS protocols, enabling the lift-and-shift of applications using traditional file systems. It acts as a managed file server in the cloud, useful for sharing files between VMs or accessing files from on-premises without maintaining a local file server.

Queue Storage: Provides persistent message queues used for asynchronous communication between application components. It is often used in decoupled architectures. where one service queues messages and another processes them later, ensuring reliability in the exchange of tasks or events.

Table Storage offers a low-latency NoSQL storage for structured data in the form of tables, with a key/attribute model. It is suitable for storing large volumes of semi-structured data (e.g., logs, IoT datasets) when the complexity of a relational database is not required.

 Managed Disks: Provides managed disks for virtual machines. These are virtual volumes (HDD or SSD) that can be attached to Azure VMs as system or additional disks. Azure automatically manages the resiliency of these disks and simplifies their scalability, offering various types (Standard HDD, Standard SSD, Premium SSD, Ultra SSD) for different performance needs.

Note: All of these storage services benefit from the inherent features of Azure Storage, such as automatic data encryption at rest and integration with Microsoft Access ID for resource-level access control (such as ACL controls on Azure Files, or SAS tokens and roles for accessing Blobs). Additionally, using the Private Endpoint feature, you can access services like Blob Storage or Azure Files directly from an Azure private network (VNet) without exposing them to the internet, increasing security.

Storage Account Types and Performance: The services listed above reside in a storage account, and the account type affects some performance and billing characteristics. General Purpose v2 (GPv2) accounts are the default choice and support all services (Blob, Files, Queue, Table, Disk) with a cost and performance combination suitable for most scenarios. Premium accounts, on the other hand, are designed for scenarios with high I/O and low latency requirements: they use more powerful SSD hardware and are suitable for, for example, intensive workloads on file shares or VM disks with high throughput and IOPS. Premium accounts have higher costs and sometimes smaller maximum sizes, but guarantee more consistent performance. It's important to choose the account type based on the workload: if we need to support a static content site with high peak requests, a GPv2 account with hot- tier blobs might be sufficient; if we have a disk-intensive database, a Premium managed disk might be necessary. (Source: Storage account overview )

Data redundancy options: Azure Storage offers multiple levels of data replication to protect against unavailability due to hardware failures or catastrophic events. The available options, which can be configured when creating your account (and modified later in some cases), are:

LRS ( Locally Redundant Storage: Local replication (within a single data center or availability zone in the primary region). Maintains three copies of the data within the same region. This is the most cost-effective option, protecting against local hardware failures (such as a server or rack crash) while guaranteeing at least 11 9s of durability over a year. However, it does not protect against failures of an entire data center or region.

 ZRS (Zone -Redundant Storage): Zonal replication (distributed across multiple Availability Zones in the primary region). Maintains three copies of the data in different data centers/zones within the region. It ensures that even if an entire zone of the region becomes unavailable (e.g., a power outage in one zone), the data remains accessible via copies in another zone. It offers 12 9s of annual durability. It does not cover full regional disasters, but it dramatically reduces the risk of data loss in the event of a single building failure.

GZRS (Geo-Zone -Redundant Storage): Geographic replication with zonal support. Combines ZRS and geographic replication. Maintains copies across multiple zones in the primary region and additionally performs asynchronous replication to a distant secondary region (in the paired region). Azure region ). In total, the data has 3 copies in the primary region and 1 (or more) copies in the secondary region. It protects against both zonal failures and the loss of the entire primary region, ensuring extremely high durability (16 9's). In the event of a disaster affecting the primary region, the data is preserved in the secondary region (but not immediately accessible without failover ).

RA-GZRS (Read-Access GZRS): Geo-replication with read-access to the secondary. Extends GZRS by allowing read-only access to the replica in the secondary region at all times. This means that, even without failing over, applications can read data from the geo-replica if the primary region is unreachable. It is useful for read-only high availability scenarios. (Similarly, RA-GRS exists for zoneless geo-replication, but GZRS has effectively replaced GRS in many scenarios.)

Choosing redundancy: The choice between these options depends on the application's durability and availability goals. In general, LRS is suitable for data that is backed up or can be easily regenerated; ZRS is suitable for applications that require high availability within a single region (e.g., mission-critical systems where the loss of a data center must not interrupt service); GZRS/RA-GZRS should be used to ensure continuity even in the event of a regional disaster, for example, for mission- critical data that must survive extreme events such as earthquakes or major blackouts affecting an entire geographic area. (Source: Azure Storage redundancy options – Documentation )

Security and data access: In addition to resilience, Azure Storage offers various mechanisms to protect data access. All files and blobs are automatically encrypted with service-managed keys (or with customer- managed keys in Key Vault, if configured). For access, Azure allows you to use Azure AD/Entra ID to assign granular permissions to entities (for example, a predefined “Storage Blob Data Reader” role can allow an application to read only blobs in a container). Alternatively or in addition, tools such as Shared Access Signatures (SAS ) are available, which are time-limited tokens that grant specific rights to an object (useful for giving a customer temporary access to a file, for example). Finally, the use of private networks (VNets and firewalls) ensures that only authorized sources can communicate with the storage account, reducing the attack surface. (More information: Azure Storage security guide – Microsoft Docs)

Practical example: Imagine we need to design a centralized repository to hold product images for an e-commerce site, with high availability and global distribution requirements. We could create a GPv2 Storage Account configured with RA-GZRS so that each uploaded image is replicated both locally and in a second geographic region for security. We also set up an Azure Storage lifecycle policy to automatically move older images to cooler access tiers (e.g., from Hot to Cool and finally to Archive ) to reduce long-term storage costs as the images age and are rarely accessed. To distribute these images to globally dispersed end users with low latency, we could leverage a CDN (Content Delivery Network) or Azure Front Door, which caches content on POP servers close to customers. In short, with a few simple configurations, we have durable storage (thanks to RA-GZRS), cost-effective ( automatic tiering ), and high-performance for end users (via CDN).

Visual tips: Two representations work well for this chapter: (1) a comparison table of storage types (Blob, Files, etc.) with “characteristic” rows (e.g., data type, access protocol, usage scenarios, performance, limitations ) to highlight the differences and help choose the right service; (2) a geographic redundancy diagram: for example, a stylized map with two connected Azure regions, where in the primary region the data is replicated across 3 zones (indicating LRS/ZRS) and then replicated to the secondary region. Next to these, icons of a barred vs. open eye could indicate the difference between GZRS (replication but without direct access) and RA-GZRS (replication with read access in the secondary). This would help visualize concretely what happens to the data in each of the redundancy options.

 

6. Computing Services – Virtual Machines (VMs) in Detail

Virtual Machines play a central role in the Azure Compute Services landscape, offering maximum flexibility and control. In this chapter, we'll explore when and how to use VMs, how to ensure their availability and performance, and how to manage their costs.

When to use VMs: Virtual machines in Azure are particularly suitable for scenarios where you need full control over the operating environment, or for compatibility with specific software. For example, if you have a legacy application that needs to run on a specific operating system (Windows Server, Linux in particular) or with special drivers, a VM allows you to install and configure everything as if it were a physical server. Even when you require very specific network or storage configurations (for example, using specific file systems, or connecting multiple network interfaces in a customized way), VMs provide the necessary flexibility. In general, a typical use case for VMs is to lift and shift existing workloads from on-premises to the cloud, without having to rearchitect them: simply create VMs similar to the original servers and maintain compatibility and functionality. It should be noted, however, that compared to managed PaaS services (such as App Service for web apps or Azure SQL for databases), VMs require more management overhead (operating system patches, backup configuration, etc.). (Source: Azure Virtual Machines Overview )

VM type selection and high availability: Azure offers a wide range of VM SKUs, grouped into series with different compute resources. For example, the Dv3/Dv4 series is balanced for general-purpose use, the Ev3/Ev4 series has increased memory for databases or in- memory analytics, the F series prioritizes the number of CPU cores for intensive computations, while the N series includes GPUs for machine learning or 3D visualizations. When creating a VM, you must choose the size (e.g., D2s_v3, E4s_v4, etc.) taking into account the vCPU, RAM, disk throughput, and required features. To ensure high availability, Azure allows deployment on Availability Options such as Availability Sets or Availability Zones. With an Availability Set, multiple VMs (e.g., two VMs that are part of a cluster) are placed in different fault domains within the same data center, so that maintenance or a hardware failure does not affect both at the same time. With Availability Zones, replicated VMs are placed in physically separate data centers (different zones) within the same region, further increasing resilience. Furthermore, for automatic scaling scenarios, Virtual Machine Scale Sets allow you to manage a set of identical VMs that can grow or shrink in number according to demand (for example, adding VMs when the average CPU load exceeds a certain threshold ). Carefully choosing the right VM family and availability strategy is essential to balance costs and service SLAs. (Sources: VM Documentation (Azure), Azure Architecture Center – VM best practices )

VM Cost Optimization: Because VMs can represent a significant expense in a cloud environment, Azure provides several mechanisms to optimize their cost. One of the main ones is the use of Reserved Instances (RI): These are VM capacity reservations for 1 or 3 years, which offer significant discounts (up to 70-80% compared to pay -as- you -go) in exchange for a usage commitment. RIs are convenient for stable, long-term workloads (e.g., a production server that's always on). Alternatively, Savings Plans offer flexibility across VM families and regions, applying hourly discounts more elastically in exchange for a cost commitment. For non-critical, interruptible workloads, there are Spot VMs, which use unused Azure capacity at deeply discounted rates (but Azure can deallocate them when it needs the resources for other workloads). Spot VMs are ideal for batch jobs, testing, or scenarios where an interruption won't cause serious problems. In addition to these, Azure Advisor in its Cost module provides recommendations, for example by flagging VMs with very low CPU utilization that could be resized (the right-sizing principle ), or suggesting applying Azure Hybrid Benefit to save on licensing costs if you already have active on- prem Windows Server or SQL Server licenses. Finally, a simple tip: shut down VMs not in use (especially test/ dev environments outside of working hours) to avoid paying for their consumption when they are not needed. (Source: Azure Cost Management & Billing )

Case study: A company offering CAD design services decides to move its 3D rendering environment to Azure to take advantage of the cloud's scalability. For these workloads, it chooses NVads v5 series VMs, equipped with high-performance GPUs to provide the necessary graphics power. Each VM is paired with Premium SSD v2 managed disks (to ensure high read/write speeds on design data) and placed on a dedicated network with Azure Bastion enabled, so designers can securely connect to the VMs via remote desktop without exposing RDP ports publicly. To monitor the health of the VMs, the company enables Azure Monitor with the VM Insights solution, obtaining detailed metrics on CPU, memory, and GPU utilization, and configures log analytics to track system events. Based on the data collected, they could set alerts (for example, to notify them if a rendering session exceeds a certain time or if GPU utilization is at 100% for too long) and evaluate whether to add another NVads v5 in a Scale Set to balance the load. This scenario highlights how Azure VMs can meet very specific requirements (GPU, secure networking, detailed telemetry) with end-to-end control by the business, but it also requires careful management (continuous monitoring and cost optimization, e.g., using spot machines for less urgent jobs).

Visual cues: A possible diagram for this chapter could show a typical deployment architecture with VMs. For example, a drawing with a public Load Balancer distributing traffic across a set of VMs in an Availability Zone, with an Azure Scale Set behind it to indicate the ability to scale. The diagram could also include complementary services: an Azure Key Vault icon attached to the VMs for managing secrets (such as passwords or certificates), and a Storage symbol representing the managed disks attached to the VMs (perhaps distinguishing Premium vs. Standard). Additionally, a small box labeled “ Savings: RI/ Savings Plan” and “Spot VM” could be shown to remind users of cost optimization methods, or a chart comparing the hourly cost of pay -as- you -go vs. reserved vs. spot. These elements would help visually summarize both the technical architecture and financial strategies related to the VMs.

 

7. Monitoring and Observability with Azure Monitor

When managing applications and infrastructure in Azure (or the cloud in general), visibility into their operation is essential. Azure Monitor is the integrated service that provides end-to-end monitoring and observability capabilities for Azure resources, on-premises resources extended to the cloud, and even other cloud platforms. In this chapter, we'll delve into what Azure Monitor offers and how it helps you keep your environment under control.

What is Azure Monitor and what does it do? Azure Monitor collects and centralizes metrics, logs, and traces from resources and applications. Metrics are numerical values at regular intervals (for example, a VM's CPU usage, the number of requests to a web app per second, disk usage percentage, etc.), useful for understanding performance in near real time. Logs are textual or semi-structured data describing events (for example, Azure activity logs, application logs, VM system events, etc.), suitable for detailed analysis, auditing, and diagnostics. Traces often refer to application transit information, especially useful in debugging or APM (Application Performance Management) contexts. Azure Monitor not only collects this data, but also offers tools to visualize and act on it: you can create customized dashboards and interactive workbooks to graphically represent metric trends and correlate data; You can set up alert rules that send notifications or trigger automatic actions when certain values exceed thresholds (for example, an alert on "CPU > 80% for more than 5 minutes"); and you can integrate services like Autoscale (which uses monitor metrics to automatically scale resources) or Logic Apps/Automation to react to specific events. Azure Monitor essentially acts as the cloud operator's "eyes and ears," enabling a proactive management approach: instead of discovering problems from outages, you receive alerts and observe trends to intervene in advance. (Sources: Azure Monitor overview, Data platform – the 3 pillars )

Insights and specialized monitoring: Azure Monitor provides out-of-the-box solutions called Insights for specific services. For example, VM Insights offers specific views for monitoring virtual machines (immediately showing CPU, memory, disk, and network usage, and identifying top processes consuming resources in a VM). Container Insights does the same for orchestrators like Kubernetes (AKS), providing visibility into clusters, nodes, and container performance. Azure Monitor for Networks provides maps and connection status for network resources (VPN, ExpressRoute, etc.). Application Insights, integrated into Azure Monitor, is also an APM solution for custom applications: it allows you to track end-to-end requests, application exceptions, and analyze user experience (e.g., web page load times, HTTP error rates). These insights solutions simplify monitoring because they offer predefined dashboards and ready-made logic for analyzing those specific services, without requiring the user to build everything manually. Of course, Azure Monitor remains extensible and allows you to write Kusto (KQL) queries on the aggregated logs in the Log Analytics Workspace to perform advanced analysis, correlate data from different sources (e.g., application logs with infrastructure logs), and generate custom reports. (Source: Azure Monitor Insights overview )

Practical example: A DevOps team sets up Azure Monitor for an enterprise application composed of multiple components: virtual machines, a SQL database, and a.NET application hosted on App Service. First, they enable Log Analytics Workspace and connect all the resources to it – so Azure activity logs, VM logs (via the Diagnostics agent ), and application logs (via Application Insights for.NET) flow into a single queryable archive. They then create some Metric Alerts: for example, a critical alert if a VM's CPU stays above 85% for more than 10 minutes or if the SQL database's DTU (Dual Usage Unit) exceeds a certain threshold. They configure the alerts to send notifications to the team via email and Teams, and also run an Azure Function that restarts a specific process on the VM in the event of a high CPU (an automatic self-healing action). At the same time, they prepare an Azure Dashboard that displays a real-time graph of VM CPUs, a graph of average SQL query latencies, and a table with any application errors extracted from the logs (e.g., 500 errors for the web app). Finally, they set up a workbook for monthly performance reviews, including key SLA metrics ( uptime, average response times, resource utilization) and correlating costs—so they can see how resource utilization impacts spending in a single report. Thanks to this implementation, the team is able to quickly identify bottlenecks (for example, from the dashboard they notice that every Monday morning the DB CPU is at 90% and they have a spike in errors—a signal to optimize a slow query) and respond promptly to incidents (the alert system immediately notifies them if something goes out of range, ensuring timely intervention and reducing perceived downtime).

Visual tips: A dashboard is the quintessential visual element in monitoring. For this chapter, you could present an example of an Azure Monitor dashboard with various tiles: a line graph showing the CPU performance of some VMs and their memory usage, next to it a bar graph of the average latency of a web application, below it a table of recent errors (error codes and counts) and a list of active alerts with an indication of severity. Each tile would have a title (e.g., “CPU Usage ”, “ Response Time”, “ Error Log”, “Active Alerts”). Alternatively, a series of small, stylized screenshots of workbooks, Application Insights maps (showing an app 's dependency map ), etc., would highlight the richness of the visualization tools offered. These images would help establish the idea that Azure Monitor allows you to truly see what's happening in the system through real-time dashboards and graphs.

 

8. Cost Management and Budgeting in the Azure Cloud

One of the advantages of the cloud is its flexible cost model, but without adequate control, the risk of exceeding budget is real. Azure provides dedicated cost management and billing tools to help users analyze, monitor, and optimize spending on cloud services. In this chapter, we'll look at how to control costs in Azure and adopt effective financial management practices.

Azure Cost Management + Billing: This is the portal and set of native services for controlling Azure costs. Through Cost Management, you can view spending broken down by service, resource, or resource group, and filter it by time period or tag. For example, you can see how much you spent on Virtual Machines in the last month, or how much a certain project costs (if all resources in that project share an identifying tag). A key feature is budget creation: you can set spending thresholds (monthly, quarterly, annual) for your subscription or RG and receive alerts when a certain percentage of that budget is exceeded (for example, alerts at 80% and 100% of the monthly budget consumed). Cost Management also offers reporting and forecast views: it projects spending to the end of the period based on current trends, helping you understand if you are at risk of exceeding it. The Recommendations section also highlights optimization opportunities related to Azure Advisor—for example, it suggests deallocating underutilized resources or purchasing reservations / savings plans for consistent workloads. The Billing section allows you to manage payment methods, invoices, and, in an enterprise context, split expenses across different business units or receive consolidated billing. (Sources: Azure Cost Management and Billing docs, FinOps in Azure )

Cost Management Best Practices: To avoid unpleasant surprises and ensure that the cloud remains cost-effective, it is recommended to follow some best practices:

·      Define the scope of analysis: Organize resources so that it's easy to assign costs. Using appropriate tags (e.g., Department, Project, Environment) and dedicated Resource Groups for each project/client facilitates granular analysis. Additionally, leverage subscriptions if you need to clearly separate cost environments (some companies place different client projects under different subscriptions to isolate reporting).

·      Proactive monitoring and financial alerts: Don't wait for your invoice at the end of the month to notice anomalies. Set monthly budgets for each project and activate alerts. Azure can also detect cost anomalies (unusual spikes) and notify you if, for example, you're spending significantly more than average on a given day—this is useful for quickly identifying problems, such as a mistakenly created resource that's generating unexpected costs.

·      Continuous optimization: Regularly review Azure Advisor and Cost Management recommendations. Consider applying Azure Hybrid Benefit if you already own Windows/SQL licenses, so you can use them on VMs and avoid paying for them again (this brings significant savings). Right-size resources: if a database is only using 10% of its performance, reduce its SKU; if a VM is consistently underutilized, move it to a smaller size or evaluate PaaS services. Also plan your schedule: shutting down development environments at night and on weekends can reduce costs by a good 20-30% annually.

·      Visibility and accountability: Share cost reports with teams (perhaps with SharePoint dashboards or by exporting data to Power BI). Ensure each team understands their own consumption and holds them accountable for efficiency goals. In advanced FinOps environments, regular meetings are held to review cost trends and optimize architectures with a cost- aware approach.

Practical example: A startup running a SaaS platform on Azure decides to control costs from the start. It creates a monthly budget of, say, €5,000 and sets up alerts: one at 80% (€4,000) and one at 100%. Midway through the month, it receives an 80% alert, prompting the team to investigate. They discover that a forgotten test environment was exhausting the budget. They shut down the test resources and evaluate the use of scheduled auto-shutdown for those VMs in the evening. Furthermore, looking at the reports, they notice that the "Azure App Service" item is having a significant impact. Digging deeper, they see that S2 tier instances are active for all customers, even the smaller ones. They therefore decide to move the smaller customers to the cheaper S1 tier, reducing costs without impacting them. At the end of the month, they stay within budget and prepare a cost dashboard for the following month, highlighting the top five resources by expense, so they can immediately see where most of the money is going. They also activate a weekly scheduled report that is emailed to managers, so there are no surprises. Following this approach, the startup adopts a continuous optimization mindset: each month, they investigate the largest cost item (e.g., data transfers, database instances, etc.) and look for ways to reduce it, such as using Reserved. Instances for always-on servers (benefiting from discounts on their production databases) or leverage pass- through services like Azure Advisor, which suggests deleting an unused public IP address or combining multiple resources on the same pricing plan. These actions, when combined, generate savings that can then be reinvested in new features.

Visual cues: To represent cost management, we can imagine three graphical elements: (1) a line graph showing cumulative costs over the month versus the budget (perhaps with a horizontal line indicating the budget and the cost curve approaching that line, with a dot highlighted when an alert threshold is exceeded); (2) a “Budget vs. Spend” table listing various budgets (by project or department) alongside current spending and the end-of-period forecast, highlighting those that will exceed them in red; (3) a box listing Azure Advisor's savings recommendations – for example: “3 underutilized VMs: potential savings of €200/month”, “Enable Hybrid Benefit on 2 SQL Servers: savings of €150/month”. These elements would help visually communicate the idea of having to stay within certain limits and having concrete optimization opportunities highlighted by the tools.

 

9. Azure Marketplace – Ready-made partner solutions

The Azure Marketplace is an integrated portal in Azure where you can find ready-to-use solutions from both Microsoft and third-party partners. In other words, it's an online catalog of applications and services certified to run on Azure. In this chapter, we'll explore what the Marketplace is, why it can be useful, and how it's typically used.

What is the Azure Marketplace? When you log in to the Azure portal and choose “Create a resource, ” you are actually browsing the Azure Marketplace. This marketplace includes pre-configured virtual machine images, complete solution templates (ARM templates or managed solutions), integrable third-party SaaS services, and even professional services offerings (consulting, support) provided by partners. There is also a public web version of the Marketplace (Microsoft website) for exploring available offerings. Solutions are categorized by type (for example: Computing, Networking, Storage, AI + Machine Learning, Security, Databases, DevOps, etc.). Each item in the Marketplace has a description page with information about the vendor, pricing (some are free, others require licensing or usage fees), and installation procedures. The Marketplace simplifies the deployment of third-party software on Azure: instead of having to manually create a VM and install software, you can take a ready-made image (for example, a firewall from a certain vendor, or configured open source software) and launch it in just a few clicks. (Source: Azure Marketplace overview )

Why use it: The Marketplace's goal is to accelerate the adoption of cloud solutions. For companies, it means access to an ecosystem of tested and supported solutions: you can find popular databases (MySQL, PostgreSQL ) pre-configured, security appliances (such as firewalls, IPS/IDS) from well-known vendors, ready-to-install enterprise applications (SAP, Dynamics), machine images with development software, complete stacks (e.g., LAMP), and much more. Using the Marketplace can save time because it eliminates the need to reinvent the wheel to configure something off-the-shelf. Furthermore, billing for these solutions is integrated into your Azure bill: for example, if you use a third-party firewall that pays through the Marketplace, the licensing costs are charged to the same Azure account, simplifying financial management. Updates and compatibility are also guaranteed by the vendor through the Marketplace, offering greater peace of mind than doing it yourself. For Independent Software Vendors (ISV) partners, the Marketplace is a channel to reach Azure customers with their cloud-optimized solutions.

Practical example: A development team needs a content management system (CMS) to quickly launch a company website. Rather than create a VM and manually install an open-source CMS, they decide to search the Marketplace and find an official WordPress image (offered by the community or by Microsoft). With just a few clicks, the image is deployed as a web app with a MySQL database in Azure (or as a Linux VM with everything pre-installed), ready to use. This greatly speeds up the online launch. In another scenario, a company wants to adopt a partner's security appliance (for example, a Palo Alto Networks firewall): through the Marketplace, they can provision the ready-to-use virtual firewall on Azure and then configure it with the necessary rules. Another example is AI service integration: if a partner offers an AI API as a service, the company can subscribe to it via the Marketplace and the cost will be added to their Azure bill, avoiding separate contracts. All of this highlights how the Marketplace helps reduce complexity in the initial launch phase of solutions, allowing you to focus more on application customization and configuration rather than basic installation.

Visual suggestions: To represent the Azure Marketplace, you could create a grid of icons divided by category: for example, a Database tile containing the logos of MySQL, MongoDB, and Cassandra; a Security tile with firewall appliance/ popular security solutions logos ; Analytics with BI or big data platform icons; AI with cognitive services icons, and so on. Each icon could have a small Azure badge to indicate that it is a marketplace offering. Another idea is to show a simplified screenshot of the Marketplace page with the search bar and a few results (e.g., searching for “WordPress” brings up the official WordPress solution). Finally, you could highlight the concept of “Azure benefit”: some Marketplace offerings are “Azure Benefit Eligible, ” meaning that if you have Azure credits or support plans, for example, certain solutions can take advantage of them—a badge in the icons could represent this feature. These images would help understand the variety of solutions available and the immediacy with which they can be adopted through the Azure platform.

 

Conclusions

In this guide, we've explored a high-level overview of Microsoft Azure, covering fundamental concepts and key services organized by thematic areas: compute, storage, networking, resource management, security, monitoring, cost management, and ready-made solutions. Azure presents itself as a mature and broad platform, capable of supporting everything from simple prototypes to the most complex enterprise architectures, all with a cloud-oriented operating model that emphasizes flexibility, scalability, and pay -per-use.

For those approaching Azure with basic or intermediate cloud computing knowledge, it's important to understand not only the individual services but also how to integrate them into comprehensive solutions. For example, knowing that there are VMs, storage, and managed databases is helpful, but the real value comes from combining them into a coherent architecture and using tools like Resource Groups, Policy, and Monitor to effectively manage them. We hope the chapters in this eBook have provided clear guidance in this regard, offering both detailed explanations and practical examples and visual suggestions to better envision the real-world application.

Recommended resources for further study:

·      Learn Documentation: The Microsoft Learn portal offers guided paths and hands-on tutorials on Azure. For example, you can find introductory tutorials on Azure, interactive modules for each service, and paths like Azure Fundamentals that are ideal for beginners.

·      Azure Architecture Center: A collection of best practices, guides, and references architecture for designing robust and optimized Azure solutions. Useful for learning how to build secure, high-performance, and resilient environments.

·      Microsoft Azure Blog: Stay up-to-date on the latest platform news (new services, updates, case studies). Azure is constantly evolving, and the official blog lets you follow releases and explore new usage scenarios.

·      Azure certifications and training: If you want to validate and deepen your skills, consider certifications like AZ-900 Azure Fundamentals (basic), AZ-104 Azure Administrator, or AZ-305 Azure Solutions Architect. Preparing for these certifications helps you systematically cover many of the topics covered here. Microsoft Learn includes dedicated study paths for each certification.

In conclusion, Azure represents a rich ecosystem where, once you've learned the basics presented in this ebook, you can explore advanced services (such as AI, IoT, large-scale data analytics, etc.) and create innovative solutions. Remember to refer to the official documentation for up-to-date details and experiment directly on the platform (perhaps taking advantage of the Azure Free Tier ) to deepen your understanding.

 

Chapter Summary

Microsoft Azure is a comprehensive cloud platform that offers core compute, storage, and networking services, as well as tools for resource management, security, monitoring, and cost control. This guide provides a detailed overview of these services and their practical applications.

·      Core services: Compute, Storage, and Networking: Azure provides flexible virtual machines for different workloads, storage accounts with varying levels of redundancy and security, and virtual networks to connect resources securely and scalably. VMs can be scaled manually or automatically, while storage supports Blob, File, Queue, and Table with LRS, ZRS, GZRS, and RA-GZRS redundancy options. Virtual networks enable segmentation, peering, and hybrid connections with on-premises.

·      Resource Management with Resource Groups: Azure resources are organized into Resource Groups, logical containers that facilitate management, access control, and tagging. These Resource Groups fit into a broader hierarchy with Subscription and Management Groups, supporting structured governance and targeted security controls.

·      Best practices for Resource Groups: It is important to adopt standardized naming, use tags to categorize resources, and follow a hierarchical structure that separates environments and business units to facilitate governance, cost control, and security.

·      Azure Security: Microsoft Defender for Cloud monitors your security posture and protects your workloads, while Microsoft Access ID manages identities and access with RBAC, MFA, and Conditional Access. Data is encrypted at rest and in transit, with centralized key management via Azure Key Vault.

·      Advanced networking: Azure Virtual Network allows segmentation via subnets and NSGs, custom routing, and PaaS service integration with Private Link. Hybrid connectivity is achieved via VPN Gateway or ExpressRoute, while the Virtual Network Manager facilitates centralized management of complex networks, such as hub-and-spoke topologies.

·      Storage types and redundancy: Azure Storage offers Blob, File, Queue, Table, and Managed Disks with self-encryption and controlled access. Accounts can be General Purpose v2 or Premium for performance needs. Data redundancy ranges from LRS to RA-GZRS, ensuring varying levels of durability and geographic availability.

·      Virtual Machines in Detail: VMs are ideal for workloads that require complete control and legacy compatibility. Azure offers different VM series for specific needs, with high availability options through Availability Sets or Zones and scalability with Scale Sets. To optimize costs, you can use Reserved Instances, Savings Plan and Spot VM.

·      Monitoring with Azure Monitor: The service collects metrics, logs, and traces to provide complete visibility into resources and applications. It includes specific Insights solutions for VMs, containers, and networks, as well as Application Insights for application monitoring. It allows you to create dashboards, alerts, and automations for proactive management.

·      Cost management and budgeting: Azure Cost Management lets you analyze spending by service, resource, or tag, set budgets, and receive alerts. Best practices include resource organization, proactive monitoring, continuous optimization, and reporting sharing to keep teams accountable.

 

CHAPTER 2 – The main services

 

Introduction

Azure is Microsoft's cloud platform that offers a wide range of services to support applications and IT infrastructure in a scalable and flexible way. This technical eBook, aimed at students with basic computer science knowledge, presents the main Azure services divided by thematic areas: Compute, Storage, Network, Database, Artificial Intelligence, DevOps, Security, Automation, Analytics, and Governance.

While we refer you to chapters 3 through 12 for more in-depth information, we'll now provide an overview of the most important Azure services related to that area, describing their key features, fundamental concepts, practical examples of use, and helpful definitions to clarify terminology. The original sources and additional references are included for those who wish to delve deeper. The goal is to provide a clear and detailed text that helps you understand the main Azure services in a technical yet accessible way.

 

Outline of chapter topics with illustrated slides

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Azure offers three main computing services: Virtual Machines, App Service, and Azure Functions. Virtual Machines is the IaaS option, allowing complete control over the operating system, network, and disks, ideal for legacy applications or those with specific needs. App Service is the PaaS solution for websites, APIs, and mobile backends, managing hosting, scalability, and DevOps integration. Azure Functions, on the other hand, allows you to run code in serverless, event-based mode, with pay-as-you-go billing and multi-language support. A practical example: an e-commerce portal can use App Service for the front end, Functions for event- driven payments, and GPU-powered VMs for batch processing. Remember: IaaS offers virtual infrastructure, PaaS a managed platform, while Serverless launches resources only when needed, optimizing costs and scalability.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Azure Storage Accounts provide a global namespace for managing Blobs, Files, Queues, and Tables: all encrypted, durable, and scalable. There are GPv2 and Premium accounts, with different levels of redundancy such as LRS, ZRS, GZRS, and RA-GZRS. Blob Storage is ideal for large files and backups, Azure Files for SMB/NFS shares, Queue for reliable messages between components, and Table for simple NoSQL data. For example, an image repository can use Blobs with private access and lifecycle policies. Key definitions: SAS grants temporary access, while Tiers offer different levels of performance and cost. Always consult the service comparison table and redundancy map to choose the best solution.

 

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.Virtual Networks, or VNets, are the foundation of private connectivity on Azure, connecting resources to each other, the internet, and on-premises. They enable peering, service endpoints, and Private Link. Network Security Groups, or NSGs, filter incoming and outgoing traffic across ports, protocols, and sources, applying to subnets or interfaces. The VPN Gateway enables secure connection between locations via IPsec /IKE tunnels, both site-to-site and point-to-site. For example, dedicated subnets for web, apps, and databases, each protected by NSGs, and secure remote access via P2S VPN. Service Tag simplifies IP range management, while peering ensures low latency between VNets. Always consider a hub-and-spoke design for network security and resiliency.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure SQL Database is a managed PaaS service that guarantees high availability, automatic backups, and patching, with vCore or DTU purchasing models and tiers such as Hyperscale and serverless. Azure Cosmos DB, on the other hand, is a distributed NoSQL database with very low latency, multi- region replication, and various levels of consistency, compatible with APIs such as MongoDB and Cassandra. Choose SQL Database for relational data and ACID transactions, and Cosmos DB for global applications and flexible schemas. A retail app, for example, can store orders in SQL Database and user profiles in Cosmos DB, leveraging geographic replication. Hyperscale allows SQL to scale beyond 100 TB, while consistency in Cosmos DB allows for a balance between correctness and latency.

 

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Machine Learning supports the entire machine learning lifecycle: training, deployment, MLOps, with managed endpoints, AutoML, and prompt flows. The service also includes a model catalog with foundation models. Azure AI Services, or Cognitive Services, offers pre -trained APIs for vision, language, translation, speech, and decision-making, which can be integrated via REST or SDKs. For example, you can create an image classifier by training on Blob data and publishing the model via AutoML and online endpoints, or build text assistants with Language and Speech. AutoML automates the selection of algorithms and hyperparameters, while managed endpoints ensure secure and scalable inference. Always consult the ML flow for a complete view: from data to monitoring.

 

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.Azure DevOps integrates Boards for work management, Repos for Git version control, Pipelines for CI/CD, Test Plans, and Artifacts. It enables agile planning, code reviews, automated builds, multi-environment deployments, and security management. A practical example: a YAML pipeline builds a.NET app, runs tests, publishes artifacts, and releases to App Service via staging and production slots. Boards manages backlogs and sprints, while branch policies on main ensure approval and security scans. Remember: CI/CD automates integration and continuous delivery, and artifacts are reusable packages across releases. Always review the CI/CD workflow to see the entire development process.

 

Immagine che contiene testo, schermata, software, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.Microsoft Defender for Cloud, formerly Azure Active Directory, manages identities and access, supporting RBAC, MFA, Conditional Access, and integration with applications and devices. It is the foundation for Zero Trust architectures. Microsoft Defender for Cloud is a CNAPP platform that unifies security and posture for servers, containers, storage, and databases, providing recommendations, alerts, and compliance. Examples: enable MFA for administrators, set Conditional Access rules, and use Privileged Identity Management for temporary roles. Activate Defender for Servers and Storage, prioritize remediation recommendations, and integrate with Microsoft Sentinel for SIEM monitoring. The secure score indicates security posture, while RBAC controls access to resources.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Logic Apps enables low-code orchestration of workflows between services, easily connecting Office 365, SQL, Storage, and HTTP. Event Grid manages real-time events, connecting publishers like Storage or Resource Groups to subscribers like Functions and WebHooks. Automation Account runs PowerShell or Python runbooks for scheduled tasks, updates, and Desired State Configuration. Examples include a workflow that validates data, writes to SQL, and sends emails when a blob is loaded; or notification of infrastructure changes managed via Event Grid and Functions. For maintenance, you can schedule nightly VM shutdowns via scripts. Always consult event diagrams and flowcharts to optimize business automation.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Synapse Analytics is a unified platform for integration, warehousing, and analytics, with SQL, Spark, and integrated pipelines, and Data Lake for analytical storage. Data Lake Storage Gen2 offers scalable storage with hierarchical directories, ACLs, and high performance. HDInsight provides managed Hadoop and Spark clusters for big data workloads. A typical ETL scenario involves ingesting data from ERP, staging it in Data Lake, transforming it with Spark or SQL, publishing it to a data warehouse, and creating BI dashboards. For IoT logs, Data Lake acts as a data lakehouse, with Spark processing and optimized tables. See the pipeline diagrams to visualize the data cycle from source to report.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Arc extends Azure management to on-premises and multicloud resources, enabling policy, monitoring, security, and GitOps across Kubernetes, servers, and SQL anywhere. Azure Policy enforces compliance and governance policies, generating compliance reports and automatic remediation. Cost Management and Billing analyzes expenses, supports budgeting, alerts, cost allocation, and enables savings through Reservations and Savings Plans. Examples: register on-premises servers with Arc, enforce security policies, and collect centralized metrics; set up Policy initiatives to require Private Endpoints and remediation ; define project budgets, receive alerts, and purchase Reserved. Instances for stable VMs. Always consult Arc compliance dashboards, spending trends, and resource maps for effective governance.

 

1. Compute in Azure (Compute)

Azure computing services allow you to run applications and workloads with different service models: from Infrastructure as a Service (IaaS), which offers fully user-managed virtual machines, to Platform as a Service (PaaS), which allows you to run applications without worrying about the underlying infrastructure, to serverless solutions where code runs on demand without having to manage servers. Azure offers both virtual infrastructure, through Virtual Machines (VMs), managed platforms such as App Services, and serverless capabilities with Azure Functions. These options cover a broad spectrum of computing needs, ensuring flexibility, scalability, and cost efficiency depending on the model chosen.

Virtual Machines (VMs): Azure VMs are virtualized computer instances where the user has full control over the operating system, runtime environment, and network and storage configurations. This IaaS service is ideal for running legacy software, applications requiring custom configurations, or when you need full control over the infrastructure. Azure offers many VM families (optimized for compute, memory, GPU, etc.) and various sizes to accommodate a wide variety of workloads. VMs also support high availability features through Availability Zones (physically separate availability zones within an Azure region) and Virtual Machine Scale Sets (groups of identical VMs that automatically scale). In short, VMs offer the flexibility of cloud virtualization, but with the responsibility of managing updates, patches, and operating system maintenance. Sources: Azure Virtual Machines Overview and Virtual Machines Guide on Microsoft Learn.

App Service: Azure App Service is a fully managed PaaS platform for hosting web applications, REST APIs, and mobile application backends. With App Service, developers can deploy code in various languages (including.NET, Java, Node.js, Python, and even Docker containers) without having to manage servers or virtual machines. The platform automatically takes care of infrastructure provisioning, load balancing, autoscaling based on traffic, and security features such as built-in authentication and integration with CI/CD ( Continuous Integration/ Continuous Deployment) services. App Service supports advanced deployments (for example, deployment slots for releasing to production without downtime) and integrates with other Azure services (such as databases or virtual networks). This service allows developers to focus on application development while Azure manages the execution environment. Sources: Azure App Service overview and documentation on Microsoft Learn.

Azure Functions: Azure Functions is Azure's serverless compute service based on an event- driven model. It allows you to execute small snippets of code or functions in response to external events, such as HTTP requests, queued messages, triggers on data changes, or scheduled timers. The key feature of Functions is that it automatically scales based on load and the payment model is pay-per-use: you only pay for the actual execution time and resources used by the functions ( Consumption mode ), with the option of opting for a Premium or dedicated plan for specific needs. Azure Functions supports various programming languages (C#, Java, JavaScript/ TypeScript, Python, PowerShell, etc.) and allows you to easily connect with other Azure services through a system of bindings (preconfigured connections to storage, queues, databases, email, etc.). This approach allows you to build highly modular and event-responsive application architectures without having to maintain a permanent infrastructure. Sources: Azure Functions Overview and Getting Started Guide “ Getting Started ” on Microsoft Learn.

Practical examples:

·  E-commerce portal: An e-commerce site could use App Service to host the web front end, while payment and order confirmation functionality could be implemented with Azure Functions triggered by HTTP triggers (for example, a function that fires when an order arrives). For intensive tasks like generating product images or nightly batch processing, specialized VMs (such as GPU-based VMs) could be used to run these workloads in isolation. This hybrid approach leverages the strengths of each compute service: App Service for easy website management, Functions for scalable on-demand processing, and VMs for custom or heavy-duty processing.

·  Systems integration: Imagine a business process where an order placed must trigger various actions. An Azure Function could be configured with a binding on a queue ( Queue Storage ): when a new order message is inserted into the queue, the Function is automatically activated to process it (for example, validating data or updating a database). At the same time, the web application for entering orders could reside on App Service. To ensure seamless releases of new versions of the web application, App Service offers deployment slots (for example, a “ staging ” slot to test the new version and then hot swap it for the “production” slot). In this scenario, the Functions handle the asynchronous and scalable processing of requests, while App Service ensures reliable hosting for the user interface and APIs.

Useful definitions:

·      IaaS (Infrastructure as a Service): A cloud model in which core resources (virtual servers, networking, storage) are provided as a service. The user has direct control over the operating system and configurations, but must manage maintenance and updates of the OS and middleware. Examples: virtual machines, networking, disks.

·      PaaS (Platform as a Service): A model in which the application platform is managed by the cloud provider, and the user deploys their applications on it. It reduces operational overhead (infrastructure management, patching, scaling), but leaves less control over the underlying environment. Examples: managed web hosting services, managed databases, and application services such as Azure App Service.

·      Serverless: A model in which the infrastructure is completely abstracted. Compute resources are launched only when needed to execute portions of code in response to events, scaling automatically. Billing is based on execution time and resources consumed, with no downtime costs. The user does not manage machines or OSs: the focus is on the code and application logic. Examples: Azure Functions, Azure Logic Apps (for workflows).

 

2. Storage

Data storage is another key component of Azure, provided through the Storage Account service. A Storage Account on Azure represents a logical container that provides a globally unified namespace for different types of data: unstructured files, distributed file systems, messaging, and simple NoSQL stores. All data stored in Storage Accounts is automatically encrypted and replicated to ensure durability and high availability. Azure offers several geo- redundancy mechanisms to protect data from failures, such as local replication ( LRS, Locally Redundant Storage (Redundant Storage) maintains multiple synchronized copies within the datacenter; Zone- Redundant Storage (ZRS ) replication distributes data across different Availability Zones within a region; Geographic Replication (GZRS) and its read-access variant (RA-GZRS) maintain copies in multiple regions to ensure resilience even in the event of a regional disaster, with the Read-Access (RA ) version allowing read-only access to the secondary replica. There are also two main types of storage accounts: General Purpose v2 (GPv2), which are the most versatile and used for most scenarios (they support all storage services with data tiering options), and Premium accounts, designed for workloads with high demands on consistent performance (e.g., Managed Premium disks, Azure Files Premium, etc.).

Within a Storage Account, Azure provides several specialized storage services: Blob Storage, File Shares (Azure Files), Queues, and Tables. Each is suited to different use cases, as summarized below.

Storage Types and Use Cases:

·      Blob Storage: A service for storing large binary objects (files) or large amounts of unstructured data, such as images, videos, logs, backups, data for data lakes, etc. It supports different access tiers – Hot, Cool, and Archive – which allow you to balance cost and performance depending on the frequency of data access: for example, frequently used data will remain in the Hot tier, while long-term archival data can be moved to the Archive tier at a reduced cost. Blob Storage also includes the features of Data Lake Storage Gen2, which adds a hierarchical file system (with directories and POSIX permissions), making it suitable for analytics and big data workloads. Sources: Overview and best practices on https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction.

·      Azure Files: Provides fully managed SMB/NFS file shares in the cloud, similar to traditional network shares, useful for lift-and-shift scenarios where existing applications require a shared file system. With Azure Files, you can migrate applications that use shared file paths without having to change your data access model. The Azure Files Premium variant offers higher performance and consistent IOPS, suitable for I/O-intensive enterprise applications, for example.

·      Queue Storage: Implements a simple yet durable FIFO messaging system between different components of an application. Azure Storage queues allow you to decouple app components by distributing reliable messages (up to 64 KB each) that can be read asynchronously by other services or processes. It is useful for building distributed and scalable architectures, where message producing and consuming components can work independently, balancing the load (for example, a web app queues messages for a backend processing service ).

·      Table Storage: Provides a low-latency, low-cost, schemaless key-value NoSQL store suitable for storing large volumes of simply structured data (e.g., logs, sensor data, session data). Each entity is a collection of properties (columns) identified by a partition key and a row key. While it doesn't offer the advanced capabilities of relational databases, Azure Tables are excellent for simple data that requires horizontal scalability. (Note that Azure Cosmos DB supports the Azure Table-compatible API for scenarios requiring additional features like secondary indexes or reserved throughput.)

Practical examples:

·      Image repository: An application that manages a large number of images (such as a photo gallery or a CMS) can store files in Blob Storage within a container set to private. To distribute images globally with low latency, Blob Storage can be integrated with a CDN (Content Delivery Network) service. Furthermore, thanks to the Storage Account lifecycle policies, it is possible to configure automatic rules that move older images to less expensive access tiers: for example, after 30 days of inactivity, they are moved from the Hot tier to the Cool tier, and after 6 months they are moved to the Archive tier, reducing storage costs. Access to blobs can be controlled using Azure AD credentials (Microsoft Entra ID) or by generating temporary SAS tokens to grant limited access to external clients.

·      Corporate network shares: A company with legacy applications hosted on virtual machines could migrate its shared files to Azure Files, providing a network SMB path accessible from Azure VMs or even on-premises users via Azure File Sync. In particular, for a critical line-of-business application that requires high performance and consistently low latency in file access (such as an ERP system), Azure Files Premium could be adopted, which guarantees high and consistent throughput and IOPS. This provides a highly available shared file system in the cloud, eliminating the need to maintain an on-premises file server while benefiting from the scalability and resilience offered by Azure.

Useful definitions:

·      SAS ( Shared Access Signature): A shared access signature (SAS) is a token that can be generated to provide temporary, controlled access to Azure storage resources (such as blobs, files, queues, or tables) without having to share account credentials. A SAS incorporates specific permissions (read, write, etc.) and an expiration time; it is widely used to securely grant external entities (client applications, users, services) limited rights to a resource for a defined period of time.

·      Storage Tier: Indicates the “level” associated with data stored in Azure in terms of expected access frequency and, consequently, cost and performance. In the context of Blob Storage, for example, the tier Hot is designed for frequently accessed data (higher storage cost but fast and cheap access), the tier Cool is for infrequently accessed data (lower storage cost but slightly higher read cost), and Archive is for archival data that is rarely or never accessed (minimal storage cost, but the data must be revived with a restore operation before it can be read, and operations have high latency). Choosing the appropriate tier allows you to optimize storage costs according to the data's lifecycle.

References: For more details on storage in Azure, see https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview and https://learn.microsoft.com/en-us/azure/storage/common/storage-introduction on Microsoft Learn. For a deeper dive into storage architectural best practices (replication, data lake design, etc.), see the guide at https://learn.microsoft.com/en-us/azure/architecture/guide/storage/storage-start-here and the Microsoft Learn training path “https://learn.microsoft.com/en-us/training/paths/store-data-in-azure/”.

 

3. Networking

Azure networking allows you to connect and secure cloud resources very flexibly, simulating and extending the capabilities of a traditional network within your Azure environment. Key networking components include Virtual Networks (VNets), Network Security Groups (NSGs), and hybrid connectivity services such as VPN Gateway. These tools allow you to create isolated environments in the cloud, define secure multi- tier topologies, and establish secure connections between Azure and on-premises infrastructure.

Virtual Network (VNet): An Azure Virtual Network is the basic unit of private networking in Azure. It functions similarly to a traditional physical network, but with the flexibility of software: a VNet allows you to connect Azure resources (VMs, containers, PaaS services) to each other, segment them into subnets, and control their internal and external access. VNets can be connected to the internet via public endpoints, communicate with each other via peering (a direct, low-latency connection between two virtual networks), and extend to the company's on-premises network via hybrid connections (VPN or ExpressRoute). Azure also offers features such as Service Endpoints (to allow resources in the VNet to securely access Azure PaaS services through the Azure Backbone network instead of the internet) and Private Link (to connect PaaS services to the VNet via a dedicated private endpoint). In short, the VNet is essential for defining isolated and secure environments in the cloud where resources can be placed, controlling their IP space and network paths. Source: See https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview on Microsoft Learn for more details.

Network Security Group (NSG): An NSG is a security component that acts as a network-level firewall to filter traffic entering and exiting Azure resources. An NSG contains a set of user-defined rules, each with allow or deny criteria based on: destination (or source) port, protocol (TCP/UDP), source and destination IP address, and priority. Rules are evaluated in order of priority and determine which traffic is allowed or blocked. NSGs can be associated either with entire subnets (applying rules to all traffic to and from the subnet ) or directly with the NICs (network adapters) of individual virtual machines or service instances. Essentially, NSGs allow you to segment your application network into security zones, opening only the ports that are strictly necessary (for example, allowing HTTP/HTTPS traffic to web VMs while blocking any other unauthorized access). Azure also provides useful objects like Service Tags (predefined labels representing groups of IP addresses from common Azure services, such as Internet, AzureStorage, AzureSQL, etc.) and Application Security Groups to simplify NSG rule management in complex scenarios. Sources: For more information, see https://learn.microsoft.com/en-us/azure/virtual-network/network-security-groups-overview and https://learn.microsoft.com/en-us/azure/virtual-network/network-security-group-how-it-works on Microsoft Learn.

VPN Gateway: Azure VPN Gateway is a service that allows you to create encrypted network tunnels between Azure and other networks, using the IPsec /IKE protocols. It supports several scenarios:

·      Site-to-Site (S2S): Creates a VPN tunnel between an Azure virtual network and an on-premises local network (requires a VPN device/service on the on-premises side as well);

·      Point-to-Site (P2S): Allows individual clients (such as developers' or administrators' laptops) to connect via VPN to the Azure virtual network from anywhere, as if they were on the corporate LAN;

·      VNet-to-VNet: Establishes a VPN between two Azure Virtual Networks, useful for connecting resources in different regions or tenants.

The VPN Gateway supports flexible authentication modes for P2S (certificates, Microsoft Login ID/Azure AD credentials, etc.) and offers scalable throughput by choosing higher-performance SKUs. In an advanced hybrid connectivity scenario, the VPN Gateway can coexist with Azure ExpressRoute (the high-speed dedicated private connection service to Azure) and often serves as a backup solution: if the private ExpressRoute circuit fails, the public VPN can take over to ensure continuity, albeit with lower performance. Sources: More information at https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpngateways and https://learn.microsoft.com/en-us/azure/vpn-gateway/tutorial-create-gateway-portal (Azure portal) on Microsoft Learn.

Practical examples:

·      Tiered application segmentation: Consider a classic multi- tier app with web, application, and database tiers. In Azure, you can create a single VNet divided into three subnets: for example, web- subnet, app- subnet, and db-subnet. Each subnet will host only the VMs or services of that particular tier. By applying an appropriate NSG to each subnet, you can implement security segmentation easily: for example, the NSG of the web subnet will allow incoming traffic on port 80/443 (HTTP/HTTPS) from the Internet, but will not allow direct access to the VMs of that tier on other ports; the NSG of the application subnet could allow traffic only from the web subnet (for example, port 1433 if the DB is SQL) and only to the database subnet, blocking any other flows; the database subnet could instead allow incoming traffic only from the app tier and deny everything else. Additionally, to increase security, database tier VMs could be free of public IP addresses and accept traffic only through private endpoints (for example, a private endpoint for an Azure SQL database or a storage account), ensuring that PaaS services are also accessible only through the private network. This scenario shows how combining VNets, subnets, NSGs, and Private Links can build cloud architectures very similar in security and isolation to a traditional on-premises data center.

·      Secure remote access for administrators: A company may want to enable its administrators to securely connect to Azure servers when working remotely. By enabling a Point-to-Site VPN on the VPN Gateway associated with the VNet hosting the servers, each administrator can establish a VPN tunnel from their laptop and log into the Azure virtual network as if they were in the office. Using Microsoft Sign In ID (Azure AD) authentication and requiring Multi- Factor Authentication (MFA ) for the VPN connection increases the security of remote connections. Once connected, administrators can RDP/SSH into corporate VMs via private IPs. This eliminates the need to expose VMs to the internet with public IPs, reducing the attack surface and leveraging Azure as a secure extension of your internal network.

Useful definitions:

·      Service Tags: In Azure, service tags are predefined labels that represent sets of IP addresses managed by Azure for specific services. For example, there's an Internet tag that corresponds to "all non-Azure Internet traffic," while tags like AzureCloud, Storage, and SQL correspond to the IP ranges used by Azure in general, the Azure Storage service, the Azure SQL service, and so on. Instead of manually specifying dozens of IP addresses in NSGs, administrators can use service tags (e.g., allow outbound traffic to Storage), and Azure will keep the list of actual IPs behind that tag up to date.

·      Peering: This is a direct connection between two virtual networks in Azure that allows their resources (VMs, services) to communicate with each other as if they were on the same local network, with very low latency. Peering can be configured between VNets, even in different regions (global VNet peering ) or in different subscriptions /tenants, as long as the necessary permissions are granted. Important: Traffic between two peered VNets remains on the Azure backbone network (it does not pass through the Internet), but peer VNets do not share objects such as NSGs or network gateways by default – for example, if a VNet has a VPN Gateway, the peer VNet can only use it by enabling the transit gateway option.

 

4. Managed databases

managed database services that remove much of the operational burden associated with managing traditional databases. Specifically, Azure provides solutions for both relational and non-relational (NoSQL) databases, allowing developers to focus on data and queries without worrying about installation, software patching, high availability management, or backups—most of these tasks are automated by the platform. In this section, we'll examine two key services: Azure SQL Database, for relational needs, and Azure Cosmos DB, for globally distributed NoSQL needs.

Azure SQL Database is a PaaS relational database service based on the Microsoft SQL Server engine, offered as a fully managed instance in the cloud. It provides the full power of SQL Server ( ACID transactions, T-SQL support, advanced relational functions) without requiring direct management of the operating system or database software – Azure takes care of security patches, updates, automatic backups, and high availability management. Azure SQL DB offers a high SLA (up to 99.99% availability) and various scalability and performance options: you can choose between purchasing models based on DTU (an older model that combines CPU, memory, and I/O measurements into a single number) or vCore (virtual cores, which provide more control over allocated CPU and memory). Additionally, there are several service tiers, such as General Purpose, Business Critical, as well as specialty options such as Hyperscale (an architecture that separates compute and storage to scale a single database up to over 100 TB) and serverless mode for intermittent loads (in which the database can automatically scale resources when idle). Azure SQL DB can be used in single-database mode or in elastic pools (where multiple databases share resources on a common pool). Sources: See “ What is Azure SQL Database?” on Microsoft Learn for a complete overview and https://learn.microsoft.com/en-us/azure/azure-sql/database/ for a user guide.

Azure Cosmos DB: Azure's multi-model NoSQL database, designed for globally distributed applications that require very low latency and high throughput. Cosmos DB is offered as a fully managed service, with automatic data replication across multiple regions worldwide and the ability to scale both in terms of storage and operations per second. Rather than using the traditional CPU/memory concept, Cosmos DB adopts the measurement of throughput in terms of Request Units ( RUs ): each operation (read, write, query) consumes a certain number of RUs depending on its complexity, and a certain RU/second capacity is pre-purchased to ensure predictable performance. A distinctive feature of Cosmos DB is its support for multiple APIs: despite having a unified implementation, it exposes interfaces compatible with different data models and protocols, including Core (SQL) APIs for JSON documents, MongoDB (Mongo-compatible protocol), Cassandra (CQL), Gremlin (for graphs), and even a Table API (compatible with Azure Table Storage) and a distributed PostgreSQL API (for scenarios requiring relational semantics over distributed data). Cosmos DB also allows you to choose between various consistency levels for distributed operations, from Strong consistency (in which all replicas must commit the operation, ensuring maximum consistency at the expense of some additional latency) to Eventual consistency (in which replicas update with delay, accepting potentially temporarily unaligned data in exchange for increased speed), through intermediate levels such as Bounded. Staleness, Session and Consistent Prefix. This flexibility allows you to balance the tradeoff between data consistency and performance according to the application's needs. Sources: For a complete overview, see https://learn.microsoft.com/en-us/azure/cosmos-db/overview.

When to choose which database:

·      Azure SQL Database is ideal for working with structured relational data and ensuring ACID (Atomicity, Consistency, Isolation, Durability) transactional properties in operations. It's the ideal choice for traditional line-of-business applications, transaction management systems (orders, invoices, etc.), platforms that require complex SQL queries, or integration with existing SQL-based reporting and BI tools. Furthermore, if you're moving from an on-premises SQL Server environment, Azure SQL Database facilitates migration thanks to its high level of compatibility (e.g., compatibility modes, support for T-SQL stored procedures, drivers, and ORMs that work with SQL Server will also work with Azure SQL).

·      Azure Cosmos DB is well-suited for building modern, distributed applications that require low latency when accessing data from different parts of the world, flexible schema (semi-structured data like JSON) or schema-free (key- value, graphs), and elastic throughput scalability. If the system must handle large volumes of non-relational data and serve requests with millisecond response times, Cosmos DB is a suitable solution. It is the preferred choice for scenarios such as IoT applications with telemetry streams, global web/mobile applications that personalize the user experience by storing settings/profiles, or data stores that must remain active even if an entire datacenter fails (thanks to cross-region replication). Choosing an appropriate partition key is crucial in Cosmos DB to achieve optimal performance by evenly distributing data across nodes.

Practical example

Hybrid Retail Application: Imagine an international e-commerce site. To manage critical financial and transactional data such as orders, billing details, and payment transactions, the application can use Azure SQL Database, benefiting from robust transactions and a relational schema (tables for customers, orders, products, invoices, etc.). This data requires consistency and integrity (for example, updates to multiple tables, such as reducing stock when a new order is placed) and can leverage SQL Database features such as indexes and stored procedures. Similarly, for features such as user shopping carts or user profiles with preferences and browsing history, Azure Cosmos DB can be used using the Core API (JSON documents). This data is less structured, varies from user to user, and benefits from low latency: with Cosmos DB, for example, it is possible to replicate data across multiple regions (close to major e-commerce markets) so that each user can read the contents of their cart from the nearest data center, achieving extremely fast response times. Additionally, if the site scales globally, Cosmos DB ensures that each region has its own copy of the profile data, kept synchronized in the background. In this scenario, the application uses different services for different types of data in parallel: the SQL database for structured transactional data, and the Cosmos NoSQL database for session and preference data, achieving the best of both worlds.

Useful definitions:

·      Hyperscale: This is an Azure SQL Database architecture designed to overcome the traditional resource limitations of a single server. In Hyperscale, the storage layer is separated from the compute and is highly distributed: data is split across multiple storage nodes (called span pages ) and cached on read/write nodes. This allows a single database to grow to tens of terabytes (100 TB or more) while maintaining high performance. It also allows you to add read-only replicas relatively quickly or restore large databases in minutes, as the restore consists of mapping already stored data pages. In short, Hyperscale provides seamless scale-out of the data layer for the SQL Database service.

·      Consistency (consistency models): In a distributed system like Cosmos DB, the consistency level defines how tightly data replicated across different nodes remains synchronized after a write operation. Cosmos DB offers 5 predefined levels: Strong (strong: after a write, all readers in any region immediately see that change; maximum consistency guarantee but higher latency), Bounded (strong: after a write, all readers in any region immediately see that change; maximum consistency guarantee but higher latency), and Staleness (bounded obsolescence: readers can be behind by at most a given time interval or number of versions), Session (per-session consistency: a single client always sees its operations in order, ensuring monotonically increasing reads within its session, but not necessarily with respect to other clients), Consistent Prefix (consistent prefix: all readers see writes in the same sequence as they were made, but may not have all recent writes; no order shuffling occurs, but lag can occur), Eventual (eventual: no immediate guarantee of order or freshness, except that eventually (eventually) all replicas will converge; maximum performance, minimum latency). These models allow you to formally choose the tradeoff between data consistency and performance/ latency in Cosmos DB.

References: To learn more about managed databases in Azure, we recommend reading https://learn.microsoft.com/en-us/azure/azure-sql/database/sql-database-paas-overview and https://learn.microsoft.com/en-us/azure/cosmos-db/overview. Additional documentation is available in the respective hubs (for example, https://learn.microsoft.com/en-us/azure/azure-sql/database/ and https://learn.microsoft.com/en-us/azure/cosmos-db/). Additionally, Microsoft Learn offers training modules for both SQL Database (including the Azure Fundamentals and Database Administrator certifications) and Azure Cosmos DB (with practical examples on using the various APIs and consistency levels).

 

5. Artificial Intelligence and Machine Learning

Azure has a rich ecosystem of services for Artificial Intelligence (AI) and Machine Learning (ML), ranging from pre -trained, ready-to-use solutions for traditional AI to comprehensive platforms for developing, training, and deploying custom machine learning models. In this section, we'll look at two key elements: Azure Machine Learning and Azure AI (Cognitive Services), illustrating how they respectively enable you to manage the entire lifecycle of ML models and integrate AI into your applications without having to train models from scratch.

Azure Machine Learning (Azure ML): is an Azure service that provides a unified environment for developing and managing end-to-end machine learning projects, often in an enterprise context. With Azure ML, you can prepare data and features, train models at scale using managed compute clusters (including GPUs and CPUs), register trained models in a centralized workspace, and finally deploy these models to production through managed endpoints with automatic scaling. Azure ML supports both visual (designer) and code-based (Python SDK, CLI) workflows and enables the implementation of MLOps ( DevOps for Machine Learning) practices to fuel a continuous cycle of model improvement (monitoring model performance in production, retraining on new data, etc.). Key emerging capabilities include: AutoML ( Automated Machine Learning) allows you to automatically generate models by trying different combinations of algorithms and hyperparameters for classification, regression, or forecasting problems, reducing manual work; Managed Endpoints offer a simple way to publish a model as a secure and scalable REST API service, without having to set up containers or load balancers; furthermore, Azure ML is enriching the field of generative AI with support for prompt flows and a Model Catalog of pre -trained models (including foundation models from various providers) that can be reused and customized. In short, Azure Machine Learning is designed for teams of data scientists and ML developers who want a robust platform to orchestrate the entire process from data preparation to model deployment. Sources: To get started, see https://learn.microsoft.com/en-us/azure/machine-learning/overview-what-is-azure-machine-learning and the related https://learn.microsoft.com/en-us/azure/machine-learning/ on Microsoft Learn.

Azure AI Services (Cognitive Services): This term refers to a series of pre -trained AI services offered "as a Service" by Azure. Microsoft has made advanced AI models trained on its own data available to developers through simple API or SDK calls, without having to develop or train models from scratch. These services cover several areas of AI: Vision (image and video analysis, facial recognition, OCR for reading text in images, visual content analysis), Language (natural language analysis, named entity recognition, sentiment analysis, machine translation, knowledge-based Q&A, etc.), Speech (speech recognition, text-to-speech synthesis, speech transcription, speech translation), Decision (services for making informed decisions such as anomaly detection, content moderation), and OpenAI Service (which provides access to text and image generation models such as GPT-4 and DALL-E, in an Azure context). Azure AI includes services such as Azure Cognitive Services, Azure OpenAI, Azure Bot Service, etc. These services are typically used via REST calls or specific libraries: for example, an app can invoke the Vision API to automatically describe a photo's content, or use the Language API to analyze sentiment from text reviews. These APIs are highly scalable and are constantly being improved by Microsoft; they also often allow for customization (for example, Custom Vision to train a vision model on user-specific images, Custom Speech to adapt speech synthesis to a certain tone). Sources: See the introductory page on Microsoft Learn at https://learn.microsoft.com/en-us/azure/cognitive-services/ for a complete overview.

Practical examples:

·      End-to-end image classifier: A data science team wants to build a system that classifies images (e.g., product photos) into categories. Using Azure Machine Learning, they can leverage AutoML Vision: they upload a dataset of labeled images to Azure Blob Storage and set up an AutoML experiment in the Azure ML workspace to test different image classification models. The service automatically trains various deep learning models (e.g., convolutional neural networks ) on GPUs, finding the one with the best accuracy. The best model is registered in the workspace. Then, with a few clicks or commands, the team can deploy the model as a managed online endpoint: Azure ML will create a container with the model and a web service behind the scenes to receive REST requests with images and return the predicted category. The system can then scale automatically as the number of requests increases. Furthermore, thanks to MLOps, you can set up continuous performance monitoring (prediction accuracy over time) and, if new labeled images become available, you can schedule a new model retraining cycle to continuously improve it.

·      Intelligent text assistant: A company wants to enrich its customer support application with AI capabilities to analyze the sentiment of requests and transcribe voice messages. Without training a model from scratch, it can combine different Azure AI Services: for example, use the Language service (part of Cognitive Services) to analyze customer emails or messages and automatically determine whether the tone is positive, neutral, or negative ( sentiment analysis ), extract key entities (product names, order numbers, locations) from the text, and perhaps perform a translation if the message is not in Italian. Likewise, if the app includes a call center, it can use Speech to Text to automatically transcribe voice calls into text, and then analyze them with Language services to extract valuable data. Or, to provide automatic responses, use an Azure OpenAI model like GPT-4, appropriately bounded by business information. Orchestrating these calls can be handled via an Azure Function that receives, for example, audio or text, calls the appropriate AI APIs (transcription, sentiment analysis), and returns an integrated result (e.g., “Customer Chiara Bianchi called about product XYZ and is upset (negative sentiment) because she reported a malfunction” ). This example illustrates how AI capabilities can be infused into existing applications by leveraging pre-built Azure templates, simply by composing the appropriate services.

Useful definitions:

·      AutoML ( Automated Machine Learning): refers to a set of techniques and tools that partially automate the process of developing machine learning models. In the context of Azure ML, AutoML allows you to define a problem (e.g., binary classification, multiclass, regression, or time series forecasting) and let the system test different modeling algorithms (e.g., decision trees, linear models, neural networks) and different combinations of hyperparameters, automatically selecting the model with the best performance on the validation dataset. It is useful for accelerating the prototyping phase when you are unsure which algorithm works best for a given problem.

·      Managed endpoints: In Azure ML, these are API access points provided as a service to expose machine learning models in production. When you create a managed inference endpoint, Azure takes care of allocating the necessary resources (e.g., container instances with CPU/GPU) and exposing a URL to invoke the model (typically via HTTP POST with input data). Managed endpoints simplify model deployment because they automatically integrate features such as scalability (they can scale out instances as requests grow or scale them down to zero if unused, in the case of serverless endpoints), authentication/authorization, request logging, and easy rollback if you want to revert to a previous version of the model.

 

6. DevOps and Application Lifecycle

Azure DevOps is Microsoft's platform that provides an integrated set of services to manage the entire software development lifecycle, from planning and coding to building, testing, and releasing to production. In enterprise and development team environments, Azure DevOps serves as a centralized collaborative hub for implementing Agile/ DevOps methodologies, ensuring traceability and automation. The key components of Azure DevOps include Azure Boards, Azure Repos, Azure Pipelines, Azure Test Plans, and Azure Artifacts.

·      Boards: Agile project management module, including Kanban boards, backlog management, user stories, tasks, bugs, sprint planning, and progress tracking. It allows teams to organize their work and follow Agile/ Scrum methodologies with flexible tools.

·      Repos: is a Git -based version control service (or Team Foundation Version Control) hosted on the Azure cloud. It allows teams to have private and secure Git repositories, with additional features such as integrated pull requests, code review, branch policies (e.g., requiring approval before merging to main or triggering validation builds), and continuous integration with pipelines.

·      Pipelines: is the Continuous Integration/ Continuous Delivery (CI/CD) system that allows you to automate builds and deployments. Build and release pipelines can be defined via YAML files or a visual interface, specifying steps such as code compilation, automatic test execution, application packaging, and deployment to environments ( dev, test, production). Azure Pipelines supports virtually every platform and language (there are agents for Windows, Linux, macOS) and natively integrates deployment to Azure (App Service, VM, AKS, etc.), as well as to other clouds or on-premises environments.

·      Test Plans: offers tools for defining test plans, test cases (including manual ones), and running manual or automated tests, integrating the results into the development cycle. Useful for managing quality with requirements and bug tracking.

·      Artifacts: Provides a package feed to manage dependencies and build outputs (artifacts). It supports formats like NuGet, npm, Maven, Python packages, and others, allowing teams to publish and share reusable code packages internally, as well as store build artifacts (e.g.,.zip files, Docker containers, etc.) that can then be used in release pipelines.

Using these services together, a team can start with planned work on Boards, develop code on Repos, automatically trigger builds and tests on Pipelines with every commit, and if everything passes, deploy to staging and then production, with continuous quality monitoring. Azure DevOps is agnostic to the target platform and can also integrate with GitHub (for example, use only the Pipelines part for projects hosted on GitHub). As a mature service, it also supports the integration of security controls (e.g., code scanning, management of known vulnerable dependencies) and compliance into the DevOps workflow. Sources: For a general overview, see “https://learn.microsoft.com/en-us/azure/devops/user-guide/what-is-azure-devops” on Microsoft Learn.

Practical examples:

·      CI/CD Pipeline for Web Application: A team develops a.NET web app. Using Azure Repos, they maintain the source code in a centralized Git repository. Every time a push to the main branch is made, an Azure Pipeline configured with a YAML file is triggered: the steps include (1) building the.NET project (compiling and producing the package or container image), (2) running automated unit and perhaps integration tests, (3) if the tests pass, publishing an artifact (e.g. a.zip file containing the web deploy, or a Docker image pushed to Azure Container Registry ). A release phase (CD) can then automatically deploy the latest build to a staging environment in the corresponding App Service. Thanks to App Service deployment slots, the new version is uploaded to the staging slot ; the team can manually verify and then, either through the pipeline itself or manually, swap between staging and production slots, releasing the new code to production with no downtime. If something goes wrong, App Service also allows for quick rollback (reverting to the previous version). All these steps—build, test, deploy —are tracked in the CI/CD pipeline and can be subject to manual approvals: for example, the production deployment step can be set to require approval from a manager before actually executing the swap. Meanwhile, the team uses Azure Boards to track features to be developed and bugs reported; each commit or pull request can be associated with a work item (e.g., a user story) in Boards, creating a traceable link between requirements, code, and release.

·      Integrated quality assurance and security: An organization adopts Azure DevOps not only to automate software delivery but also to improve security and quality. For example, on Azure Repos, they can activate branch policies on the master branch: each pull request requires at least two human reviewers (code review) and a successful validation build. When defining the build pipeline, the team also includes static code analysis steps with tools like SonarCloud or artifact analysis with Microsoft Defender for DevOps (which checks for secrets in the code, known vulnerabilities in dependencies, etc.). Furthermore, by using Azure Artifacts, the team always downloads third-party libraries from verified feeds (rather than unverified public sources), thus having greater control over the approved versions of open source components. Finally, each sprint, testers define test cases for new features in Azure Test Plans and link them to requirements on Boards, so that when all test suites (automated and manual) are green, the Product Owner can confidently approve the release. This scenario shows how Azure DevOps helps institutionalize quality practices assurance and DevSecOps ( DevOps + Security) into the normal developer workflow.

Useful definitions:

·      CI/CD: stands for Continuous Integration and Continuous Delivery/Deployment. CI is the practice of frequently (even multiple times a day) integrating code changes into the main shared branch, running an automated build and test suite each time. This ensures that integrations between developers' changes occur regularly and that any issues are identified immediately (if something breaks, the build will continue to fail, providing immediate feedback). CD, on the other hand, concerns the automation of application deployment: Continuous Delivery means always having a build ready and potentially deployable to production (even if the act of deploying it may require manual approval), Continuous Deployment means automatically pushing every change that passes all tests and checks into production, without human intervention. In both cases, the goal is to make software releases rapid, frequent, and reliable, eliminating error-prone manual processes.

·      Artifact: In the context of DevOps, an artifact is a file or package resulting from the build process that can be distributed or reused. For example, when compiling a Java application, I get a.jar file: that's an artifact. When compiling a.NET project, I get a.dll or.zip ready for deployment on a web server: that's also an artifact. In broader terms, it can also be a container (Docker image) produced and then published to a registry, or a NuGet /NPM package generated for sharing. Azure Artifacts is the service that allows you to store and index these artifacts /packages, versioning them, so you can easily reuse them in release pipelines or as dependencies in other projects.

References: To get started with Azure DevOps, we recommend following https://learn.microsoft.com/en-us/azure/devops/. In particular, the "Azure DevOps User Guide" documentation contains detailed explanations of each service. Learning paths are also available on Microsoft Learn for both Azure DevOps and general DevOps concepts, such as the AZ-400 ( DevOps Certification) path. Engineer ) which thoroughly covers using Azure DevOps to orchestrate CI/CD pipelines, repository management, and test plans.

 

7. Security in Azure

security covers various aspects, from identity and access controls to continuous monitoring of resource security posture. In this section, we'll cover two broad areas: identity and access management, primarily through Microsoft Access ID (the new name for Azure Active Directory), and security posture management and workload protection through Microsoft Defender for Cloud. Both are essential services for implementing the Zero Trust principle and ensuring Azure environments are adequately protected and compliant with best practices.

Microsoft Entra ID (Azure Active Directory): Microsoft Entra ID (part of the Microsoft Entra family, formerly known simply as Azure Active Directory) is the Identity and Access Management (IAM) service in the Microsoft cloud. It is responsible for authenticating and managing users, application identities, groups, and resource access permissions. In Azure, each user or application that wishes to access a resource (virtual machine, database, key in Key Vault, etc.) must be authenticated by Entra ID and then authorized using the appropriate roles. Entra ID supports the definition of Role-Based Access Control (RBAC) roles on Azure resources, meaning you can assign predefined (or custom) roles to users on specific resources or resource groups (for example, John Smith is a Contributor on resource group XYZ, so he can create/modify any resource within it; the application account of a web app is a Reader on a certain storage, so he can only read data). In addition to RBAC, Entra ID provides advanced security features such as multi-factor authentication (MFA) to protect access to user accounts beyond the password alone, and Conditional Access policies, which allow you to apply conditions for access (for example: require MFA only if the user logs in from a non- compliant device or an external network, or block access entirely if it comes from certain countries). Another component is Privileged Identity Management (PIM), which allows you to assign temporary administrative roles to users (rather than granting permanent elevated rights) thus reducing the risk window – an administrator via PIM can activate, for example, the Global Admin role only when needed, and for a few hours, with approval. Microsoft Entra ID is integrated with thousands of applications (such as Office 365, Azure, third-party apps) to provide Single Sign -On (SSO) and centralized identity management, and is a cornerstone of the Zero Trust approach, in which every access request is continuously verified and nothing is implicitly trusted, even within the corporate network. Sources: For more information on identity and access in Azure, see the Identity section at https://learn.microsoft.com/en-us/azure/security/fundamentals/identity.

Microsoft Defender for Cloud: is a unified cloud security solution, classified as a Cloud-Native Application Protection Platform (CNAPP) that encompasses Cloud Security Posture Management (CSPM) and Cloud Workload Protection (CWPP ) capabilities. Simply put, Defender for Cloud helps both continuously assess the security posture of your Azure environment (and even hybrid or multi-cloud environments like AWS and GCP) and provide active protection for running resources (virtual machines, containers, databases, storage). On the CSPM side, even in the free version, Defender for Cloud analyzes the configuration of Azure resources against a set of security best practices and benchmarks (for example, it checks whether VMs have open ports to the internet, whether databases are unencrypted, whether storage accounts lack access controls, etc.) and calculates an aggregate Secure Score that reflects the environment's security level: the more correct configurations, the higher the score. It also provides detailed recommendations on how to resolve each issue encountered (for example, “Enable encryption on VM X disk” or “Configure MFA for administrator account Y”). On the CWPP side, through paid plans called Defender plans, the service enables specific protections for various types of workloads:

·      Defender for Servers: Installs an agent (Azure Monitor Agent with Defender extensions) on VMs or physical machines/VMs in other clouds, providing capabilities such as anti-malware, file integrity monitoring, anomalous behavior detection, and integration with Microsoft Defender Endpoint.

·      Defender for Storage: Scans files and blobs in Storage Accounts for malware or suspicious activity (e.g., abnormal read/write spikes that could indicate an attack).

·      Defender for SQL/Database, Defender for Containers, Defender for App Service, etc.: Modules that enable specific alerts (e.g. SQL injection attempts on a managed DB, vulnerability scans of container images, etc.).

Additionally, Defender for Cloud can integrate with Microsoft Sentinel (Azure's SIEM/SOAR) to correlate alerts with other log data and create a comprehensive security operations center. Using Defender for Cloud, an organization gets both continuous assessment (including compliance and scoring) and threat detection across cloud resources. Sources: Introduction and details are available at https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-cloud-introduction.

Practical examples:

·      Improving identity security: A small business sets up Microsoft Login ID for its administrators and users. First, it enables mandatory MFA for all accounts with elevated administrative roles, drastically reducing the likelihood of these critical accounts being compromised even if a password is stolen. It then sets up Conditional Access Policies: for example, it allows administrators to access the Azure portal only if they are on the corporate network or if they perform MFA, and completely blocks access from countries where the company does not operate. It also implements Privileged Identity Management so that roles such as "Owner" or "User Access Administrator" on Azure subscriptions are not held permanently: an administrator must activate the role to gain elevated rights. Elevation via PIM, which may require a second approver and expires after 4 hours. These measures ensure that access to Azure resources follows the principle of least privilege and is constantly verified, in line with Zero Trust.

·      Protecting cloud workloads: An organization activates Microsoft Defender for Cloud and subscribes to the Defender for Servers and Defender for Storage plans for its solution, which includes Linux and Windows VMs and multiple storage accounts. After enabling Defender, the system begins displaying certain recommendations in the Secure Score dashboard: for example, it indicates that three VMs are not automatically updating critical patches, or that access logging is not enabled on a public storage account. The company proceeds to correct these issues, improving the Secure Score and therefore the overall posture. Defender then generates an alert indicating that a suspicious process has been detected on a VM that could indicate a cryptomining attempt. Thanks to the Defender for Servers agent, the activity is blocked and the admin receives the alert to investigate (perhaps discovering that the RDP had been left open on that VM without MFA). Another example: on a storage account containing sensitive documents, Defender for Storage detects and alerts about unusual mass access, helping to uncover potential access key abuse. With these tools, the company gains visibility and active protection across its Azure environment, allowing it to respond quickly to security incidents and close configuration gaps before they are exploited.

Useful definitions:

·      Secure Score: This is a percentage score assigned by Defender for Cloud (also visible in the Azure Security Center portal) that reflects the degree to which the resource configuration adheres to security best practices. Each recommendation is assigned a certain weight; as recommendations are addressed (for example, enabling encryption, remediating configurations, or enabling defense services), the score increases. The idea is to provide an easy-to-monitor quantitative indicator: a secure score of 100% would mean there are no known vulnerabilities in the configuration. It is useful for measuring progress in strengthening security over time and for internal benchmarking.

·      RBAC ( Role-Based Access Control): This is the permissions management model used in Azure (and many other systems) where access to resources is not directly granted to specific users on a case-by-case basis, but through the assignment of predefined roles. A role defines a set of permissions (for example, the Reader role allows only reading of a resource, the Contributor role allows modification but not management of access to it, and the Owner has full control, including permission management ). In Azure, a role is assigned to a principal (user, group, or service application) within a specific scope (this can be at the level of a single resource, a group of resources, or the entire subscription ). This approach simplifies management in complex environments: instead of creating access rules for each user and each resource, standard roles are defined and assigned where necessary.

 

8. Automation and Integration

In the cloud, the ability to automate processes and orchestrate workflows across different services is essential for creating efficient and responsive solutions. Azure provides several services for implementing automation and integration without having to build everything with infrastructure code. Among these, three key services are Azure Logic Apps, Azure Event Grid, and Azure Automation Account (with runbooks ). Each covers a different aspect: Logic Apps for low-code process orchestration, Event Grid for real-time event management, and Automation Account for running infrastructure management scripts on a scheduled or reactive basis.

Azure Logic Apps: is a workflow automation platform based on a visual, low-code approach. It allows you to create workflows by integrating different services and systems through predefined connectors, all while defining a sequence of actions and conditions. In practice, with Logic Apps you can design a flow that reacts to an initial trigger (for example, the arrival of an email, the creation of an item in a SQL database, an incoming HTTP call, scheduled execution at a certain time) and then executes a series of predefined actions (send another email, insert a record into a database, call a REST API, write a file to OneDrive, etc.), possibly with conditional logic and loops. Connectors exist for a wide variety of services, both Azure (e.g., Azure Functions, Service Bus, Blob Storage, Azure AD, Key Vault, etc.) and external/Microsoft 365 services (Office 365, SharePoint, Dynamics, Salesforce, Slack, SAP, etc.), making Logic Apps a powerful tool for integrating disparate applications without having to write custom glue code. Typical scenarios include business process automation (e.g., when a form is filled out on a website, Logic App saves the data to a database, notifies a manager via email, and creates a ticket in a management system), data flow orchestration (e.g., periodically transferring files from FTP to Blob Storage and then notifying a service), and IT automation (e.g., if I receive a certain alert, send a Teams message and create a ticket). Logic Apps is serverless—Azure executes the workflow when triggered, scaling as needed—and allows developers and non-developers (including analysts or IT pros) to define complex integrations with a low learning curve. Sources: Introduction and details are available at “https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-overview” on Microsoft Learn.

Azure Event Grid is a fully managed event routing service that allows you to build event- driven applications easily and efficiently. In an event-driven architecture, producer components raise events when something happens (for example, “a new file has been uploaded to blob storage,” “a VM has been created,” “a message is available in a queue,” or custom user-defined events), and consumer components receive these events and perform actions in response. Event Grid acts as a publish-subscribe event bus: event sources ( or publishers ) publish events to Event Grid, and one or more subscribers register to receive specific events (filtered by type, source, subject, etc.). When the event occurs, Event Grid reliably delivers it to subscribers, being able to handle thousands of events per second with very low latency. Many Azure services are natively integrated with Event Grid as event emitters (for example, an Azure Storage can send an event to Event Grid every time a blob is added; Resource Groups send events when a resource is created/updated/deleted; IoT Hub sends telemetry events, etc.). On the subscriber side, typical handlers are Azure Functions, Logic Apps, HTTP WebHooks (generic web endpoints), Service Bus queues, or Event Hubs. The difference compared to, for example, a traditional queue is that Event Grid implements a push /pub-sub mechanism and can have multiple recipients for the same event, while also maintaining built-in filtering functionality (e.g., it sends the event only if the file name matches certain conditions) and ensuring automatic retry / backoff if the subscriber is temporarily unreachable. In practice, Event Grid facilitates real-time reaction to changes and events without the need for continuous polling, reducing complexity and load. Sources: See “ https://learn.microsoft.com/en-us/azure/event-grid/overview ” for more details.

Azure Automation Account ( Runbook ): Azure Automation is a service designed to automate management and configuration tasks within Azure (and to some extent on external systems). By creating an Automation Account, you can define and execute Runbooks, which are automation scripts written in PowerShell, Python, or built using a graphical editor. These runbooks can be executed manually, scheduled at recurring times, or triggered by webhooks /event responses. Typical scenarios include: automating large-scale maintenance operations (powering on or off virtual machines at scheduled times to save costs, cleaning old logs on storage, restarting services), integrating deployment processes ( for example, running post-deployment scripts), or configuring environments consistently (using Desired State Configuration (DSC), an Automation feature for applying declarative configurations to Windows/Linux VMs). Azure Automation provides a managed environment in which these scripts are executed (in an isolated sandbox on dedicated workers), with integrated output logging and the ability to use credentials and modules securely stored in the account. It also includes solutions like automatic patch updates for Windows and Linux VMs and inventory/configuration. In short, it's the cloud equivalent of having a job scheduler or automation server that runs administrative scripts on resources, helping reduce manual work and streamline operations. Sources: https://learn.microsoft.com/en-us/azure/automation/automation-intro covers creating PowerShell/Python runbooks and using DSC.

Practical examples:

·      Automated Order Workflow ( Logic Apps): A company wants to automate the process that starts when a customer places an order on their website. Instead of implementing everything by hand in code, they create a Logic App with the following flow: the trigger is an HTTP webhook waiting for order data (it is called by the e-commerce application when there is a new order). The Logic App, once triggered, performs several actions in sequence: (1) validates the order data (perhaps using a connector to query Azure SQL Database or check the customer exists), (2) inserts the order details into a CRM system or internal database, (3) sends a confirmation email to the customer via the Office 365 Outlook connector, (4) adds a message to an Azure Queue to notify the shipping department to prepare the package, and (5) posts a message to Microsoft Teams (via the Teams connector) in a “new orders” channel to notify the internal team. All of this happens without anyone writing any custom, imperative code; the flow is designed and configured. If you need to modify your logic (for example, add a step to generate a PDF invoice and save it to Blob Storage), simply add the corresponding connector. This example illustrates how to easily orchestrate multiple services and business actions with Logic Apps.

·      Infrastructure event management (Event Grid + Functions): Imagine we want to monitor virtual machine state changes (power on, power off) to maintain a log or react. In Azure, we can leverage Event Grid by subscribing to events such as "Virtual Machine Powered On/Off" that Azure publishes when a VM changes state. We then configure an Event Grid Topic that listens for events from all VMs in our resource group. As a subscriber, we register an Azure Function that will be invoked for each event: this function could, for example, take the event and record the operation in a database log, or send an email alert if a critical VM has been powered off. Thanks to Event Grid, the reaction is immediate and we don't have to constantly query Azure to find out if the VM is up or down: Azure itself notifies us via the event. Another scenario: when a new file is uploaded to Blob Storage (the “Blob Created ” event), Event Grid automatically invokes an Azure Function that processes the file (e.g., generates thumbnails if it's an image, or transforms data). This event- driven model is extremely efficient and scalable, and Azure handles the entire event subscription and delivery mechanism for us.

·      Scheduled Maintenance (Automation Runbook ): To save costs, an IT department wants to shut down development virtual machines every night and turn them back on in the morning. Using Azure Automation, create a PowerShell runbook that, given a list/tag of VMs, invokes Azure cmdlets to shut down the VMs. This runbook is then scheduled to run automatically every evening at 8:00 PM. Similarly, a second runbook to start the VMs is scheduled for 8:00 AM the following morning. Once tested, these scripts run autonomously every day. Another runbook example: run a script every week that checks all storage accounts and deletes blobs older than X days in a log container, to prevent storage from growing indiscriminately. Or, integrating with on-premises services: via a Hybrid Runbook Worker (an on-premises agent), Azure Automation can execute scripts that interact with on-premises systems, such as syncing on- premises AD users to the cloud or backing up on- premises databases and uploading them to Azure. All this without manual intervention, reducing errors and ensuring tasks are performed smoothly.

References: To learn more about automation and integration on Azure, see: https://learn.microsoft.com/en-us/azure/logic-apps/ with numerous examples of connector usage; https://learn.microsoft.com/en-us/azure/event-grid/ to understand concepts like events, themes, and subscriptions; https://learn.microsoft.com/en-us/azure/automation/ for guides on creating runbooks and using Desired State Configuration. The Azure Monitor - Alert section is also a good complement: many people use an approach where an Azure Monitor Alert (for example, detecting high CPU on a VM) can trigger a call to an Automation webhook or runbook, providing another way to react to operational events. In general, Azure offers a wide range of automation capabilities: for example, Azure Functions, which we discussed in Compute, often works in tandem with Event Grid and Logic Apps, as seen above.

 

9. Data Analysis (Analytics and Big Data)

With the exponential growth of data, Azure provides dedicated services for advanced analytics, building cloud data warehouses, and processing large volumes of information (Big Data). Key solutions in this area include Azure Synapse Analytics, Azure Data Lake Storage, and Azure HDInsight, which respectively cover end-to-end unified analytics, scalable storage for analytical data, and big data processing with open-source tools such as Hadoop /Spark.

Azure Synapse Analytics: Synapse is Azure's unified platform that combines data integration, data warehousing, and big data analytics capabilities into a single service. Previously, Azure SQL Data Warehouse and Azure Data Factory existed separately ; Synapse integrates them, also adding a collaborative environment for data engineers and data scientists. Within a Synapse workspace, you have access to:

·      Integration pipelines (equivalent to Azure Data Factory ) to orchestrate ETL/ELT processes, move and transform data from different sources (database connectors, files, APIs, SaaS services, etc.), running tasks in sequence or in parallel with scheduled or fired triggers.

·      Azure Synapse SQL in two modes: dedicated (a data warehouse cluster with reserved resources, suitable for very high-performance SQL queries on large volumes of structured data) and serverless (an on-demand SQL engine that allows you to query files in the Data Lake in Parquet/CSV/JSON format, paying for the TB of data read, excellent for ad-hoc exploration without having to worry about infrastructure).

·      Apache Spark: In the workspace, you can create Spark pools and run jobs or notebooks ( largely compatible with Databricks ) to work on data using PySpark, Scala, SQL,.NET Spark, with the ability to directly access data in the Data Lake or connected sources.

·      Azure Data Lake Storage Gen2 tightly integrated: Typically, each Synapse workspace is linked to a Data Lake account that acts as the default storage where the data of interest (big data files, job outputs, etc.) resides.

·      Integrated web studio: Synapse provides a single web interface where you can write SQL queries, Spark code, data factory pipelines, and easily move from data preparation to analysis and visualization (integrates with Power BI to create reports on warehouse data ).

In other words, Azure Synapse Analytics allows you to build a modern lakehouse or combined enterprise data warehouse: raw data is stored in the data lake, pipelines and Spark are used to clean and transform it, and the SQL engine is then used to aggregate and make the data available to BI tools. Synapse is very powerful because it eliminates the barriers between different types of analytics (batch, streaming, SQL, noSQL ) in a single place. Sources: See https://learn.microsoft.com/en-us/azure/synapse-analytics/overview for a more detailed description.

Azure Data Lake Storage Gen2: This is Azure's storage technology optimized for data analytics workloads. It's essentially an evolution of Azure Blob Storage, incorporating a hierarchical file system (similar to HDFS) and advanced features to efficiently manage large amounts of files and data. Data Lake Gen2 is built on Azure Storage Account (it's not a separate service, but a flag that can be enabled on a storage account) and allows for directories and subdirectories (not just a flat container of blobs ), making it easy to organize complex datasets with nested structures (e.g., /raw/companyX/year=2025/month=11/day=23/datafile.json ). It also supports Posix ACLs on files and folders, allowing granular permissions for users/groups with IDs on specific directories or files (something classic blob storage could n't do, being container - level ). Data Lake Storage Gen2 is designed for scenarios where you collect massive amounts of heterogeneous data (logs, CSV files, images, IoT data, etc.) and then analyze it with tools like Spark, Hive, U-SQL, or Synapse. It offers improved performance for typical analytics operations (e.g., large directory listings) and special pricing for file appends (useful for streaming). Essentially, if you're building a data lake in Azure, the ideal choice is to use a Gen2 storage account as the foundation, taking advantage of Azure Storage's massive scalability (petabyte capacity, high throughput) and file system capabilities. Sources: https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-introduction offers further information.

Azure HDInsight: is a managed service that offers ready-to-use deployments of popular open source big data frameworks, such as Apache Hadoop, Spark, Hive, HBase, Kafka, Storm, etc., on clusters in Azure. In practice, HDInsight allows you to create cloud clusters with these technologies without having to manually provision VMs and install the software: with just a few clicks you get, for example, a Spark cluster with N nodes ready to run jobs, or a Hadoop cluster complete with HDFS and Yarn, or a Kafka cluster for streaming, and so on. Microsoft handles patching and monitoring of the cluster, and the user pays for the active nodes (and can also scale them). Over the years, many HDInsight features for Spark/ Hadoop have flowed into more integrated alternatives such as Azure Databricks or Synapse Spark; however, HDInsight remains relevant for those who have specific needs for open source compatibility or want to use components such as HBase (a columnar NoSQL database) or Kafka without managing them on- prem. It's very useful for migrating existing Big Data workloads to Azure, providing a familiar environment (e.g., porting Hive / Hadoop jobs to HDInsight with minimal modification). It also supports various languages (Spark in Python/Scala, Hive with HiveQL, streaming with Storm or Spark Streaming, etc.) and can connect to Data Lake Storage as a base storage. Sources: Learn more: https://learn.microsoft.com/en-us/azure/hdinsight/hdinsight-overview.

Practical examples:

·      Data Pipeline with Synapse: A large company has data from its corporate ERP system and wants to combine it with web telemetry for advanced analytics. Using Azure Synapse Analytics, it creates a pipeline (a built-in Data Factory feature ) that extracts updated ERP data (e.g., sales, customer records) from an on-premises database via a connector every night and loads it into the corporate Data Lake in parquet format. Transformation activities are then performed within the same pipeline: for example, it launches a Spark notebook in Synapse that combines sales data with web traffic data (already present in the Data Lake as JSON files collected by Azure Event Hubs), cleans and aggregates this information to obtain an aggregate table for analysis (e.g., sales by region cross-referenced with website visits). Finally, the results are written to a relational table within the dedicated Synapse SQL pool (the data warehouse ), so that business analysts can connect Power BI to that table and obtain dashboards updated daily. This end-to-end ETL process is all orchestrated in Synapse: the raw data resides in the Data Lake, the power of Spark is used to process large volumes, and the data warehouse serves the reporting, all without needing to move data out of the platform.

·      IoT Log Analysis in a Data Lake: A common Big Data use case is collecting large volumes of data from IoT sensors for periodic analysis. Suppose you receive millions of messages per day from devices sending metrics. This data is stored in an Azure Data Lake Storage Gen2 in a format such as Avro or Parquet, partitioned by date and time (each day has its own file folder). To process these logs, you can use an Azure HDInsight Spark cluster: you spin up an on-demand cluster (e.g., 10 nodes with Spark), run a PySpark script that reads the last week's worth of files from the Data Lake, performs calculations (e.g., calculates averages, deviations, and detects anomalies for each sensor), and saves the result to another location, then shuts down the cluster. Alternatively, you could use Synapse Spark or Databricks ; the important thing is that Data Lake Storage Gen2 serves as a central data source ("single source of truth") that can be leveraged by multiple services. In another scenario, if the data is so large and complex that specialized tools like Hadoop are required, MapReduce or Hive ecosystem, you can use HDInsight Hadoop: Existing Hive jobs are moved to the HDInsight cluster connected to the same data in the Data Lake. This allows the company to leverage existing open source code and expertise, but with the ease of management and on-demand scalability of the Azure cloud.

 

10. Cloud Governance and Management

As cloud usage grows, it becomes crucial to have tools to effectively govern the environment, enforcing corporate policies, controlling costs, and managing resources both in the Azure cloud and potentially across hybrid infrastructures. Azure offers robust capabilities in this area, including Azure Arc for unified management of on-premises and multi-cloud resources, Azure Policy for enforcing standards and compliance across resources, and Azure Cost Management + Billing for monitoring and optimizing spend.

Azure Arc: is a solution that extends Azure management capabilities to resources not directly located in the Azure cloud. Azure Arc allows you to connect and project resources such as on-premises physical or virtual servers, external Kubernetes clusters (even on other clouds), databases such as SQL Server or Azure Data Services in external environments, within the Azure Portal and Azure Resource Graph. Once a server or cluster is connected via Arc, it appears as a fully-fledged Azure resource (with an ID, resource group, tags, etc.), allowing you to apply Azure Policies, monitor via Azure Monitor, perform Defender for Cloud scans, and even deploy applications or configurations using techniques such as GitOps (especially for Kubernetes clusters: with Arc for Kubernetes, you can connect a K8s cluster and then declaratively deploy manifests / helm charts from a Git repo). For servers, Arc installs an agent that registers them with Azure; for Arc -enabled databases such as SQL Server, Microsoft provides extensions and centralized update management. There is also Azure Arc Data Services which allows you to run managed Azure data services like Azure SQL Managed in a containerized on- prem environment. Instance or PostgreSQL Hyperscale. Essentially, Azure Arc breaks down the barrier between Azure and the rest: if an organization has a mix of on-premises infrastructure, multiple clouds, and Azure, Arc offers a single control plane, albeit logically ( workloads remain where they physically are). Sources: https://learn.microsoft.com/en-us/azure/azure-arc/overview.

Azure Policy: is a service that allows you to define and assign governance policies on your Azure environment to ensure compliance with internal or regulatory requirements. With Azure Policy, an administrator can write rules that specify how resources should be configured or limited: for example, a policy could mandate that all storage accounts must have encryption enabled, or that no resources be created outside of approved regions (e.g., only “Europe West” and “Europe North”), or that all VMs must have the monitoring extension installed, etc. Azure Policy operates in two modes: in audit mode, flagging (but not blocking) resources that violate the rules and producing a compliance report; or in deny mode, actively rejecting the creation or modification of resources that do not comply with the policy (for example, preventing the deployment from succeeding if it violates a rule). There is also the option to define automatic remediation policies: for example, if the policy requires that disks be encrypted and it finds one that is not encrypted, it can launch an automation to encrypt it. Azure provides hundreds of built -in policy definitions (ready-to-use for common things like those mentioned above, CIS benchmark compliance, mandatory tags, etc.), and allows you to create custom ones using your own JSON definition language. Policies can be grouped into Initiatives (sets of policies for a specific purpose, e.g., "PCI-DSS compliance initiative" containing dozens of policies). Adopting Azure Policy is essential in enterprise scenarios to maintain order and standards: for example, an organization can ensure that no one creates expensive resources out of control, or that certain security flags are always enabled. In the Azure Security Center (now Defender for Cloud) portal, the Compliance section is actually powered by Azure Policy assessments of specific rule sets.

Cost Management + Billing: Azure provides a set of tools to monitor and optimize cloud costs. Cost Management (an integral part of the Azure portal, based on Cloudyn technologies acquired by Microsoft) allows you to view detailed analysis of Azure spending: there are graphs, reports, and breakdowns by service, resource group, tag, and time period. You can define monthly, quarterly, or annual budgets based on scope (e.g., budgets by subscription, resource group, or specific service) and set alerts that notify you via email or text message when projected spending exceeds a threshold (e.g., 80% of the consumed budget). Cost Management also offers optimization recommendations: for example, it identifies underutilized resources (such as expensive VMs with very low CPU usage) and suggests resizing them, or recommends purchasing Reserved. Instances or Savings Plan to save on future costs if you notice a constant use of certain resources (a Reserved Instance allows you to pre-purchase 1 or 3 years of a specific VM at a discounted cost, leading to significant savings if you plan to use that VM for a long time; Savings Plans are similar but flexible across VM families or services. In the Billing section, Azure centralizes the management of invoices, payment methods, and billing scopes: for large companies, perhaps with Enterprise Agreements, it is possible to have subdivisions by department or enrollment account and attributes such as Cost Centers. In Cost Management, the use of tags on resources (for example, tags such as “Environment: Production” or “Project: XYZ”) allows you to generate reports for those tags, useful for internal chargebacks. In short, Cost Management helps answer questions such as “Who is spending how much? Where can we reduce costs? Are we within budget?”. Sources: https://learn.microsoft.com/it-it/azure/cost-management-billing/cost-management-billing-overview.

Practical examples:

·      Hybrid Resource Management with Arc: A company still has many on-premises servers but wants to consolidate management. They install the Azure Arc agent on all Windows and Linux servers in their datacenter. Now, in the Azure portal, each server appears as an “Azure Arc Server” with its own name. The company can assign tags to these servers, include them in Azure Resource Groups alongside pure Azure resources, and most importantly, centrally apply Azure policies. For example, they can define an Arc policy to ensure that each server has certain security software installed, or that servers adhere to a naming convention, and immediately receive reports on which servers aren't compliant. Similarly, they enable Defender for Cloud on Arc servers: this ensures that the same anti-malware controls and log collection present on Azure VMs are extended to physical machines, with alerts reported in the same security dashboard. Additionally, the company is deploying Kubernetes on AWS: by installing Arc for Kubernetes on those EKS clusters, it manages them from Azure Kubernetes Hub, and can even deploy configurations with GitOps (meaning it creates a GitOps configuration in the Azure portal, pointing to a Git repo with a YAML manifest, and Arc ensures those manifests are applied and synchronized on EKS). So, despite having dispersed resources, Azure Arc provides a single plane for governance and operations.

·      Enforcing governance policies: An enterprise organization wants to ensure that all resources created follow certain corporate rules. For example, no production workloads should be located in regions other than the EU for GDPR compliance reasons. Using Azure Policy, the cloud team defines an “ Allowed Locations” policy listing only Western Europe and Northern Europe, and assigns it with a Deny effect to all production subscriptions. From that point on, if anyone tries (even unknowingly) to create a VM or database in the East US, the deployment will immediately fail, indicating a policy violation. Furthermore, for existing resources, the compliance status will show which resources are non-compliant (if any were inconsistent before the application, they will be shown as “non- compliant ”). Another common policy is enforcing tagging conventions: the company requires that each resource have the Department and Project tags filled in for reporting purposes. With Azure Policy, they can enforce audits on “ require tag and its value ”: this way, administrators receive lists of untagged resources, which their owners can correct (if desired, they could also auto-apply a default tag with the modify effect ). On the security side, they define a policy initiative (collection) based on the Azure CIS benchmark: Azure Policy will continuously evaluate the configuration of everything (NSG, storage, key vault, etc.) and report deviations such as disabled firewalls, missing encryption, etc. These mechanisms help scale governance without having to manually check each resource or rely on the good behavior of each team.

·      Cost optimization: A development team has an Azure subscription for development and testing. Midway through the month, they receive an email alert: their monthly budget of $5,000 has reached 80%. Opening Azure Cost Management, they notice that the anomalous spending comes from a series of test VMs that had been left on 24/7. They decide to shut them down after office hours (and possibly automate the process with a runbook ). Furthermore, the cost graph shows that a storage account has generated significant data egress, and they discover that a colleague was performing uncompressed backups, downloading dozens of TBs. They take action to stop that activity, bringing costs back into line. In another scenario, a company notices that it consistently spends X euros per month on a set of 20 VMs that are always on for a production service. Azure Cost Management recommends a Savings Plan or purchasing Reserved. Instances for those VMs for 1 year, with an estimated savings of 30%. Estimating that the service will continue to be used, the company purchases RIs for the VMs of that specific series and region. This way, in the following months, it will see actual spending decrease and stay within the set budget, without having to shut down anything, thanks to the discount obtained. Monthly reports, broken down by department (thanks to tags), are automatically sent to financial managers so that everyone can see how much their department has consumed in Azure, ensuring transparency and accountability for IT costs.

 

Conclusions

In this manual, we've explored the main Azure services, divided into thematic areas, highlighting their features, use cases, and key terminology. Azure presents itself as a rich and integrated ecosystem: from basic compute and storage services to advanced artificial intelligence and data analytics tools, without neglecting DevOps, security, and governance aspects that are essential in real-world contexts. For a student or professional new to the cloud, understanding these pillars provides a solid overview and helps them choose the right service for their needs.

It's important to note that the cloud landscape is constantly evolving: new services and features are introduced regularly. Therefore, in addition to this eBook, it's a good idea to consult the official Microsoft documentation and the sources listed to learn more about topics of interest and stay up-to-date on the latest developments. With this foundation, you're ready to begin designing and implementing Azure solutions in an informed and knowledgeable manner, taking full advantage of its potential.

 

Chapter Summary

This document provides a detailed overview of the key services offered by Microsoft Azure, covering areas such as compute, storage, networking, databases, artificial intelligence, DevOps, security, automation, data analytics, and cloud governance. Each section illustrates features, service models, practical examples, and definitions that help you understand how to use Azure in various business and technology scenarios.

·      Azure Compute: Azure offers compute services ranging from IaaS virtual machines, PaaS platforms like App Service, to serverless solutions with Azure Functions, providing flexibility, scalability, and pay-as-you-go models for diverse application needs.

·      Data storage: Azure Storage Accounts allow you to manage unstructured data, shared files, queues, and NoSQL tables with various redundancy and tiering options to optimize costs and performance. Specialized services such as Blob Storage, Azure Files, Queue Storage, and Table Storage cover various use cases.

·      Networking in Azure: Virtual networks (VNets), security groups (NSGs), and the VPN Gateway allow you to create isolated, secure, and connected cloud environments both internally and with on-premises infrastructure, with advanced features such as peering, Private Link, and multi-factor authentication for remote access.

·      Managed databases: Azure SQL Database offers a PaaS service for relational databases with high availability and scalability, while Azure Cosmos DB provides a global, multi-model NoSQL database with varying levels of consistency for distributed, low-latency applications.

·      Artificial Intelligence and Machine Learning: Azure Machine Learning supports the entire ML lifecycle with AutoML tools and model deployment, while pre -trained AI services (Cognitive Services) offer APIs for vision, language, speech, and decisions, making it easy to integrate AI without developing from scratch.

·      DevOps and Application Lifecycle: Azure DevOps integrates tools for Agile management (Boards), version control ( Repos ), CI/CD (Pipelines), testing (Test Plans) and package management ( Artifacts ), automating the development cycle and improving software quality and security.

·      Azure Security: Microsoft Access ID manages identity and access with RBAC, MFA, and conditional policies, while Defender for Cloud monitors security posture and protects workloads with threat detection and compliance recommendations.

·      Automation and integration: Azure Logic Apps lets you orchestrate low-code workflows, Event Grid manages real-time events with a publish-subscribe model, and Automation Account runs runbooks to automate management and maintenance operations.

·      Data Analytics and Big Data: Azure Synapse Analytics unifies integration, data warehousing, and big data with serverless SQL and Spark, Data Lake Storage Gen2 offers analytics -optimized storage, while HDInsight provides managed clusters for open source frameworks like Hadoop and Spark.

·      Cloud governance and management: Azure Arc extends management to on-premises and multi-cloud resources, Azure Policy enforces compliance and security rules, and Cost Management helps monitor and optimize cloud spending with budgets, alerts, and savings recommendations.

 

CHAPTER 3 – The calculation service

 

Introduction

In Azure, the term compute (compute services) refers to any resource that allows you to run code: from IaaS virtual machines (VMs), to managed PaaS platforms like App Services, to serverless models like Azure Functions. The core idea of the cloud is that users can run their applications without directly managing the underlying hardware infrastructure. In other words, the cloud provider (Microsoft, in the case of Azure) takes care of much of the physical and operational complexity (data center, hardware, networking, availability), while users can focus on configuring services and running application code. This division of responsibilities between provider and customer is a cornerstone of the cloud model.

One of the main advantages of the cloud is on-demand scalability: you can allocate more resources or free them up with a few clicks or automatically, in response to current needs. Furthermore, the pay-as-you-go model ensures you only pay for the resources you actually use: there's no upfront hardware investment, and you can adapt spending to the actual performance of your workload. All of this is centralized administration: Azure provides a unified portal from which you can set security policies, monitor performance, and automate operational tasks across all computing resources deployed in the cloud.

Azure offers several computing service models, which differ in the level of control left to the user and the degree of automatic management offered by the platform. Specifically, we distinguish three fundamental categories:

·      IaaS (Infrastructure as a Service): Virtual infrastructure such as VMs, networks (VNets), and storage (disks) is provided by the cloud, but the software components are managed by the user. The user has complete control over the operating system, configurations, and installed software.

·      PaaS (Platform as a Service): A managed platform that simplifies application deployment and scaling. The cloud automatically manages the runtime, load balancing, SSL certificates, autoscaling, and so on, leaving the developer to focus primarily on the application code and app settings.

·      Serverless (Functions): A model where you provide only small snippets of code or event-related functions, and Azure runs them without the need to manage any dedicated servers. The underlying infrastructure is completely abstracted: the platform allocates resources automatically when the event occurs, instantly scaling as needed, and billing is based solely on the execution time and resources consumed by that code.

To better clarify the difference between these models, let's imagine some practical scenario examples:

·      IaaS scenario: A company has legacy management software that requires specific components and cannot be easily adapted to PaaS services. In this case, a dedicated Windows VM can be created, choosing the appropriate size (CPU/RAM) and high-performance disks (e.g., Premium SSDs), all within an isolated virtual network for security reasons. This allows the company to maintain full control over the environment (as if it were a traditional physical server) while running it in the cloud.

·      PaaS scenario: To publish a showcase website with a backend API, you can use a managed service like Azure App Service. This gives you instant scalable and secure web hosting, with a free HTTPS certificate and automatic autoscaling capabilities, without having to manage underlying virtual machines. Furthermore, thanks to native integration with CI/CD tools (such as GitHub Actions or Azure Pipelines), releasing new versions of the application is quick and easy.

·      Serverless Scenario: For an incoming order processing process, a serverless solution can be adopted. For example, implement a pipeline in which an Azure Function automatically triggers when an event occurs (such as a message being inserted into a queue or an HTTP call), processes the order, and logs it to a database. In this model, the company only pays for the actual execution time of the function and doesn't have to worry about provisioning or managing VMs: Azure allocates and deallocates the necessary resources completely automatically.

These examples show how Azure offers computing solutions suited to different needs: from the maximum performance and control of IaaS, to the convenience of a managed PaaS platform, to the agility of serverless solutions. In the following chapters, we will delve into each of these service models and the specific services associated with them, analyzing their characteristics, benefits, and best practices for use.

 

Outline of chapter topics with illustrated slides

 

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.In the Azure cloud, the term compute refers to everything that runs code: from virtual machines to managed platforms like App Service, to serverless models like Azure Functions. With the cloud, you only pay for what you use and can scale resources in just a few clicks. VMs offer maximum control, while App Services and Functions eliminate infrastructure complexity. Everything is managed from a centralized console, where you can set security policies, monitor performance, and automate tasks. Essentially, the cloud separates responsibility between provider and user, simplifying application management. Practical examples include using a Windows VM for a legacy management system, App Service for a showcase site with APIs, or Functions for an order processing process. The main models are: IaaS, or user-managed virtual infrastructure; PaaS, a managed platform that simplifies deployment ; and Serverless, for event-based execution without dedicated servers.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Choosing between IaaS, PaaS, and Serverless depends on the application and the level of control required. With IaaS, you manage the operating system, patches, network, and storage, ideal for migrations or software with specific dependencies. PaaS, on the other hand, simplifies development: the platform manages the runtime, load balancing, and certificates, allowing you to focus on the application. Serverless allows you to define only functions or events: the runtime scales automatically and you only pay for execution. These models are often combined. Examples: VM test labs for IaaS, multilingual web apps with authentication for PaaS, and processing of files uploaded to Blob Storage via serverless triggers. Key terms are: autoscale, which means automatic scaling of resources, and deployment slots, for seamless releases.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure virtual machines are useful when you need specific components or software. You can choose the size, disks, networking, and availability. Unlike PaaS, you manage patching, antivirus, hardening, and monitoring. VMs can be integrated with Scale Sets for autoscaling and with services like Azure Bastion for secure access. Practical examples include a VM-based web farm with Load Balancer and Scale Sets that scales out instances as load increases, or a graphics VM with a GPU for video rendering. Important definitions include Scale Sets, a group of identical VMs that scale automatically, and NSG, network firewall rules.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Kubernetes Service, or AKS, is a managed solution that takes care of the control plane, leaving you only to manage the nodes. It enables declarative deployments, self- healing, horizontal scaling, rolling updates, and secret management. AKS simplifies microservice deployment, integrates CI/CD, and offers observability through Container Insights. To get started, you can define namespaces, deployments, and services, use ingress to access apps, and enable autoscaling. Practical examples include deploying a microservices application with frontends, APIs, and workers, or managing bursts of load with virtual nodes. Some key terms: pod, the smallest unit in Kubernetes, and deployment, the resource that manages replication and updates.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure App Service is the PaaS platform for websites and APIs. It offers free SSL, integration with continuous deployment systems like GitHub Actions and Azure Pipelines, deployment slots for secure releases, and autoscaling. You can also integrate authentication with Microsoft Login ID, run custom containers, and secure your app via VNet integration. Practical examples:.NET APIs with SQL databases use staging slots for testing and swapping to production; a Python site can automatically scale and use a CDN for static assets. The definitions you need to know are App Service Plan, the compute profile shared by multiple apps, and slots, parallel environments for testing changes before release.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Functions lets you write small pieces of logic tied to triggers like HTTP, timers, queues, Blobs, or Event Hubs. Bindings let you connect inputs and outputs without additional code. The Consumption and Premium plans handle autoscaling and cold start; the Dedicated plan is available for specific needs. Functions integrate with Application Insights for monitoring and with Durable Functions to orchestrate complex workflows. Examples include an order pipeline that uses HTTP triggers and queues, or automatic maintenance with timer triggers. The trigger is the event that starts the function, while the binding is the connection to services like Queue, Blob, or Cosmos DB.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Scalability in the Azure cloud is achieved with Virtual Machine Scale Sets for VMs, autoscale for App Services and Functions, and HPA on AKS. In addition to traditional scale-out and scale-in, Azure also offers predictive autoscaling based on machine learning. To ensure high availability, resources are distributed across Availability Zones, backup and disaster recovery are configured, and stateless architectures are designed with load balancing and health probes. Typical autoscaling rules are: scale up if the CPU exceeds 70% for 10 minutes, and scale down if it drops below 30%. HPA is Kubernetes' horizontal autoscaler, while Availability Zones refer to separate data centers in the same region.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Automation lets you automate repetitive tasks using runbooks written in PowerShell or Python. You can manage resources both in Azure and on-premises with Hybrid Automation. Runbook Worker. Includes State Configuration to ensure configuration compliance and Update Management for VM patching. Runbooks can be launched from Logic Apps, Functions, Azure Monitor, or webhooks, enabling DevOps and ITSM workflows. Examples include automatically shutting down non-productive VMs at night or backing up a database using a runbook that boots the VM, dumps it, and uploads the data to Blob Storage. Runbooks are automated scripts. Hybrid Runbook Worker is the agent that runs runbooks near resources.

 

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Azure Monitor collects metrics, logs, and traces from all your resources, both in the cloud and on-premises. Application Insights analyze application performance, while alerts trigger actions like emails, webhooks, or runbooks. Insights provide quick visualizations for VMs, containers, and the network. For security, Microsoft Defender for Cloud offers a single solution for security posture, workload protection, and DevSecOps, calculates secure scores, offers recommendations, and verifies compliance. Integration between Monitor and Defender allows you to quickly identify anomalies and vulnerabilities and automate response. Some terms: Log Analytics workspace, the log archive, and secure score, the security posture indicator.

 

Immagine che contiene testo, schermata, Pagina Web, software

Il contenuto generato dall'IA potrebbe non essere corretto.With Microsoft Cost Management + Billing, you can monitor and control cloud spending. View costs per service, set budgets with alerts, and enable anomaly detection. Detection, and analyze the coverage of Reservations and Savings Plans. FinOps practices include consistent resource tagging, VM rightsizing, shutting down idle resources, choosing reserved plans for predictable loads, and evaluating the Azure Hybrid Benefit. The invoice is generated a few hours after the month closes, and data can be exported to Power BI. Examples: set a monthly budget with 80% and 100% alerts, optimize VMs by reducing their size, or purchasing reserves for always-on instances. Scope indicates the scope of analysis, while Reservations and Savings Plans are spending commitments that allow for compute discounts.

 

1. Service models: IaaS, PaaS and Serverless

Choosing the right service model in Azure depends on the type of application you need to run and the level of control or intervention you want to maintain over the underlying infrastructure. The three main models— IaaS, PaaS, and Serverless —represent a continuum: from more control and accountability (IaaS) to less management overhead and more automation (serverless). Let's look at each model in detail:

Infrastructure as a Service (IaaS): With IaaS, Azure provides basic virtual infrastructure components (virtual servers, networking, storage) that the user must manage and configure almost as they would in their own data center. This means you are responsible for installing and maintaining the operating system, applications, applying security patches, configuring the virtual network, firewall, and so on. IaaS is ideal for lift-and-shift migration scenarios for existing applications, or for software that requires very specific configurations or dependencies not supported by managed services. In exchange for this greater flexibility, there is more administrative work: the user must manage the instance as they would a real server. A typical example: a test lab for an old corporate ERP system, implemented by creating several VMs in an isolated network, on which snapshots can be taken and over which the user has full control to install any necessary software.

·      Platform as a Service (PaaS): With PaaS, Azure provides a complete, managed application environment, automatically taking care of many operational aspects such as runtime, load balancing, TLS/SSL certificate management, autoscaling, and more. This allows developers to focus on code development and the logical configuration of the application, without having to worry about managing the operating system or underlying infrastructure. PaaS is ideal for increasing productivity and reducing time to market, as it allows for rapid and standardized deployments with high built-in scalability. However, compared to IaaS, it offers less freedom over some low-level configuration details (since many elements are preconfigured by the platform). A typical example: building a multi-language web app with integrated authentication (for example, via Microsoft Login ID, formerly Azure AD) and deployment slots to manage staging and production environments. In this scenario, using App Service (a PaaS offering) allows you to have these features out of the box: there are staging slots to test new versions before releasing them, built-in support for user authentication, and the ability to scale the application simply by changing the service plan.

·      Serverless: In the serverless model—as implemented by Azure with services like Azure Functions or Azure Logic Apps —the concept of the server on which the code runs is completely abstract. The developer simply defines the logic to execute and specifies which events or triggers trigger it; all infrastructure management to run that code is Azure's responsibility. Serverless is extremely elastic: the runtime automatically scales based on the workload (even down to zero processes in the absence of events), and the cost is calculated based on the invocations and resources actually used during execution. This model minimizes operational overhead but is primarily suited to stateless workloads segmented into autonomous functions. A typical example: processing files uploaded to Blob storage. A Function can be configured to automatically trigger whenever a new file is saved to a Blob container and process that file (e.g., generating previews, parsing content, etc.). With serverless, processing occurs only when needed, and you don't pay for standby VMs during periods of inactivity.

Often, in more advanced cloud architectures, the three models coexist and integrate: for example, you might have an API backend exposed on a web app in App Service (PaaS), which invokes serverless functions for asynchronous or on-demand tasks, while perhaps maintaining a VM in IaaS to run a legacy or highly specialized component that can't be ported to PaaS. This combination allows you to leverage the best of each model where it's most needed: total control where essential, simplified management, and autoscaling where possible.

 

2. Azure Virtual Machines (IaaS) – Control and Flexibility

Azure Virtual Machines (VMs) are often the first resource that comes to mind when thinking about cloud computing, because they offer an environment similar to a traditional physical server but with all the benefits of virtualization in Azure. VMs are useful when you need specialized components, special drivers, or software that can't easily run in PaaS or serverless environments. With VMs, you get maximum control: you can choose the operating system (Windows or various Linux distributions), CPU/RAM size, disk type and size (Standard HDD, Premium SSD, Ultra SSD, etc.), network configuration (e.g., dedicated subnets, NSG to filter traffic), and even advanced availability options such as Availability Zones or Virtual Machine Scale Sets. In practice, an Azure VM is the equivalent of a server in the data center, over which the user has administrator privileges.

It's important to remember that opting for IaaS (and therefore VMs) also entails greater operational responsibility. Compared to a PaaS solution, using VMs means managing operating system updates and patches, installing and updating antivirus software, hardening the machine (securing it), backing up application data, and monitoring the operating system (processes, event logs, etc.). These are tasks that would be largely handled by the platform in a managed service, whereas with VMs, they fall to the user or IT team, just as they would be on-premises. Azure provides tools to facilitate these operations (e.g., Azure Automation for automatic patching, Backup for backups, Monitor for VM telemetry, etc.), but it's important to be aware of the additional work involved.

Azure VMs integrate well with other cloud services to improve their usability. For example, you can place VMs in Availability Sets or use Scale Sets to distribute them across multiple physical nodes for high availability and automatic scaling. A Scale Set allows you to manage a group of identical VMs that Azure can scale up or down based on predefined autoscaling rules (for example, adding instances when the load exceeds a certain threshold). For security and access, Azure Bastion is a service that allows you to securely connect to VMs directly through the Azure portal (via web browser), without having to expose public RDP/SSH ports. It's also common practice to configure appropriate firewall rules on subnets via Network Security Groups (NSGs), which allow or block inbound/outbound traffic based on addresses, ports, and protocols.

Practical examples: A typical IaaS scenario is building a web farm on VMs. Suppose we need to run a high-traffic web application on multiple instances to balance the load. We can create a set of identical VMs behind an Azure Load Balancer (which distributes incoming traffic among the VMs) and use autoscaling rules on a Scale Set so that, if the CPU usage on each VM exceeds, say, 70% for more than 10 minutes, an additional VM instance is automatically launched. Conversely, if the load drops below a certain threshold, the number of VMs can be reduced to conserve resources. Communications are protected by an NSG that filters access to the application ports to allow only legitimate traffic. This ensures both scalability (adapting resources based on load) and network security and isolation.

Another scenario is the use of specialized VMs for specific compute needs. For example, for video rendering or intensive graphics processing tasks, Azure offers VMs with powerful GPUs (such as the graphics-optimized NVads series ). You could then create a VM with a GPU to run rendering software, perhaps pairing it with Premium SSD v2 drives that offer high speed and low storage latency. In this case, you'll only pay for the time the "compute-intensive" VM is running, allowing you to shut it down when not needed, and you'll still have extremely high performance thanks to the dedicated hardware, all of which can be configured in just a few minutes from the Azure portal.

 

3. Containers and Orchestration with Azure Kubernetes Service (AKS)

containers and orchestration platforms like Kubernetes play a key role. Azure offers Azure Kubernetes Service (AKS), a managed Kubernetes solution. This means that Azure takes care of preparing and managing the control plane infrastructure (the master nodes that control the cluster) for us, while we only need to manage the agent nodes (worker nodes ) that run the containers, paying only for them based on usage. AKS therefore offers all the benefits of Kubernetes (the standard open-source platform for container orchestration) without the burden of manually managing a complete cluster.

With AKS, you can deploy applications declaratively ( describing the desired state via YAML files), achieve self- healing (containers are automatically restarted if they fail), perform horizontal scaling by adding more instances of a service as load increases, manage rolling updates (gradual updates without significant downtime), and use secure configuration mechanisms such as Secrets to store credentials for use in containers. All of this benefits from the Kubernetes ecosystem, which makes AKS compatible with standard tools and certified by the CNCF (Cloud Native Computing Foundation), ensuring compliance and interoperability with containerized applications developed according to open standards.

One of the main advantages of using AKS on Azure is standardization and automation: compared to deploying container applications on “ naked ” VMs, AKS provides a consistent environment where microservices are managed uniformly. This also simplifies CI/CD ( Continuous Integration/ Continuous Deployment): by combining AKS with services like Azure DevOps or GitHub Actions, you can automate the entire container build and release cycle, knowing that the cluster will apply updates in a controlled manner (e.g., via rolling updates) and ensure the desired number of instances is always running ( autoscaling ). Additionally, AKS integrates with Azure Monitor through Container Insights to provide deep observability of the cluster: container logs, pod performance metrics, node status, etc., all centralized for easy monitoring. From a security perspective, AKS inherits Azure's basic security measures (for example, you can use Azure AD to authenticate requests to the cluster, manage Kubernetes roles via AD-integrated RBAC) and, being an upstream Kubernetes-compliant cluster, allows you to apply security policies and advanced configurations just like on any standard Kubernetes cluster.

To get started with AKS in a project, you typically first define Kubernetes namespaces (to isolate groups of resources by environment or application module), then describe deployments ( which specify the container image to run, the number of instances desired, and how to perform updates) and services (which expose the pods to the network, making them reachable, for example by defining a load balancer or an internal IP cluster). It's common to use an Ingress object to manage HTTP/HTTPS endpoints to application services in the cluster, often integrated with TLS certificates for end-to-end security. AKS also supports the configuration of Horizontal Pod Autoscaler (HPA), which is the Kubernetes mechanism for automatically increasing or decreasing the number of pods in a given deployment as metrics such as CPU usage or message queue change. Naturally, to monitor cluster behavior and costs, it's important to integrate everything with Azure Monitor: the logs and metrics collected (for example, through a Log Analytics Workspace) allow you to set alerts and diagnose any performance issues or application errors within containers.

Practical examples: Consider a microservices application composed of three components: a web front-end, an API, and a background processing service (worker). With AKS, we can deploy each of these components as a group of separate containers (for example, a Deployment for the front-end, one for the API, and one for the worker), perhaps within different namespaces for each organization. We can configure a Horizontal Container for each deployment. Pod Metric-based autoscaler (for example, if the API pod 's CPU exceeds 70% over 5-minute intervals, the HPA adds an additional pod ). We can set up an Ingress Controller with a TLS certificate that routes HTTP requests to the right service (front-end or API). During software updates, Kubernetes will perform rolling updates: with each new container version, the pods are gradually updated to avoid complete service disruptions. If one of the containers crashes, the self- healing mechanism will automatically restart it. This scenario shows how AKS allows for relatively simple scalability, reliability, and zero-downtime updates by delegating many of the complex orchestration tasks to Kubernetes/Azure.

Another scenario is managing variable or unpredictable loads. Imagine a service that normally uses few resources, but can experience sudden spikes (for example, a website that normally has few users but can be the target of traffic surges on certain occasions, such as flash promotions). With AKS, we can take advantage of virtual nodes, an integration with Azure Container Instances (ACI), allows you to add additional serverless container-based nodes in seconds when your AKS cluster is experiencing exceptionally high load. Essentially, during peak load, AKS “stretches” the cluster on ACI by creating additional pods on these virtual nodes (which don't require pre-provisioning like standard nodes) and evicts them when they're no longer needed. This allows you to absorb bursts of traffic without having to constantly keep an excessive number of VMs running in the cluster (which incurs costs). The end-user experience remains stable, while the engineering team doesn't have to manually intervene: AKS's auto-scaling orchestration takes care of everything.

 

4. Azure App Service – Hosting web applications and APIs (PaaS)

Azure App Service is Azure's PaaS service dedicated to hosting web applications, websites, and APIs in a fully managed manner. Using App Service, a developer can deploy their web application on Azure without having to worry about managing virtual machines, configuring a load balancer, or manually setting up a web server—the platform provides it all as a service. Among App Service's most popular built-in features are automatic HTTPS/SSL support (including a free SSL certificate provided by Azure), native integration with CI/CD services like GitHub Actions and Azure Pipelines to automate deployments, and the availability of deployment slots to manage staging and production environments without interruption. For example, you can have a " staging " slot to publish the new version of the app, test it at your leisure, and then swap it with the "production" slot so that the new version goes live in production in seconds and with no noticeable downtime. App Service also supports autoscaling: you can configure autoscale rules based on parameters such as CPU usage or the amount of requests, so that Azure increases or decreases the number of instances of your application to handle the load.

When you create an App Service instance, you choose an App Service Plan, which determines the allocated computing resources (amount of CPU, memory, disk space, etc.) and the available features. App Service Plans are divided into tiers (Free, Shared, Basic, Standard, Premium) with increasing features: for example, higher tiers include features such as support for custom domains with certificates, autoscaling, virtual network integration, and so on. Multiple App Services (sites or APIs) can share the same App Service Plan if they need to reside on the same infrastructure and service tier, optimizing costs. Once the Plan is defined, publishing an app to App Service is a matter of a few steps: you can use tools like git Push, FTP, or DevOps pipelines to upload the code. Azure takes care of running the application in one or more containers (behind the scenes) according to the resources of the chosen plan.

Azure App Service supports a wide range of technologies and languages:.NET, Java, Node.js, Python, PHP, Ruby, and even custom Docker containers. You can choose to run a custom container within an App Service by pointing to a Docker image hosted in a registry (Azure Container Registry or Docker Hub) if you require a specific runtime that isn't natively provided. You can also enable integration with the Azure VNet if your app needs to securely access resources in a virtual network (for example, a SQL Server database on a VM, or services only available via the internal network). From an operational standpoint, App Service offers options for configuring scheduled app backups (including both the code and the attached database), all directly from the Azure portal. Furthermore, integration with Microsoft Login ID (formerly Azure AD) allows you to easily manage user authentication on web applications, enabling enterprise logins without having to write authentication code.

Practical Examples: A common example is hosting a REST API written in.NET (e.g., ASP.NET Core) with a SQL Server database. By creating a Standard-level App Service Plan and an App Service instance, we can publish the API and immediately take advantage of features like autoscaling (for example, setting a second instance to be spun up at 10 requests per second per instance) and deployment slots. We can have a staging slot where we can test new versions of the API with a small subset of users or run automated tests, and then perform a swap to promote the release to production without disruption. During the process, App Service can integrate with GitHub Actions to automatically grab code from the company's GitHub repository whenever a new release tag is created, compile it, and deploy it to the staging slot – thus creating a complete CI/CD pipeline without having to maintain separate build infrastructure.

Another scenario could be hosting a website in Python (Django or Flask ). Suppose we have a site that experiences traffic spikes during specific events (e.g., a marketing campaign). By publishing it on App Service, we can configure automatic scale-out: for example, add up to 3-4 additional app instances during peak times, and then revert to just one instance during off-peak periods. Additionally, to improve the performance of the site's static content (images, CSS/JS files), we could activate a CDN (Content Delivery Network) that works alongside App Service, distributing those files from edge caches. Global nodes to reduce latency to users. This way, even a relatively simple project benefits from enterprise features: high availability, elastic load response, and global content distribution, all with minimal effort and without having to manually administer web servers.

 

5. Azure Functions – Event-Driven Serverless Computing

Moving to the serverless model, Azure Functions is the Azure service that allows you to run event- driven functions, that is, small snippets of code that are triggered in response to events or conditions, without the need to manage a persistent server infrastructure. With Azure Functions, you define a function written in the language of your choice (C#, JavaScript/ TypeScript, Python, etc.) and attach it to a trigger that causes it to execute. Triggers can be of various types: a received HTTP call, a message inserted into a storage queue, a file uploaded to Blob Storage, a time scheduler (timer) that fires at regular intervals, an event on an Event Hub or Service Bus, and many others. This architecture allows you to build reactive and extremely scalable applications by composing many small independent services (functions) that activate only when necessary.

A key aspect of Azure Functions is the concept of bindings: bindings are declarative ways to connect your function to other resources for input and output, without your code having to explicitly manage the connections. For example, you can configure an input binding to a database table or an output binding to a queue: within your function, you will interact directly with an object (e.g., a row or queue database object). message ) without having to write the code to access that resource – the Functions platform takes care of reading/writing to those resources according to the provided configuration. This speeds up development by eliminating a lot of boilerplate. Functions support extensions for binding to many Azure services (Cosmos DB, Storage, SendGrid, etc.), making them ideal as glue code for integrating various services.

hosting model perspective, Azure Functions offers three main plans:

·      The Consumption Plan, which is the pure serverless setup: function instances are dynamically created and destroyed as needed. You only pay for the execution time and resources used. This plan also features virtually unlimited automatic scaling (subject to Azure's internal limits) and can instantiate hundreds of parallel executions if a large number of events arrive at the same time. On the downside, it may suffer from a slight cold start (startup delay) when a function isn't invoked for a while and then needs to restart, because Azure must then allocate a new container to run it.

·      The Premium Plan is similar to Consumption (serverless with auto-scale) but includes pre -reserved instances to avoid cold starts and offers more resources per execution. It has a fixed cost to keep them always ready, but it's useful for critical functions that need to be more responsive. Billing is also based on executions, but with a pre- allocated resource allocation that's always active.

·      The Dedicated (App Service) Plan, in which Functions run on a dedicated App Service Plan, perhaps shared with a Web App. In this case, there is no event-based autoscaling (unless you configure the Plan's autoscaling ), and the price is like a normal App Service Plan (i.e., per instance/ VM per month). However, it allows you to use Functions in environments where you need to keep machines always on or integrate with virtual networks without the limitations of serverless plans. This plan is often chosen for specific compatibility needs or to run Functions in isolated networks.

Azure Functions are designed to integrate well with other Azure services in complex architectures. For example, they can be easily connected to Application Insights, the Azure Monitor module, to obtain detailed traces and metrics on executions (execution times, errors, invocation counts, etc.). For more advanced scenarios that require multi-step workflows or state, there's the Durable Functions extension, which allows you to orchestrate functions and maintain state between invocations (implementing patterns like function chaining, fan-out/fan-in, and orchestrator/ actor, useful for more complex business processes). All this while maintaining the declarative programming model: for example, by defining a Durable orchestration in code, Azure takes care of calling and waiting for child functions, persisting the state in storage, and resuming at the appropriate time.

Practical examples: A classic use case for Azure Functions is building an order processing pipeline in an e-commerce site. It can be structured like this: a Function exposed via HTTP trigger serves as an endpoint for receiving new orders; when called, it performs data validation and then inserts the order into an Azure Storage queue (this can be done conveniently via an output binding ). Then another Function, configured with triggers on the same queue (so it will automatically activate for each new message), takes charge of the order and performs business logic operations (for example, recording the order in a database, sending a notification, etc.). This division allows you to absorb peak requests: the first function immediately responds to the customer by queuing the order, and processing occurs in the background; if 100 orders arrive simultaneously, Azure will seamlessly scale the processing functions in parallel. All this without having to allocate any servers in advance—when there are no orders, no functions run and there are no costs.

Another example is a scheduled maintenance operation: for example, you want to clean up logs or send an aggregate report every night. With Azure Functions, you simply write a function with a Timer trigger (for example, "every day at 3:00 AM") that executes the desired code. Azure will take care of starting this function at the scheduled time. We can imagine a function that every night checks the previous day's application logs, extracts some summary metrics, and sends an email with a report. Thanks to the serverless model, there's no need for a scheduled Windows server or a cron job on a Linux VM that's always on: the function "lives" only when it's time to execute the task, and is then unloaded, making it a very cost-effective model.

(Note: trigger indicates the event or condition that triggers the execution of a Function, such as an HTTP request or a new message in the queue; binding indicates a configured connection to an external resource, which simplifies access to that resource from the Function code.)

 

6. Scalability and high availability

One of the cornerstones of cloud architecture is scalability, or the ability of a system to automatically adapt its allocated resources to the workload, growing (scale-out) or decreasing (scale-in). We've already mentioned many autoscaling features in specific services; let's summarize the main mechanisms in Azure:

·      For VMs (IaaS), you use Virtual Machine Scale Sets, which allow you to manage groups of identical VMs and define automatic scaling rules. For example, you can specify that if the average CPU utilization of the VMs in a set exceeds a certain threshold, Azure will add another instance to the set; conversely, if the load drops below a minimum level for a certain period, a VM is shut down.

·      PaaS services like App Service, autoscaling is built into the platform (App Service Plan). Users simply define autoscaling rules based on metrics (e.g., number of requests, CPU usage, available memory), and Azure will add or remove app instances based on those rules. You can also set up autoscaling Predictive: Azure Monitor, using machine learning algorithms, can anticipate future load peaks (based on historical trends) and scale instances before the peak occurs, improving responsiveness. This predictive autoscaling feature is available for some services and scenarios and represents an exciting evolution towards intelligent automation.

·      In AKS (Kubernetes), as seen, the Horizontal is used Pod Autoscaler (HPA) to scale the number of pods (container instances) running a given service. Kubernetes also allows you to scale the cluster nodes themselves (cluster autoscaler ) by adding VMs when the pods don't fit on the existing nodes. This means that in a well-configured AKS cluster, both the worker units ( pods ) and the infrastructure (VM agents) can dynamically expand or contract based on demand.

Along with scalability, another crucial requirement for cloud systems is high availability (HA), or the ability of a service to remain operational and reachable despite failures or maintenance. Azure offers several options for achieving high availability:

·      Distribute resources across Availability Zones within a region. Availability Zones are groups of physically separate datacenters (different buildings, different power sources, independent network) but still in the same geographic area. For example, by placing half of a service's VMs in Zone 1 and the other half in Zone 2, a major failure affecting one zone won't impact the entire service, because the other zone continues to service requests.

·      failover and disaster recovery mechanisms. For example, Azure provides Azure Backup for automatic backups of VMs, databases, and other services, and Azure Site Recovery for orchestrating disaster recovery (for example, replicating VMs to another region ready to take over in the event of a disaster). A well-designed architecture includes periodic backups of crucial data and, if service continuity is critical, a disaster recovery plan with reserve resources in another datacenter or region.

·      stateless and load-balanced applications. A basic architectural principle is to prevent a specific instance of a service from holding irreplaceable state. If user sessions, for example, are maintained on shared storage (a database or distributed cache) rather than in the local memory of a single VM, then any instance can handle any request. This way, if a VM or container fails, the load can be taken over by other nodes without losing session data. Azure provides Load Balancers (TCP/UDP layer) and Application Gateways (HTTP layer with advanced features) to distribute incoming traffic, and health probes to monitor the health of instances behind the load balancer, automatically excluding unresponsive instances from traffic. This ensures that the end user receives a response even if one of the servers goes offline, because the load is redirected only to the active and healthy ones.

Achieving proper scalability and high availability also requires attention to resource reduction policies. For example, when an autoscaling rule decides to scale-in instances, you need to ensure that an instance that is still processing important operations or that is the last copy of a critical element isn't removed. Azure Scale Set allows you to define removal policies, such as removing the oldest or newest instance first, or the one in a certain zone, etc., depending on what makes the most sense for the application. These tuning details often make the difference between a highly available system and a fragile one.

Practical examples: For autoscaling, a concrete example of a rule might be: “If the average CPU utilization of web apps exceeds 70% for more than 10 minutes, add an instance; if it drops below 30% for 15 minutes, remove an instance, while still maintaining at least 2 instances always active and no more than 10.” This ensures that the service responds to high loads by adding capacity, but avoids continuous oscillations ( temporal hysteresis ) and never drops below a vital minimum. Azure allows you to easily set these rules in the App Service Plan or Virtual Machine Scale Set, and monitor in real time when they are applied.

For high availability and disaster recovery, imagine a critical application that handles financial transactions. We can schedule regular database backups to a Recovery Services Vault (a centralized backup management service) and activate Azure Site Recovery to replicate the application VMs to another region. We'll periodically run a simulated failover test to ensure that, in the event of a disaster, the entire system can be started up in the secondary region quickly and with data consistency. Meanwhile, at the primary level, we'll distribute the VMs across multiple Availability Zones and set up health probes on the Load Balancer to ensure that if a VM in one zone stops responding, traffic is immediately diverted to other functioning VMs. The result is a resilient architecture where both the data (thanks to backups and replication) and the application logic (thanks to load balancing and multiple zones) are resilient to failures.

 

7. Operational management and automation

As applications on Azure grow in number and complexity, it becomes essential to have tools to manage and automate routine operations, reducing manual intervention and the risk of human error. Azure provides several services in this area, most notably Azure Automation.

Azure Automation lets you create and run runbooks, which are automation scripts (in PowerShell, Python, or graphical PowerShell Workflow) that can perform virtually any operation on Azure resources and even on-premises systems. For example, you can write runbooks to start or stop virtual machines on a schedule, clean up temporary files from storage, create reports, rotate access keys, and more. These runbooks run in a context managed by your Azure Automation account, which can have permissions on various resources. To include resources located on your local network or in other environments outside of Azure in your automations, you can use a Hybrid Runbook Worker: This is an agent installed on a VM (or physical server) that registers with Azure Automation and from which runbooks can be executed locally, allowing you to also touch on-premises systems.

In addition to custom runbooks, Azure Automation offers ready-made features like State Configuration (DSC), which helps ensure server configurations remain consistent with a desired definition (useful for Chef/ Puppet -style configuration management natively in Azure), and Update Management, which allows you to manage the patching of Windows and Linux VMs by scheduling the installation of updates on groups of machines. This way, even if we're using many IaaS VMs, we can automate their maintenance to bridge the gap with PaaS platforms in terms of operational effort.

Another key aspect of automation is the ability to trigger automatic actions in response to events or conditions. Azure Automation runbooks can be launched not only manually or on a scheduled basis, but also via webhooks (external HTTP calls) and, most importantly, by integrating with other Azure services: for example, they can be launched in response to an Azure Monitor alert, within Azure Logic Apps flows, or at the end of an Azure DevOps /GitHub Actions pipeline. This means you can create a complete operational flow: monitoring that detects a condition -> automation that intervenes to correct it. A classic scenario is integration with ITSM systems: a critical alert could trigger a runbook that attempts an initial corrective action and automatically opens a ticket in ServiceNow if it fails to resolve the issue.

Practical examples: An immediate example of automation is cost management: you can create a runbook that automatically shuts down test or development VMs every evening at 11:00 PM and turns them back on at 7:00 AM the following morning. This way, non-productive environments consume resources only when they're actually needed (during business hours), resulting in significant savings. You can set Azure Automation to run this runbook every weekday, and perhaps keep it disabled on weekends if those machines aren't needed on Saturdays and Sundays. Everything happens in the background without manual intervention, but obviously with the ability to easily intervene or exclude certain VMs from the program if necessary (it would be enough to parameterize the runbook ).

Another example is a custom backup process: suppose we have a database that, for consistency reasons, we want to hot- backup using a specific procedure. We could create a runbook that, at a specific time (e.g., at night), powers on a specific VM running the database or a backup tool, executes a SQL dump script of the data, uploads the resulting file to Blob Storage as an archive, and then powers off the VM again to avoid costs until the next backup. This runbook could be scheduled weekly. Furthermore, by integrating it with Azure Monitor, we could set an alert: if the runbook fails or takes longer than expected, it sends an email or opens a ticket to inform the team. Ultimately, with a few well-written PowerShell/Python scripts, you can automate almost any operational routine, from the most basic system check to complex multi-step sequences, ensuring greater reliability (because the process will always be executed the same way) and freeing up human operators' time for more analytical tasks.

(Note: runbook means an automated script or process executed by the Azure Automation service; a Hybrid Runbook Worker is an agent that can be installed on- prem or on a VM, which runs runbooks in your local environment, allowing you to control resources not directly exposed to Azure.)

 

8. Monitoring and security

When moving significant workloads to Azure, two aspects become critical for long-term management: continuous resource monitoring and ensuring adequate security. Azure offers very comprehensive tools for both of these purposes.

Azure Monitor is the unified monitoring service in Azure. It can collect metrics, logs, and traces from virtually all Azure resources, as well as on-premises systems and even other clouds. Metrics are numerical values at regular intervals (e.g., CPU usage of a VM, number of requests to an app, average database latency), while logs are unstructured or semi-structured data (e.g., application logs, system events, security audit trails ). Azure Monitor centralizes this data in Log Analytics Workspace (for logs) and makes it available for analysis and querying using a dedicated language ( Kusto Query Language). On top of Monitor, there are targeted solutions, such as Application Insights, a Monitor component designed for applications, which provides programmatic performance analysis (requests per second, average response times, application log traces with operation correlation). Then there are pre-packaged views called Insights (e.g., VM Insights, Container Insights, Network Insights) that provide dashboards and analytics templates specific to those resource types, making it easier to work without having to build everything from scratch.

A crucial added value of Azure Monitor is Alerts: we can define rules that, when certain conditions occur on the collected data (e.g.: a metric exceeds a threshold, or a specific log appears too often), trigger an alarm. Alarms can generate notifications (email, SMS, push calls ) or automatic actions: for example, invoking a Function, running a Logic App, or launching an Azure Automation runbook. This allows you to build a proactive observability system, where you not only visualize data, but also react in real time to problems. For example, if a web application has HTTP 500 errors above a certain rate, an alert can be triggered that notifies the development team and at the same time temporarily increases the App Service instances while waiting for the problem to be resolved, preventing a complete collapse.

security perspective, Azure provides an integrated service called Microsoft Defender for Cloud (formerly known as Azure Security Center). It's a unified Cloud Security Posture Management (CSPM) and Cloud Workload Protection (CWPP) solution, often referred to as a Cloud-Native Application Protection Platform (CNAPP). Simply put, Defender for Cloud continuously analyzes the configurations of Azure resources (and, in some cases, resources in other clouds or on- prem ) to identify vulnerabilities, misconfigurations, or security risks, and provides a series of recommendations on how to improve their posture. For example, it might report that a certain VM has unnecessary open ports to the internet, or that a database doesn't have encryption enabled, or that some machines are missing security updates. Each recommendation contributes to a Secure Score: Azure calculates an overall security score for the environment by taking into account how many recommended controls have been implemented. The higher the Secure Score, the better configured and protected the environment (in theory). This score helps prioritize interventions: for example, improving the elements that increase the score the most because they perhaps mitigate greater risks.

Defender for Cloud doesn't stop at static configurations: it also includes active workload protection capabilities. For example, Defender for Servers (virtual machines) can perform security baselines, behavioral analysis, and report attacks such as malware or brute force; Defender for Containers analyzes Docker images and monitors AKS runtimes ; Defender for PaaS resources (SQL, Storage, App Services, etc.) alerts you to usage anomalies that could indicate compromise. All these events generate security alerts that appear in real time. The platform also helps with compliance: predefined reports indicate how compliant the environment is with standards such as CIS, PCI-DSS, ISO 27001, etc., highlighting missing controls.

The integration between Monitor and Defender is powerful. Defender's security recommendations and alerts can often be linked to monitoring tools: for example, by feeding events into a SIEM (Security Information and Event Management) like Microsoft Sentinel, or by responding immediately via an automated response playbook (built with Logic App). In practice, Azure provides a complete ecosystem where you can monitor the health and security status of all components, quickly identify anomalies or vulnerabilities, and even automate the response to such events. For example, an intrusion attempt on a VM (detected by Defender) could trigger a Monitor alert that notifies the security team and simultaneously launches a runbook that temporarily changes the NSG rules to block suspicious traffic.

Practical examples: A DevOps team could create an operational dashboard by aggregating data from Azure Monitor: for example, a single screen in Azure Dashboard or a Monitor Workbook showing the average CPU and memory utilization of all VMs (or App Services), application errors collected by Application Insights over the last 30 minutes, the number of requests to each API and the error rate, the last backups performed, and perhaps the latency of some key database queries. Additionally, there could be SLA ( availability ) graphs for microservices and a list of the most severe active alerts at the moment. This dashboard provides a quick overview of the current state of the entire system and helps identify anomalous behavior before it becomes a serious problem.

On the security side, an example is using Defender for Cloud to protect workloads: by enabling Defender for Servers on all VMs, Defender for SQL on databases, Defender for Storage on storage accounts, etc., you get a centralized overview of recommendations. For example, Defender might recommend enabling encryption on a certain storage account, applying updates to a Linux VM, or disabling unprotected access to a database. The security team can periodically review these recommendations and establish an action plan to gradually increase the secure score. Meanwhile, all critical alerts (such as malware detections, suspicious traffic spikes, blocked malicious database queries) are sent to the corporate SIEM for tracking and correlation. An example flow: a container in AKS is detected running an unusual process – Defender generates a high-severity alert; This alert is passed to Microsoft Sentinel (SIEM), where a rule exists that, if it involves a front-end container, automatically executes a playbook ( Logic App) that sends a message to the Teams team and scales that pod 's instances to zero for isolation. Of course, this is an advanced scenario, but it illustrates how Azure can connect monitoring and security to achieve autonomous response to adverse events.

(Note: Log Analytics Workspace is the container in Azure Monitor where logs collected from your resources are stored and managed; Secure Score is a metric calculated by Defender for Cloud that summarizes the security posture of your Azure environment and increases as you implement recommended security recommendations.)

 

9. Use cases and cost optimization

Last but not least, an aspect to consider when adopting the cloud is cost management and resource optimization to maximize ROI (Return on Investment). Azure provides tools to monitor spending in detail and make informed decisions on how to optimize operating costs.

Microsoft Cost Management + Billing is the integrated portal for cost control on Azure. Through this service, you can monitor spending on Azure in near real time, breaking it down by subscription, resource group, service, or even custom tags. For example, you can assign tags like Environment:Production or Project:Website to resources and then see the aggregate monthly cost of all components with that tag. You can set monthly or quarterly budgets: a budget defines a spending threshold (for example, "I don't want to spend more than €10,000 this month on subscription X") and allows you to configure automatic alerts when spending reaches certain percentages of that budget (e.g., alerts at 80% and 100%). This helps avoid surprises on the invoice and allows you to intervene before costs get out of hand.

Cost Management also includes anomaly functionality Detection, which analyzes spending patterns and reports if an anomalous cost occurs on a given day or week compared to the historical average—often a symptom of resources left on by mistake or unexpected usage. The cost portal also provides analysis for different scopes: at the tenant (Management Group) level, for individual subscriptions, or for resource groups. This is useful in enterprise contexts where cost analysis needs to be broken down by department or project.

Another important component is the management of Reservations and Savings Plans. For many computing resources (VMs, managed databases, etc.), Azure allows you to purchase a certain amount of usage in advance over one or three years, obtaining significant discounts (often 20% to 50% less) compared to pay -as- you -go payments. For example, if you know that a certain VM will be used 24/7 for the next few months, you can "reserve" an instance of that VM for one year, paying a discounted upfront or monthly fee. Reservations apply to specific resources (e.g., a specific VM family in a region), while Savings Plans are more flexible (you purchase a certain amount of hourly spending committed to various services). Cost Management helps calculate the coverage of these options: that is, given the actual usage, how much of that usage is covered by reservations and how much is not. This guides advance purchase decisions to maximize savings.

Adopting a FinOps (Financial Operations) approach in the cloud also means following some best practices:

·      Systematically use tags to categorize resources by project, environment, and responsible team so you can easily assign costs and identify areas for optimization.

·      Periodically right-size VMs and other services: often, workloads initially designed for a certain size can run on less CPU/RAM, especially after application optimizations. Azure Advisor and Cost Management can suggest when a VM is underutilized and could be downsized.

·      Shut down or delete unused resources: test environments no longer active, VMs powered on after hours, services created for testing and then forgotten. Automate shutdowns when possible (as seen with Azure Automation) or schedule periodic reviews of orphaned resources.

·      Use appropriate pricing plans: for example, take advantage of Azure Hybrid Benefits for Windows and SQL Server VMs, which allow you to apply existing on-premises licenses to cloud VMs, avoiding double licensing costs (this can significantly reduce costs for those with Software Assurance).

·      For continuous loads, consider purchasing Reservations / Savings Plans to obtain discounts. For sporadic or variable loads, continuing with pay -as- you -go may be more cost-effective.

·      Continuously monitor with automatic reports and, if necessary, export cost data to BI tools (such as Power BI) to cross-reference it with business metrics. Azure allows you to export detailed cost data daily, allowing the company to perform in-depth analysis and forecast spending.

Practical examples: A company might set a monthly budget of, say, €50,000 for its production subscription. Alerts are configured so that when 80% of the budget (€40,000) is reached, an email is sent to the IT department and project managers to assess corrective measures, if necessary. Another alert is sent at 100% (€50,000), perhaps even triggering a Logic App to notify the situation in Teams. In the Cost Management portal, dashboards are created with cost charts by service (to see which services have the greatest impact, for example, VM vs. Database vs. Storage) and historical trends (to see monthly trends and identify seasonality). This data, discussed in monthly meetings, helps understand whether cloud spending is delivering the expected benefits and where optimization can be made.

In terms of practical optimization, an example might be: after a few months of monitoring, the team notices that some production VMs have an average CPU utilization below 10%. This indicates overconfiguration. Consequently, they might decide to downsize these VMs ( fewer vCPUs /RAM) to reduce the hourly cost, or, if possible, consolidate more workloads onto fewer VMs by shutting down some of them. Furthermore, if there are machines that are essential and always on (for example, domain servers or primary database instances), the company might consider purchasing a 3-year Reservation for each, perhaps obtaining a 30% discount on the full price. Another simple saving comes from licensing: by activating Azure Hybrid Benefit on all Windows servers with a Software Assurance license, the licensing component is eliminated from the Azure bill (paying only for the host ). All of these actions combined can lead to significant savings, freeing up budget that can be reinvested in new initiatives rather than spent on unoptimized resources.

(Note: In Cost Management, the term scope refers to the scope of analysis or application of an operation, such as a specific subscription, a resource group, or the entire tenant. Reservation and Savings Plan refer to upfront commitments to obtain discounted pricing on compute services.)

 

Conclusions

In this chapter, we explored the main computing services offered by Azure and the key concepts for using them best. We started with the fundamentals of IaaS, PaaS, and serverless, highlighting how to choose the most suitable model based on your needs for control and simplicity. We looked in detail at virtual machines for maximum flexibility scenarios, containers with AKS for orchestrating modern microservices applications, and managed platforms like App Service and Functions that simplify the development of web apps and event- driven workflows.

Through practical examples, we demonstrated how to implement automatic scaling and ensure high availability, leveraging the integrated capabilities of the Azure platform. We emphasized the importance of automated management and continuous monitoring, using services like Azure Automation to reduce manual work and Azure Monitor combined with Defender for Cloud to monitor the performance and security of the environment. Finally, we focused on cost optimization best practices, because efficient cloud usage includes not only technical but also financial aspects (the FinOps paradigm ).

With this knowledge, those new to Azure computing services should have a clear picture of the options available and how to strategically plan their cloud adoption. The Azure world is constantly evolving: new services and features are added regularly. However, the basic principles—choosing the right abstraction layer, designing for scalability and resilience, automating where possible, and keeping an eye on costs and security—remain constant. By following these principles and experimenting with the services described, it will be possible to build robust, secure, and economically sustainable cloud infrastructures, fully benefiting from the innovation offered by Azure.

 

Chapter Summary

The document provides a detailed overview of the main service models and tools offered by Azure for managing cloud applications, covering IaaS, PaaS, and serverless models, as well as scalability, security, automation, and cost optimization aspects.

·      Azure Service Models: The IaaS, PaaS, and Serverless models represent a continuum from complete control of the infrastructure (IaaS) to fully automated management (serverless). IaaS offers flexibility and control over VMs, PaaS provides managed environments for web applications and APIs, while serverless performs event- driven functions without server management. They are often combined in advanced systems to balance control and automation.

·      Azure Virtual Machines (IaaS): VMs allow complete control over the operating system, configurations, and software, making them useful for legacy applications or specific needs. They require operational management such as patching and backups, but offer high flexibility and integration with scaling and security services such as Scale Sets, Availability Zones, and Azure Bastion.

·      Containers and Azure Kubernetes Service (AKS): AKS is a managed Kubernetes service that makes it easy to deploy, scale, and update containerized applications. It offers self- healing, rolling updates, CI/CD integration, and in-depth monitoring via Azure Monitor. It also supports virtual nodes to handle peak loads with serverless containers.

·      Azure App Service (PaaS): A managed service for hosting web applications and APIs, with built-in HTTPS support, deployment slots, automatic scaling, and CI/CD integration. It supports various languages and custom containers, offers integration with virtual networks, and authentication via Microsoft Login ID.

·      Azure Functions (Serverless): Allows you to run event- driven functions without server management, with various triggers and bindings to integrate Azure resources. It offers Consumption, Premium, and Dedicated hosting plans to suit different needs. It supports extensions like Durable Functions for complex workflows.

·      Scalability and high availability: Azure supports autoscaling via VM Scale Sets, App Service Plan, and Kubernetes Horizontal. Pod Autoscaler, plus distribution across Availability Zones for resiliency. Includes failover mechanisms, backups, load balancing, and controlled resource removal policies to ensure continuity and responsiveness to variable loads.

·      Operational Management and Automation: Azure Automation lets you create runbooks to automate routine operations across Azure and on-premises resources using Hybrid Runbook Worker. It also offers patch management (Update Management) and configuration (DSC), with the option of integrating alerts and workflows for automatic event responses.

·      Monitoring and security: Azure Monitor collects metrics and logs from Azure and on-premises resources, enabling alerts and analysis with Application Insights and application-specific insights. Microsoft Defender for Cloud assesses security posture, identifies vulnerabilities, and protects workloads with real-time alerts, integrating with SIEM and automation for rapid response.

·      Use cases and cost optimization: Microsoft Cost Management enables detailed spending tracking, including budgets, alerts, and anomaly analysis. Azure supports the use of tags for cost attribution, right-sizing, shutdown of unused resources, and the purchase of Reservations and Savings Plans to save money. FinOps best practices help maximize the return on your cloud investment.

 

CHAPTER 4 – The storage service

 

Introduction

Azure Storage is Microsoft's cloud storage platform designed to be highly scalable, durable, and secure. It allows you to store massive amounts of data of all types in Microsoft data centers, ensuring they remain available and protected over time. A single storage account provides a global namespace reachable via HTTP/HTTPS within which multiple storage services reside. A storage account can manage: Blob Storage for unstructured data such as binary files or documents, Azure Files for SMB/NFS file shares compatible with on-premises environments, Queue Storage for reliable messaging systems between application components, Table Storage for schema- less NoSQL data organized in key-value pairs, and even Managed Disks for virtual machines. Thanks to this variety, Azure Storage covers a wide range of needs: from storing backups and multimedia content, to managing communication queues between services, to storing simple structured data.

All data in Azure Storage is automatically encrypted at rest ( encryption at rest ) using Microsoft-managed keys. Alternatively, you can use customer-managed keys, such as those integrated with Azure Key Vault, for greater control (including double encryption and periodic key rotation). Traffic in transit is also encrypted using TLS: it's a good practice to force the use of HTTPS and disable any insecure or outdated protocols to ensure maximum protection.

access control mechanisms. It integrates with Microsoft Access ID (formerly known as Azure AD) for role-based authentication and authorization (RBAC), allowing you to assign granular permissions to users or services. In addition to the identity, each account has access keys that can be used by applications to authenticate directly: these keys should be protected and periodically rotated for security reasons. In limited sharing scenarios, you can generate Shared Access Signatures (SAS ), which are temporary access tokens with restricted permissions to specific resources and operations, valid for a defined period of time. Finally, the storage account can be configured with private endpoints or network firewall rules to limit access to only authorized networks or IP addresses, adding an additional layer of perimeter security.

From an observability perspective, each Storage account provides detailed logs and metrics via Azure Monitor. This data allows you to track operations (audit), monitor metrics such as request latency or inbound/outbound data volume, and set automatic alerts for anomalous conditions. Integration with Azure Monitor and Log Analytics allows you to set alerts (for example, for unauthorized access or frequent errors) and analyze usage trends to optimize performance and costs over time.

 

Outline of chapter topics with illustrated slides

 

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Storage is Microsoft's cloud storage platform, designed to be massively scalable, durable, and secure. A single Storage account offers a global namespace reachable via HTTP or HTTPS and hosts multiple services: Blob Storage for unstructured objects, Azure Files for shares compatible with on-premises environments, Queue Storage for reliable messaging, Table Storage for key-value NoSQL data, and Managed Disks for virtual machines. All data is automatically encrypted at rest, and access can be managed via Microsoft Login ID, keys, SAS, and private endpoints. Accounts expose metrics and logs via Azure Monitor for observability and auditing. Practical examples include e-commerce stores that save product images to Blob Storage with SAS URLs, management systems that migrate folders to Azure Files with Login ID authentication, and microservices that use Queue Storage to decouple processes. Remember: the namespace is the account's unique namespace, while SAS is a temporary token that grants granular permissions. View the service map with icons for Blob, File, Queue, and Table, linked to the most typical scenarios.

 

Immagine che contiene testo, schermata, Carattere, Pagina Web

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Storage offers different types of services for different needs. Blob Storage manages binary and text objects in containers, with access tiers, versioning, soft delete, and lifecycle policies, as well as Data Lake Storage Gen2 for big data analytics. Azure Files provides managed SMB or NFS shares that replace traditional file servers, with support for identity authentication, snapshots, and on- prem synchronization via Azure File Sync. Queue Storage offers highly available FIFO queues for asynchronous communication between microservices, while Table Storage is a schema- less, cost-effective NoSQL store for telemetry and lookups. If you need advanced features, consider Azure Cosmos DB. Examples: a blog uses Blob Storage for frequent assets, moving seasonal content to Cool and historical content to Archive; companies with branch offices centralize backups with Azure Files and File Sync ; order systems use Queue Storage to handle peak requests. See the comparison table with use cases, protocols, and key features.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.The Storage account is the management unit that hosts all Azure Storage services. During creation, you can choose the region, performance, redundancy, network configuration, and tags for cataloging costs. The modern account type is StorageV2 (GPv2), which enables advanced features such as tiering, lifecycle, and Data Lake Gen2. The choice of region and redundancy impacts latency, availability, and costs. Access policies and key management, including rotation via Azure Key Vault, complete the security framework. For example, a European app can have an account in North Europe with ZRS and private endpoints, while a global data lake can use RA-GZRS for incident reads. Remember: GPv2 is the modern account type, and Private Endpoint is the private network interface for accessing the service. Follow the flow of parameter selection and observe the effects on SLAs, costs, and latency.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Storage ensures data durability through different types of replication. LRS ( Locally Redundant (Redundant ) maintains three copies in the same data center, ideal for non-critical scenarios. ZRS (Zone Redundant ) replicates across three different zones in the same region, protecting against zone outage, perfect for production workloads. GRS (Geo- Redundant ) performs asynchronous replication to a paired region, while RA-GRS and RA-GZRS allow reading from the secondary area for disaster recovery and active / read scenarios. The choice depends on RTO, RPO, regulations, costs, and access patterns. For Blob Storage, GZRS and RA-GZRS combine ZRS in the primary with geo-replication for maximum resilience. Examples: a mission- critical portal uses ZRS and RA-GZRS for strategic objects, a regulatory archive relies on GRS for compliance and recovery. View the region, zones, and paired design region with replication arrows and read -access icons.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Storage security is based on several layers. Encryption at rest is automatic and can be managed with service keys or personal keys in Azure Key Vault, with support for double encryption and rotation. Encryption in transit is done via TLS: it's best practice to force HTTPS and disable obsolete protocols. Authentication and authorization integrate with Microsoft Entra ID for RBAC and granular delegation, SAS for temporary access, and Access Keys, which must be protected and rotated. The network perimeter can be strengthened with IP firewalls, Private Endpoints for isolation, and Service Endpoints for VNets. Monitoring and auditing are managed through Azure Monitor and Log Analytics for access traces, metrics, and alerts. Examples: HR repository with CMK keys in Key Vault, access only from the corporate VNet and limited SAS; file shares with Entra ID access and restrictive network policies. See the defense-in- depth diagram to visualize the security chain.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Blob Storage offers three tiers to optimize cost and performance. The Hot tier is designed for frequent access, with low latency and higher storage costs, ideal for active files, websites, and recent logs. The Cool tier is less expensive to archive, but has higher access and rehydration costs, making it suitable for seasonal content or sporadically accessed backups. The Archive tier is the most economical, designed for long-term data and compliance, but requires rehydration before access. You can set up lifecycle management to automatically move blobs between tiers. Examples: a pipeline that moves logs from Hot to Cool after 30 days and back to Archive after 180 days, or a media library that archives promotional assets and original footage in the most appropriate tiers. See the chart showing cost vs. access frequency and rehydration time.

 

Immagine che contiene testo, schermata, Carattere, software

Il contenuto generato dall'IA potrebbe non essere corretto.Managing Azure Storage is easy with several tools. Azure Storage Explorer is a desktop app that lets you explore containers, upload and download data, manage snapshots, and generate SAS, ideal for manual operations. Azure CLI and PowerShell enable automation and Infrastructure as Code for provisioning, policies, role assignments, and network rules, useful in CI/CD pipelines. Azure Monitor and Log Analytics collect metrics and logs, enabling alerts on anomalies and saturations. AzCopy is the high-performance tool for data-intensive transfers such as migrations and backups. Examples: PowerShell scripts to create containers and lifecycle policies, Monitor dashboards for egress and latency, and alerts on thresholds. Consult the official documentation for more information. View the toolbelt diagram with icons and use cases for each tool.

 

Immagine che contiene testo, schermata, Pagina Web, software

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Storage integrates with many Azure services and enables modern architectures. On Virtual Machines, you can use managed disks and diagnostic logs on Blobs, or Azure Files for lift-and-shift. App Service enables static asset management on Blobs, file storage on Azure Files, and secure connections via VNet integration. Data Factory and Synapse Pipelines facilitate ingestion and transformations to Data Lake Gen2. Logic Apps orchestrates low-code workflows that react to events on Blobs and Queues, while Event Grid enables event -driven architectures that trigger Functions or webhooks on blob changes. These integrations enable ETL, serverless processing, application modernization, and data lakehouses. Examples: photo pipeline that creates thumbnails via function, monthly ETL with Data Factory and Spark. View the event- driven diagram with Storage in the center.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.To get the most out of Azure Storage, follow best practices. For security, enable mandatory HTTPS, minimal TLS, private endpoints, RBAC with Entra ID, CMKs in Key Vault, short-expiry SAS, and the principle of least privilege. Enable soft delete and versioning on Blobs. For performance, use ZRS for resiliency, Premium for consistent latency on Files and disks, structure containers and folders efficiently, and use AzCopy for bulk transfers. Monitor latency and egress with the dashboard. For costs, apply lifecycle policies to move blobs between tiers, use reservations on disks, tag resources for chargeback, avoid unnecessary egress, and evaluate RA-GZRS only when required. Examples: automated lifecycle policies and performance and egress alerts. See the security, performance, and cost checklist and policy timeline chart.

 

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.To get the most out of Azure Storage, follow best practices. For security, enable mandatory HTTPS, minimal TLS, private endpoints, RBAC with Entra ID, CMKs in Key Vault, short-expiry SAS, and the principle of least privilege. Enable soft delete and versioning on Blobs. For performance, use ZRS for resiliency, Premium for consistent latency on Files and disks, structure containers and folders efficiently, and use AzCopy for bulk transfers. Monitor latency and egress with the dashboard. For costs, apply lifecycle policies to move blobs between tiers, use reservations on disks, tag resources for chargeback, avoid unnecessary egress, and evaluate RA-GZRS only when required. Examples: automated lifecycle policies and performance and egress alerts. See the security, performance, and cost checklist and policy timeline chart.

 

1. Storage Services: Blobs, Files, Queues, and Tables

Azure Storage offers four main storage services through a storage account, each designed for different but complementary scenarios. Below, we'll look at each component in detail:

·      Blob Storage – Allows you to store binary objects or files of any type (documents, images, videos, backups, etc.) within containers called blob containers. It is an unstructured object store, ideal for static content and large files. Blob Storage supports different access tiers (Hot, Cool, Archive) that allow you to balance cost and performance based on the frequency of data use (details on the tiers in Chapter 6 ). It also has advanced features such as versioning (to retain previous versions of a file), soft delete (to recover data deleted within a certain period), and lifecycle policies (automatic rules to move blobs between tiers based on age or last access). Blob Storage is also the foundation of Azure Data Lake Storage Gen2, an evolution designed for Big Data analytics scenarios: it adds a hierarchical file system (directories and subdirectories) and file-level access controls (ACLs), making Azure suitable for Hadoop /Spark workloads and large data analysis. In short, Blob Storage is the default destination for unstructured data: from media files for websites, to application logs, to backups, to datasets for analytics systems.

·      Azure Files – Offers managed file shares in the cloud accessible via standard Server Message Block (SMB) and Network File System (NFS) protocols. Essentially, Azure Files allows you to create the equivalent of a traditional file server, but hosted in the cloud and fully managed by Azure. Azure Files shares can be mounted read/write from both Azure virtual machines and on-premises systems, facilitating lift-and-shift migration scenarios for legacy applications that use file shares. Azure Files supports integration with identity services: you can enable authentication via Azure AD DS or Microsoft Login ID to control access to shares with corporate credentials, similar to a Windows file server in a domain. Other features include file snapshots (for quick restores) and integration with Azure File Sync, a service that keeps copies of files synchronized between the cloud share and on-premises file servers, enabling a local cache to improve latency and business continuity even in the event of a loss of connectivity. For high performance needs, the tier is available Premium for Azure Files, which provides higher and more consistent throughput and IOPS, useful for environments with intensive file access, for example.

·      Queue Storage – Provides an asynchronous messaging system based on durable and highly available FIFO queues. An Azure queue can hold messages (up to hundreds of KB each) that will later be processed by consumer processes. This mechanism allows for decoupling application components: for example, a web service can queue processing requests, and one or more background worker services can read from the queue and perform the processing independently, ensuring resilience and scalability (workers can increase in number during peak times without the system losing messages). Queue Storage is therefore ideal for implementing worker buffers, task queues, and other asynchronous communication patterns between microservices, ensuring reliable message delivery and the ability to retry in the event of transient errors.

·      Table Storage – This is a flexible-schema, document-oriented NoSQL storage organized into key-value entity tables. It allows for the very cost-effective storage of large amounts of semi-structured data: each entity (record) is identified by a key and can contain an arbitrary set of properties (columns) without a fixed schema definition. This structure makes it suitable for data such as logs, telemetry, user preferences, reference lists, and other information where fast access by key is useful and complex queries or relationships between tables are not required. Table Storage guarantees low latency on entity read and write operations and low costs, especially compared to a traditional database, thanks to a pricing model based on the volume of data stored and the operations performed. It should be noted that Table Storage offers basic query capabilities; if advanced capabilities such as secondary indexes, global multi-area distribution, more sophisticated queries, or features such as similarity/ vector analysis are required, Table Storage can be used. search, it's worth considering Azure Cosmos DB (which does indeed support an API compatible with Table storage but with many more features). For simple key- value needs, however, Azure Table remains a simple and affordable solution.

Practical examples of service use – The four Azure Storage services are used in many real-world scenarios. For example, a multimedia blog portal could save images and videos from articles in Blob Storage: the most frequently used files remain in the Hot tier, while seasonal or less popular content is moved to Cool or even Archive after a certain period, optimizing costs. A company with distributed branches can use Azure Files to centralize documents: thanks to Azure File Sync, each local office maintains a cached copy of the most used files for quick access, while the master copy resides in the cloud, ensuring centralized backups and data consistency across all locations. In a microservices-based order management system, Queue Storage could be used to queue order requests as they arrive: the processing services read from the queue and fulfill orders asynchronously, allowing it to absorb traffic spikes without losing orders and balancing the workload efficiently.

 

2. Storage account and basic configuration

To use Azure Storage services, you need to create a Storage Account, which acts as a logical container for all storage resources (blobs, files, tables, etc.). The storage account defines a set of settings and limits common to all services within it. When creating a new storage account, you need to specify some basic configuration parameters:

·      Subscription and Resource Group: You select the Azure subscription to which you will charge and place the account in a resource group to organize its management along with other related resources (such as the VMs that will use that storage).

·      Unique Name and Region: Each account must have a globally unique name (this will become part of the public URL to access resources, e.g.,.blob.core.windows.net ). You also choose the Azure Region where the data will be physically stored: it's best to select a geographic location close to the users or services that will use the data to minimize latency, while also considering data residency and compliance requirements.

·      Performance: Azure Storage offers two performance modes for accounts: Standard and Premium. Standard accounts use traditional disks and hardware with throughput suitable for most general-purpose scenarios; they support all service types (Blob, File, Queue, Table), and billing is generally based on the storage volume used and operations performed. Premium accounts, on the other hand, use high-performance SSD hardware: they are designed for I/O-intensive, low-latency scenarios. For example, there are Premium accounts for Blob (with limited capacity but very low latency, useful for streaming workloads or machine learning with fast file access) and for Azure Files (providing high IOPS and consistent throughput comparable to enterprise storage ). Premium accounts have higher fixed costs and sometimes capacity limits, but offer higher, predictable performance.

·      Redundancy (data redundancy): This is one of the key parameters of an account, and determines how many copies of data are maintained and where. Azure offers various data replication options (LRS, ZRS, GRS, RA-GZRS, described in detail in Chapter 4 ). In summary, an account can keep data replicated in three local copies in the same data center, or in three copies distributed across different availability zones in the same region, or even maintain backup copies in a secondary geographic region to protect against a total disaster in the primary region. The choice of redundancy option is made when the account is created (although for some account types it can be changed later) and affects durability levels, data availability in the event of failures, and costs. It is important to evaluate business requirements in terms of RTO (Recovery Time Objective, the maximum acceptable time of downtime) and RPO (Recovery Point Objective, the amount of data you can afford to lose in the event of a failure) to choose the most suitable replication.

·      Networking: During setup, you decide how and where the storage account will be accessible. By default, an account is reachable via public endpoints on the internet (with the option to restrict access to specific IPs). Alternatively, you can configure the account to be private, restricting access via Private Endpoints: in this case, the account is mapped to a private IP address within a specified Azure Virtual Network, making it isolated from the internet and accessible only via the private network (a popular option in enterprise contexts for increased security). Another networking option is the use of Service Endpoints, which allow resources within a VNet (such as VMs or App Services) to access the storage account via the Azure backbone rather than going out to the internet, without having to configure a specific private endpoint.

·      Tags: Optionally, you can assign metadata tags to the account (key-value pairs useful for classifying the resource, such as the project, department, environment (production vs. test), etc.). Tags help organize and filter resources and, above all, chargeback costs (for example, you can generate expense reports grouped by the Project tag, to attribute storage costs to the responsible team).

An important thing to note is that the default and most modern storage account type is called General Purpose v2 (GPv2). GPv2 accounts support all services (Blob/Files/Queue/Table) and offer the latest features, such as Hot/Cool/Archive access tiers, support for Data Lake Storage Gen2, lifecycle policies, and so on. (There were previously “Blob Storage” or “General Purpose v1” accounts with limited functionality, but GPv2 is now the standard and should be used in almost all cases.) When you create a new account through the Azure portal or via script, you are effectively creating a GPv2 account unless you have specific needs.

When defining a new account, the correct choice of region, performance, and redundancy is crucial because it impacts three factors: latency (data replicated geographically far from the user will be slower to reach than local data), availability and durability (more replicas in different zones or regions increase the ability to survive major failures), and cost (geographic replicas and premium storage are more expensive). Beyond these basic parameters, storage account security is strengthened through access policies (such as requiring a secure HTTPS connection, defining firewalls and virtual networks) and encryption key management (whether using Microsoft keys or your own keys in Key Vault)—aspects we'll explore in more detail in the chapter on security. In short, the storage account is the fundamental unit that must be carefully designed, encapsulating the location, performance, resilience, and security choices that ultimately impact the behavior of all the storage services used.

Configuration examples: To clarify, imagine an enterprise application serving users in Europe: we could create a storage account in the North Europe region, choosing the ZRS (Zone -Redundant Storage) replication option to have redundant data across multiple Availability Zones within the same region – thus the service can withstand the loss of an entire data center while keeping data available in other zones. If the application is internal and does not need to expose data to the internet, we would enable a Private Endpoint connected to the corporate virtual network, so that only VMs and services on that network can reach the storage. Instead, for a global data lake project aimed at multi-region analytics, we could opt for RA-GZRS replication: the data would be maintained both zonally redundant in the primary region and asynchronously copied to a geographically distant secondary region, with the option of read-access to the secondary replica in case of emergency. This would ensure maximum data durability and availability worldwide, while accepting the associated higher cost.

 

3. Data redundancy options

One of the key features of Azure Storage is the ability to replicate data into multiple copies to ensure high durability and availability even in the event of hardware failures or disasters. When creating a storage account, as we've seen, you must choose a redundancy strategy for the stored data. Azure offers several replication options to choose from, typically referred to by acronyms:

·      LRS – Locally Redundant Storage: This is the most basic option, in which Azure maintains three synchronous copies of your data within the same data center (i.e., the same physical facility). Every write is then immediately replicated to three different disks in the same site. LRS protects against the failure of a single node or drive within a data center, ensuring that if a server or disk fails, healthy copies still exist elsewhere in the same building. It's the most cost-effective solution, but it doesn't protect against the extreme case of an entire data center being unavailable (for example, due to a fire or total outage at that site). LRS is suitable for non-critical scenarios, where you can tolerate the potential loss of data in the event of a total data center disaster, or where you may already be managing separate backups.

·      ZRS – Zone Redundant Storage: In this mode, Azure always maintains three copies, but each in a different Availability Zone within the same region. Azure regions, when they support zonal redundancy, have multiple Availability Zones (typically three zones), each corresponding to a physically separate data center but interconnected at high speed with the others in the region. With ZRS, written data is replicated synchronously between zones: this means that the data is resilient to the loss of an entire data center, because it will still be available in other zones in the same region. ZRS therefore offers a higher level of availability than LRS, and protection from faults at zonal scale. It is often the recommended choice for production workloads that require high reliability within a region, without having to replicate geographically (ZRS avoids higher latency times by keeping replicas localized in the same metropolitan area). The cost of ZRS is slightly higher than LRS, but justified by the resiliency benefits.

·      GRS – Geo- Redundant Storage: With GRS, Azure adds geographic data replication. Essentially, the GRS option combines LRS with an asynchronous copy in another region: the data is maintained in 3 local copies in the primary region (like LRS) and is periodically replicated (asynchronously) to 3 other duplicates within a distant secondary region, typically Azure's default paired region ( each Azure region has a second region with which it forms a pair for disaster recovery scenarios, e.g., West Europe is paired with North Europe, East US with West US, etc.). With GRS, if the primary region were to suffer a disaster, a relatively recent copy of the data would still exist in the secondary region. However, in the standard GRS model, the secondary copy is not accessible to the customer except during a Microsoft-declared account failover in the event of a major disaster: this means that normally all read and write operations occur in the primary region; The secondary replica remains "dormant" as long as everything is OK, ready to be activated only in recovery scenarios. This means that any newly written updates could be lost if a disaster strikes the primary region before the asynchronous replica has copied them (conceptually, there's an RPO > 0). Despite this, GRS offers extremely high durability (6 total copies in two locations) and is suitable for critical data where automatic geographic backup is required.

·      RA-GRS / RA-GZRS – Read-Access Geo- Redundant Storage: These Read-Access variants allow read-only access to the secondary region at any time. RA-GRS is the read -access version of GRS, while RA-GZRS is the read -access version of GRS combined with ZRS in the primary region. To introduce RA-GZRS, let's first explain GZRS: GZRS is an option that combines the best of ZRS and GRS – essentially, it maintains synchronous replicas to zones in the primary region (like ZRS) and additionally performs asynchronous geo-replication to a secondary region (like GRS), resulting in 3 local zonal copies + 3 geo-redundant copies. RA-GZRS enables read access to the secondary replica of a GZRS account. These RA* options are useful in advanced disaster recovery scenarios: for example, with RA-GZRS, an application in the primary region could perform read-only operations on data from the secondary region without waiting for official failover, ensuring business continuity (albeit in limited mode) during the emergency. The cost of both GZRS and RA-GZRS is obviously higher (being the maximum level of resilience offered), so it should only be chosen when the requirement of having readable data even in a region-down scenario is essential and justifies the investment.

In summary, the choice of LRS, ZRS, or GRS/RA-GZRS depends on your business needs in terms of fault tolerance and business continuity requirements. From a performance standpoint, under normal conditions there is no perceptible difference between LRS and ZRS (both replicate synchronously in the same metropolitan area), while GRS will introduce slightly higher latency only for writes (due to the need to replicate to another site, although it is asynchronous so the impact for the user is minimal). LRS and ZRS have identical read/write throughput, while the geo options (GRS/GZRS) carry restrictions: for example, while the secondary region is not accessible in normal GRS, in RA-GRS/RA-GZRS it is read-only but obviously with higher latency if the app resides on the other side of the world from the secondary.

compliance and regulatory considerations: some organizations may require internal policies that data not leave a certain country or region; in this case, GRS (which copies data outside of a region) may not be permitted. Others, however, for resilience reasons, require a geographic copy of all data. Azure provides technical options, but it's up to the architect to choose based on these constraints and costs: LRS is cost-effective but less resilient, ZRS increases local resilience, GRS adds geographic security, and RA-GZRS is the top-of-the-line solution for those who can't afford downtime even in the event of a regional disaster.

Example Replication Scenarios – A mission- critical web application requiring continuous uptime could configure its storage account in ZRS for active transactional data, ensuring redundancy against local failures, and use RA-GZRS for certain strategic data (e.g., backups configured as blobs with a read-only policy) so that it can be accessed even if the entire primary region is unavailable. On the other hand, a long-term regulatory data archive, less sensitive to latency, could opt for GRS, accepting that under normal conditions the data is only accessible from the primary region, but ensuring a second remote copy in the event of an emergency to adhere to compliance and disaster recovery policies.

 

4. Security and access control

Data security in Azure Storage is fundamental, achieved through a layering of measures that protect content at multiple levels: data encryption, identity and key control, network security, and monitoring.

·      Data encryption at rest ( encryption at rest ): As mentioned, any data stored in Azure Storage is automatically encrypted as soon as it's written to disk, using standard algorithms (such as AES-256) managed by the service. By default, encryption keys are managed by Microsoft ( Microsoft - managed keys ), making life easier for the user, but for advanced needs, you can use customer-managed keys (CMKs) stored in Azure Key Vault. Using your own keys allows you, for example, to exercise full control (revoke access to encrypted data, implement a key rotation schedule according to internal policies, or have backup copies of them in escrow). Azure Storage also supports double encryption (data encrypted by Microsoft with an additional master key, in addition to the main encryption, to add an extra layer of security), and of course, if you switch to customer-managed keys, you can rotate them periodically to reduce the risk in the event of a compromise.

·      Encryption in transit: All communication with a storage account occurs over secure HTTPS/TLS protocols. Azure allows you to force the use of encrypted connections, rejecting any attempts over unencrypted HTTP. Additionally, you can configure the minimum TLS version accepted (for example, disabling the deprecated TLS 1.0 and 1.1, ensuring only modern clients with TLS 1.2/1.3 can connect). These settings ensure that data never travels in the clear over the network and that robust protocols are used, preventing known attacks on older TLS versions.

·      Authentication and Authorization: Azure Storage offers several methods for authenticating requests and granting access only to authorized users. The most integrated method is through Azure AD/Microsoft Login ID: by assigning access roles (RBAC) to Azure AD identities (users, groups, or service principals), you can granularly control who can read, write, or delete data in a storage account or specific container. For example, you can grant a certain group only read permissions on a Blob container, another group contributor (write) permissions on an Azure Files share, and so on, all managed centrally by Azure AD identities and respecting the principle of least privilege. In parallel, each storage account has two access keys ( Primary and Secondary Keys): these are secret strings that act as a "master password" and allow administrative access to all resources in the account. These keys can be used in connection strings to be provided to legacy applications that do not support Azure AD; However, their use must be limited and they must be kept secret and rotated regularly (Azure allows you to regenerate one of the two keys at any time, allowing you to update applications on the second key and then regenerate the first, alternately, to avoid interrupting services). To grant more limited access, the preferred route is to use Shared Access Signatures (SAS): a SAS is a token that can be generated at the account or individual resource level (container, file share, queue, table) specifying which permissions are allowed (read, write, delete, list, etc.) and for how long. For example, I can generate a SAS that only allows reading a particular file for the next 60 minutes, and provide that SAS URL to a customer to allow them to download the file during that time. SASs are cryptographically signed using the account's keys, so there's no need to directly share master keys or credentials; Additionally, they can be revoked indirectly by regenerating the account keys (which invalidates all SAS created with those keys). In production, it is recommended to use SAS with short expirations and limited rights, preferring Azure AD where possible to manage ongoing access.

·      Network and perimeter security: In addition to authentication, Azure Storage can be protected by limiting access sources. As with the account network configuration, you can decide to only allow access from specific IP ranges (for example, the public IPs of your company headquarters) or completely isolate the account in a private network using Private Endpoint. With a Private Endpoint, the account does not have a public endpoint reachable from the internet: all requests must pass through the associated private VNet, which in turn can be connected to the company's on-premises network via VPN or dedicated links (ExpressRoute). This eliminates the exposed surface area to the internet and protects against external malicious access attempts. A slightly less radical alternative is the use of Service Endpoints: in practice, even while maintaining the public endpoint, the storage service can only accept requests from certain subnets of an Azure virtual network, rejecting all others. This ensures that, for example, only VMs in VNet X can communicate with the account (even if the public IP would theoretically be open, Azure performs a filter on the service side). Furthermore, to increase security, it is advisable to enable soft delete features (on Blob, File and Queue where available): soft delete retains deleted data for a defined period (e.g. 7 days), preventing accidental deletions or malicious acts (an attacker who wanted to destroy the data would have to wait beyond the retention period). (So that they actually disappear). On Blob, enabling versioning also helps you keep track of all changes and recover previous versions if necessary. Finally, for highly sensitive scenarios, you can use features like immutability policy and legal holds on Blob containers (which make data undeletable or unmodifiable for a certain period, useful in financial or legal contexts).

·      Monitoring and auditing: To complete the security framework, Azure Storage integrates closely with Azure Monitor to provide visibility into all operations performed. Diagnostic logs allow you to track every access, indicating who did what and when (audit trail ). Azure Storage logs can be collected and sent to a Log Analytics workspace, where queries can be run to identify anomalies (such as repeated failed login attempts or mass deletions in a short period of time). Azure Monitor also allows you to set alerts on metrics and events: for example, if a container experiences an unusual number of reads or writes, or if a certain threshold of authentication errors is exceeded, an alarm can notify administrators so they can take timely action. These monitoring tools not only help with proactive security (identifying suspicious activity), but also with optimization —for example, by viewing usage trends, you can determine whether it's necessary to upgrade the network, enable a CDN, or add caching to improve performance.

Examples of security solutions – Consider a repository of confidential HR documents hosted in Azure Storage: we might choose to protect the files with a customer-managed key (CMK) stored in Key Vault, so that even Microsoft cannot access the data without our key. We'll enable access to the storage account only from the corporate network using a Private Endpoint, and apply a firewall rule to allow operations only from our office IPs. All employees will access the documents using their Azure AD identities, with roles that only allow read or write access where necessary. To temporarily share a file with an external consultant, administrators will generate a custom SAS valid for perhaps an hour, limited to the download of that specific file. At night, access logs will be analyzed with automatic queries in Log Analytics to verify that there have been no suspicious attempts (e.g., failed logins exceeding a certain threshold). In another scenario, imagine corporate file shares migrated to Azure Files. In this case, we'll integrate Azure Files with Azure AD to ensure employees continue to use their domain credentials to access the shares. We'll also configure the service to be accessible only from internal subnets of the VNet connected to our network (preventing any access from the internet). We'll also enable soft delete for files to prevent accidental loss and create periodic backups with Azure Backup. These combined measures—encryption, identity /RBAC, private network, and monitoring—create a defense-in-depth solution that keeps data safe in any situation.

 

5. Storage Tiers: Hot, Cool, Archive

Another important feature of Azure Blob Storage (and to some extent Azure Files for file shares) is the ability to choose between different access tiers to optimize the tradeoff between performance and storage costs. The three main tiers offered for blobs are: Hot, Cool, and Archive.

·      Hot Tier: This is the highest performance level. Data in the Hot Tier is stored on faster-access media and is immediately available for read/write with low latency. This results in a higher storage cost per GB, but minimal access costs. The Hot Tier is ideal for information that is accessed frequently or continuously, such as everyday files, website content and active applications, streaming media, databases, or recent logs. In short, you pay more to keep your data always ready and fast, but you can use it without penalty whenever you need it.

·      Cool Tier: This tier is designed for less frequently accessed data. Storing a blob in Cool costs less (per GB/month) than Hot, because Azure assumes that data isn't read or modified often. However, each time you access data in the Cool tier, you incur slightly higher costs per operation, and overall performance can be slightly higher than Hot (though it's still online and immediately accessible). Additionally, there's a cost to reclassify a blob from Cool to Hot and vice versa if you change your mind before a certain minimum period (Azure typically recommends keeping a blob in Cool for at least 30 days, otherwise the savings won't offset the transition costs). The Cool tier is suitable for files that need to be kept for future use but aren't needed for day-to-day operations: for example, recent backups, historical data from a few months ago, archive documents that are rarely accessed (but may still need to be recovered quickly if needed), or content from applications that are no longer active but need to be retained for a period of time.

·      Archive Tier: This is the cheapest tier overall for storing data on Azure, and conversely the least performant and immediate. When a blob is moved to Archive, it is actually stored on cold storage media (such as tape or capacity-optimized storage) and is not directly available for consultation. To read (or modify) a blob in Archive, you must first perform a “rehydration” operation, that is, request its move to an active tier (Hot or Cool): this operation can take several hours, until Azure restores the blob to online media. Only after rehydration is complete will the blob become accessible. This means that Archive should be used for data that is not expected to be accessed except in exceptional circumstances, typically for long-term retention or regulatory obligations. In return, the cost of storage in Archive is very low, allowing you to maintain petabytes of data at an affordable cost. Typical examples: raw data from years past that is only needed for auditing or compliance, long-term backups, very old logs, records that need to be retained but rarely viewed. Azure often requires keeping a blob in Archive for at least 180 days to justify the cost (premature moves to Hot/Cool incur early termination penalties). deletion ).

Manually managing these tiers for each individual blob would be costly, so Azure Storage provides Lifecycle Management Policies: configurable rules that automatically apply tier moves or deletions based on data age or inactivity. For example, you can define a policy that says: "After 30 days from the last access, downgrade the blob from Hot to Cool; after 180 days, move from Cool to Archive; after 7 years, permanently delete." This way, you can set up automated management of the entire file lifecycle, saving on storage costs without having to remember to perform manual interventions.

To choose the appropriate tier, consider the expected access frequency of the data and your immediate availability requirements. It's often best to start new data in Hot (for example, files just uploaded by a user or the current day's logs) and then, via policies or scripts, move it to cooler tiers as it ages and is likely no longer needed. Remember that the Hot and Cool tiers are online (no prior action is required to read them, other than paying the access fee), while Archive is offline until it's brought back online. Blob metadata (such as their names or attributes) remains visible even when the content is in Archive, so you can see what's there and decide whether to revive it.

Tier Management Examples – A typical log archiving scenario in a company might include: application logs are written daily to a Blob container with a Hot tier ; after 30 days, logs older than a month are automatically moved to Cool (since they will rarely be accessed, but need to be retained for some time); after 180 days from creation, those logs are further moved to Archive (for historical preservation); finally, after a few years (for example, 7 years, as per compliance policies), the logs are permanently deleted. This way, storage costs remain proportionate to the actual use of the data at different stages of its lifecycle. Another example: a marketing media library might keep content from active campaigns in the Hot tier (to ensure fast delivery to the websites or servers that use them). When a campaign ends and its materials are not often needed, these files can be moved to Cool, still keeping them available if marketing needs them later. Finally, after a year, the archive materials (original videos, high-resolution photos no longer used) are placed in the Archive for long-term preservation, knowing that they can be retrieved in the future with little warning if they ever become needed again.

 

6. Tools for managing Azure Storage

Microsoft provides several tools and interfaces for working with Azure Storage, meeting both manual (interactive) and automation/scripting management needs. Here are the main ones:

·      Azure Storage Explorer is a graphical user interface (GUI) desktop application, available free of charge for Windows, Mac, and Linux, designed to visually explore and manage the contents of a storage account. With Storage Explorer, you can connect to your accounts (authenticating with Azure AD or using access keys/SAS), and once connected, navigate between Blob containers, File shares, queues, and tables. The interface allows you to upload and download files via drag and drop, create new Blob containers or directories, delete data, view and optionally modify file metadata and properties (for example, set attributes on a Blob, or view file permissions ), and even quickly generate SAS tokens for a resource (there's a built-in feature for creating a Shared Access Signature to grant specific temporary access). Azure Storage Explorer is very convenient for day-to-day operations and manual administration, especially for those who prefer a visual approach rather than remembering script commands. It also supports advanced features, such as managing snapshots on Azure Files and Blobs (viewing and restoring previous versions of a file). Because it can be installed locally, it allows administrators to interact with storage without having to go through the Azure web portal for every operation.

·      Azure CLI and Azure PowerShell: For automation and scripting, Azure provides command-line tools. The Azure CLI is a unified text interface with commands like az storage... that allow you to create accounts, list and manage content, set policies, and so on. Azure PowerShell offers similar cmdlets (New- AzStorageAccount, Get-AzStorageBlob, etc.) integrated into the PowerShell environment, which are widely used by Windows administrators. These tools allow you to integrate Azure Storage into scripts and deployment pipelines. For example, with CLI/PowerShell scripts, you can implement Infrastructure as Code ( IaC ) solutions by creating storage accounts, automatically defining lifecycle rules, configuring the firewall, assigning RBAC roles to specific containers, and much more, all versionable and repeatable. In a DevOps context, using CLI/PowerShell allows you to include storage management in CI/CD ( Continuous Integration/ Continuous Deployment) pipelines: for example, when releasing an application, you could use a script to create a new blob container for temporary files or update certain settings. In addition to command -line tools, Azure Storage is supported by SDKs in various programming languages (for.NET, Python, Java, JavaScript, etc.), which also allows developers to write code that interacts directly with the services (file upload/download, queue message insertion, table queries, etc.) without going through the portal.

·      Azure Monitor and Log Analytics: More than direct management tools, these are integrated monitoring services that help manage storage accounts by monitoring performance and usage. Using Azure Monitor, as we've seen, you can collect metrics (amount of data stored, number of transactions, average latency, network ingress / egress, availability percentage, etc.) and set up dashboards or time graphs to see the performance of these indicators. With Log Analytics, you can write queries to delve deeper into the logs (for example, filter all delete operations performed in a certain period, or count the number of 403 ( forbidden ) requests, a possible indication of unauthorized access attempts). Additionally, Azure Monitor allows you to define automatic alerts: for example, if the space used in an account exceeds 80% of the available quota, or if the 95th percentile latency exceeds a certain ms for more than 5 minutes, or if a backend service stops reading messages from a queue (a growing queue without consumers), an alarm can alert operators via email/SMS/Teams or take automatic corrective actions. In management terms, this means being able to react in real time to critical conditions and avoid outages or unexpected costs.

·      AzCopy: is a specialized tool for efficiently transferring large-scale data to and from Azure Storage. AzCopy works from the command line and, with just a few parameters, allows you to initiate copies of entire local folders to a blob container, or conversely, download data from storage in bulk. It supports parallel transfers, resume in the event of an interruption, and specific optimizations to maximize speed over a WAN. It is often used for migrations (moving large file archives to the cloud), for bulk backups, or generally for moving terabytes of data reliably and quickly. For example, AzCopy is the recommended tool for importing a large dataset into Azure Blob, rather than doing it manually file by file. It can be integrated into scripts and, since it is optimized specifically for Azure Storage, it is aware of SAS and can use them to authenticate without exposing credentials.

In addition, it's worth noting that many Azure Storage management features are also accessible through the Azure web portal (Azure Portal), which offers a general-purpose graphical interface: through the portal, you can create and configure storage accounts and perform basic data navigation (for example, there's a basic file explorer for blobs and files). However, for intensive or professional use, dedicated tools like Storage Explorer or the CLI are more convenient and powerful.

Tool usage examples – An administrator could write a PowerShell script that automatically creates a new Blob container for each month, sets a lifecycle rule on it (e.g., move blobs to Cool after 60 days, delete them after 2 years), and generates a read-only SAS valid for 24 hours to allow an external system to download all reporting files produced that month. This script could be scheduled with Azure Automation or in a DevOps pipeline at the end of each month, thus achieving automatic and repeatable storage management. At the same time, the operations team could set up an Azure Monitor dashboard that displays real-time bandwidth usage ( egress / ingress ) for the storage account, the remaining space as a percentage of quota, and average request latency. If any of these values exceed a threshold (for example, excessive outbound bandwidth, which could indicate unexpected usage, or high latency impacting applications), alert notifications are generated. When migrating data from on-premises, the team could use AzCopy to upload tens of millions of files: AzCopy commands are prepared with the relevant SAS to authorize the upload and run on a dedicated machine, so everything is transferred as quickly as possible and with the certainty that any network interruptions will not compromise the entire process ( AzCopy retries and resumes where it left off). All these tools together provide a complete ecosystem for managing Azure Storage from end to end, combining ease of use, automation, and control.

 

7. Integration with other Azure services

Azure Storage doesn't exist in isolation: on the contrary, it's often at the heart of hybrid cloud architectures and integrates with numerous other Azure services to build comprehensive solutions. Let's look at some typical integrations:

·      Virtual Machines (Azure VMs): VMs in Azure rely heavily on Azure Storage. First, VM disks (both the operating system disk and any additional data disks) are implemented as Managed Disks, which, as we've seen, are stored in the background on Azure Storage (in special blob formats). When you create a VM and assign it a Standard or Premium managed disk, you're effectively using cloud storage with its replication and backup mechanisms. Furthermore, VMs can use Azure Files to share files between multiple VMs or with on-premises users, for example by mounting a share as a network drive on Windows or as a mount point on Linux. Another commonality is that VMs (as well as other services) often send their diagnostic logs and telemetry data to a storage account: for example, you can configure a Windows VM's diagnostic extensions to save event logs or crash dumps to Blob Storage for later analysis. In lift-and-shift migration scenarios, when bringing old applications to Azure, it is common to retain the file shares they use by simply moving them to Azure Files, thus ensuring that Azure VMs can access the files the same way they did on-premises.

·      App Service and Azure Functions: Platform services such as App Service (which hosts web apps, APIs, and web applications in PaaS mode) and Functions ( FaaS /Serverless) can also benefit from Azure Storage. For web apps, Azure Storage is often used for static content: site images, JavaScript files, CSS, videos – all resources that can be served directly from Blob Storage, possibly combined with a CDN to improve overall performance (see below). Furthermore, App Service can mount Azure Files as a shared volume, for example for applications that need to share resources or state between multiple instances (which is not easy to do in a pure PaaS environment, but Azure Files provides a convenient “network disk” even in App Service). Applications in App Service or Functions often access data on Storage using SDKs or via REST APIs, so programmatic integration is very simple. Regarding connectivity, App Services and Functions can be integrated with a Virtual Network through VNet Integration (in the case of App Services) or by defining functions with Event Grid /Queue triggers that are intrinsically linked to a storage account. This allows these applications to communicate with the storage account via the internal network if configured with a Private Endpoint, keeping traffic isolated from the internet.

·      Data Factory and Synapse Analytics: In data engineering and big data workflows, Azure Storage serves as a data lake and landing pad for large volumes of data. Services like Azure Data Factory or Azure Synapse pipelines can connect to a myriad of data sources (databases, APIs, external systems, FTP files, etc.) and transfer this data to Azure Storage —particularly Blob Storage or Data Lake Gen2 —as an ingestion step. For example, a Data Factory pipeline could connect daily to an external SFTP server, download new CSV files, and save them to a blob container. Once the raw data resides in Azure Storage, it can be processed: Synapse and other analytics services can read directly from the data lake (for example, with Spark notebooks or PolyBase for SQL queries) and transform the data. Data Factory also offers Mapping Data Flows, a visual transformation capability that reads from Blob Storage/Data Lake Gen2, performs data mappings and conversions, and writes the result back to a destination (often back to a storage or data warehouse ). In short, Azure Storage is an essential component in ETL/ELT architectures, serving as a repository for staging, historical data storage, and as a data source for batch analytics.

·      Logic Apps: Azure Storage can also be integrated with workflow and application integration solutions like Azure Logic Apps. Logic Apps allows you to create low-code workflows that react to triggers and orchestrate actions across various services. There are native connectors for Azure Storage: for example, you can create a workflow that triggers when a new blob arrives in a specific container, or when a message appears in a Storage Queue. Once triggered, the workflow can perform steps like sending an email, calling an API, moving a file from one container to another, translating content, and so on—all visually orchestrated without writing server code. Similarly, Logic Apps can write to Storage as part of a process (for example, it could extract data from an email and save it to a file in Azure Files). This integration simplifies the creation of automated processes and serverless applications that involve storage, such as document approval flows, system integration (an uploaded file triggers an insertion into a database via Logic Apps), or on-the-fly image processing.

·      Event Grid and Functions: Azure Event Grid is a real-time event routing service. Azure Storage is tightly integrated with Event Grid: whenever a certain event occurs in a storage account (for example, a new blob is created, a blob is deleted, a message is added to the queue, a file is created ), it can generate an event that Event Grid intercepts. You can subscribe to these events and have them sent to destinations such as an Azure Function, a queue, an HTTP webhook, or a Logic App. For example, by registering an Azure Function as a handler for the “Blob created in container X” event, whenever someone uploads a file to that container, the Function will automatically be invoked and can process the file (resize an image, process a document, etc.). This event- driven model turns Azure Storage into a reactive system: instead of having to constantly poll (periodically check for new files or messages), you can count on the storage to immediately “notify” you of important events. This allows for highly scalable and efficient serverless architectures, where compute resources (such as Functions) run only when needed, triggered by changes in the storage layer.

These integrations make Azure Storage not just a place to store data, but a central hub in the application flow. They enable the construction of complete systems: consider an image processing solution – the user uploads an image to Blob Storage, which triggers an Event Grid event that invokes a processing Function, which saves the result to Blob and adds a queued message to notify it is ready. Or an ETL pipeline process – Data Factory moves raw data to a Data Lake (Blob) and launches a Spark job on Synapse that reads and processes those files, then a Logic App sends a report via email upon completion, all orchestrated using Storage as the transition medium. Thanks to these integration capabilities, Azure Storage is the foundation of countless cloud scenarios: from the creation of scalable web applications (where static files and state are stored on external storage), to complex Big Data and AI flows (where huge datasets are fed to computers via data lakes ), to IoT solutions (telemetry collection on Tables/Blobs, streaming event processing, etc.).

Integrated Architecture Examples – A practical example: Imagine a photo management application. A user uploads a photo via a web front end; the photo is saved to Blob Storage. The “new Blob uploaded” event triggers an Azure Function via Event Grid, which reads the photo, creates a thumbnail, and saves it to another Blob container. It then stores the metadata (e.g., thumbnail URL, author, date ) in a Table Storage for future use. Simultaneously, a message is inserted into Queue Storage to notify a post-processing component that the photo is ready for further analysis (e.g., filtering or AI analysis). This scenario leverages Blob, Event Grid, Functions, Table, and Queue together to create a completely serverless and scalable image management workflow. Another case: a company implements a monthly ETL process in which an Azure Data Factory collects CSV files from various source systems and uploads them to a Data Lake (Azure Data Lake Gen2). Once uploaded, a Spark notebook (hosted on Azure Synapse Analytics) starts reading those files from the data lake, joining and normalizing them into a large dataset, then saving the aggregated result to Storage. Finally, a Logic App sends a notification or moves the resulting file to a corporate FTP server. Here, Azure Storage (in data lake mode ) serves as the foundation for big data analysis and as an output medium, orchestrating the steps with Data Factory and integrating computation (Spark) and integration ( Logic App).

 

8. Best practices for using Azure Storage

When designing and managing Azure Storage solutions, it's helpful to follow some proven best practices regarding security, performance, and cost optimization. Here's a summary of the key recommendations:

·      Security best practices: Enable only secure access and apply the principle of least privilege. In particular, it is strongly recommended to force the use of HTTPS (the portal allows a "Secure transfer required " checkbox that should be left enabled, so no unencrypted calls will be accepted). Set the minimum TLS version to 1.2 or higher to avoid deprecated protocols. Use Private Endpoints whenever possible, or at least IP firewall rules, to limit the exposed surface of the storage account to only the necessary network. Manage permissions via Azure AD (Enter ID) and RBAC roles, avoiding sharing account keys. If keys are required for integrations, rotate them periodically and prefer the use of time-limited and permission-limited SAS to provide delegated access to third parties. Enable protection features such as Soft Delete and Versioning on Blobs (and Soft Delete on Files and Queues) to mitigate accidental deletions or malicious actions. If you handle sensitive or critical data, consider using Customer- Managed Keys (CMKs) for encryption and immutability policies (WORM) where necessary. Additionally, implement security monitoring: for example, enable Azure Storage logs and use Azure Defender for Storage (a service that analyzes storage access patterns to identify threats, such as data exfiltration malware or anomalous activity).

·      Performance best practices: To optimize performance, first choose the right service tier. If a workload requires consistently low latency and high throughput (for example, an intensive file sharing system), consider premium accounts (e.g., Azure Files Premium) and ZRS replication (which guarantees minimal intra-region latencies). In general, keep data close to the compute resources that use it (avoid having a VM in Europe continuously reading data from storage in the US, as network latency will impact it). Organize data efficiently: in the case of Data Lake Gen2, pay attention to folder structure and file naming, as operations like enumeration and listing can be time-consuming on crowded directories. In Blob storage, avoid having millions of blobs all in the same container with similar prefixes without hierarchies, as Azure distributes them across partitions based on their names: a recommended pattern is to insert differentiated name segments (e.g., date-based prefixes, like logs/2025/11/23/... ) to improve scalability. For large transfers, use suitable tools like AzCopy or the Data Movement Library, which parallelize operations and achieve significantly higher speeds than serial copies made with unoptimized code. Constantly monitor storage latency and throughput metrics: if you notice any anomalous values (e.g., very high 95th percentile latency), it could indicate a hot spot (a “hot partition” because too many clients are accessing the same object or prefix). In this case, consider data sharding techniques (distributing access across different keys, e.g., using hashed blob names to distribute them across multiple partitions). For Azure Files, consider using multiple separate shares if a single share becomes a bottleneck, or upgrading to Premium for better performance. Finally, leverage Azure CDN or Azure Front Door for high-traffic, global static content: serving images or videos directly from storage to customers around the world can suffer from latency, while integrating a CDN will cache content closest to users, resulting in huge performance benefits and reduced egress directly from storage.

·      Cost Management Best Practices: Azure Storage can become expensive if not managed well, so implementing cost optimization measures is crucial. First, use Hot/Cool/Archive access tiers appropriately – storing rarely used data in Hot is wasteful, while keeping frequently accessed data in Archive is impractical (and slow). Leverage Lifecycle Policies to automate the movement of data to lower-cost tiers as usage decreases. Keep an eye on egress costs: data read from storage and sent out of the region or over the internet incurs bandwidth costs. If you have many end users downloading files, it's a good idea to place the data in the regions closest to consumption and use services like CDN/Front Door to reduce storage egress (the CDN caches and repeatedly serves data without having to download it from the storage origin each time ). Minimize unnecessary transactions: Each operation (read, write, list, etc.) has a cost per million executions – writing an app that continuously lists a container or checks for the presence of a file too frequently can generate significant costs; it's better to use notification mechanisms (Event Grid ) or local caching when possible. To save on long-term costs, consider Azure Reservations for Storage when available, or reserved capacity plans (for example, for Azure Files and Azure Blob, there are options to reserve a certain capacity for 1 or 3 years at a discounted price, useful if you know you'll always have at least X TB occupied). Use tags to track the relevance of costs and then analyze them with Azure Cost Management: this helps identify waste (e.g., a forgotten test environment with a lot of useless data). Finally, consider replication options only when needed: for example, RA-GZRS costs more than GZRS, which in turn is more expensive than LRS. If your application doesn't really need to read from a secondary region, avoid paying for RA-GZRS and instead opt for GZRS or ZRS. Likewise, if certain data is truly non-critical, you could use LRS and pair it with a specific backup stream instead of paying for GRS continuously.

Best practice examples in action – An administrator defines a lifecycle policy for a critical backup Blob container: “If the last modified time is more than 30 days old, move the blob to Cool; if it is more than 180 days old, move it to Archive; delete completely after 7 years.” This single rule ensures that the space occupied in Hot (the most expensive) is limited to recent backups, while older backups are gradually moved to cheaper storage and finally removed when no longer needed, all without manual intervention. On the security front, a company enables Azure AD access for all services, so no developers use account keys directly in their code, but instead use managed identities and roles (for example, a web app has the “Storage Blob Data Reader” role only on the container it serves). Additionally, only TLS 1.2+ is allowed and any weak cipher suites are disabled in the account settings. To monitor performance, the team sets up an alert on the 95th percentile of latency: if the latency of operations exceeds, say, 200 ms for 5 minutes, an alarm is triggered. During an incident, this alert notifies the team, which discovers, for example, an inefficient access pattern (many repeated reads of the same blob by too many instances) and decides to implement an application cache to reduce the load. Another alert is set on the monthly egress cost: if it exceeds a certain threshold in the middle of the month, it means there has been unusually high outbound traffic – the cause could be a misconfigured client that is downloading data in a loop, or a public endpoint that someone is abusing. In this case, the issue is investigated and corrected (for example, by enabling a CDN or more strictly restricting public access). These examples show how the combined use of configuration, monitoring, and automation techniques allows both the prevention of security/performance issues and the optimization of costs without sacrificing service functionality.

 

9. Use cases and practical scenarios

Azure Storage is extremely flexible and can be used in a variety of scenarios. Let's look at three broad usage categories and how the platform addresses their needs, followed by concrete examples:

·      Backup and Disaster Recovery (BCDR): One of the most immediate applications of Azure Storage is as a target for cloud backup and Business Continuity/Disaster Recovery solutions. Thanks to the low cost of the Cool and Archive tiers, and the high durability with geo-redundant options, Blob Storage is ideal for storing backup copies of files, databases, virtual machines, and other workloads. Tools like Azure Backup or Azure Backup Center integrate natively with the storage: for example, Azure Backup can save VM backups directly to Vaults that use Blob Storage under the hood ( Cool/Archive tiers for savings). Furthermore, by leveraging features like immutability policies (WORM), you can ensure that backup data will not be altered or deleted for a certain period – effectively creating an inviolable archive, useful against ransomware or human error. In the event of disaster recovery, if you have adopted geographical replication (GRS/RA-GZRS), the critical backup data is already present in another region, ready for recovery. To protect against accidental deletion, features like Soft Delete ensure that any deleted blobs can be recovered within the retention period. Therefore, Azure Storage provides a robust backup infrastructure: cost-effective in the long term, secure with encryption and WORM policies, and resilient with geo-replication.

·      Big Data and Analytics: In data analysis, AI, and big data scenarios, Azure Storage plays the role of a data lake. The Azure Data Lake Storage Gen2 variant (based on Blob) offers a Hadoop -compatible file system for storing raw, semi-finished, and results data. Thanks to the support for ACLs, hierarchical directories, and high throughput, a Data Lake Gen2 on Azure can serve as the foundation for lakehouse architectures: data collected from various sources (logs, transactions, IoT, etc.) is saved in file format (CSV, Parquet, JSON) on the data lake ; tools like Azure Synapse Analytics, Databricks, or HDInsight clusters can directly access these files to perform analysis, train machine learning models, and perform large-scale aggregations with Spark or Hive. Services like Power BI can also connect to Parquet files in the data lake for large-volume business intelligence analysis without moving everything into a database. Azure Storage stands out in this context for its massive scalability (it can hold hundreds of terabytes or petabytes), its lower cost compared to maintaining data in a transactional database, and its integration with batch/distributed processing tools. Furthermore, the separation between storage and compute typical of a data lake allows for independent scaling: data can be stored on low-cost storage and compute power ( Synapse, Databricks ) can be activated only when needed to process it, optimizing the overall costs of the data platform. Therefore, Azure Storage is a key ally for implementing efficient ETL/ELT pipelines and data reservoirs for advanced analytics.

·      Web Apps and Content Delivery: For web, mobile, and content distribution applications, Azure Storage provides simple and robust solutions. A classic modern web application can leverage Blob Storage to host all of the site's static content: images, CSS and JavaScript files, downloadable documents, marketing videos, etc. These blobs can be served directly to clients with very high performance, especially when combined with services like Azure CDN or Azure Front Door, which cache static content in global nodes, bringing it geographically closer to users and reducing the load on the storage origin (in addition to providing compression, global HTTPS, etc.). For the dynamic application part, services like App Service manage the code, but can also store configurations or output on Azure Storage (for example, a web app could save user profile photos in Blobs and only a reference in the database). Furthermore, a common pattern is to use Azure Files as a "shared container" for multi-instance applications: imagine a cluster of web servers in Kubernetes or VM scale sets, they can mount an Azure Files share to share necessary files among themselves (e.g., images uploaded by users, generated by the app). Azure Storage also supports the microservices architectures typical of cloud web apps very well: for example, an e-commerce site could use Queue Storage to asynchronously manage tasks (an order queued and processed by a backend service ), and Table Storage to quickly store user sessions or carts without having to set up an entire database. All this while ensuring that the app can scale horizontally: by adding more compute instances, they share the same data repository on storage, rather than having local files to synchronize.

These cases show how Azure Storage can scale from cold storage for backups, to the core of data platforms, to the backend of global web applications.

Final real-world use case examples – For concrete combined contexts: a healthcare company could use Azure Storage in this way – storing diagnostic images (radiological exams in DICOM format) as Blobs in a secure container, applying a WORM immutability policy to ensure that historical reports are not altered. It would also use the Cool or Archive tier for older data to reduce costs, and GRS replication to have an emergency copy out of the area. The metadata of these exams (patient name, date, exam type) could be saved in a Table Storage for quick reference. When the company's data scientists want to perform aggregate analyses (e.g., outcome statistics), they could use Azure Synapse to query the DICOM blobs directly or their metadata in the data lake. Another scenario, a global e-commerce site, leverages Azure Storage for various integrated purposes: the site's static content (product images, pre -rendered HTML files ) resides on Blob Storage and is distributed via a CDN to quickly serve customers around the world; Order operations are managed with a microservices pattern where, when a customer makes a purchase, the details are entered into a Queue Storage so that an order processing service can take charge of them and process them (perhaps updating inventory, sending email confirmations, etc.) without slowing down the front-end. Generated documents (PDF invoices, shipping labels) are saved to Azure Files so that different modules (e.g., the shipping system, customer service) can easily access these shared files. All transaction logs and raw daily sales data are finally copied to a Data Lake (blob) where a nightly analysis process combines them with marketing data to produce business reports. Thanks to Azure Storage, the e-commerce platform achieves scalability (it can handle traffic spikes by delegating the resilience of its components to queues and storage), reliability (important data is on durable storage, separate from ephemeral servers), and insights (having centralized data makes it easier to analyze and extract value from it).

Ultimately, Azure Storage is a fundamental building block of cloud infrastructure: with its various services and options, it provides a reliable place to house data and a set of capabilities to protect it, manage it long-term, and integrate it with the rest of the Azure ecosystem. Whether for simple backup, powering a global web application, or providing the foundation for a data pool for machine learning, Azure Storage offers the tools and flexibility to build robust and scalable cloud solutions.

 

Conclusions

In this chapter, we've seen how Azure Storage is a comprehensive cloud platform that allows you to securely and scalably store and manage data, supporting scenarios ranging from backup to web applications and big data. The core services include Blob Storage for unstructured data, Azure Files for SMB/NFS shares, Queue Storage for asynchronous messages, and Table Storage for NoSQL data, each with specific use cases. Configuring a storage account requires choices regarding subscription, region, performance, redundancy, and networking, with preference for General Purpose v2 accounts. Replication options such as LRS, ZRS, and GRS ensure availability and resiliency, while RA-GRS/RA-GZRS variants offer read-only access to the secondary replica. Security is ensured by encryption, Azure AD and SAS authentication, firewall, private endpoint, and soft delete and versioning features. Blob Storage offers Hot, Cool, and Archive tiers to optimize costs and performance, with automated lifecycle policies. Tools like Storage Explorer, CLI, PowerShell, and AzCopy simplify management and transfers, while Azure Monitor and Log Analytics support monitoring. Integration with other Azure services enables advanced scenarios like data lakes, automated workflows, and microservices architectures. Best practices include using HTTPS, TLS 1.2+, Private Endpoint, cost monitoring, and proper tiering and replication. Finally, use cases range from backup and disaster recovery to big data and static content hosting for web applications.

 

Chapter Summary

Azure Storage offers a comprehensive cloud storage platform, with diverse services for managing unstructured data, files, queues, and tables, supporting scenarios ranging from backup to big data to web applications. Storage account configuration and redundancy options are crucial to ensuring performance, security, and data availability.

·      Core storage services: Azure Storage includes Blob Storage for unstructured data and large files, Azure Files for managed file shares with SMB and NFS protocols, Queue Storage for asynchronous messaging, and Table Storage for semi-structured NoSQL data, each with specific characteristics and distinct use cases.

·      Configuring Storage Accounts: Creating a storage account requires choosing a subscription, unique name, region, performance (Standard or Premium), data redundancy, network options (public, private, or service endpoints), and management tags, with the preference being for General Purpose v2 accounts that support all modern features.

·      Data redundancy options: Azure Storage offers LRS (local replication within a data center), ZRS (synchronous replication across Availability Zones in the same region), GRS (asynchronous geographic replication across regions), and RA-GRS/RA-GZRS variants that allow read-only access to the secondary replica, balancing cost, durability, and compliance requirements.

·      Security and access control: Data protection includes encryption at rest and in transit, authentication via Azure AD and Shared Access Signature, network restrictions with firewalls and Private Endpoints, soft delete and versioning to prevent accidental loss, and monitoring with Azure Monitor and Log Analytics for auditing and anomaly detection.

·      Storage Tiers: Blob Storage supports Hot (fast, frequent access), Cool (less frequent access at lower cost), and Archive (long-term, delayed-access storage) tiers, with lifecycle policies to automate data movement between tiers based on age or usage, optimizing cost and performance.

·      Management tools: Azure Storage Explorer provides a graphical interface for manual management, while Azure CLI and PowerShell support automation and scripting. AzCopy is dedicated to efficient bulk data transfers. Azure Monitor and Log Analytics help with performance and security monitoring and alerting.

·      Integration with Azure services: Azure Storage integrates with VMs, App Services, Functions, Data Factory, Synapse Analytics, Logic Apps, and Event Grid, enabling scenarios like data lakes, serverless processing, automated workflows, and scalable and resilient microservices architectures.

·      Best practices: We recommend enforcing HTTPS and TLS 1.2+, using Private Endpoint or IP firewalls, managing access with Azure AD and SAS, enabling soft delete and versioning, monitoring costs and performance, choosing tiers and replication based on latency and durability requirements, and using lifecycle policies to optimize costs.

·      Use cases: Azure Storage supports backup and disaster recovery with cost-effective tiering and immutability, serves as a data lake for big data and analytics with Data Lake Gen2, and serves static content and web application backends, with real-world examples in healthcare, e-commerce, and integrated ETL flows.

 

CHAPTER 5 – The networking service

 

Introduction

Azure offers a set of networking services that are the fundamental building blocks for securely and efficiently connecting resources in the cloud and between clouds and on-premises environments. These services allow you to create private networks in Azure, extend them to your datacenter, efficiently distribute traffic, and protect applications from cyber threats. The three key objectives of the Azure networking infrastructure are: ensuring secure connectivity between cloud and on-premises resources, enabling centralized network and security management, and offering flexible scalability to adapt to load needs. In practice, Azure provides components such as virtual networks (VNets), network gateways, security groups (NSGs), firewalls, and many others, accessible and configurable via the Azure portal or APIs.

Together, these services enable you to build modern architectures (such as microservices, hybrid, or multi-region environments) while reducing risk and improving the user experience. In the following sections, we'll examine the main Azure networking components and their capabilities, with headings and subheadings to help structure the concepts. Finally, a summary table presents the core Azure Networking services and their key capabilities.

Example scenario: A retail company connects its physical stores to its e-commerce backend hosted on Azure. It creates a virtual network (VNet) with separate subnets for the web, app, and database tiers ; establishes a site-to-site VPN connection between the VNet and the headquarters network; uses a load balancer to ensure high availability of the web instances; applies NSG to allow only the necessary ports and addresses to each subnet ; and places an Azure Firewall in the path to centrally control outbound traffic. This example brings together several Azure services working together to create a secure, resilient, and manageable network infrastructure.

 

Outline of chapter topics with illustrated slides

 

Immagine che contiene testo, schermata, software, Pagina Web

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Networking provides the foundation for securely and efficiently connecting cloud and on-premises resources. It offers centralized network and security management, as well as flexible scalability. The Virtual Network creates an isolated private perimeter in the cloud, while services like VPN Gateway and ExpressRoute connect Azure with datacenters and offices. Traffic is distributed by Load Balancers, Application Gateways, and Front Door. Security is ensured by Network Security Groups, Azure Firewall, DDoS Protection, and Microsoft Defender for Cloud. Azure DNS manages names, and Network Watcher provides observability tools. These services enable modern architectures, reducing risk and improving the user experience. For example, a retail company can connect stores to e-commerce on Azure using VNets, dedicated subnets, site-to-site VPNs, Load Balancers, NSGs, and Firewalls. See the block diagram to visualize the main services and flows between on-premises and the cloud.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.The Virtual Network, or VNet, is the private routing domain in Azure. Here you define address space, subnets, routes, and integrations. You can deploy virtual machines, AKS, App Service Environments, and PaaS service private endpoints. Communication between resources occurs over private IPs, and internet access is only permitted through specific configurations such as public IPs, NAT, or load balancers. VNets can connect to each other via peering, even across regions, and offer hybrid connectivity via VPN Gateway or ExpressRoute. Traffic is controlled via NSG and User- Defined. Routes. For example, in a dev /test environment, you can create separate subnets for development and testing, set up peering to a shared -services VNet, and restrict access using NSG rules. See the IP addressing scheme and the VNet peering diagram.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Subnets divide the VNet into logical segments, improving security and traffic management. Separating web, apps, and databases allows you to apply targeted Network Security Groups, log flows, optimize routes, and efficiently assign IP addresses. You can associate service endpoints or private endpoints to access PaaS services via the private network and use User- Defined Routes and Network Virtual Appliances for advanced routing. Subnets support delegation to specific services and security policies. It's important to plan capacity and use consistent names. A practical example: the web subnet only allows HTTP and HTTPS traffic from the Front Door, the app subnet only from the web tier, while the data subnet uses a Private Endpoint to SQL. See the three-tier diagram to visualize communications between subnets.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Network Security Groups, or NSGs, filter inbound and outbound traffic using customizable rules based on protocol, port, source, and destination. Rules are prioritized; the lowest-numbered rules are evaluated first. You can associate NSGs with subnets or individual VM network interfaces. Default rules deny all external inbound traffic and allow intra-VNet traffic. Use service tags and Application Security Groups to simplify management. Document and monitor rules using NSG flow logs with Network Watcher. For example, you can allow only HTTP and HTTPS traffic from the web to the frontend and deny everything else, or allow database access only from the app tier. See the NSG rules table and rule evaluation flow.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.With Azure, you can securely connect on-premises and cloud environments via VPN Gateway and ExpressRoute. The VPN Gateway creates site-to-site IPsec /IKE tunnels between Azure and corporate firewalls or routers, or point-to-site for remote user access. Choose the SKU based on the bandwidth and features required. ExpressRoute offers a private, dedicated connection to the Microsoft network, ideal for high latency and bandwidth requirements. You can combine ExpressRoute with VPN for failover and use BGP for dynamic route exchange. Virtual WAN simplifies the management of multiple sites. For example, the headquarters can use a site-to-site connection, mobile users can use point-to-site, and the primary data center can use ExpressRoute with forced tunneling. See the diagram for connectivity and failover paths.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Load Balancer, at layer 4, distributes TCP and UDP traffic to virtual machines or scale sets, using health probes to check the health of backends. It is ideal for high-performance internal or public scenarios. For HTTP and HTTPS traffic, Application Gateway operates at layer 7, offering advanced features such as Web Application Firewall and URL- or host- based routing. Azure Front Door provides global acceleration, caching, and geographic failover. Choose the tool based on your needs: Load Balancer for transport, Application Gateway for application routing and protection, Front Door for global performance. For example, a multi-zone solution could use Front Door in front of the regions, Application Gateway with WAF in each region, and an internal Load Balancer for inter-microservice communications. View the balancing chain in the dedicated diagram.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Firewall offers stateful filtering, centralized application and network rules, integration with threat intelligence, and advanced IDPS capabilities. DDoS Protection Standard protects against volumetric threats at the VNet level. Microsoft Defender for Cloud calculates the secure score, provides recommendations, and protects workloads with specific plans for VMs, containers, and PaaS services. The Zero Trust approach requires identity, device, and network control: it implements NSG, Firewall, Private Endpoints, Just-In-Time for administrative access, and Conditional Access. For example, a security hub VNet hosts the firewall, while app and data spokes direct outbound traffic via UDR to the firewall. DDoS and Defender are active, with JIT on admin VMs. See the security hub-and-spoke scheme.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure DNS manages public and private zones, ensuring high availability and low latency. Private DNS zones resolve internal names between connected VNets, often replacing custom DNS servers. You can automate record management using Azure CLI or PowerShell and integrate DNS with Traffic Manager or Front Door for global routing. For hybrid resolution, Azure DNS Private Resolver enables forwarding to corporate DNS. For example, you can manage a contoso.com public zone in Azure and a contoso.local private zone connected to different VNets, using Private Resolver for forwarding. See the DNS records table and the public/private diagram with hybrid resolver.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Network Watcher offers advanced tools for monitoring and diagnosing your network. Connection Monitor verifies paths and latency between endpoints, Topology displays resource dependencies, NSG flow logs and Traffic Analytics analyze traffic flows, Packet Capture collects packets on VMs for detailed investigations. IP Flow Verify and Next Hop help validate rules and routing. Integration with Azure Monitor enables custom alerts and dashboards. Use these tools during migrations, incidents, and optimizations. For example, you can configure Connection Monitor between Application Gateway and backend, enable flow logs on NSGs, and analyze performance using latency and error workbooks. View the dashboard with graphs, topology maps, and flow log tables for complete control.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.When designing solutions on Azure Networking, follow some fundamental guidelines. Use the hub-and-spoke model to centralize security and shared services in the hub, while the spokes host applications and data. Apply the Zero Trust principle: NSG on each subnet, firewalls for outbound traffic, Private Endpoints for PaaS services, and minimal segmentation. For high availability, distribute resources across Availability Zones, use load balancers with health probes, and enable DDoS Standard on critical VNets. Ensure governance with consistent naming, Azure Policy for mandatory requirements, and Blueprint for standardization. Maintain high observability by enabling Network Watcher, logs, and alerts. Optimize costs by choosing the most suitable services and limiting outbound traffic. Consult the Azure Architecture Center and official documentation for more information. View the hub-and-spoke design and best practices checklist for a complete overview.

 

1. Virtual Networks (Azure Virtual Network - VNet)

An Azure virtual network (VNet) is the core networking component in Azure. A VNet represents an isolated private network perimeter in the cloud. Within a VNet, a private IP address space (in CIDR notation) is defined, which can be divided into subnets. In this space, you can deploy virtual machines (VMs) and other Azure services (such as AKS clusters for containers, App Service Environment for PaaS web applications, and Private Endpoints for privately connecting PaaS services). All these resources within the VNet can communicate with each other using private IP addresses, ensuring isolation from public internet traffic.

By default, outbound Internet traffic is blocked unless explicitly enabled, such as by assigning resources a public IP address or using services like a NAT gateway or a public load balancer. You can expand or integrate a VNet in several ways:

·      VNet peering: This allows you to connect two virtual networks (in the same or different regions) so that traffic can flow between them with minimal latency and without passing through the Internet. Peering is useful for building complex multi-network architectures, such as connecting a frontend VNet with a shared services VNet.

·      Hybrid connectivity: A VNet can be connected to the company's on-premises network via a VPN Gateway (using IPsec /IKE encrypted tunnels over the Internet) or ExpressRoute (a dedicated direct connection). These options will be explored in more detail later, but in short, they allow you to securely extend your corporate network into Azure, as if the VNet were a remote portion of the datacenter.

·      Routing Control: Azure provides predefined route tables to route traffic within and out of your VNet. You can customize routing with User- Defined Route Tables. Routes (UDR), defining static routes to divert traffic to specific devices (for example, to a third-party Network Virtual Appliance ). This is useful in advanced scenarios, such as forcing egress traffic through a centralized firewall.

·      Integrated security: The VNet works with Network Security Groups (NSGs) to filter traffic at the network level (as we'll see in detail later). NSGs can be applied to both subnets and individual VM network interfaces within the VNet to control which communications are allowed or denied.

In short, VNet provides network isolation, segmentation, and control in the Azure cloud: by defining your own IP addressing scheme, internal subnets, and access rules, you create a secure environment in which to deploy cloud services while maintaining control over communications.

Example: In a corporate Dev/Test environment, you could create a VNet (e.g., 10.20.0.0/16 ) split into two subnets, dev and test, that are isolated from each other. These subnets can be peered to a separate shared services VNet (where common services like logging, Bastion jump boxes, etc. reside). You would apply NSG to these subnets to, for example, only allow RDP/SSH traffic from corporate IPs to the development VMs.

 

2. Subnet (Logical Network Segmentation)

Within a VNet, subnets allow you to divide the virtual network into smaller logical segments. This segmentation is essential for organizing workloads and applying targeted security policies. For example, dividing the VNet into subnets called web, apps, and databases allows you to apply specific Network Security Groups to each tier, separately log traffic flows, and optimize IP address allocation.

Subnets inherit IP address space from the main VNet, so careful planning is essential to allocate sufficient IP space to each segment for future growth, leaving some unused addresses for expansion. It's good practice to establish consistent naming conventions for subnets (e.g., prd-web-subnet1, dev -db-subnet2, etc.) and IP ranges, making the architecture easier to manage and understand.

Integrated services in subnets: Azure allows you to associate specific features with subnets:

·      Service Endpoints and Private Endpoints connect subnets to Azure PaaS services (such as Azure Storage or Azure SQL Database ) over the private network. Using a private endpoint, for example, a SQL database in Azure can have a private IP address within the subnet. data from a VNet, avoiding exposure to the Internet and allowing access only from within the corporate network.

·      Subnets support delegation to certain Azure services. This means that a subnet can be "dedicated" to a managed service (e.g., Azure Container Instances, Azure NetApp Files, etc.), allowing that service to automatically create network resources within the subnet.

·      Security policies can be applied to each subnet using Azure Policy to ensure compliant configurations (for example, preventing resources in a subnet from having public IPs, or enforcing the use of NSG).

Subnet segmentation also improves security and traffic control: NSG rules can be written to allow communication only between specific subnets, for example restricting web tier servers from directly reaching the database tier unless they are routed through the app tier. Furthermore, by combining subnets with custom routes (UDRs) and devices such as firewalls ( Network Virtual Appliances ), you can create forced paths for traffic, adding additional inspection or filtering between subnets.

Example: Consider a VNet with three subnets: web (10.10.1.0/24), app (10.10.2.0/24), and data (10.10.3.0/24). The web subnet is configured with an NSG that allows inbound traffic on ports 80/443 only from the Azure Front Door service (which acts as the global HTTP inbound) and denies all other inbound traffic. The app subnet allows inbound traffic only from the web subnet (on the appropriate port for the application service) and nothing else. The data subnet doesn't directly expose any ports, but it contains a Private Endpoint that privately connects it to an Azure SQL database—this way, app servers can reach the database through the private endpoint on the Azure network, without going outside.

 

3. Network Security Groups (NSG)

Network Security Groups (NSGs) are the network-level traffic control mechanism in Azure. They function similarly to L3/L4 firewall filters, applying permit / deny rules to inbound and outbound traffic for Azure resources. Each NSG rule specifies a criterion based on: direction (inbound or outbound ), protocol (TCP, UDP, ICMP, or Any ), port (or port range), source and destination address (which can be single IPs, ranges, or predefined tags), and an Allow or Deny action. Rules are evaluated according to a numerical priority: lower numbers indicate high-priority rules that are evaluated first. As soon as a rule matches the traffic being examined (a match), the action is applied and the evaluation stops.

NSGs can be associated at the subnet level (protecting all resources within that segment) or at the network adapter (NIC) level, to define specific rules for individual VMs or instances. Azure provides some default rules in each NSG: for example, all incoming traffic from the internet is denied by default, while traffic within the VNet is allowed by default, as are some essential Azure communications (such as the ability for VMs to communicate with the Azure DNS service). These default rules provide a basic level of security; the user can then add custom rules to allow the required services (for example, opening port 443 for a web server).

To simplify managing rules at scale, Azure offers Service Tags and Application Security Groups (ASG): Service Tags are labels that represent sets of addresses managed by Azure (e.g., Internet, VirtualNetwork, AzureLoadBalancer, Storage, AzureSQL, etc.), which can be used in place of explicit IP addresses in rules. For example, a rule can allow inbound access only if the source is ServiceTag:Internet, or it can allow outbound access only to ServiceTag:AzureSQL (which includes the IPs of Azure SQL services). Application Security Groups, on the other hand, allow you to define logical sets of virtual machines (e.g., an ASG called "web-servers" assigned to all frontend VMs ) and use these groups as the source or destination in NSG rules, instead of managing the IPs of each VM individually. This makes it easier to apply uniform policies to groups of instances with a similar role.

It's a good practice to document and version your NSG rules, especially in complex environments, and use monitoring tools to track filtered traffic. Azure Network Watcher provides NSG flow logs, detailed logs of traffic allowed or denied by NSG rules, which can be analyzed (for example, with Azure Monitor or Traffic Analytics) to understand traffic patterns or diagnose connectivity issues.

Example: You have two NSGs in a multi-tier application: NSG-web associated with the web frontend subnet, which allows inbound HTTP /HTTPS traffic (port 80/443) from the outside (Service Tag Internet ) to the VMs in the web- frontends group (an ASG) and to Azure Storage services (Service Tag Storage, to allow web apps to access static files), but denies all other inbound traffic. Additionally, NSG-web could allow outbound traffic only to certain necessary external or Azure services, denying everything else. NSG- db, perhaps associated with the database subnet, only allows inbound port 1433 (SQL), and only from the ASG app- tier group (i.e., the application tier VMs), denying all outbound traffic to the Internet for the database servers. This way, the databases can only be contacted by internal application servers and cannot call external services unless explicitly allowed.

 

4. Hybrid Connectivity (VPN Gateway and ExpressRoute)

Azure resources often need to integrate with existing on-premises networks, such as corporate datacenters or offices. To implement hybrid connectivity (i.e., a secure connection between the on-premises network and Azure), two main solutions are used: VPN Gateway and ExpressRoute.

VPN Gateway (Virtual Private Networks via VPN)

Azure VPN Gateway service allows you to create encrypted VPN tunnels between your Azure VNet and your on-premises network over the Internet. It uses standard IPsec /IKE protocols to establish site-to-site connections (from a VPN appliance or router on your on-premises network to the gateway in Azure) or point-to-site (P2S) connections where individual remote clients establish a VPN to Azure, useful for telecommuting or mobile user access.

The VPN Gateway is created within a special subnet of the VNet (called GatewaySubnet ) and has different SKUs ( tiers ) that determine its throughput capabilities and supported features (for example, BGP connection support for dynamic route exchange, or redundancy across Availability Zones). The choice of SKU depends on the required bandwidth and reliability needs. Once configured, the gateway establishes the VPN tunnel with the corresponding on-premises device; all traffic routed to the local network (according to the configured routes ) will be encrypted and sent through this tunnel, and vice versa.

ExpressRoute (Private Dedicated Link)

ExpressRoute is the solution for hybrid connectivity needs with even greater performance and reliability. It is a private, dedicated link between the company's on-premises network and Microsoft's global network (hosted by Azure). Unlike a VPN over the Internet, with ExpressRoute, traffic does not traverse the public Internet, but travels over a private circuit provided by a Microsoft partner provider. This offers two main advantages: low latency and high speed (circuits of various sizes are available, from tens of Mbps up to 10 Gbps and beyond) and greater intrinsic security (being a private circuit, it is isolated from global Internet traffic).

ExpressRoute requires you to activate a circuit through a telecommunications provider or a partner exchange ; once activated, the circuit connects your infrastructure to one of Microsoft's ExpressRoute gateways. From there, the connection can be mapped to one or more Azure VNets. You can have both private peering (to connect to Azure services within a VNet) and peering. Microsoft (to reach public Microsoft services like Azure SQL, Azure Storage, but through the private circuit instead of the Internet).

Importantly, ExpressRoute and VPN are not mutually exclusive: in fact, Azure allows you to combine the two solutions in redundant mode. For example, you can provide failover, where if the ExpressRoute circuit fails, a site-to-site VPN on the Internet takes over to maintain the connection, albeit with lower performance. Furthermore, using the BGP protocol, both ExpressRoute and VPN Gateway can dynamically swap routes between Azure and on-premises, simplifying routing table management.

For environments with multiple locations and complex networks, Azure also offers Virtual WAN, a service that aggregates and simplifies the centralized management of multiple VPN/ExpressRoute connections and allows you to seamlessly connect users and distributed branches to the Azure network.

Example: A company with a headquarters and branch offices can set up a site-to-site connection between the headquarters (HQ) firewall/router and a VPN gateway in the production VNet in Azure, so that the two environments are continuously connected. At the same time, for employees traveling or working remotely, point-to-site (P2S) access to the VPN gateway can be enabled (for example, using the Azure-supported OpenVPN protocol ), allowing individual clients to join the corporate network on Azure from anywhere. For critical workloads requiring high throughput and minimal latency, the company also activates an ExpressRoute circuit to its primary datacenter; much of the traffic is routed through ExpressRoute (including, potentially, forced tunneling all Internet traffic from Azure servers to the datacenter to enforce centralized policies). In the event of a private circuit failure, the Internet-facing VPN serves as a backup link using failover routing configured with BGP.

 

5. Load Balancing (Load Balancer, Application Gateway, Front Door)

To ensure application scalability and high availability, Azure provides several load balancing services. These distribute traffic across multiple instances of a service, avoiding single points of failure and optimizing user response. Azure offers load balancing solutions at both the transport layer (Layer 4) and the application layer (Layer 7):

a) Azure Load Balancer (Tier 4)

The Azure Load Balancer operates at layer 4 (transport) of the OSI model, balancing TCP and UDP traffic. It can automatically distribute incoming requests across a set of back-end destinations, typically virtual machines or instances in an Availability Set or Virtual Machine Scale Set (VMSS). The Load Balancer checks the health of the instances using health probes: if an instance does not respond to the probes, it is temporarily removed from the pool, so that traffic is directed only to healthy instances .

Azure Load Balancer supports both internal (loading across private networks to create, for example, database clusters or highly available internal services) and public scenarios (exposing a public IP address that loads across instances in private subnets for end-user services). It is ideal for high-performance, low-latency scenarios where simple port/protocol loading is needed without introspection into the content of requests. For example, it can be used to distribute RDP/SSH traffic to jump -box gateways or to load UDP traffic for media streaming systems.

b) Azure Application Gateway ( Level 7)

The Application Gateway is Azure's layer-7 load balancer, specifically designed to handle HTTP/HTTPS traffic. Unlike the content-agnostic L4 Load Balancer, the Application Gateway can perform URL-based or host header- based routing, allowing requests to be routed based on the domain name or the requested path (useful for multiple hosts on the same IP or distinct microservices under the same domain). It also supports advanced features typical of application load balancers, such as SSL termination ( SSL offload ) – meaning it can manage the decryption of HTTPS traffic, reducing the load on backend instances – and most importantly, it integrates an optional Web Application Firewall (WAF). The WAF protects web applications from common attacks (SQL injection, XSS, etc.) by following rules based on the OWASP Top 10.

The Application Gateway is ideal when you need application-level security and intelligent routing. It can handle session cookies, HTTPS redirects, and other web-level behaviors. It's commonly used to publish enterprise web applications, even in combination with other services (for example, it can work behind a per-region Azure Front Door, as we'll see below).

c) Azure Front Door (Global Distribution)

Azure Front Door is a global load balancing and application acceleration service. It also operates at Layer 7 and uses the global network to route users to the closest location in terms of latency, leveraging Anycast technology (a single global IP address that automatically reaches the Front Door node closest to the user). Front Door can perform geographic failover: if an entire Azure region becomes unreachable, Front Door can divert traffic to a secondary region in seconds, ensuring service continuity. It also offers acceleration capabilities similar to a CDN, such as caching static content at globally distributed Points of Presence, improving end-user experience.

Front Door is ideal for multi-region or global applications where users are geographically distributed and you want to provide them with a single, nearby endpoint. It's often used in combination with Application Gateway: for example, Front Door can route traffic to each region's Application Gateway (which in turn routes traffic to local VMs or instances) and act as the first layer of defense and optimization worldwide.

Solution Selection: In summary, Azure Load Balancer is suitable for "simple" load balancing at the network/transport layer and supports all TCP/UDP protocols (e.g., for internal services or non-HTTP backend tiers ). Application Gateway is chosen for web scenarios where URL routing or WAF protection directly on application instances is needed. Front Door is used for global traffic distribution, performance improvement, and cross- region high availability scenarios. In a complex architecture, it's not uncommon to use all three solutions in cascade: Front Door as the global entry point, Application Gateway within each region for application-layer security, and internal Load Balancers to load balance microservices or databases on the backend.

Example: A multi-zone web service on Azure could use Azure Front Door as a single global entry point. Front Door routes each request to the Azure region closest to the user. In each region, an Application Gateway with a WAF handles incoming traffic, potentially routing requests across multiple pools (e.g., different microservices) and filtering common web attacks. On the application tier, if the microservices communicate with each other via gRPC or other non-HTTP protocols, they could use an internal Load Balancer to distribute requests across many identical instances, maintaining high availability for backend services as well.

 

6. Advanced Network Security (Azure Firewall, DDoS Protection, Defender for Cloud)

In addition to NSGs, Azure provides advanced services to improve network and resource security: Azure Firewall for centralized traffic control, DDoS Protection to mitigate distributed attacks, and Microsoft Defender for Cloud for security posture and workload protection.

a) Azure Firewall

Azure Firewall is a fully managed, stateful cloud firewall that allows you to centrally enforce both network and application rules. Unlike NSGs (which operate on individual subnets /VMs), Azure Firewall is typically deployed in a dedicated subnet (often in a Security Hub VNet) and serves as a centralized hub through which traffic, especially egress from application subnets, passes.

Key features of Azure Firewall include:

·      Stateful filtering of L3-L4 and L7 traffic.

·      Application rules that allow or deny HTTP/HTTPS requests based on FQDNs (domain names), for example allowing web access only to authorized domains.

·      IP/port/protocol based network rules, similar to NSG but centrally managed.

·      Address Translation: Support for both SNAT (sending traffic out via firewall public IP) and DNAT (publishing internal services via firewall IP/ports to the outside), simplifying controlled exposure of internal resources.

·      Threat Intelligence Integration: The firewall can automatically block or alert on traffic to known malicious IPs/domains using Microsoft threat intelligence feeds.

·      Premium version, it has IDS/IPS (intrusion detection and prevention) for advanced application traffic analysis.

Azure Firewall is a key component in hub-and-spoke architectures: all outbound Internet connections from the spokes pass through the firewall in the hub, where uniform rules are applied. This facilitates centralized management of security policies and traffic monitoring from a single point.

b) DDoS protection

Denial of Service (DDoS ) attacks aim to render a service inaccessible by overloading it with massive volumes of artificial traffic. Azure offers DDoS Protection Standard, a service that, enabled at the VNet level, continuously monitors traffic to public resources (such as public IPs associated with VMs, Load Balancers, or App Gateways) and detects anomalous patterns that could be a DDoS attack. In the event of an attack, the service filters malicious traffic (such as volumetric packets) before it reaches the VNet, allowing only legitimate traffic to reach its destination.

Standard DDoS Protection relies on Microsoft's global infrastructure, allowing it to absorb very large attacks. It complements the basic service (which already offers infrastructure-level DDoS protection for everyone) and is recommended for critical or internet-exposed applications, as it also provides detailed telemetry, mitigated attack logs, and the ability to define custom mitigation policies. When DDoS Standard is enabled on a VNet, all resources with public IPs in that network are automatically protected.

c) Microsoft Defender for Cloud

Microsoft Defender for Cloud (formerly Azure Security Center) is not a direct network controller, but rather a Cloud-Native Application Protection (CNAPP) platform that helps monitor and strengthen the overall security posture of Azure resources, including network aspects as well as other aspects (operating systems, applications, data).

Defender for Cloud generates a Secure Score for your Azure environment, evaluating your configuration against security best practices and standards. It provides improvement recommendations (for example, "Enable MFA for admin accounts," "Configure an NSG for this subnet," "Enable encryption on this storage account") and can activate targeted protections through Defender plans dedicated to specific workloads: for example, Defender for Servers enables endpoint protection and vulnerability features. VM assessments, Defender for Storage detects data access anomalies, Defender for Containers monitors AKS clusters, etc.

On the network side, Defender for Cloud integrates with controls like NSG and Firewall to highlight weak configurations (such as unnecessary open ports) and with monitoring services to detect suspicious network activity. Implementing a Zero Trust approach in Azure—meaning never implicitly trusting any traffic, not even internal —involves using tools like NSG on every subnet, Azure Firewall to actively filter all outgoing traffic, Private Endpoint for PaaS services (so nothing is publicly accessible), Just-In-Time access for VMs (meaning only opening management ports like RDP/SSH temporarily when needed), and integration with Azure AD Conditional Access to control administrative access. Defender for Cloud helps implement and verify these measures, ensuring that every component—network, identity, and data—complies with the expected security principles.

For example, a hub-and-spoke architecture can dedicate a hub-security VNet that hosts an Azure Firewall instance. All outbound Internet traffic from the spoke VNets (e.g., apps and data ) is routed to the firewall via UDR routes, so that no VMs communicate directly with the Internet but pass through the firewall's centralized control. Standard DDoS protection is also enabled on these spoke VNets to mitigate attacks against exposed services. Additionally, the company enables the appropriate Defender plans: for example, Defender for Servers on VMs (which also enables JIT for RDP/SSH), Defender for SQL on databases, providing visibility through the secure score and alerts in the event of anomalous behavior. This creates a Zero Trust posture where every layer—network, host, and application—is monitored and protected.

 

7. Name Management (Azure DNS)

In the cloud and on-premises, name resolution is critical to service accessibility. Azure DNS is the Domain Name System management service in Azure: it allows you to host both public DNS zones (classic internet domains) and private DNS zones (internal DNS zones, visible only within Azure networks) with the reliability and performance of Microsoft's global infrastructure.

Using Azure DNS for public domains means being able to manage DNS records (A, CNAME, MX, TXT, etc.) via the Azure portal, CLI or API, benefiting from a highly scalable platform. available and globally distributed, instead of having to maintain proprietary DNS servers. For internal domains, Azure Private DNS Zones offer a private name system without having to create and manage DNS VMs: for example, you can have a contoso.local private zone whose records are resolved by VMs in the Azure VNets associated with that zone, allowing internal services to find each other by hostname as they would in a traditional datacenter. Using VNet links, you connect a private DNS zone to one or more VNets, defining the scope of visibility of those names.

Azure DNS integrates well with other services: for example, it can work with Traffic Manager or Front Door to implement global routing strategies ; in this case, DNS records can direct the client to the best endpoint (Traffic Manager uses DNS to redirect to the best endpoint based on metrics like latency or geography).

For hybrid environments where on-premises DNS servers already exist, Azure has introduced Azure DNS Private Resolver: a service that enables mutual DNS resolution between Azure and on-premises. In practice, Private Resolver can forward queries from the VNet to on- premises DNS servers (to resolve local network names not known to Azure) and vice versa, answering queries from on-premises for Azure private zone names, all without having to manage VMs to perform this function. This component simplifies scenarios where part of the DNS infrastructure is in the cloud and part is on-premises.

Example: A company manages the public domain contoso.com directly in Azure DNS, creating A and CNAME records for public web services. At the same time, it defines a private DNS zone contoso.local in Azure for internal name resolution of servers and databases in Azure; this private zone is linked to the production and development VNets, so that VMs in those networks can resolve *.contoso.local names between each other without querying external servers. Finally, it configures Azure DNS Private Resolver to forward any DNS queries for legacy internal domains to the on-premises corporate DNS, allowing a VM in Azure to resolve, for example, hostname.corp.local, which only exists in the corporate DNS, and conversely allowing on- premises clients to resolve private Azure names like db01.contoso.local. This unifies the DNS namespace between cloud and on-premises.

 

8. Monitoring and Troubleshooting (Network Watcher)

Managing a network also means monitoring it and being able to quickly diagnose any connectivity or performance issues. Azure Network Watcher is Azure's integrated toolkit for network monitoring and troubleshooting. Once enabled in a region, it provides several useful tools for network administrators:

·      Connection Monitor: Allows you to continuously check connectivity (and measure latency and packet loss) between one endpoint and another. Endpoints can be, for example, a VM in Azure and an external URL, or two VMs on different networks. Useful for checking that an application is reachable from various company sites or that latency remains within acceptable limits.

·      Topology: Automatically generates a graphical map of a VNet's network topology, showing the relationships between subnets, NICs, NSGs, routes, and other elements. This helps visualize and understand the current configuration, such as whether an NSG is associated with a subnet or how traffic may flow between components.

·      IP Flow Verify: Allows you to test whether a given communication would be allowed or blocked, given the current configuration. By specifying a source and destination IP, port, and protocol, Network Watcher checks the NSG rules and active routes to determine whether the hypothetical packet would arrive at its destination or be filtered. Similarly, Next Hop helps you understand which destination (which next hop) a packet would be sent to based on the current routing tables (useful for diagnosing routing problems or UDR configurations).

·      Packet Capture: Allows you to capture network packets directly on an Azure VM (Linux or Windows) and save them for analysis, similar to a network sniffer. This tool is invaluable when you need to diagnose packet-level problems or analyze traffic in detail and don't have direct access to the VM to run a tcpdump or Wireshark.

·      NSG Flow Logs and Traffic Analytics: As mentioned in the NSG section, Network Watcher can record flow logs for each NSG, which are the list of connections allowed or denied by its rules. These logs, saved in JSON format to a storage account, can be analyzed manually or via Traffic Analytics —a solution that aggregates and presents flow statistics, such as traffic volumes, top source/destination addresses, most frequently used ports, and so on. This information is valuable for both network optimization (for example, identifying bottlenecks or opportunities to optimize rules) and security (detecting anomalous traffic).

Network Watcher integrates with Azure Monitor, meaning you can set alerts for certain events (e.g., if the latency measured by Connection Monitor exceeds a threshold, or if a certain flow type appears in the logs). Additionally, you can use pre-configured Workbooks —interactive dashboards—to visualize network data (e.g., an overview of connection latency, or a count of threats blocked by an NSG).

Network Watcher is recommended for use during migrations (to compare pre- and post-migration performance ), for rapid diagnosis of network incidents, and for continuous optimization of the environment.

Example: An administrator configures Connection Monitor to monitor connectivity between the Application Gateway in Azure and the backend servers residing on-premises, continuously verifying that the hybrid VPN/ExpressRoute path is operational and measuring latency and response times. NSG flow logs are enabled on the subnet 's NSG. Web and data is sent to Traffic Analytics to obtain monthly reports on the type of traffic generated by users. In case of an anomaly, the administrator can use IP Flow Verify to test whether a certain port should be reachable or not, and Packet Capture to directly analyze traffic from a problematic VM. Finally, create a dashboard ( Workbook ) showing the 95th percentile (p95) latency of connections and the rate of detected TCP errors, giving you an aggregate picture of network quality.

 

9. Architectural best practices for Azure Networking

When implementing networking solutions on Azure at scale, it's important to follow some best practices and reference architectures, both to achieve the best performance and security, and to simplify management and optimize costs. The following are the key guidelines to keep in mind:

a)    Hub-and-Spoke Architecture: For complex enterprise environments, adopt a hub-and-spoke model. Create a central hub VNet that serves as the hub for shared connectivity and security, hosting common components such as Azure Firewall, Azure Bastion, DNS services, and VPN/ExpressRoute gateways for hybrid deployments. Spoke VNets contain departmental or project-specific applications and data, connecting to the hub via VNet peering or Azure Virtual WAN. This model centralizes controls (e.g., firewall filtering) and simplifies multipoint connectivity, avoiding redundant links between all networks.

b)    Zero Trust approach to networking: Don't assume that resources within the same perimeter are inherently secure. Apply NSG on each subnet to isolate segments, use a firewall to monitor and log outbound traffic to the internet (and between critical segments), prefer private endpoints rather than exposing PaaS services on public IPs, and segment as much as possible, limiting communications to only what's necessary. Zero Trust also means continuously verifying: combining network security with application and identity security (for example, with MFA and Conditional Access for administrative access).

c)    High Availability: Design your network with resilience in mind. Distribute critical resources across at least two Availability Zones (where available) so that a failure in one zone doesn't impact the entire application. Use load balancers with health probes to redundant service instances. Implement geographic failover solutions if the application requires it (for example, with Front Door or Traffic Manager across multiple regions). Enable DDoS Protection Standard on VNets hosting exposed front ends for additional protection against attacks that could compromise service availability.

d)    Governance and Compliance: Establish naming and tagging conventions for network resources from the outset (e.g., prefixes to indicate environment/project, etc.), which helps with cost management and reporting. Use Azure Policy to enforce corporate rules (e.g., prevent the creation of resources with unapproved public IPs, ensure each VNet has associated NSGs, mandate resource tagging, etc.). Leverage tools like Azure Blueprint or Microsoft's landing zones to deploy environments that comply with pre-established and repeatable standards.

e)    Observability: Don't neglect monitoring. Enable Network Watcher (or the newer Azure Monitor Network Insights) in all regions used, configure logs and diagnostics for network components (NSG flow logs, Application Gateway diagnostic logs, VPN Gateway metrics, etc.), and establish proactive alerts. Prepare dashboards that aggregate key network and security information, and regularly review the data (for example, check the most frequent blocked flows to determine if any configuration needs optimization).

f)      Cost optimization: Network design can impact cloud costs. Choose the right service for the right scenario: for example, an Azure Load Balancer costs less than an Application Gateway, so if you only need L4 balancing per VM, avoid using an expensive L7 gateway. Avoid unnecessary data transfers: egress traffic (leaving Azure) costs money, so minimize calls from Azure to the outside world if possible, and leverage caching or internal services (for example, a database in the same region avoids egress costs). If you use a lot of bandwidth on ExpressRoute or consume a lot of public IPs, consider options like ExpressRoute Unlimited ( flat rate ) or the use of reserved public IP SKUs, which are more cost-effective for high volumes. Periodically review unused network resources (unassigned IPs, gateways not in use) to avoid unnecessary costs.

By following these principles, you can build networking environments on Azure that are secure, highly available, manageable, and aligned with your business needs. For further insights into Azure networking reference architectures and up-to-date best practices, we recommend consulting the Azure Architecture Center and the official Azure Networking documentation.

 

10. Azure Networking Services Summary Table

Below is a table summarizing the main Azure Networking services and components covered, with a summary of their key features:

Service/Component

Key Features

Azure Virtual Network (VNet)

Isolated private network in the Azure cloud; define custom IP address space (CIDR) and subnetting ; supports peering between VNets and hybrid connections (VPN, ExpressRoute) to extend the on- prem network ; control routing with UDR and integration with NSG for security

Subnet (in VNet)

Logical segmentation of a VNet; traffic isolation between tiers (e.g., web/app/ db ); application of specific NSGs for access control; support for Service Endpoints and Private Endpoints for private access to PaaS services; possibility of custom routes (UDR) and delegation to Azure services; IP address planning for future growth

Network Security Group (NSG)

Network-level (L3/L4) security filtering; define allow / deny rules on ports and protocols to/from subnets or NICs; prioritize rules with defaults that block unwanted traffic (e.g., all inbound from the Internet denied by default); use of Service Tags and Application Security Groups to simplify rule management; monitorable via NSG Flow Logs with Network Watcher.

VPN Gateway

VPN gateway to connect Azure VNet with on-premises networks via IPsec /IKE tunnels; supports site-to-site (VPN between network appliances) and point-to-site (individual client VPN) connections; different SKUs available based on throughput and features (e.g., BGP, zonal redundancy); allows you to securely extend your corporate network to the cloud over the Internet.

Azure ExpressRoute

Dedicated private connection between the corporate network and Azure (does not transit the Internet); offers high bandwidth and low latency for mission- critical scenarios ; requires provisioning through partner providers; can

 

Conclusions

We've seen how networking in Azure is the foundation for building secure, scalable cloud environments that integrate with existing infrastructure. Virtual Networks (VNets) offer isolation and control, allowing you to define private IP spaces and securely connect resources, while peering and hybrid connectivity extend the cloud to corporate networks. Subnet segmentation is essential for organizing workloads and applying granular policies, leveraging features like Private Endpoint to protect PaaS services. Security is strengthened by Network Security Groups (NSGs), which filter traffic with flexible rules, and advanced tools like Azure Firewall, DDoS Protection, and Defender for Cloud, which implement a Zero Trust approach. To ensure availability and resilience, Azure provides multi-layered load balancing solutions: Load Balancer for L4 traffic, Application Gateway with WAF for web protection, and Front Door for global distribution. Name management through Azure DNS simplifies resolution for both public and private domains, integrating with hybrid scenarios thanks to Private Resolver. Continuous monitoring with Network Watcher and NSG flow analysis allow you to diagnose issues and optimize performance. Architectural best practices, such as the hub-and-spoke model, governance policy adoption, and proactive observability, ensure compliant and manageable environments. Finally, carefully selecting services and connectivity options allows you to balance security, performance, and costs. In short, Azure Networking is not just a set of technical components, but an integrated ecosystem that enables modern, secure, and resilient architectures, essential for supporting mission- critical applications and enterprise cloud strategies.

 

Chapter Summary

This document provides a detailed overview of key networking services and concepts in Azure, explaining how to design, manage, and secure virtual networks in the cloud with architectural best practices and monitoring tools.

·      Virtual Networks (VNets): VNets are isolated private networks in the Azure cloud that define custom IP spaces and subnets ; they support peering, hybrid connectivity with on-premises networks via VPN Gateway or ExpressRoute, routing control, and security via Network Security Groups (NSGs).

·      Subnets and Segmentation: Subnets divide a VNet into logical segments to organize workloads and enforce specific security policies, support delegation to Azure services, and private links to PaaS services via Private Endpoint.

·      Network Security Groups (NSG): NSGs filter traffic at the network level with allow / deny rules based on addresses, ports, and protocols; they bind to subnets or network interfaces, support Service Tag and Application Security Group for easier management, and are monitored via NSG flow logs.

·      Hybrid Connectivity: Securely connect Azure to on-premises networks with VPN Gateway, which creates IPsec /IKE tunnels over the internet, and ExpressRoute, a dedicated, high-speed, low-latency private link; they can be used together for redundancy and integration via BGP.

·      Load balancing: Azure offers Load Balancer (Layer 4) for simple TCP/UDP traffic, Application Gateway (Layer 7) with URL-based routing and Web Application Firewall, and Front Door for global load balancing, geographic failover, and application acceleration.

·      Advanced security: Azure Firewall manages centralized, stateful rules at the network and application levels; DDoS Protection Standard mitigates volumetric attacks by protecting public resources; Microsoft Defender for Cloud monitors security posture by integrating network controls and recommending best practices.

·      Name management with Azure DNS: Azure DNS manages highly available public and private DNS zones; Private DNS Zones allow internal resolution; Azure DNS Private Resolver enables mutual DNS resolution between Azure and on-premises without dedicated servers.

·      Monitoring and troubleshooting: Azure Network Watcher provides tools to monitor connectivity, visualize topologies, verify traffic flows, capture packets, and analyze NSG logs, integrating with Azure Monitor for alerts and interactive dashboards.

·      Architectural best practices: We recommend the hub-and-spoke model to centralize security and connectivity, adopt a Zero Trust approach with rigorous segmentation and controls, ensure high availability with multi-zone deployment and failover, enforce governance through consistent policies and naming, continuously monitor, and optimize costs by choosing appropriate services.

 

CHAPTER 6 – The database service

 

Introduction

In this chapter, we'll focus on the database services offered by Azure, clearly and educationally analyzing the fundamental concepts that enable you to design and manage modern cloud solutions. Databases are the heart of every application, and their correct implementation is essential to ensure performance, security, and reliability. Azure offers a full range of services that cover a variety of needs, from traditional relational databases to NoSQL systems, from data warehouses for advanced analytics to in-memory solutions for distributed caching. Understanding the differences between these options is the first step in choosing the technology best suited to your scenario. Relational databases such as Azure SQL Database and Azure Database for MySQL or PostgreSQL offer compatibility with classic database engines, automated management, and high availability, while Cosmos DB is the ideal solution for distributed and scalable data, supporting multiple APIs and configurable consistency models. For large-scale analytics, Azure Synapse Analytics allows you to create powerful data warehouses integrated with business intelligence tools, while Azure Cache for Redis accelerates applications by reducing latency with in-memory caching. Designing a database in Azure requires careful attention to architecture: PaaS services eliminate the complexity of hardware and patch management, offering features such as automatic replication, load balancing, and non-disruptive updates. Security is crucial, and Azure implements data encryption at rest and in transit, authentication via Azure Active Directory, a firewall to limit access, and a Private Endpoint to prevent internet exposure. Furthermore, tools such as Defender for SQL and Cosmos DB detect threats and anomalies, while role-based policies ensure each user has only the necessary permissions. Backup is another key element: Azure SQL Database offers automatic backups with configurable retention and the ability to restore to a specific point in time, while geo-recovery options ensure business continuity even in the event of a disaster. Scalability is one of the key advantages of the cloud: Azure SQL Database supports resource models based on DTU or vCore, while Cosmos DB allows horizontal scaling with configurable throughput. Features like automatic indexing and data partitioning improve performance, and autoscaling allows you to optimize costs and performance based on actual load. To maintain efficiency, Azure offers monitoring tools like Azure Monitor, Log Analytics, and Query Performance Insight, which allow you to analyze metrics, identify slow queries, and set proactive alerts. Integration with other services is a strength: Azure databases easily connect to Azure Functions for serverless processing, Data Factory for ETL pipelines, Synapse for advanced analytics, and Power BI for data visualization, creating comprehensive ecosystems from ingestion to transformation and analysis. Use cases are diverse: in e-commerce, Azure SQL Database manages catalogs and orders while Redis accelerates responses; in healthcare, Cosmos DB securely stores sensitive data with Private Endpoint; in IoT, Cosmos DB collects data from devices and Data Explorer analyzes it in real time; for business intelligence, Synapse and Power BI offer strategic insights. To design effective solutions, it's important to follow best practices such as using strong encryption and authentication, implementing backup and geo-recovery, constantly monitoring performance, and choosing the most suitable service for the type of data and expected load. Governance is equally important: Azure Policy allows you to enforce business rules and ensure compliance, while tools like Defender for Cloud's Secure Score help assess your overall security posture. In short, Azure database services offer a comprehensive and flexible platform that allows you to manage data securely, scalably, and in an integrated manner, meeting the needs of mission- critical applications and innovative scenarios. Understanding the key concepts and leveraging the capabilities offered by Azure is essential for building modern, resilient, and best-practice-oriented architectures, thus ensuring the value and reliability of cloud solutions.

 

Outline of chapter topics with illustrated slides

 

Immagine che contiene testo, schermata, Pagina Web, software

Il contenuto generato dall'IA potrebbe non essere corretto.In the Azure cloud, you can choose between relational and non-relational databases, also known as NoSQL. Relational databases, such as Azure SQL Database, MySQL, and PostgreSQL, use structured schemas and the SQL language to ensure ACID properties, constraints, and table relationships. They are ideal for financial transactions, ERP, CRM, and reliable reporting. NoSQL databases, such as Azure Cosmos DB, are designed for low latency, horizontal scalability, and flexible schemas. They support various models, such as document, key- value, graph, and wide- column, and offer APIs compatible with Core (SQL), MongoDB, Cassandra, and Gremlin. The choice depends on the structure of your data: use SQL when you need strong constraints and complex transactions; choose NoSQL for high throughput, global distribution, and schema agility. Modern architectures often integrate both: the transactional core on SQL and customization, telemetry, or session capabilities on NoSQL. For example, in an e-commerce environment, orders and payments are hosted on SQL Database, while carts and user profiles are hosted on Cosmos DB, to achieve minimal latency and multi-area distribution. In IoT contexts, the large volume of events can be managed on Cosmos DB, while daily aggregates are exported to SQL for traditional analysis. Remember: ACID guarantees robust transactions, while the horizontal scalability of NoSQL allows the load to be distributed across multiple nodes. Consult the comparison table to choose the model best suited to your scenario.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Data models profoundly influence database design and performance. In the relational model, data is organized into tables linked by keys and constraints, ideal for consistency and complex queries like joins and aggregations. In the document model, such as Cosmos DB API Core (SQL) or MongoDB, data is represented as nested JSON objects, useful for domains with variable structure and rapid development. The graph model, such as Cosmos DB API Gremlin, focuses on relationships between entities, ideal for social networks, recommendation systems, and fraud detection. Choose the relational model if you need rigid relationships and multi-row transactions, the document model if you need flexible schemas and fewer relationships, and the graph model when relationships are the focus and efficient traversal is needed. For example, for order management you can use the relational model for orders and customers, the document model for product catalogs with variable descriptions, and the graph model for links between products and recommendations. The JSON document is indexed by default in Cosmos DB, while traversal allows for efficient paths in graph databases. See the diagrams to see the differences between the models.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.In Azure data services, the minimum architecture includes an instance or managed server, such as an Azure SQL logical server or Cosmos DB account, one or more databases or containers, and network integration via Private Endpoints, IP firewalls, and a VNet. In PaaS databases such as SQL, MySQL, and PostgreSQL, you select the level of compute, memory, storage, and redundancy; the service manages patching, availability, and backups. In Cosmos DB, you define the account, database, and container, choose the partition and throughput, with automatic replication across regions. The design should include network isolation, identity management with Microsoft Login ID and RBAC, monitoring with Azure Monitor and Insights, and recovery strategies. For example, you can create a SQL logical server, a specific database, and connect it to your VNet via Private Endpoints, blocking the firewall from internet access. In Cosmos DB, you choose the partition key and throughput needed, distributing data across regions. See the diagram highlighting the security components and access flows.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure SQL Database is a PaaS service that offers high availability, patching, and managed backups. When creating a database, you can define the number of vCores, service tier, storage, and zone options. User and permission management is done via T-SQL or Microsoft Login ID. T-SQL queries work just like in SQL Server, and you can use views, stored procedures, columnstore indexes, and Intelligent Query Processing. For isolation and consistent performance, consider serverless or Hyperscale options, which separates storage and compute logic and allows you to scale beyond 100 TB. You can create read-only users, define Elastic Jobs for recurring operations, and use Failover groups for disaster recovery across multiple regions. The vCore represents the allocated unit of compute, while Hyperscale allows for advanced management between compute and storage. View the T-SQL editor screenshot and tier diagram with workload examples.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Cosmos DB is a distributed, multi-model database designed to offer single-digit millisecond latency and global replication. You can choose from various APIs, such as Core (SQL), MongoDB, Cassandra, and Gremlin, depending on your application needs. Capacity is measured in Request Units per second, which can be provisioned to ensure consistent throughput, or serverless, paying only for what you use. Data consistency can be configured according to different models: Strong, Bounded, or Staleness, Session, Consistent Prefix and Eventual. For example, Session consistency is the default choice for many applications. Partition key design is critical to distribute load and avoid hot partitions. You can replicate data across multiple regions, automatically adjust RUs using Autoscale, and manage consistency as needed. View the consistency vs. latency graph and the multi- region replication scheme.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Database security follows the defense-in- depth principle. Encryption at rest is managed using Transparent Data Encryption for SQL and encryption for Cosmos DB, with the option to use customer-managed keys in Azure Key Vault. Encryption in transit is ensured by mandatory TLS. Integration with Microsoft Entra ID enables role-based access control and modern authentication. In SQL, you can enable AAD Admin and database roles, while in Cosmos DB, role-based access control and tokens are used. Microsoft Defender for SQL detects vulnerabilities and threats, while Defender for Cloud provides recommendations for improving security. The network can be isolated with Private Endpoints, IP firewalls, and Service Endpoints, allowing only authorized subnets and segregating development, test, and production environments. Practical examples include CMKs in Key Vault with annual rotation, Conditional Access for administrative queries, and Just-In-Time on VMs. See the Azure security and Defender for Cloud documentation for more information. View the defense-in- depth diagram showing identity, network, encryption, monitoring, and advanced protection layers.

 

Immagine che contiene testo, schermata, Carattere, software

Il contenuto generato dall'IA potrebbe non essere corretto.Backups in Azure PaaS services are automated: for SQL Database, you can perform point-in-time restore to a specific point in time, use long- term retention on storage for years, and configure active geo-replication or auto- failover groups for disaster recovery. In Cosmos DB, you can enable continuous backup or periodic backups with defined retention, and restore at the item or partition level. It's important to establish recovery point objectives (RPO) and recovery time objectives (RTO), regularly test recovery processes, and document backup retention for compliance. Practical examples include a 7-year LTR for the finance-db database, PITR on application incidents, and cross-region failover groups with a global listener. In Cosmos DB, continuous backup enables item- level restore for specific containers. See the timeline and geo-replication map to understand backup and failover processes.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.SQL Database can scale vertically, increasing the number of vCores and memory, or serverless, with automatic scaling useful for intermittent loads. Hyperscale allows for the separation of compute and storage to handle volumes exceeding 100 TB, with page replication and secondary readers. Cosmos DB scales horizontally, leveraging partitions and RU/s, with Autoscale adjusting throughput to the load. Performance monitoring is done through Azure Monitor and Insights, which provide metrics on DTU usage, vCores, and wait times. stats, RU consumption, latency, and error rates. You can optimize costs with compute reservations and tuning of indexes, caching, and access patterns. Practical examples include Query Store for performance analysis, alerts on CPU and RU thresholds, and workbooks with latency percentiles. View the dashboard with graphs of RU/s, vCore usage, latency p95 and the tuning checklist.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure databases integrate seamlessly with other platform services. Power BI connects via connectors to SQL and Cosmos DB to create interactive reports and dashboards. Azure Functions reacts to table or change events, such as timers, HTTP, Queue, or Change Feed, to implement serverless logic and automation. Logic Apps orchestrates workflows with connectors to Office 365, SharePoint, Teams, and ERP, transforming data, sending notifications, and updating records. For advanced pipelines, use Synapse Pipelines and Data Factory for ETL/ELT processes, or Event Grid with Cosmos DB's Change Feed for event- driven architectures. A practical example: Change Feed on orders in Cosmos triggers a Function that validates and saves to SQL, while the Logic App notifies the team and updates the CRM, and Power BI displays KPIs. View the event- driven diagram showing the integration between these services.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Web applications combine Azure SQL Database for transactions and Cosmos DB for distributed data, with security via Private Endpoint and monitoring with Application Insights. For data analytics, Synapse and Data Lake handle ingestion and transformation, while SQL provides curated tables for BI and compliance. In IoT and Big Data, telemetry flows from IoT Hubs/Event Hubs to Cosmos DB for operational queries and to Data Lake for historical storage. These patterns integrate PaaS and NoSQL services to balance consistency, speed, and scalability. The key is to define latency, consistency, cost, and governance requirements, applying security, backup, and monitoring to each component.

 

1. Database Types – Relational SQL vs. NoSQL

In the Azure world, there are two broad categories of databases: relational (SQL) and non-relational (NoSQL). Understanding the differences between these types is essential for choosing the best solution for a given scenario. In general:

·      Relational databases (SQL): They organize data into tables with predefined schemas and support SQL for queries. They offer ACID (Atomicity, Consistency, Isolation, Durability) properties that ensure reliable and consistent transactions. Examples in Azure include Azure SQL Database, Azure Database for MySQL, and Azure Database for PostgreSQL. Relational databases are ideal when the data has a defined structure, there are strong integrity constraints, relationships between entities, and the need to join data from multiple tables (JOIN) while maintaining absolute consistency—for example, in financial systems, ERP, CRM, or reporting applications where it is crucial not to lose any transactions.

·      Non-relational databases (NoSQL): These store data with flexible or schema- less schemas and prioritize performance and scalability. In Azure, the main example is Azure Cosmos DB, a multi-model NoSQL service that can handle data such as JSON documents, key-value pairs, graphs, or wide columns. NoSQL databases are designed for low latency and horizontal scalability, meaning the ability to grow by adding nodes/servers instead of upgrading a single node. They partially forgo strict ACID guarantees in favor of greater availability and flexibility (often following the " eventual-recovery " principle). consistency, where data propagates gradually) and support various access APIs (in Cosmos DB for example: SQL-like, MongoDB, Cassandra, Gremlin for graphs). They are suitable when the data has a variable or evolving structure, when it is necessary to manage large volumes of globally distributed data at high velocity, for example for high-traffic web applications, big data, IoT, user- generated content, or personalized experiences on a global scale.

Key Differences Between SQL and NoSQL – The following table summarizes some key differences:

Characteristic

SQL Database (Relational)

NoSQL Databases

Data schema

Fixed and predefined (tables with typed columns). Changing the schema requires migrations.

Flexible or non-flexible (JSON documents, key- values, etc.). Each element can have different fields; easy to add new attributes.

Query language

Standard SQL, great for complex joins and multi-entity transactional queries.

No unified SQL standard. Queries via specific APIs (e.g., SQL-like document queries, MongoDB /Cassandra interfaces, graph languages).

Transactions

ACID complete – strong consistency, every transaction maintains data integrity.

Generally eventual Consistency (eventual consistency) for performance. They support smaller or batch transactions; priority is given to availability and partitioning.

Scalability

Scale-up: Increase resources on the same server. Partitioning is possible but complex; replication for reads.

Horizontal (scale-out): Native partitioning across multiple nodes. Designed to transparently distribute data and load at global scale.

Latency and performance

Typically higher latency on large volumes (must maintain strong consistency). Complex queries optimized by indexes, but can be expensive.

Very low latency even at high volumes (single-digit milliseconds in Cosmos DB) thanks to simplified distribution and models. Excellent throughput with commodity hardware.

Typical use cases

Financial systems, management systems, line-of-business applications, where structured data and consistency are critical (e.g. orders, invoices, accounting).

Scalable web applications, user personalization, IoT, semi-structured data analytics, social networks, systems with heterogeneous or rapidly changing data.

 

As a general rule, choose a relational database when your data has a well-defined schema, complex relationships, and you require integrity constraints and consistent transactions; choose a NoSQL database when you need high speed, the ability to manage heterogeneous or unstructured data at scale, flexible schema requirements, and widely distributed geographic replication. Modern architectures often combine the two: for example, an e-commerce application might store orders, payments, and product catalogs in a SQL database to ensure consistency and reliability, while using a NoSQL database like Cosmos DB to manage user sessions or shopping carts with low latency and global replication.

Practical example: In an e-commerce site, orders and financial transactions reside in a rigid-schema Azure SQL Database, ensuring that each order is counted once and only once; meanwhile, user preferences, shopping carts, and sessions can be stored in Cosmos DB (NoSQL) for rapid access and data distribution close to customers around the world.

 

2. Data Models – Relational, Document, and Graph

A data model describes how data is logically organized in a database. Azure supports various models in its database services, including relational, document, and graph models. The choice of model affects application design, query performance, and analytics capabilities. Let's look at the three main data models and the scenarios in which they are used:

·      Relational model: In this model, data is organized into tables made up of rows and columns, and the tables can be linked together via primary and foreign keys. Relationships and constraints ( unique keys, referentials) integrity, etc.) ensure consistency between entities. The relational model is effective for representing structured data with clear links – for example, customer, order, and product records – where complex queries are performed that correlate information from multiple tables (JOIN) and multi-entity transactions are applied. Azure SQL Database and MySQL/ PostgreSQL databases on Azure use this model. Advantages: strong consistency, ease of performing complex queries (aggregations, multiple joins), automatic referential integrity. Disadvantages: schema rigidity (less suitable if the data format changes frequently) and non-immediate horizontal scalability (usually requiring manual sharding ).
Example: a relational database for a school management system may have tables for Students, Courses, and Enrollments, ensuring via foreign keys that each enrollment links a valid student to an existing course. Typical queries might ask: “list students enrolled in course X” by joining the Students and Enrollments tables.

·      Document model: Suitable for semi-structured or heterogeneous data, this model stores information in document format, typically JSON. Each document is a self-describing object that can contain nested fields and arrays. There is no strict requirement for uniformity between documents: for example, two documents in the same collection can have different fields. Document databases allow you to model complex entities as single objects (e.g., an "Order" document contains a list of items, customer details, address, etc.). Azure Cosmos DB (with Core SQL API, or MongoDB API ) falls into this category. Queries can be executed with SQL-like syntax (in the case of Cosmos DB Core) or with custom search methods (in the case of MongoDB ). Advantages: great schema flexibility, easy mapping of application objects directly to documents, excellent performance when reading/writing an entire document, transparent horizontal scalability. Disadvantages: Less efficient for highly relational queries (e.g., aggregations involving multiple document types), data duplication (the same data may be found in multiple documents rather than normalized in a relation), optional default consistency (in Cosmos DB, the default session-level consistency balances correctness and performance).
Example: An e-commerce product catalog in Cosmos DB could have a JSON document for each product with different fields for different categories (e.g., a book has author and ISBN, a phone has processor and memory). Each document is independent and can be quickly retrieved to display the product sheet.

·      Graph model: Focuses on explicit relationships between data. Graph databases store entities as nodes and relationships as edges ; each node and edge can have properties. This model excels when the query involves the connections between elements rather than the properties of the elements themselves. In Azure, Cosmos DB offers a graph API called Gremlin, which allows you to create distributed graphs. Advantages: It allows you to perform very efficient graph traversal operations, for example, discovering multiple second- or third-degree connections; it is ideal for problems such as suggesting friends in a social network, finding optimal paths, and detecting complex relationship patterns (e.g., in a financial fraud network). Disadvantages: It is not suitable for large-scale transactions on unconnected data, and graph queries are often expressed not in SQL but in specific languages (Gremlin in our case) that have a learning curve.
For example, in the social network context, we can model users as nodes and “friendships” or “likes” as edges between nodes. A typical graph query is: “find the shortest knowledge path connecting User A to User B” – an operation that a relational database would struggle to perform quickly, but a graph database can solve by exploring the neighbors of the nodes.

Summary: The choice of data model depends on the application's needs. If complex transactions and consistency are required: the relational model. If flexibility and rapid development with hierarchical or variable data is required: the document model. If link and network analysis is required: the graph model. In Azure Cosmos DB, in particular, you can leverage both document and graph models (as well as key- value and wide columns) using the appropriate API, making it a very flexible service for a variety of needs.

 

3. Database Services Architecture in Azure

The architecture of a database service in Azure defines how the service is structured, isolated, and connected within the cloud. In Azure Database-as-a-Service (PaaS), the typical architecture consists of:

·      Managed Logical Server or Instance – A container that hosts one or more databases. For example, Azure SQL Database is called Azure SQL Logical Server, Azure Database for MySQL/ PostgreSQL is called Flexible Server, and Cosmos DB is called Account. These instances are managed by Azure: the user does not see the underlying operating system but can configure some options (computing power, replication, etc.).

·      Database – Within the logical server or account, one or more databases (in the case of Cosmos DB, these are called databases and contain containers or collections depending on the API) that contain the actual data organized according to a model (relational, document, etc.). For example, we might have a logical server called sql-prod-euw with a database called salesdb inside it, or a Cosmos DB account called cosmos -retail with a profiles database that contains a users container.

·      Networking and security – Each database service can (and should) be integrated with the customer's Azure network: for example, via Azure Virtual Network (VNet) and Private Endpoints to make it accessible only from certain private subnets, or via IP firewalls to limit access from the Internet. The architecture also includes integration with identity systems (Microsoft Login ID, formerly Azure AD) for authentication and authorization to database resources.

In terms of resource provisioning, when creating an Azure database service you need to specify capacities and configurations that will affect performance and cost:

·      For PaaS relational databases (Azure SQL, MySQL, PostgreSQL ), you choose the size in terms of vCore (CPU/Virtual Memory Units) or in the old DTU model, the service level ( General Purpose, Business Critical, Hyperscale for Azure SQL), the amount of storage and its redundancy. For example, Azure SQL Database in tier Business Critical offers local SSD storage and multiple synchronous replication for high resiliency, while in tier Hyperscale separates the compute and storage layers to support massive databases (over 100 TB). Azure SQL also offers a serverless option, where the database automatically scales based on load and is suitable for intermittent loads, with usage-based billing.

·      For Azure Cosmos DB (NoSQL), the focus is on throughput and partitioning: when creating a container on Cosmos, you define a partition key (e.g., / tenantId to separate data by customer, as in the users container example ) and the throughput in terms of Request Units per second (RU/s). Throughput can be dedicated ( provisioned ) —for example, guaranteeing 10,000 RU/s constantly—or serverless ( autoscale), where you only pay for the RUs you consume or have a dynamic range (e.g., 400-4,000 RU/s as minimum and maximum) that the system automatically adjusts based on load. The Cosmos DB architecture is natively distributed and multi- region: a single account can replicate data across multiple Azure data centers around the world with just a few clicks, maintaining the consistency of your choice (see Chapter 5) and offering high availability and low local latency.

Another key architectural aspect is network isolation and configuration: for production environments, it is common practice to include the database in a VNet through Private Endpoint (a private network interface with an IP in the VNet that maps to the database service), disabling public internet access (firewall set to “No external services”). This ensures that only authorized applications and services in the corporate network can communicate with the database, drastically reducing the attack surface. Additionally, at the identity level, Azure allows you to use Azure Login ID (AD) to authenticate users and services instead of managing only traditional SQL users: for example, you can appoint an Azure AD Admin for a SQL PaaS server and assign database roles to AD groups, or use RBAC roles in Cosmos DB to grant read/write-only access to certain collections.

Finally, on the architectural level, remember that since Azure is a PaaS service, it automatically handles many management tasks such as applying security patches to the database engine, updates, high availability monitoring (for example, Azure SQL Database guarantees a 99.99% availability SLA by replicating data across multiple nodes in the same data center), and backup management (discussed in Chapter 5). This allows the architect and administrator to focus more on data modeling and query optimization, delegating the maintenance of the underlying infrastructure to Azure.

Architectural diagram (visual description): Imagine a three-layered drawing: at the top is the Database Server/Account (e.g., a database symbol representing the logical instance), below it one or more Databases/Containers like boxes inside the server, and in the background a cloud representing the Azure Network with a padlock (symbolizing security mechanisms such as VNets and firewalls). The arrows indicate that the client application (outside the cloud) can only access the database via the network and secure access points (controlled private or public endpoints). This illustrates how each database call goes through network checks and authentication before reaching the instance and finally the specific database.

 

4. Security in Azure Databases

Security is a fundamental aspect of data management. Azure takes a defense-in-depth approach to protect databases at multiple levels. In this chapter, we'll cover the key security measures applicable to Azure databases, including data encryption, access and identity control, network security, and advanced protection and threat monitoring tools.

·      Data encryption: In Azure, data is encrypted at rest, meaning when it's stored on disk, using built-in technologies. Transparent Data Encryption (TDE) is enabled by default for SQL Azure databases, which encrypts database and log files on storage, preventing unauthorized access to data at rest. Cosmos DB also automatically encrypts stored data. Users can optionally manage their own encryption keys ( customer- managed keys ) via Azure Key Vault, instead of using platform-managed keys, for additional control (such as periodic key rotation or immediate revocation if necessary). In addition to encryption at rest, all Azure database services require encryption in transit, meaning communication between client and server occurs via HTTPS/TLS with certificates so that data is protected while traveling over the network. TLS 1.2 is generally mandatory, and a minimum version can be imposed.

·      Identity and access control: Azure allows you to centrally manage database access via Microsoft Access ID (Azure AD). For example, for Azure SQL Database, you can set up an Azure AD administrator and then create database accounts mapped to Azure AD identities, assigning them predefined roles (read, write, admin). This facilitates the use of corporate credentials and the enabling of multi - factor and conditional access authentication at the AD level to access data. Similarly, Cosmos DB has a role-based access control (RBAC) model that allows you to define granular roles and permissions on resources (databases, containers, etc.) and use access tokens tied to Azure AD identities. Naturally, traditional authentication schemes are also available: for example, SQL Database also allows SQL accounts with usernames and passwords (but using AD is considered more secure and recommended because it avoids static credentials in the code). Identity management also includes least-privilege access: each account should have only the necessary permissions (the principle of least privilege). privilege ).

·      Network security: As mentioned in the architecture, the network is the primary defense perimeter. Service-level firewalls allow you to allow or block connections based on the IP address of the source. Even more effective, Azure Private Endpoints completely eliminate public exposure: the database is only accessible to hosts in the VNet that have the endpoint configured. Furthermore, with VNet isolation, you can segregate different environments (development, test, production) on different networks and control data flows between them. For PaaS services, Azure also ensures the separation of management traffic on internal networks and encourages the use of Service Endpoints or Private Endpoints for application traffic. The network is also the place to apply other measures, such as a WAF (Web Application Firewall) if the database is behind a web service, and the use of VPNs or Azure ExpressRoute to securely connect the cloud to the corporate network.

·      Monitoring and advanced protection: Azure provides specific tools to monitor and strengthen database security. For example, Microsoft Defender for SQL (part of Defender for Cloud) can be enabled on both Azure SQL Database PaaS and SQL Server virtual machines. It performs vulnerability assessments (e.g., identifying weak configurations, out-of-date software, excessive permissions) and monitors anomalous activity, flagging potential threats (e.g., SQL injection attempts, suspicious logins). Defender for Cloud also extends security recommendations to Azure Cosmos DB and other services, helping improve the environment's secure score. Furthermore, activity logging (e.g., Azure SQL Auditing to track executed queries and logins) and the use of centralized log analysis services (such as Azure Monitor and Log Analytics ) provide visibility into who is accessing data and when, allowing for early detection of non-compliant behavior.

Azure therefore adopts a layered security model: encrypted data, well-managed identities and permissions, an isolated network, continuous monitoring, and active protection with intelligent tools. A useful analogy is to think of database security as a medieval fortification: there isn't a single wall protecting the castle, but multiple concentric rings of walls and guards (checkpoints) at each gate. Thus, even if one layer is breached (e.g., credentials are leaked), others mitigate the risk (e.g., that user ID has no access from outside the network, or suspicious actions are immediately alerted by Defender).

Practical example: A company sets up its finance-db database on Azure SQL. It activates TDE with keys managed via Key Vault (and decides to rotate them annually). It sets up an Azure AD group that includes only the company's DBAs as administrators and requires MFA for anyone attempting to connect as an admin. Using a firewall and private endpoint, it ensures that the database is accessible only from application VMs on the production network and its office IPs for maintenance, blocking everything else. It also enables Microsoft Defender for SQL to receive alerts in the event of anomalous queries or exploit attempts, and periodically reviews security recommendations (for example, enabling mandatory TLS 1.2 if it isn't already). With all these measures, sensitive financial data has multiple layers of protection.

 

5. Backup and Restore (Disaster Recovery)

Even with all the security measures in place, it's essential to prepare for unforeseen situations such as application errors, accidental data deletion, or catastrophic failures. This is where backups ( data safety copies) and recovery strategies come into play. Azure greatly simplifies these aspects in PaaS database services, offering automated backups, point-in-time restore ( PITR) capabilities, and geo-replication options for disaster recovery.

·      Automatic backups and PITR: For Azure SQL Database, for example, the platform automatically performs weekly full backups, daily differential backups, and frequent log backups, retaining them for a standard period (typically 7–35 days depending on settings and service tier ). This allows for point-in-time recovery, meaning the database can be restored to its current state at a specific point in time (e.g., "restore the database as it was at 10:00 AM 3 days ago"). This feature is extremely useful if we discover bugs or errors that have corrupted the data: we can go back in time before the error occurred. Automatic backups are managed by Azure without interrupting database operations and are stored on redundant storage. Similarly, in Cosmos DB, you can enable continuous backup (where the service tracks all changes and enables PITR within a defined period) or periodic backups with configurable retention.

·      Long-Term Retention (LTR): In some cases, such as regulatory requirements or audits, you need to retain backups for years. Azure SQL Database offers Long- Term Retention (LTR), which allows you to retain weekly backup copies on archive storage for 1, 5, or up to 10 years, defining granular policies. Thus, if you need to review data from year-end 2025 in five years, you can restore the archived backup from that period. However, it's important to plan for the required storage and costs for these long-term backups.

·      Geographic replication and failover: Backup helps with one-off failures, but for business continuity in the event of a major disaster (for example, an entire Azure region going down), it's a good idea to have a disaster recovery configuration. Azure SQL Database offers Active Geo-Replication and Failover Groups: you can have up to 4 read-only copies of the database in other Azure regions, updated asynchronously. In the event of a disaster, the application can failover to one of these secondary copies, minimizing downtime. Failover Groups also allow you to have a single connection endpoint that automatically redirects to the primary active replica, simplifying failover logic in the application. In the case of Cosmos DB, multi- region distribution is already integrated into the service: if we replicate data to, for example, West EU and East US, in the event of problems in West EU we can read and write to data in East US (depending on the consistency level chosen, the service guarantees that there are no conflicts). Cosmos DB also supports manual Failover between regions with a few clicks or via SDK.

·      RPO and RTO: When defining your backup and DR strategy, two key parameters must be established: the Recovery Point Objective (RPO), which is the maximum amount of data we can afford to lose (e.g., an RPO of 5 minutes means we accept losing a maximum of 5 minutes of transactions in the event of an incident, so backups/log shipping must occur at least every 5 minutes); and the Recovery Time Objective (RTO), which is the maximum amount of time the service can remain unusable before recovery (e.g., an RTO of 1 hour means we must be back online within an hour of the event, perhaps in a secondary region). Azure, with its features, helps achieve very low RPOs and RTOs if the solution is well configured: for example, with an active failover group, an RPO of a few seconds (depending on the georeplicated replication latency ) and an RTO of a few minutes (the time it takes to switch references). For a simple point-in-time recovery, RPO can also be minutes (frequent log backups) and RTO depends on the database size and restore speed ( from a few minutes to a few hours for very large DBs).

Best practices: It's essential to periodically test recovery plans. Having backups is useless if you can't quickly restore them when needed. Therefore, simulating a scenario where you restore the database from backups (perhaps on a test instance) or perform a controlled failover to a secondary site is an integral part of preparation, along with ensuring backups are performed regularly. Furthermore, protecting the backups themselves—for example, by limiting access to backup storage, encrypting them (Azure already encrypts them at rest ), and controlling the identities that can initiate a restore —is part of overall security.

Practical example: A mission- critical application on Azure SQL Database maintains active backups with a 14-day PITR. A bug in the code accidentally deleted some data last night at 11:00 PM; having discovered the problem, technicians performed a Point-In-Time Restore of the database to its state at 10:55 PM, recovering the lost data (the last 5 minutes of transactions were manually re-inserted from the application logs). Furthermore, for resilience, the database was configured in a Failover Group with a copy in another data center: during a DR test, IT simulated the failure of the primary region and verified that the application could connect to the secondary replica within a few minutes of service disruption. In Cosmos DB, for an IoT application, Continuous Backup was enabled and an attempt was made to restore a single item (document) accidentally deleted by a developer, leveraging the item-level point-in-time restore feature – the operation was successfully completed in a matter of seconds.

 

6. Scalability and Performance Monitoring

An application's needs can change dramatically over time: a database may need to handle a growing number of users, ever-increasing data volumes, or highly variable loads throughout the day. Scalability refers to a system's ability to grow in power as load increases while maintaining acceptable performance. Azure database services offer various scalability options, along with monitoring tools to observe and optimize performance.

a) Vertical vs. Horizontal Scalability:

·      Vertical scaling (scale-up): This involves enhancing an existing instance, for example by increasing the vCores, RAM, or I/O power available to the database. Azure SQL Database allows you to scale up to higher tiers (from 2 to 4 vCores, then 8 vCores, etc.) or to machines with more memory, to handle more transactions per second. This operation is often simple (it can be done via the portal with a slider) but typically involves a brief restart/reallocation of the service. Vertical scaling works well as long as there is a single instance that can handle the load, but it has physical limits (there is a maximum of resources on a single machine) and economic limits (beyond a certain threshold, further increasing CPU/RAM becomes very expensive).

·      Horizontal scaling (scale-out): This involves adding multiple instances in parallel to divide the load. In the context of traditional relational databases, this is non-trivial—you can implement sharding (partitioning data across multiple databases) and replication for reads, but the app must manage the logic. In natively distributed databases like Cosmos DB, however, horizontal scaling is a basic principle: data is automatically partitioned across multiple nodes, and the service adds nodes behind the scenes as the required throughput increases. Azure Cosmos allows you to scale throughput in RU/s and divide that budget between partitions; with the Autoscale option, it can dynamically adjust the available RU/s (up to a defined maximum) based on traffic, so the app doesn't slow down during load peaks. Azure SQL doesn't support transparent scale-out for writes, but it does allow you to add read-only replicas (for example, with the Hyperscale option, secondaries). replicas to read, or in Managed Instance ( create scale-out for read-only operations). Additionally, features like Azure SQL Elastic Pools allow you to scale multiple databases together and share common resources to handle varying loads between them.

b) Serverless and Hyperscale: As mentioned, Azure SQL Database offers two particular modes:

·      Serverless: Here, scalability is virtually automatic and dynamic. You set a minimum and maximum vCores range, and the service activates or suspends resources based on activity: if a database is idle, it reduces resources to a minimum (even pausing them, at almost zero cost), and when the load increases, it scales up to the defined maximum. This option is excellent for development environments or applications with occasional use, as it optimizes costs.

·      Hyperscale: This is an Azure SQL architecture designed for very large databases (hundreds of GB up to tens of TB). In Hyperscale, the primary node delegates data management to page servers and maintains multiple replicas for reads, clearly separating compute and storage. This means adding space doesn't require migrations (just add a page server), and performance can be scaled by adding reader endpoints. In practice, Hyperscale combines scale-up (the primary node can be of various sizes) and scale-out for reads.

c) Performance Monitoring: Azure provides a rich set of metrics and logs to monitor the health of your databases:

·      For Azure SQL Database you can monitor metrics such as CPU usage percentage, I/O consumption, memory, wait time ( wait stats ), transaction rates per second and log usage, as well as query-level statistics (using tools like Query Performance Insight or Query Store ). Metrics can be visualized in Azure Monitor as graphs over time, and alerts can be set based on thresholds—for example, sending an alert if CPU exceeds 80% for more than 5 minutes.

·      For Azure Cosmos DB, key metrics include Request Unit (RU) consumption per second, operation latency (specifically the percentage of requests served under certain milliseconds, e.g., 95th percentile latency), error rate (e.g., whether any partition saturates the available RU limit and generates 429 – Too Many errors Requests ). Here too, you can set alerts, for example if RU consumption consistently exceeds 70% of the provisioned threshold, signaling that it may be necessary to increase throughput.

·      Tools like the integrated Azure Monitor and Application Insights (on the application side) allow you to correlate metrics: for example, a drop in app performance could correspond to an increase in database latency. Azure SQL Analytics (a Log Analytics solution) offers predefined dashboards to identify slow queries, perform index tuning, and more.

·      For tuning, Azure includes advisory features: for example, the Index Advisor suggests missing indexes to speed up certain queries, or recommends deleting unused indexes to save resources. Query Store in SQL records execution plans and helps identify performance regressions over time. On Cosmos DB, however, you need to carefully design the partition key and monitor “ skew ” (if one partition receives significantly more traffic than the others, becoming a hotspot).

d) Cost and performance optimization

Monitoring and scaling often go hand in hand to optimize costs. For example, if we notice that a SQL database is underutilized at night, we could manually lower the tier or use scheduled scaling (Azure Rest API/Automation) to reduce vCores at certain times. Or use autoscale (for Cosmos DB) to avoid paying the maximum RU 24/7 but only when needed. Another example: if some queries are slow, instead of dramatically increasing resources (which is expensive), it's better to check if indexes are missing or can be optimized (a "scale smart" approach rather than just "scale out"). Azure offers Azure Advisor, which also periodically analyzes resource usage and suggests where you could save (for example, downgrading to a lower plan if usage is low, or purchasing reserves for 1-3 years to get discounts if vCores allocation is stable).

Practical examples:

·      An online gaming company uses a Cosmos DB database to store game statistics. During the evening rush hour, RU consumption spikes; by setting Autoscale (e.g., 1,000-10,000 RU/s), the database automatically scales up during the peak and returns to lower RU off- peak values, ensuring both performance and savings. On the monitor, the RU consumption graphs show peaks at 90% of the maximum, but never touching the limit ( throttling errors are therefore avoided ).

·      An e-commerce site on Azure SQL Database in the standard tier experiences slowdowns during Black Friday. Before the event, administrators scale the database from 4 vCore to 16 vCore. They also enable Query Store to track the slowest queries. During Black Friday, they actively monitor CPU and response times: seeing the CPU spike above 80%, they decide to temporarily add two read-only replicas (in Hyperscale ) to distribute reporting queries and offload the primary. This allows the system to handle the load without downtime. Once finished, they return the database size to normal values to avoid unnecessary costs.

·      An application experiences periodic bottlenecks on certain SQL queries. Analyzing the logs, they discover that an index is missing on the column used by that query in the WHERE statement. After adding the index, the query becomes 10 times faster and the database's CPU usage drops significantly, preventing them from upgrading to a higher tier for now.

 

7. Integration with Other Azure Services

Databases don't exist in isolation: in Azure, they are part of a broader ecosystem of cloud services. A major advantage of the Azure cloud is the native integration between its services, which allows you to build end-to-end solutions combining databases with analytics, artificial intelligence, application services, data flows, and more. In this chapter, we look at some examples of integration between database services and other Azure services:

·      Power BI and BI/Analytics: Azure SQL Database and Cosmos DB can be data sources for Power BI, Microsoft's business intelligence and data visualization platform. Using native connectors, Power BI can extract data from Azure SQL in near real time to create interactive reports and dashboards on business metrics. In the case of Cosmos DB, integration often occurs through the Cosmos Analytical Store (in the context of Azure Synapse Link) or by periodically exporting data to a SQL database or data lake, where Power BI consumes it. For example, data collected in Cosmos DB by an IoT application can be replicated in an analytics environment ( Synapse or dedicated SQL) and then visualized in Power BI to reveal large-scale trends and anomalies.

·      Azure Functions (Serverless Compute): Azure Functions allows you to execute small units of code in response to events, without managing infrastructure. Azure databases can trigger serverless functions – for example, Cosmos DB has a Change Feed feature, a stream of events that records changes (inserts/updates) to a collection in real time. You can connect a Function to this stream: each new document inserted into Cosmos activates the function, which perhaps performs additional logic (e.g., validating data, enriching it, or synchronizing it with another database). Other possible triggers: a Function can be invoked by a timer (for scheduled database operations, such as maintenance) or by queues and messages (for example, a message on a Service Bus queue indicating a certain operation to be performed on the DB). Thanks to Functions, you can easily implement reactions to events in the database in a completely cloud-based and scalable way.

·      Example: every time an order is written to the collection orders from Cosmos DB, an Azure Function is launched that takes that order, verifies its contents, and writes it to Azure SQL Database (perhaps for financial reporting purposes). This pattern combines NoSQL speed and SQL consistency.

·      Logic Apps: These are the low-code equivalent of Azure Functions, geared towards workflow orchestration by integrating various services via predefined connectors. A Logic App can react to events or schedules and coordinate activities such as: “when a new record Y appears in database X, send an email, update a file in SharePoint, and post a message on Teams.” In the database context, there are connectors for Azure SQL and Cosmos DB (among others), so for example, a Logic App could periodically read rows from a SQL table and add records to a SharePoint list, or listen for changes in Cosmos (also via the Change Feed integrated into Event Grid ) and trigger approval processes, etc.
For example: when a new user registers (inserted into the Users table in SQL), a Logic App automatically sends a welcome email and creates a corresponding entry in the company CRM via its API connector.

·      Event Grid & Event Hubs (streaming and reactive data): Cosmos DB publishes Change Feed events to Azure Event Grid, the global event routing service. This means that other services can subscribe to database change events reactively. For example, new IoT telemetry inserted into Cosmos can generate an event on Event Grid, which either triggers a Function (for processing), notifies a queue service, or updates a cache. Event Hubs, on the other hand, are used for massive ingestion of streaming data (real-time telemetry, logs): this data is often then saved to a database (batch or streaming analytics ). Imagine an IoT Hub/Event Hub that collects millions of events from sensors and then stores them in a database or forwards them to Cosmos DB for immediate querying.

·      Data Factory and Synapse Pipelines (ETL/ELT): When you need to move large volumes of data between systems, integrate data from different sources, or build data warehouses, data integration pipelines are used. Azure Data Factory (ADF) or Azure Synapse Pipelines allow you to extract data from databases (Azure SQL, Cosmos via connector) and transform it: for example, take data from Cosmos DB, normalize it, and load it into an Azure SQL table for reporting. Or perform logical backups, database migrations, bulk file loading into databases, etc. These tools complete the synergy between storage and database services.

In short, Azure offers a connected ecosystem: data collected and managed in databases can trigger serverless processes, fuel real-time and deferred analysis, flow into automated pipelines, and finally be presented on interactive dashboards. This allows for the construction of comprehensive solutions: for example, an event- driven architecture could ensure that every change in user data in Cosmos DB triggers a Function that also updates Azure SQL, and then a Logic App to notify the team and update an external system, while simultaneously making the data available for historical analysis on Synapse, all by seamlessly connecting different services.

Built-in practical example: in an advanced e-commerce solution, when an order is confirmed on SQL Database, the transaction also writes a record to Cosmos DB in a collection orders_feed. From here:

·     's Change Feed intercepts the new document.

·     Event Grid propagates the event to those who are interested.

·     An Azure Function is triggered: it calculates, for example, loyalty points for the customer and always saves them to Cosmos DB.

·     A parallel Logic App sends a confirmation email to the customer and notifies the shipping department's Teams channel.

·     Overnight, Synapse Pipeline pulls all the day’s orders from Cosmos DB and integrates them with revenue data from SQL, saving them to a data lake as parquet files.

·     Power BI displays a report combining information (delivery speed, financial data, etc.) updated with integrated data from the previous day.

This scenario, though complex, is made possible by the native integration between Azure components. Databases are the heart of the data, but the real power lies in connecting them with functions, flows, and analytics tools.

 

8. Use Cases – Application Scenarios

After reviewing technologies and concepts, let's see how they translate into some real-world use cases in the Azure cloud. We present three typical scenarios: a web application, a data analytics pipeline, and an IoT/Big Data solution. In each, different database and integration services work together.

·      Enterprise Web Applications: Imagine a web portal for a bank or e-commerce site. The architecture often includes a relational database for core data (bank accounts, orders, inventory) to ensure consistency and structure, flanked by NoSQL databases for user experience or session data. In Azure, an implementation might use Azure SQL Database as the primary repository for financial transactions or orders, while Azure Cosmos DB is used to store user sessions, temporary shopping carts, or personalization data (viewed products, preferences) with global replication for ultra-low latency. The application (perhaps hosted on Azure App Service) connects to SQL for critical operations and to Cosmos DB to quickly read/write non-transactional information. The entire application is secured with a private network and Azure AD as discussed in previous chapters, and monitored with Application Insights. Additionally, Azure Cache for Redis could be integrated for stringent caching of frequently read data.
Benefits: The website user will have a fast experience (thanks to distributed NoSQL for volatile content) without compromising the accuracy of their orders and payments (managed by SQL with full ACID). The company can horizontally scale the NoSQL component to other regions if it opens the service in new countries, while maintaining consolidated central data.

·      Data Analysis and BI: For analytics-oriented applications (e.g., a financial reporting system or marketing analytics ), data is often collected from operational sources and then processed in pipelines. A typical Azure scenario involves using Azure Synapse Analytics or Azure Data Lake Storage to collect large amounts of raw data (logs, CSV files, historical data), then transform and load it into a relational database that serves as a data warehouse for reporting. For example, daily sales data from various stores could be imported into Azure Data Lake, then a Synapse /ADF pipeline could be used to clean and calculate aggregates, and finally insert it into Azure SQL Database tables optimized for BI queries. Likewise, if some of the data comes from real-time sources (e.g., user clicks on the website, IoT data), Cosmos DB could be used to quickly ingest these streams, which are then periodically extracted into the analytics system. Finally, Power BI connects to the final database (or directly to Synapse ) to provide constantly updated dashboards to management.
Benefits: This architecture ensures separation between operational transactional systems and analytical systems. Analytics workloads don't disrupt live applications (because they work on copies of the data), and each component can be scaled independently ( Synapse for massive processing, SQL for rapid BI queries, etc.). Additionally, machine learning models can be applied to the data in the lake or in Synapse to extract additional insights, with the results also stored and made available via the database.

·      IoT and Big Data in Real Time: A modern use case is managing IoT (Internet of Things ) devices that generate continuous streams of data (sensors, machine logs, vehicle telemetry, etc.). In Azure, a typical scenario involves ingesting device events at high speed through services like IoT Hub or Event Hubs, then storing them partly for historical analysis and partly for immediate access. For example, IoT Hub receives millions of messages per day from sensors; these messages are accumulated in a data lake for raw historical storage and batch processing, but are also sent to a streaming Azure Function that inserts them into Azure Cosmos DB with a per-device partition key and/or timestamp. Cosmos DB thus retains only the latest data or operational data useful to the application (e.g., the current status of each device, or events from the last 24 hours). If the current status of a sensor needs to be displayed on an IoT dashboard, the app can read directly from Cosmos DB (which provides rapid response). Meanwhile, downstream, daily aggregation processes read from the Data Lake or directly from the Cosmos
Change Feed to calculate statistics (e.g., average hourly consumption, anomalies), which are then saved to a relational database or an analytics model for monthly reporting. Benefits: This pipeline leverages the strengths of each component—scalable ingestion (Event Hubs), serverless processing (Functions), fast and distributed operational storage (Cosmos DB), and low-cost analytical storage (Data Lake + SQL/ Synapse ). This provides both real-time insight (for immediate action if a sensor triggers an alarm) and historical insight (for long-term trends and optimization).

 

Conclusions

These examples highlight a key principle: often the best solution isn't a single database, but an orchestrated combination of services, each used where it performs best. Azure facilitates this through a range of options (SQL, NoSQL, analytics, streaming) that work together. When designing a system, it's important to clearly define the requirements in terms of tolerated latency, required consistency, data volume, access frequency, cost, and complexity. Based on these, allocate the right services for each role: a transactional database for critical data, a NoSQL archive for scale and speed, possibly a dedicated data warehouse for analytics, all held together by integrated pipelines and APIs. Furthermore, it's crucial to consistently apply security, backup, and monitoring practices to all components: a solution's strength is measured by its weakest link, so no part should be overlooked (for example, it wouldn't make sense to fully secure SQL and leave the Event Hubs feed public, or to back up the database but not the data lake if it contains irreplaceable data).

With this overview, students should have a solid understanding of Azure database services and how to use them together. We recommend expanding each chapter with hands-on exercises: for example, trying to create a SQL and Cosmos database and run queries, setting up a backup and then restoring it to a test environment, or developing a small function that responds to change feeds. Active learning in the field, combined with theoretical knowledge, will consolidate this knowledge and prepare students to tackle real-world cloud scenarios.

 

Chapter Summary

This chapter provides a detailed overview of databases in Azure, comparing relational and NoSQL models, describing supported data models, service architecture, security, backup, scalability, integration with other Azure services, and typical application use cases.

·      Database types in Azure: Azure offers relational databases (SQL) with fixed schema and ACID properties, ideal for structured data and critical transactions, and NoSQL databases with flexible schema and horizontal scalability, such as Cosmos DB, suitable for variable data and large volumes distributed globally.

·      Key differences between SQL and NoSQL: SQL databases use rigid schemas, standard SQL, ACID transactions, and vertical scalability, while NoSQL has flexible schemas, specialized query languages, eventual consistency, and native horizontal scalability, with lower latencies at large volumes.

·      Supported data models: Azure supports relational (tables with keys and constraints), document (flexible JSON), and graph (nodes and relationships) models, each with specific advantages and disadvantages and dedicated use cases. Cosmos DB allows multiple models through different APIs.

·      Database Services Architecture: Azure PaaS services include logical instances (servers or accounts), internal databases or containers, and networking and security resources such as virtual networks and private endpoints. Configuring capacity ( vCores, RU/s) and service levels impacts performance and costs. Azure manages maintenance, patching, high availability, and backups.

·      Database security: Azure applies encryption at rest and in transit, manages identities and permissions through Azure AD, isolates resources on the network with firewalls and Private Endpoints, and provides monitoring and advanced protection tools like Microsoft Defender and auditing to detect threats and anomalies.

·      Backup and recovery: Azure automates full, differential, and log backups for point-in-time recovery, with long-term retention options and geo-replication for disaster recovery. RPOs and RTOs are defined to establish data loss limits and recovery times. Testing recovery plans is essential.

·      Scalability and monitoring: Azure supports vertical scaling (increasing resources on a single instance) and horizontal scaling (adding nodes), with serverless and hyperscale options for large databases. It offers monitoring tools for CPU, I/O, latency, and throughput, as well as recommendations for index and query optimization. Scalability is combined with cost optimization strategies.

·      Azure Services Integration: Databases integrate with Power BI for analytics, Azure Functions and Logic Apps for workflows and automation, Event Grid and Event Hubs for events and streaming, and Data Factory / Synapse for ETL/ELT pipelines, enabling complex and responsive end-to-end solutions.

·      Application Use Cases: Typical scenarios include enterprise web applications combining SQL and NoSQL for transactional data and user sessions, data analytics pipelines with separation between operational and analytical systems, and IoT/Big Data solutions using Event Hubs, Cosmos DB, and Data Lake for real-time and historical data management.

 

CHAPTER 7 – The artificial intelligence and machine learning service

 

Introduction

Azure world, Artificial Intelligence (AI) and Machine Learning (ML) services come in two main forms: on the one hand, pre-configured services (turnkey solutions for computer vision, language processing, speech recognition, translation, and decision-making); on the other, development platforms that allow you to train and deploy customized models at scale. In Azure, these two souls coexist to offer both immediately usable solutions and the flexibility to create custom models.

Azure Machine Learning (Azure ML) is the heart of the Azure platform for the machine learning lifecycle. It is an enterprise service that supports teams throughout all phases of an ML project: from data preparation and model training to production deployment and continuous monitoring, all with built-in governance and security. Azure ML allows you to use popular open-source frameworks (such as PyTorch, TensorFlow, scikit-learn, etc.) as well as large pre -trained models ( foundation models ) available in the Azure Model Catalog. It also offers tools for orchestrating advanced workflows such as prompt- based ones (prompt engineering for language models) and AI agents.

For applications that require out-of-the-box cognitive capabilities (such as recognizing images, understanding text, or speaking natural language), Azure offers a broad range of Azure AI Services: pre -trained APIs for Vision, Speech, Language, Decision, and Document Intelligence. These services allow developers to easily add seeing, hearing, speaking, and understanding to their applications without having to build models from scratch.

Another important component of the Azure AI ecosystem is Microsoft Foundry, a new unified portal that simplifies the development of solutions with generative AI models and intelligent agents. Foundry allows you to access a rich catalog of models (including models from Microsoft, OpenAI, Meta, Hugging Face, Cohere, and others), combine them with tools like Cognitive Services, and centrally apply Responsible AI controls. Essentially, Foundry makes it easier to integrate models from different vendors, build AI agents (systems capable of performing multi-step actions using language models and software tools), and ensure that everything is done ethically and safely.

Here are some practical examples that illustrate the possibilities offered by Azure in the AI and ML fields:

·      Example 1: An e-commerce site can combine Azure services to improve the user experience. For example, it can use Vision services to automatically generate product image captions and Language services to translate product reviews or descriptions into multiple languages. It can also leverage Azure Machine Learning to develop a personalized recommendation system that suggests products to customers based on their purchase and browsing data. In this scenario, preconfigured services (Vision, Translation) provide immediate intelligence, while Azure ML allows you to train a specific machine learning model on e-commerce data to generate targeted recommendations.

·      Example 2: A technical department that works with many drawings or photographs might need to catalog images or identify defects in photos of components. In Azure, they could use Azure ML's Data Labeling feature to label a set of images (for example, indicating for each one whether the part is defective or not), then train a custom computer vision model (perhaps using a classification algorithm provided by Azure ML or an open-source model), and finally publish the model as a service via a managed endpoint. Then, once in production, the endpoint would allow other internal applications to send images to the model and receive an automatic "defective part" or "good part" response.

These examples show how on Azure it is possible to mix approaches: using cognitive APIs for general functionality and rapid prototyping, and at the same time develop advanced custom models with Azure ML when you need to address specific problems with your data.

Categories of AI solutions on Azure

In general, AI solutions on Azure can be grouped into a few typical workload categories, depending on how they are built and used:

·      Custom Machine Learning: Solutions where you train and deploy your own models using your organization's existing data. This is typically done through Azure Machine Learning, which provides the infrastructure for experiments, large-scale training, and custom model deployment.

·      Pre-built AI (Cognitive Services): Solutions that leverage Azure's pre -trained models, exposed as APIs. This includes Vision, Speech, Language, Decision, and other cognitive services. In this case, you don't train your own model, but instead directly use the AI capabilities Azure offers (for example, to recognize faces in a photo, extract text from a document, translate a sentence, etc.). The advantage is rapid time to market and the need for very little machine learning expertise, since the "underlying" model is managed by Microsoft.

·      Generative AI: Solutions that use large models (LLMs – Large Language Models, or other generative neural networks) to produce text, images, code, and other content, or to understand natural language at a high level. On Azure, this is made possible through the Azure OpenAI Service (which offers access to models such as GPT-3, GPT-4, Codex, DALL-E, etc.) and Microsoft Foundry (which integrates not only OpenAI models but also many other advanced models, allowing you to orchestrate more complex agents and conversation flows). These solutions often involve customizing the output of the generative models by integrating them with information from your own business data (we'll look at the Retrieval-Augmented Generation technique for asking models questions about business data later ).

·      Specialized vertical services: Azure also offers AI services designed for specific domains. One example is Azure Video Indexer, a specialized service for analyzing video content by automatically extracting useful metadata (recognized faces, dialogue transcripts, scene and object detection, etc.). These vertical services often combine multiple AI techniques (audio, vision, language) to provide turnkey solutions in specific areas (media, finance, healthcare, etc.).

In this guide, we'll explore all of these aspects—from the basic concepts of AI and ML, to the concrete services offered by Azure, to best practices and resources for learning and getting certified— in a structured and educational way suitable for students and beginners. Let's start by clarifying some fundamental concepts and basic terminology.

 

Outline of chapter topics with illustrated slides

 

Immagine che contiene testo, schermata, Pagina Web, software

Il contenuto generato dall'IA potrebbe non essere corretto.In the Azure world, artificial intelligence and machine learning include both preconfigured services—such as ready-made APIs for vision, language, speech, and decision-making—and development platforms for training and deploying models at scale. At the heart of the machine learning lifecycle is Azure Machine Learning, which supports teams from data preparation to production deployment, with built-in governance and security. Open-source models like PyTorch, TensorFlow, and scikit-learn, or foundation models from the Model Catalog, can be used to orchestrate prompt- based and agentic flows. For apps that require ready-made cognitive capabilities, Azure AI services offer APIs for seeing, hearing, speaking, and understanding. Finally, Microsoft Foundry simplifies agent development, multi-vendor model integration, and Responsible AI controls. For example, an e-commerce site can use Azure AI services for image captioning and machine translation, and Azure ML for recommendations based on purchasing data. An engineering department can label images with Data Labeling, train a visual classifier, and publish the endpoint to production with managed endpoints. In the ML cycle, data is prepared, trained, evaluated, deployed, and monitored, with dedicated Azure services at each stage.

 

Immagine che contiene testo, schermata, Carattere, software

Il contenuto generato dall'IA potrebbe non essere corretto.Artificial intelligence creates systems capable of performing complex tasks, while machine learning is a subclass that learns from data. On Azure, you can build models with Azure ML using AutoML, shared notebooks, and reusable pipelines, or use ready-made APIs from Azure AI services for Vision, Speech, Language, and Document Intelligence. These capabilities integrate easily into applications and flows like App Service, Functions, and Logic Apps. The main types of machine learning are supervised, unsupervised, and deep learning. For example, in IT ticket classification, you start with a labeled dataset, use AutoML, and deploy the integrated API with Logic Apps to automate the assignment. Chat support can combine Language and Speech services to detect intent and generate speech, hosted on App Service. AutoML automatically explores algorithms and hyperparameters, while a managed endpoint allows you to deploy models with observability and secure rollout. A table can help you compare supervised, unsupervised, and deep machine learning, associating examples and relevant Azure services.

 

Immagine che contiene testo, schermata, software, Pagina Web

Il contenuto generato dall'IA potrebbe non essere corretto.AI workloads on Azure are divided into: custom machine learning, where you train and deploy your models in Azure ML; prebuilt AI, which leverages Azure AI services APIs for vision, speech, language, and decision making ; generative AI, with large models via Foundry or Azure OpenAI; and vertical services like Video Indexer, useful for extracting metadata from videos. The Architecture Center helps you choose between managed platforms like Azure ML, cognitive APIs, Spark environments like Databricks, and capabilities in SQL or Synapse. For example, Custom Vision can be used to detect production defects, with a scheduled retraining pipeline in Azure ML. OpenAI and Foundry enable Q&A on business documents by integrating Azure AI Search. The RAG ( Retrieval-Augmented Generation) method enriches generative models with indexed documents for relevant answers. A visual map connects workloads to services: ML with Azure ML, Generative with Foundry /OpenAI, APIs for Vision/Speech/Language, and Media via Video Indexer.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.enterprise- grade service that accelerates the entire ML lifecycle: from development with shared notebooks, datasets, reproducible environments, and Spark/Fabric integration, to training with CPU/GPU compute clusters, distributed training, AutoML, and prompt flow for language models. MLOps includes tracing, a model registry, managed endpoints, secure rollbacks, and monitoring with metrics and alerts. Responsible AI offers fairness, explainability, and error analysis dashboards to reduce bias and increase transparency. The official documentation explains who uses Azure ML, how to orchestrate ML and LLM, and what security and compliance guarantees are included. For example, you can train a sales forecasting model with AutoML and deploy it as an online endpoint, as well as create monthly retraining pipelines. A managed endpoint offers managed hosting with telemetry, traffic splitting, and a gradual rollout. Prompt flow supports the design, evaluation, and deployment of LLM flows within Azure ML. A diagram shows the MLOps cycle with experiment, train, register, deploy, and monitor blocks, mapped to Azure ML icons.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure AI services provide ready-to-use capabilities via REST and SDKs: Vision for OCR, image analysis, and face detection ; Speech for speech recognition, synthesis, and translation; Language for text analysis, entity extraction, and summaries; Document Intelligence for extraction from invoices and forms; and Personalizer and Anomaly Detector for decision-making. These services reduce time to market without the need to build models from scratch. With Foundry Tools, the same capabilities are available as tools that can be integrated into agents. For example, a document portal can leverage Document Intelligence to extract fields, Language for summaries and classification, and store the data in SQL. The SDKs include client libraries in Python,.NET, JavaScript, and Java that simplify API calls. A table summarizes the capabilities and typical uses of the Vision, Speech, Language, Document Intelligence, and Decision services.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Microsoft Foundry is the unified portal for models, agents, and tools. It offers a rich Model Catalog, including models from Microsoft, OpenAI, Meta, Hugging Face, Cohere, and DeepSeek, with evaluation, fine-tuning, deployment, and observability. It integrates Agent Service to create agents with tools and workflows, and enables RBAC and unified policies, with compatible OpenAI v1 or REST Foundry endpoints. Guides explain the architecture, resources, and quickstarts for creating projects and testing models or agents in playgrounds. For example, you can evaluate gpt ‑4o on FAQ data and deploy an agent with search tools and functions to perform tasks. An agent is a component that uses LLM, tools, and memory to complete multi-step tasks. A diagram shows the flow from App to Agent, Tools, and Data, with arrows pointing to Foundry endpoints.

 

Immagine che contiene testo, schermata, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.Microsoft defines Responsible AI according to six principles: fairness, trust and safety, privacy and security, inclusiveness, transparency, and accountability. Azure ML provides tools for assessing fairness, explainability, and error analysis; Foundry offers Content Safety controls, tracking, assessments, and integrations with Defender for Cloud for risk and alerts. Operational guidelines follow the Identify, Measure, Mitigate, and Operate phases, applicable to both generative models and agents. For example, you can assess disparity with a fairness dashboard on a credit risk model, applying mitigations such as rebalancing and threshold tuning. Content Safety offers filters and guardrails to reduce harmful content. An infographic shows the six principles and the Identify, Measure, Mitigate, Operate flow.

 

Immagine che contiene testo, schermata, Carattere, Pagina Web

Il contenuto generato dall'IA potrebbe non essere corretto.AI solutions on Azure are extensible and easily connect to many cloud resources. You can expose models through API Management, react to events with Event Grid and Functions, orchestrate flows with Logic Apps, store data and embeddings in SQL, Cosmos DB, or Storage, protect secrets in Key Vault, and isolate your network with Virtual Network and Private Endpoints. Official guides illustrate patterns for modern apps, such as chatbots and RAG in App Service, agents and MCP, and AI workflows in Logic Apps. A practical example is the RAG solution: upload to Storage, indexing in AI Search, orchestration with Functions, API gateway in APIM, and secrets managed in Key Vault. MCP, Model Context Protocol is the standard for describing tools and actions that agents can invoke. An event- driven diagram shows the path from the user to the frontend, APIM, agent or functions, data stores, and Event Grid.

 

Immagine che contiene testo, schermata, Carattere, logo

Il contenuto generato dall'IA potrebbe non essere corretto.Developer environments and tools on Azure include Azure Machine Learning, Azure AI Studio, and Data Science Virtual Machine. Azure ML offers an end-to-end platform for training, deployment, and MLOps with security and governance. AI Studio and Foundry support generative app and agent development, model integration, and evaluation, helping you choose the right tool versus Azure ML. DSVMs are pre -configured VM images, available on Windows or Ubuntu, with data science tools like Jupyter, VS Code, and deep learning libraries, useful for rapid experimentation or training. For example, an educational lab can start with an Ubuntu DSVM with GPUs for computer vision workshops, then port the project to Azure ML for MLOps. A compute instance is a managed Azure ML VM for collaborative notebooks with SSO. A table compares the pros and cons of ML Studio, Foundry /AI Studio, and DSVM for different scenarios.

 

Immagine che contiene testo, schermata, Carattere, Pagina Web

Il contenuto generato dall'IA potrebbe non essere corretto.The Microsoft Certified: Azure AI Fundamentals (AI ‑900) certification certifies knowledge of basic machine learning and artificial intelligence concepts on Azure. It is suitable for both technical and non-technical profiles and prepares for roles such as Azure AI Engineer or Data Scientist. Microsoft Learn offers learning paths, practice assessments, exam sandboxes, and updated materials. AI ‑900T00 courses with guided exercises are available. A study plan can include completing the Introduction to AI in Azure path, practicing with self-assessment quizzes, simulating the exam with sandboxes, and applying the concepts in a Foundry mini-project. Practice assessments are useful for identifying gaps and best preparing for the exam. A timeline shows the stages from preparation to the certification badge: learning path, practice, sandbox, and exam.

 

1. AI and Machine Learning Concepts

To begin, let's define what we mean by Artificial Intelligence and Machine Learning and why these terms often go hand in hand.

·      Artificial Intelligence (AI): is the field of computer science that studies how to create systems capable of performing tasks that would normally require human intelligence. These include complex tasks such as recognizing elements in an image, understanding natural language, making data-based decisions, playing chess, driving a vehicle, and so on. An AI system therefore attempts to imitate some human cognitive abilities (vision, hearing, learning, reasoning, etc.) through algorithms and software.

·      Machine Learning (ML): This is a subdiscipline of AI. Instead of explicitly programming all the rules to perform a task, ML involves building a system that learns from data. In practice, the machine learning model is fed many examples (historical data, labeled datasets, etc.) and, through mathematical algorithms, it "learns" the characteristics and relationships present in the data, so it can then make predictions or decisions based on new data. ML has become the dominant method for building advanced AI systems because it allows us to leverage the vast amounts of data available today to train models capable of performing complex tasks without having to manually code them.

In other words, AI is the goal (getting a machine to perform intelligent tasks), while machine learning is one of the primary means to achieve that goal (learning from data). Not all AI is machine learning (there are static rule-based AI techniques, search algorithms, etc.), but nearly all advanced modern AI applications—from speech recognition to autonomous vehicles—rely heavily on machine learning.

On Azure, the two ways to create intelligent applications are:

·      develop custom models with your own algorithms and data (custom ML),

·      or use pre -trained AI services provided by Azure.

Both approaches can coexist and complement each other. For example, you could use a pre -trained service to analyze text and classify its language, and then pass the output to your own ML model that performs further analysis specific to your domain.

One advantage of the Azure platform is that AI models and services integrate easily with other Azure application platforms. For example, you can host an AI model or service on App Service (a service for running web applications/APIs), or call a machine learning pipeline within an Azure Functions or Logic Apps flow (to trigger business actions in response to certain events). This interoperability allows AI to be included as a component of broader cloud architectures.

Before delving into specific services, it's important to understand the main types of machine learning you might encounter or want to implement. Generally, we distinguish three fundamental categories of machine learning: supervised learning, unsupervised learning, and deep learning. In the next chapter, we'll explore these in detail, with practical examples, and how these categories are reflected in Azure services.

 

2. Types of Machine Learning

In machine learning, problems and techniques are typically divided into several categories depending on the type of learning involved and the nature of the data available. Here are the three main types:

·      Supervised Learning: In this mode, the model learns from labeled examples. This means that for each input data point in the training set, we also provide the model with the expected "correct result" (label). The model can then adjust its parameters to try to reproduce those results. This is the case for problems like classification (e.g., recognizing whether an email is spam or not: we provide many emails already labeled "spam"/" ham " and the model learns to distinguish) or regression (e.g., predicting a numerical value like the price of a house given its square footage, location, etc.: the model learns from data on houses already sold and their prices). Supervised learning is very popular because in many cases in industry, we have historical data sets already classified or evaluated by humans.

·      Unsupervised Learning: Here, the model attempts to find patterns in unlabeled data, meaning it doesn't know a priori what the correct outcome is. A typical example is clustering, where the algorithm divides data into groups based on emerging similarities (for example, segmenting a store's customers into groups with similar purchasing habits, without having predefined categories). Another example is anomaly detection, where the model learns the "typical behavior" of the data and identifies data points that differ significantly (useful for identifying fraudulent transactions, faults from IoT sensor signals, etc.). Unsupervised learning is useful when you don't have labels or human assessments, but you still want to extract information from the data (hidden patterns, correlations, outliers ).

·      Deep Learning: This is not a different label-based learning type, but a cross-cutting category that refers to the use of artificial neural networks with multiple layers (hence “deep”). Deep learning has achieved extraordinary results and is behind many recent advances in AI, especially in fields such as computer vision and natural language processing. Deep learning can be performed in a supervised manner (e.g., training a convolutional neural network on labeled images to recognize objects) or unsupervised (e.g., neural networks that learn to compress data, as in autoencoders, or unsupervised generative models). Given its importance, it is often mentioned separately: deep learning can typically be used to tackle complex problems (facial recognition, machine translation, autonomous driving, advanced chatbots) provided large amounts of data and computational power (often GPUs) are available for training. In Azure, many pre -built cognitive services use deep learning algorithms, while the Azure ML service allows data scientists to design and train their own deep neural networks using frameworks like TensorFlow or PyTorch.

Let's summarize these key concepts in a table, associating each type of learning with some practical examples and how Azure supports that scenario:

Type of ML

Description

Practical example

Related Azure Services

Supervised

The model learns from examples with known labels (input -> expected output). Suitable for classification and regression tasks.

Automatically classify IT support tickets into categories (“software”, “hardware”, “permissions”) based on their description, after training the model with many already categorized tickets.

Azure ML (training experiments, AutoML for classification/regression), Azure Custom Vision (for labeled image classification), integration with Logic Apps or Functions to automate actions based on predictions.

Unsupervised

The model finds patterns in unlabeled data, uncovering hidden structures. Used for clustering, dimensionality reduction, and anomaly detection. detection.

Analyze website browsing data to identify segments of users with similar behaviors, without predefined categories (the model could discover clusters of “curious” users, “frequent buyers,” and “occasional visitors”).

Azure ML (clustering algorithms, e.g., K-Means, in notebooks or pipelines), Azure Synapse / Spark (for unsupervised big data analytics), Azure Anomaly Detector ( pre -trained API to detect anomalies in time series without providing anomaly examples).

Deep Learning

Models based on complex multilayer neural networks. Requires a lot of data and computational resources; can be supervised or unsupervised. Excellent for image recognition, speech, NLP, and generative AI.

Recognize features in complex images, such as building a model that analyzes medical X-rays for signs of disease. The model is a neural network trained on thousands of images labeled by radiologists.

Azure ML (to train deep learning models on GPU clusters, manage experiments), Azure OpenAI Service (to directly use pre- trained deep models like GPT-4, DALL-E), Azure Cognitive Services like Vision, Speech, Language (provide features based on deep models without having to manually train them).

 

As you can see, Azure provides support for all of these categories. For example, for a (supervised) classification problem like automatic IT ticket assignment:

·      you can use Azure Machine Learning with AutoML functionality to automatically generate and test many classification models on the labeled dataset of historical tickets;

·      once the best model is identified, it is distributed as an API service ;

·      then you integrate it into a flow, for example with Azure Logic Apps, so that every new incoming ticket is sent to the template and, based on the predicted category, Logic App automatically assigns the ticket to the corresponding team (e.g. ticket of type “hardware” -> IT Hardware team).

Another example, to understand service integration, could involve an intelligent customer support system: imagine you want to build a chatbot or virtual assistant that sorts customer requests and provides voice information. You could combine different services:

·      Language Understanding model (Azure Language Service) to analyze request text and identify user intent (e.g., “report a fault” vs. “request commercial information”);

·      Speech service to automatically convert the bot's text response into a synthetic voice to be returned to the customer over the phone;

·      all orchestrated on a web application or an Azure App Service, where the bot logic resides.

We can see that, thanks to the various Azure services, an AI project can range from custom models trained on your own data (thus requiring ML and data science skills) to quickly assembled solutions by composing ready-made cognitive services. In the next chapter, we'll explore how, regardless of the type of learning used, a machine learning project follows a set of very specific phases, and how these phases can be managed with Azure tools.

 

3. ML Lifecycle Architecture

typical machine learning project follows a workflow (pipeline) consisting of several sequential phases, which together constitute the lifecycle of an ML model. Understanding this reference architecture is crucial because it allows us to understand where and how to use the right tools when developing AI solutions.

Here are the main phases of an ML project life cycle and what happens in each of them:

·     Data Collection and Preparation: This initial phase consists of collecting raw data from various sources (databases, files, sensors, etc.) and preparing it for use in machine learning. Preparation includes operations such as cleansing (removing or correcting incorrect or missing data), transformation (normalizing values, creating additional features, encoding textual categories into numbers), and possibly annotation/labeling (if necessary, creating a supervised dataset by manually adding labels). In Azure, the data can reside in services such as Azure Storage, Azure SQL Database, Azure Data Lake, etc., and tools such as Azure Data Factory or Azure Databricks / Synapse can be used for data engineering pipelines. Azure ML also provides data prep components (e.g., registered datasets and data labeling capabilities, as seen in the previous example).

·     Model Training: In this phase, the prepared dataset is used to train one or more machine learning models. Training involves feeding data to the model (which can be a neural network algorithm, a random forest, a linear model, etc.) and optimizing the model's internal parameters so that it "learns" to perform the desired task well (predicting labels, clustering data, etc.). On Azure ML, this phase is handled as an Experiment: you define a training script (in Python, R, or using the visual designer), run it on compute resources (e.g., CPU/GPU clusters), and Azure ML tracks the resulting performance metrics (accuracy, error, etc.). Azure ML also supports AutoML, which automates the process of trying different algorithms and configurations, and distributed training to handle very large datasets or very complex models on multiple machines in parallel.

·     Evaluation and Validation: After (or during) training, you need to evaluate the model's performance on data it has never seen before (test or validation data). This is to ensure that the model performs well not only on the training set but also on new data in general. Metrics are calculated (e.g., accuracy, precision /recall, MSE, depending on the problem) and it is verified whether the model meets the requirements. This is also the time to perform explainability analyses ( to understand how the model is making decisions) and fairness analyses (to see if there are biases towards certain subgroups in the data). Azure ML provides tools such as Explainability Dashboards (e.g., based on SHAP) and Fairness Dashboards ( Fairness ) to help with this phase. If the model isn't adequate, you can go back: adjust the data, change the algorithm or hyperparameters, and retrain (that's why it's an iterative cycle).

·     Deployment to Production (Deployment): Once satisfied with the results, the model is deployed so it can be used in real applications. “Deploying” a model to Azure usually means creating an inference endpoint: essentially a web service (HTTP API) that encapsulates the model. Azure ML has a Managed Inference feature. An endpoint (managed endpoint) that allows you to take a registered model and make it available as a scalable service with just a few clicks or lines of code, with Azure managing the infrastructure (containers, CPU/GPU, autoscaling, etc.) for you. Alternatively, you can export the models and use them in different contexts (for example, in a mobile app, an IoT Edge device, etc., but in our Azure context, we focus on cloud deployments). Often, an API or integration is also prepared alongside the model: for example, we could insert the model's endpoint behind Azure API Management to securely handle calls, or integrate it into a bot, a web app, etc.

·     Monitoring and Maintenance: After deployment, the work isn't over. A model in production must be monitored to ensure it continues to perform well over time. Data is collected on actual requests and the responses provided, keeping an eye on metrics such as latency, throughput, error rate, and even the quality of predictions (if we have a way to verify it). Furthermore, input data may change over time (a phenomenon known as data drift ), which could degrade the model's performance. It's good practice to establish a maintenance process: for example, scheduling periodic retraining of the model with more recent data (Azure ML allows you to create automatic pipelines that retrain the model every month and, if the new version passes certain quality criteria, replace it in production). Monitoring also includes logging and alerting (Azure ML can integrate metrics into Azure Application Insights or send alarms if something goes out of range) and governance (tracking model versions, who approved it for production, etc., for compliance).

This lifecycle, often called MLOps (Machine Learning Operations), is partly inspired by DevOps practices but adapted to the world of data and models. Azure Machine Learning was designed specifically to support the entire MLOps cycle. In the conceptual image, you often see blocks like Experiment -> Train -> Register -> Deploy -> Monitor, in a continuous loop.

In the next chapter, we'll take a closer look at how Azure Machine Learning implements and facilitates each of these phases, providing a unified environment for data scientists and developers to efficiently take machine learning projects from prototype to real-world use.

 

4. Azure Machine Learning: Platform for the ML Cycle

Azure Machine Learning (Azure ML) is the Azure service designed to unify the entire lifecycle of machine learning projects, as described above. Let's look at its key features and how it supports the various phases:

·      Collaborative Development Environment: Azure ML provides a centralized workspace where team members can work together on ML projects. Within the workspace, you can create and share notebooks. Jupyter (in an environment called Azure ML Studio that runs in the browser), allowing data scientists to write Python/R code to explore data and develop models directly in the cloud. Datasets can be registered in the workspace, so everyone uses the same prepared and versioned data. Additionally, Azure ML allows you to define replicable environments: essentially runtime environment specifications (operating systems, Python packages, libraries) to ensure that model code always runs in a controlled context. This eliminates the classic "it works on my computer but not in production" issue, ensuring reproducibility.

·      Automated and Scalable Training: For the training phase, Azure ML offers managed Compute Clusters, which can be CPU or GPU, on which you can launch your training experiments. You can start training by distributing it across multiple machines (useful for large neural networks or very large datasets). Furthermore, the AutoML functionality allows you to automate the selection of the best model: you provide the data and the type of problem (e.g., multiclass classification ), and Azure ML will try numerous combinations of algorithms and configurations to find the one with the best performance, returning you the optimal model. A recent addition is Prompt Flow, a tool integrated into Azure ML for designing, testing, and running flows based on linguistic models (LLMs). This is particularly useful for generative AI scenarios: for example, you might want to create a pipeline that takes a user prompt, makes a call to GPT-4, then passes the response through another model or a post-processor, etc. Prompt Flow lets you orchestrate these operations and evaluate the results, within the same Azure ML environment.

·      MLOps, Deployment, and Model Management: Azure ML includes MLOps practices by default. Each training run (called a Run ) is tracked with its metrics and outputs; you can register a model by saving a version of the trained model (e.g., “Model X version 1.0”) in the workspace. There's a centralized Model Registry where all registered models appear, along with their metadata (who created it, when, with what data, with what validation metrics, etc.). When you decide to bring a model into production, Azure ML allows you to create Managed Endpoints: in just a few steps, you choose a model from the registry and deploy it as a web service. The underlying infrastructure is managed by Azure: you simply specify whether you need CPU or GPU, how many replicas to keep, and Azure takes care of creating the necessary containers, balancing the load, and incrementally replacing new versions (for example, it supports gradual rollout: you can deploy version 2 of the model by initially assigning it only 10% of the traffic, keeping 90% on version 1; if all goes well, you increase to 50%, then 100%, minimizing risks). The managed endpoints also offer integrated monitoring: you can see the requests made, average latencies, and any errors, and integrate with Azure logging and monitoring systems.

·      Built-in Responsible AI: Azure ML has several tools to help implement responsible AI practices during development. For example, it provides Fairness Assessment (a module that allows you to upload the model's output data and analyze whether there is bias toward certain protected groups), Explainability (tools for interpreting and explaining the model's decisions, such as SHAP values or feature importance, to understand which factors the model is basing its predictions on), and Error Analysis ( to systematically see which data the model is most erring on and identify error patterns). These tools help the team evaluate and improve the model not only on traditional metrics, but also in terms of fairness and transparency, following the principles of responsible AI.

In practice, Azure Machine Learning aims to be an end-to-end solution: from initial prototyping in notebooks to long-term production model management, everything happens within the same ecosystem. An example of an Azure ML flow might be the following:

·      A data scientist trains a sales forecasting model using AutoML on Azure ML, using historical sales data provided by the business team. After a few hours, Azure ML returns the best model found (say, a regression model based on an ensemble of decision trees) with a certain level of accuracy for future sales.

·      The model is registered and then immediately deployed as an online endpoint for testing. The endpoint is invoked from an internal dashboard app where managers can enter certain parameters (period, region, product type) and obtain the sales forecast from the model.

·      automatic pipeline is set up in Azure ML that reloads the model every month, adds the latest sales data, retrains the model, and, if performance improves, upgrades the production endpoint to the new version. All this with built-in notifications and approvals where necessary (for example, a senior team member must manually approve the new version's move to production if metrics fluctuate significantly).

·      Thanks to managed endpoints, the team also has the peace of mind of being able to quickly rollback if something goes wrong: Azure ML keeps the old versions and with one click you can revert to the previous version of the model if the new one causes problems.

With Azure ML, companies across all industries accelerate the development of AI solutions because much of the infrastructure and operational management is handled by Azure, allowing teams to focus on models and data – that is, on the added value specific to their scenario.

 

5. Azure Cognitive Services (Azure AI Services)

Let's now move on to the other major strand of Azure's AI offering: cognitive services, known as Azure AI Services. These are pre -trained cloud services that offer AI capabilities through simple API calls or SDKs, without requiring the user to develop or train any models. Microsoft has packaged various AI capabilities into dedicated services that cover different areas. Let's look at the main categories of Azure cognitive services and what they offer:

·      Vision: Services for analyzing images and videos. Features include object recognition, image classification, optical character recognition (OCR), face recognition with facial feature analysis (estimated age, basic emotions), and automatic description of visual content. Examples of Vision APIs include the Computer Vision API, Custom Vision (for training custom vision models with just a few clicks), Face API, and Form Recognizer (the latter is actually part of Document Intelligence, see below, but it also handles document images). A typical use case: an application that needs to catalog photos could send each image to the Computer Vision API and get the labels of the objects in it (e.g., “outdoors, two people, smiling ”) and use them to tag the image in the database.

·      Speech: Services related to audio and voice. Azure offers Speech to Text (speech recognition, converting audio into transcribed text), Text to Speech (speech synthesis, converting written text into speech using an artificial voice), Speech Translation (real-time translation from one spoken language to another, combining STT and TTS), and even services for creating a custom Voice Font (i.e., a synthetic voice trained on human voice samples, useful for example for automating switchboards while maintaining the company's "voice"). A practical example: an automated call center can use Speech to Text to transcribe a user's request on the phone, then process the text (perhaps with Language services, see below), and finally respond by generating audio with Text to Speech.

·      Language: Services that understand and process natural language (written text or conversation). These include Language Understanding (LUIS) or the new Conversation Language Understanding, to recognize intent and extract entities from sentences; Text Analytics for text analysis such as extracting key phrases, recognizing named entities (people, organizations, places, etc.), detecting the sentiment (emotional tone) of a text, and generating automatic summary of a document ( summarization ); Translator for translating texts from one language to another. For example, you could automatically analyze customer reviews: with Text Analytics, you can obtain the sentiment score (positive/negative) and the key phrases mentioned for each review (e.g., "slow shipping," "great customer service") to understand what's good or bad about the product.

·      Decision: This category includes services aimed at supporting specific decisions or analyses. Two examples: Personalizer, a reinforcement learning service used to make personalized recommendations in real time (for example, choosing which content to show a user on a website based on context and implicit feedback); Anomaly Detector, a service that analyzes time-series data and automatically flags anomalous values and unusual trends (useful for KPI monitoring, fault detection, security, etc.). These services provide very specific “vertical” intelligence: Personalizer avoids having to build an online recommendation engine from scratch, while Anomaly Detector avoids having to manually implement statistical models to find outliers in the data.

·      Document Intelligence: Formerly known as Form Recognizer, this service combines vision and language to extract structured information from documents. For example, it can take a PDF document or an image of an invoice as input and return the recognized fields (header, date, total, expense items, etc.) in a structured format. It supports pre -trained templates for invoices, receipts, IDs, and identity cards, as well as custom templates where you can upload examples of your forms and teach the service to extract the exact fields you need. This is very useful for automating the scanning of paper documents or emails and inserting them into databases without having to manually transcribe them.

All these services are available in two ways: via REST API (HTTP calls from any language/platform, for example, passing an image URL and obtaining a JSON with the result) or via official SDKs (libraries available in Python, C#, Java, JavaScript, etc., which simplify the call by hiding the REST details). The underlying model is software-as-a-service: you pay based on the number of calls or the amount of data processed, and Microsoft is continuously updating and improving the underlying models.

A key advantage of cognitive services is rapid time to market: if I need to translate text into five languages and extract product name entities from descriptions, I can do it in a few hours by integrating Translator and Text Analytics, without having to collect multilingual data corpuses and train complex NLP models from scratch. Of course, the downside is that the models are "generic": they aren't trained specifically on my data, so they might not perfectly capture my domain (for example, a general entity extraction model might not recognize very specific product names from my company). In these cases, Azure often offers customization options: for example, Custom Vision to train a vision model with a few images, or the ability to provide custom entity lists in Language.

Let's see a concrete example of combined use of cognitive services in a solution:

Practical example: Suppose we want to automate the processing of documents received from various customers, such as order forms and text feedback, to enter the data into a database and obtain a quick summary. We can build an intelligent document portal that works like this:

·      The user uploads a form (PDF or image) to the portal.

·      The system uses Azure Document Intelligence to analyze the document and extract structured fields (e.g., order number, customer name, list of ordered products, total amount).

·      From the form or any attached free text, we can use Azure Language (summary function or sentiment analysis) to summarize any textual notes or understand the customer's opinion (e.g. "the customer requested urgent delivery and appreciated the support received").

·      The extracted data (order fields and notes summary) is then saved to a database, such as Azure SQL.

·      This whole flow could be orchestrated with a Logic App: triggers on the new file, calls to Document Intelligence and Language services, logical branches depending on the results, then saving to the DB or notifying humans if something is missing.

In this scenario, thanks to cognitive services:

·      Data extraction from the document is done automatically (without manual entry).

·      The system also understands free text and condenses it.

·      Processing time goes from manual minutes (or hours) to automated seconds.

It's worth noting that Microsoft Foundry (which we'll discuss in the next chapter) integrates the same capabilities as Cognitive Services in the form of Tools. In practice, when creating an AI agent in Foundry, you can insert tools like " Vision_AnalyzeImage " or " Language_SummarizeText " that correspond behind the scenes to Azure Cognitive APIs. This means that those developing agents with Foundry can easily enrich them with cognitive capabilities without having to call the APIs separately, but directly from the unified Foundry environment.

In summary, Azure Cognitive Services represent the fastest way to infuse intelligence into applications: just one API call is all it takes to access years of Microsoft research in vision, language, speech, and decision support. In the following sections, we'll see how to build more complex AI solutions, leveraging generative AI models and orchestrating multiple services together.

 

6. Azure OpenAI and Microsoft Foundry: Generative AI Solutions

Generative AI has gained enormous traction in recent years, particularly thanks to the evolution of Large Language Models (LLMs) and other advanced architectures (such as generative adversarial networks, GANs, in the field of image processing). Azure has positioned itself as a reference platform in this area as well, especially through two closely related offerings:

Azure OpenAI Service is an Azure service that provides access to generative models developed by OpenAI, with all the benefits of security, scalability, and Azure integration. Through Azure OpenAI, developers can use models such as GPT-3.5, GPT-4 (for natural language generation and understanding), Codex (for code generation from natural language), and DALL-E (for generating images from text descriptions). Access is controlled (approval is required to use the service, given potential misuse), but once enabled, models can be called via REST APIs or SDKs, similar to cognitive services. For example, with Azure OpenAI, you can send a prompt to GPT-4 and get the completion/text generated in response, all while ensuring that the inference takes place on Azure servers (important for compliance and data privacy concerns).

Microsoft Foundry is a unified portal and service introduced to extend the Azure OpenAI offering and integrate it with other features. We can think of it as a hub for advanced AI solutions. Its main components are:

·      A rich Model Catalog: Inside Foundry, you'll find not only OpenAI models (GPT, DALL-E, etc.), but also many other models from various providers: for example, models from Meta AI, open-source models from Hugging Face or emerging AI startups, models like Cohere for NLP, DeepSeek, etc. Each model is accompanied by information, evaluations, fine-tuning options (where supported), deployment, and monitoring. In practice, Foundry aims to provide a centralized catalog where you can choose the model that best suits your needs, regardless of vendor.

·      Agent Service: Foundry allows you to create AI Agents, which are software entities that combine a model (typically an LLM) with a set of tools and memory to perform complex tasks by breaking them down into multiple steps. An agent is what in other contexts we might call an intelligent bot, except that here the emphasis is on using a generative model as the agent's "brain." For example, an agent could be designed to answer employees' questions about internal documents: it would be built with a linguistic model (e.g., GPT-4) and a search tool for corporate documents (e.g., using Azure Cognitive Search ), so that when the agent receives a question, it can both reason with its own linguistic capabilities and take action by calling the search tool to find relevant information, ultimately returning an accurate answer to the user. Foundry provides the infrastructure to define these agents, connect tools (e.g., the cognitive services mentioned above become reusable tools within the agent, as well as custom functions developed by the user), and manage multi-turn conversations and call chains.

·      Unified Endpoints and Management: Any model or agent you create in Foundry can be published as an API endpoint. Foundry supports both OpenAI API-compatible endpoints (useful because many software already directly supports the OpenAI API, so by using Foundry you can masquerade as a standard OpenAI endpoint) and custom REST endpoints. Furthermore, Foundry integrates secure management with RBAC ( Role-Based Access Control) and unified enterprise policies: this means that access to various models can be regulated with granular permissions (e.g., only team X can use the company's GPT-4 model) and that content policies can be applied (e.g., security filters to prevent certain output). Foundry also offers observability tools: detailed logging of requests made to the model, usage statistics, cost monitoring, etc., which are essential when a company begins to intensively use generative models.

·      Guides, resources, and user-friendly interfaces: Within the Foundry interface, you'll find guides and quickstarts that explain how to create your first project, how to fine-tune a model (where possible, such as for some open source models), how to connect a new custom tool to your agent, etc. There are also interactive playgrounds for trying out models with prompts right from your browser, and visual workflows for defining an agent's action chains.

In short, when should you use Azure OpenAI vs. Foundry ? Azure OpenAI is great if you simply want to integrate an OpenAI model into your application (e.g., call GPT-4 to generate text, and that's it). Foundry becomes valuable if:

·      you want to have access to a larger set of models (not just OpenAI but others as well),

·      you want to combine multiple models or tools into something more complex (an agent),

·      You want centralized, sophisticated control over how models are used across the organization (monitoring, policies, etc.).

Let's look at a couple of practical examples related to Foundry and generative AI on Azure:

·      Example 1: A customer support team wants to build an AI assistant that helps answer frequently asked customer questions. Using Foundry, they could start with a powerful language model (say, GPT-4 or a similar open-source model) and specialize it by loading company FAQ documents. They set up an agent equipped with a document search tool (perhaps integrating Azure Cognitive Search as a tool for retrieving relevant documents). When the agent receives a question, it can search the relevant FAQs and then formulate a response citing the information found. The team can test this agent in the Foundry playground, evaluate the answers, make adjustments (such as adding specific prompts or additional knowledge sources), and finally deploy it as an API endpoint. They can then integrate the agent into a chatbot on the website: whenever a user asks a question, the question is sent to the Foundry endpoint, the agent processes it, and returns a ready-made answer to display to the user—all in seconds and in natural language.

·      Example 2: A company wants to leverage generative AI to automate multi-step tasks. For example, an agent receives an email, determines whether it's an order, extracts the details (perhaps using a Document Intelligence tool), checks availability in a database (using a tool that calls an internal API), and finally responds by generating a confirmation email. This is a complex flow that combines NLP, data integration, and text generation. With Foundry, the team can create an agent by defining a chain of actions: action 1: understand the intent and document type ; action 2: if an order, use Document Intelligence to fetch the data ; action 3: use an API to check inventory ; action 4: formulate the response with the generative model, integrating the results. The agent can use memory to retain the extracted data between steps. Once tested, the agent is deployed on an endpoint and linked to the company's email management system. This is a highly customized example: custom built with Foundry by combining models and tools.

An important concept that has recently emerged in the context of these generative solutions is RAG ( Retrieval-Augmented Generation). We actually described its principle in the example: it means enriching the generative process of an LLM with a knowledge retrieval step from specific sources. In practice:

1.    It takes the user's question (or other generation requirement).

2.    A search is performed in a knowledge base (documents, databases) to extract the most relevant information.

3.    Both the question and the extracted information are provided to the generative model.

4.    The model also composes the response using the information provided, thus ensuring that the response is relevant and anchored to a verifiable source.

Azure supports this pattern very well with services like Azure Cognitive Search (for indexing documents and retrieving them via queries) combined with Azure OpenAI/ Foundry for the generative part. This allows you to build Q&A systems on corporate documents, chatbots that can access knowledge bases, and generally reduces the hallucination of generative models (the risk of them inventing information) because they are forced to rely on reference data.

Finally, it's useful to know that Foundry and Azure OpenAI continue to evolve: Microsoft is unifying the experience into an Azure AI Studio, of which Foundry is part, where you can choose models, perform prompt engineering, evaluate content safety, all in one place. However, conceptually, the combination of large pre -trained models and cloud infrastructure to customize and integrate them is what enables previously unthinkable AI scenarios today. Azure puts these capabilities in the hands of developers with high-level tools, minimizing the need for overly specialized skills in training giant neural networks (something only a few players could do on their own).

 

7. Integrating AI Solutions with Azure Services

We've examined the various pieces of the puzzle (custom models, cognitive services, generative agents). Now it's important to understand how to integrate these components into comprehensive solutions leveraging the Azure ecosystem. In other words, AI alone is rarely enough: it needs to be integrated with applications, data flows, ensure security, scalability, and so on. Azure offers a myriad of services designed specifically for building end-to-end cloud solutions; here, we'll focus on those that are particularly relevant for connecting the AI/ML component with the rest of the application landscape.

Here are some ways AI solutions on Azure can be integrated and enhanced by other Azure services:

·      Exposing APIs via API Management: If you've developed a model and published it as an endpoint (for example, an ML model on Azure ML or a Foundry agent ), you'll likely want other applications (internal or external) to be able to consume it. Azure API Management (APIM) is a service that acts as a gateway and "storefront" for APIs: you can register your model's endpoint as an API in APIM and take advantage of its security features (authentication, rate limiting, keys/API tokens), monitoring, and even transformations on input/output data. This way, for example, a team outside your organization could consume your AI via an API key published to APIM, without directly accessing the underlying endpoint, and with the confidence that APIM regulates traffic and hides the internal implementation.

·      Events and Triggers with Event Grid and Functions: Many AI applications benefit from event -driven architectures. For example, you might want to retrain an ML model every time a significant new dataset is added, or send an alert if the model detects an anomaly. Azure Event Grid is the service that allows you to route events (like “file X uploaded to Storage” or “new row added to database” or custom events) to other services. Azure Functions allows you to run serverless code in response to those events. Combined: Imagine uploading new data into an Azure Blob Storage container every day ; Event Grid can be configured to “listen” for the new blob event and launch a Function, which in turn could start an Azure ML Pipeline to update the model with the new data, or directly run an inference calculation on that data and save the result. Another example: a “new IoT stream with anomalous data” event can trigger a Function that sends a message to Teams via a webhook, informing the team that the anomaly pattern detection found something worrying.

·      Flow Orchestration with Logic Apps: Azure Logic Apps is the low-code orchestration and workflow service. It allows you to design block-based workflows, with conditions, iterations, and integration with a wide range of connectors (databases, email, external SaaS services, etc.). For AI solutions, Logic Apps can be very useful when you need to combine multiple steps in sequence, perhaps involving different systems. For example, I could have a Logic App that runs this process: "Whenever an email arrives at a certain address, get the PDF attachment -> send it to the Form Recognizer service -> get the result. If a certain field is above a threshold, then send an email notification to the manager, otherwise archive it in SharePoint." All this without writing serverless code but rather designing it with ready-made connectors (there's a connector for Form Recognizer, for Send Email, for SharePoint, etc.). In practice, Logic Apps can orchestrate our AI blocks (call one cognitive service, then another, then a custom model) within larger business or application processes.

·      Data and Results Storage: Any AI solution produces or consumes data: ML models produce predictions, AI agents access documents, cognitive services extract information. We need to think about where we store both input data and results, and possibly any data generated at runtime (e.g., vector embeddings for RAG, conversation logs, etc.). Azure offers many storage options:

a)    Azure Blob Storage for generic files (including datasets, images, exported models).

b)    Azure SQL Database or Cosmos DB for structured data (relational or NoSQL respectively).

c)    Azure Data Lake for large volumes of raw data in a data lake (often used in ML data preparation).

d)    For specific generative AI scenarios with RAG, text embeddings are often saved in a search engine like Azure Cognitive Search (which indexes and allows for vector-based document search), or in a fast key-value store like Redis if implementing ad hoc architectures. In general, the advice is to use existing storage services for what they do best, rather than trying to have the AI service do everything. For example, if a model generates 1,000 records to be saved, it's better to insert them directly into an appropriate database and then query them, rather than having the model store that data in memory.

·      Security and Networking: In enterprise contexts, beyond functional logic, solutions must be ensured to comply with security and privacy policies. Azure allows you to isolate AI services within a virtual network (VNet) so they can only be reached from the internal network and not from the public internet. Furthermore, many services support Private Endpoints, which are private network interfaces on the VNet that allow you to call, for example, an Azure ML or Azure OpenAI endpoint without traffic going out onto the public network. Azure Key Vault is used to manage secrets (such as API keys, passwords, connection strings): instead of hardcoding credentials into code, AI solutions retrieve secrets from Key Vault as needed. This is especially crucial when orchestrating pipelines with multiple services (each may have its own API key, but Key Vault stores them all centrally and securely).

·      Common architectural patterns: Microsoft provides many official guides and references architecture on how to combine these services for known scenarios. For example:

a.    web chatbot architecture might include a Web App in Azure App Service to host the chat interface, a Language Understanding service to interpret questions, a Logic App or Function to orchestrate responses, and perhaps integration with other systems (calendar, customer database, etc.).

b.    RAG ( Retrieval-Augmented Generation) solution architecture typically involves: document storage in Blob Storage, indexing via Azure Cognitive Search, an Azure Function or Azure OpenAI/ Foundry agent to handle the query (which does: query documents -> call a generative model with context), exposure via API Management, and perhaps a front-end on an App Service. (This is exactly the scenario mentioned in the previous examples: Q&A on business documents.)

c.    Architectures for Complex Conversational Agents and Services (sometimes called MCP - Model Context Protocol (referring to the emerging standard for defining how models and agents interact with tools) involve using Foundry to define agents, Event Grid /Functions to handle any asynchronous events, and so on.

b)    A concrete example of an integrated solution could be useful to fix ideas.

Example: Full RAG (document Q&A) implementation – Imagine we want to build an internal system where employees can ask questions like "What is the company vacation policy?" and get a timely answer from internal regulations documents. Here's how we could implement it on Azure:

1.    Knowledge Base: All documents (PDF, Word files) with company policies are uploaded to a container on Azure Blob Storage.

2.    Indexing: We use Azure Cognitive Search to index these documents. Cognitive Search will read the files (there are skills that extract text from PDFs, etc.) and create a searchable index, including semantic indexing, perhaps generating embeddings for paragraphs.

3.    Q&A API: Let's create an agent with Azure OpenAI/ Foundry: the agent will have a language model (e.g., GPT-4) and a search tool that queries the Cognitive Search index. When it receives a query, the agent uses the tool to retrieve the 3-5 most relevant documents from the query, then passes these documents (or extracts) along with the query to the GPT-4 model. The model generates a natural language response, perhaps including references to the documents.

4.    Orchestration: We could encapsulate step 3 in an Azure Function if we want to manage it manually, or configure the agent directly in Foundry. In any case, we get an endpoint (via Foundry or via Function + OpenAI) that returns the answers given the questions as input.

5.    Exposure and Security: We put this endpoint behind API Management to manage authentication (only employees can sign in, perhaps integrating Azure AD for SSO) and to monitor usage.

6.    Front-end: We develop a small web application (in App Service or static web app) that provides a chat/Q&A type interface to employees, which calls the above API.

Additionally, to improve the solution:

·      We use Key Vault to hold Cognitive Search and OpenAI keys, which the Function or Agent will securely retrieve.

·      We set up monitoring: for example, we log every question and answer (be careful of sensitive data) perhaps on Application Insights, and we set up an alert if the success rate drops (for example, too many empty answers).

·      If necessary, we could automate the pipeline via Event Grid: when a new policy document is loaded into storage, an event is triggered that invokes a process to update the Cognitive Search index (which typically has a scheduled indexer anyway).

This example shows several Azure services working together: Storage, Search, OpenAI, Functions, APIM, App Service, Key Vault, etc. And it's a viable scenario with almost all managed components (little to maintain on your own).

In general, Azure favors a modular approach: each service plays its part, and it's up to the solution designer to orchestrate the right flow. The good news is that there are many examples and templates, and cloud services relieve you of having to worry about infrastructure (servers, scalability, updates), allowing you to focus on application logic and AI.

 

8. Responsible Artificial Intelligence (Responsible AI)

When developing AI technologies—especially for use in real-world contexts with users, customers, or citizens—it's not enough to focus solely on technical performance. It's important to ensure that AI is used responsibly, respecting ethical principles and minimizing the risk of negative impacts. Microsoft has defined six principles of responsible AI that guide the design and implementation of AI systems:

·      Fairness – AI should treat all users and groups fairly, avoiding bias and discrimination. For example, a credit model should not penalize or unduly favor one ethnic group over another given equal financial circumstances.

·      Reliability and Safety – AI systems must be robust and safe, function well under the various expected conditions, and elegantly handle any errors or unexpected situations. Furthermore, they must be protected from malicious attacks and abuse.

·      Privacy and Data Security (Privacy & Security) – AI solutions must ensure the protection of personal and sensitive data. They must comply with privacy regulations, minimize data collection, and prevent data leaks or unauthorized use. (Microsoft uses "security" for both safety and security; here we distinguish between operational security and data security.)

·      Inclusiveness – AI should be inclusive, meaning it should be designed with user diversity (different abilities, cultures, backgrounds) in mind. This means, for example, developing accessible interfaces and models that work well for different demographics.

·      Transparency – AI systems should be made as transparent as possible in their operation and intent. Users should know when they are interacting with an AI system (vs. a person) and have information about how and why the AI made a certain decision, in a comprehensible way.

·      Accountability – Creators and operators of AI systems must maintain ultimate responsibility for their actions. This means establishing human oversight mechanisms, auditability of AI decisions, and generally taking responsibility for correcting any negative consequences caused by the system.

Following these principles isn't just a matter of theory: they must be translated into practice during the development of AI projects. Microsoft has developed a four-phase operational cycle for implementing Responsible AI: Identify, Measure, Mitigate, Operate.

·      Identify: In the initial phase of a project, identify potential ethical and security risks. For example, understand whether the model might be biased, whether decisions might impact vulnerable groups, what potential abuses or misuses of the system might be, etc. This phase often also includes defining ethical requirements and planning how to verify them.

·      Measure: During development, actively measure model properties against RAI principles. For example, calculate fairness metrics (such as equal false positives across groups), test robustness with noisy data or edge cases, verify model confidence levels, conduct security tests ( adversarial attacks, etc.), and so on. Azure ML helps here with built-in fairness and explainability tools.

·      Mitigate: If the measurements reveal issues, apply mitigation strategies. Some examples: if there is bias in the data, you can balance the dataset by adding more examples from the minority group or applying weights; if the model is difficult to interpret, you can choose a simpler model or add a post-hoc explanation; if there is a risk of toxic output (in the case of language models), implement filters or content moderation. Mitigation is an iterative step – it often requires going back and redoing part of the development (feature engineering, training, etc. with additional constraints).

·      Operate: In production, continue to monitor and maintain responsible AI principles. This includes monitoring models for data drift that could reintroduce bias, updating usage policies as new scenarios emerge, training relevant personnel on the proper use of AI, and having contingency plans in place if something goes wrong (e.g., if the model starts making serious errors, be prepared to suspend it or call in humans).

Azure provides practical tools to support Responsible AI in both development and production:

·      In Azure Machine Learning, as mentioned, there are dashboards for analyzing fairness ( a Fairness Dashboard that can calculate metrics such as demographic parity between subgroups), explainability dashboards (which show the importance of factors in model decisions or local explanations for individual predictions), and error analysis tools (to systematically identify which data features cause the most errors). These tools allow data scientists to measure and then mitigate problems upstream.

·      In Foundry, on the generative model side, Microsoft has integrated Content Safety controls. This means that when a model (e.g., GPT-4) generates text, a filter can be activated that analyzes the content for problematic elements—such as offensive language, hate speech, explicit violent content, sensitive personal information, etc.—and takes action (blocking or altering the response, reporting the event, etc.). Content Safety is especially crucial for agents that interact with users in natural language, to prevent inappropriate output.

·      Foundry also offers tracking and evaluation of agent conversations, allowing you to keep an audit log of what agents do and how they perform. For example, you could review sessions in which the agent failed to respond correctly or provided unsatisfactory responses to improve the process.

·      Another security aspect is integration with services like Azure Defender for Cloud: it can be configured to monitor AI resources for insecure configurations or anomalous activity. For example, if someone logs into an Azure ML workspace and downloads large amounts of data, it could trigger an alert; or if an endpoint experiences an abnormal number of calls (possible abuse ), this can also be detected. Having such integrations ensures that AI, inserted into the broader context of corporate IT, fits within existing cybersecurity and compliance practices.

Let's take an example of applied Responsible AI: Imagine you're developing a credit scoring model (which assesses customers' creditworthiness to decide whether to grant a loan). You know there's a risk of racial or gender bias if, for example, the historical data (from which the model learns) reflects human or historical biases.

·      During development, you'll use Azure ML's Fairness Dashboard: you upload the model's output data (approval/rejection predictions) along with sensitive columns (e.g., ethnicity, gender if available, geography). Perhaps you discover that the approval rate for a certain ethnic group is significantly lower than others with similar financial profiles – a possible indicator of bias.

·      To mitigate this, you decide to apply a strategy: for example, you use a training set rebalancing technique (if a group was underrepresented, you increase its weight or sample size) or you apply a correction to the decision thresholds to somewhat level out the differences (e.g., calibrated predictions by group). You rerun the model and check the fairness again until it falls within acceptable parameters.

·      Additionally, use Explainability: For loan rejection decisions, make sure to extract local feature importance, so you can provide the customer with an explanation such as "Application rejected because annual income was below the minimum threshold and credit history showed 2 late payments in the last 5 years" rather than an opaque rejection. This increases transparency and accountability.

·      In production, set up continuous monitoring: if in the future the updated model starts to show drift again (perhaps customer data changes and introduces new disparities), you will receive an alert and can intervene (perhaps by collecting more data from the disadvantaged group or creating an updated model).

Another example: for a public conversational agent (which also responds to external users on a site), you configure Content Safety in Foundry so that any output generated by the model passes through moderation filters. An attacker might try to force the agent to output inappropriate content (a so-called prompt injection attack), but the filter catches profanity or insults and removes them. Or, if the user asks questions about personal data the agent might know (e.g., "Tell me the home address of customer X"), the agent is designed to refuse to respond, citing privacy principles. Defining what an agent can and cannot do is also part of responsible design: for example, you might limit the agent's tools to prevent it from performing potentially harmful actions (don't give it the ability to send company-wide emails unless absolutely necessary, and in any case, monitor its output).

In conclusion, Responsible AI isn't a separate element of the solution: it must be woven into every part of the lifecycle and architecture. Azure offers many technological guardrails to help (filters, dashboards, permissions, logs), but it also requires the development team's awareness: choosing the right use cases for AI (where it delivers net benefits), testing carefully, and maintaining adequate human oversight. For students approaching these topics, it's encouraging to know that more and more automated tools will help them adhere to these principles, but it's vital to understand their meaning and importance from the outset.

 

9. Developer Tools and Environments

Azure provides various environments and tools for those who need to develop, test, and prototype AI and machine learning solutions. Depending on your needs—team project vs. individual experiment, low-code solution vs. custom code, rapid generation vs. complete pipeline—you can choose the most suitable tool, or even use multiple tools in combination. The main environments you'll encounter are:

·      Azure Machine Learning Studio (Azure ML) – We've talked about it extensively: it's both a backend service and a web environment. From a developer's perspective, Azure ML Studio is the interface where you can manage everything: upload Jupyter notebooks and write code, run tracked training experiments, use visual interfaces like the designer to drag-and-drop ML models, create and monitor endpoints, and more. It's ideal for collaborative data science projects in an enterprise context: multiple people can access the same workspace with their own Azure AD accounts, work on the same resources, and enjoy the security of access controls and activity logging. Azure ML is excellent for developing custom models that will then be put into production, ensuring reproducibility and ease of maintenance ( integrated MLOps ).

·      Azure AI Studio / Microsoft Foundry – This is the environment designed for generative AI and managing pre- trained models. Azure AI Studio is the new unified interface that also includes the Foundry experience. Here, developers (or even non-developer power users ) can easily test models (e.g., experiment with different prompts on GPT-4), create conversation canvases to define how agents should interact, add tools to agents via configuration, and evaluate responses—much of this with a low-code or no-code approach. You can think of AI Studio as a “laboratory” for building conversational AI apps without having to write all the code for model invocation, orchestration, and so on, because the platform provides it. For students, this environment is useful for quickly exploring the potential of generative models and building prototypes of chatbots or innovative applications, with little need to know the underlying infrastructure.

·      Data Science Virtual Machine (DSVM) – This is a different option: these are virtual machine (VM) images offered on Azure, preconfigured with a rich set of data science and deep learning tools. You can choose either DSVM Windows or DSVM Ubuntu; once the VM is created, you'll find software like Jupyter Notebook, RStudio, Visual Studio Code, and a large number of Python/R libraries for machine learning and deep learning ( scikit-learn, PyTorch, TensorFlow, Pandas, etc.) already installed, as well as drivers and optimizations to optionally use Nvidia GPUs. The DSVM is a standalone environment: unlike Azure ML Studio or Foundry, here you have a real machine where you can do almost everything manually as you would on your PC, but with the power of the cloud (you can choose very powerful VMs, with multiple CPUs or GPUs). It is highly appreciated in training, workshop and rapid prototyping contexts: for example, in a university course on ML I could tell students to each activate a DSVM (perhaps to turn it off when not in use, to save money).

 

Conclusions

Artificial Intelligence (AI) is the set of techniques that enable machines to perform typically human tasks, such as recognizing images, understanding language, and making decisions. Machine Learning (ML) is the main subdiscipline of AI: rather than programming rules, models learn from data to make predictions and classifications. Azure offers two approaches: custom models via Azure Machine Learning and pre -trained cognitive services, easily integrated with other cloud solutions. There are three types of ML: supervised (learns from labeled data, useful for classification and regression), unsupervised (finds hidden patterns, such as clustering and anomalies), and advanced (finds hidden patterns, such as clustering and anomalies). detection ) and deep learning, based on deep neural networks, ideal for computer vision and NLP. An ML project follows a structured lifecycle: data collection and preparation, training, evaluation, deployment, and monitoring ( MLOps ). Azure ML supports each phase with tools for training at scale, AutoML, model registration, and secure deployment. Azure Cognitive Services (Vision, Speech, Language, Decision, Document Intelligence) allow you to add AI capabilities via APIs without developing complex models. Azure OpenAI and Foundry enable generative AI scenarios, intelligent agents, and retrieval integration (RAG). The Azure ecosystem allows you to orchestrate end-to-end solutions with Logic Apps, Functions, API Management, secure storage, and governance. It is essential to apply the principles of Responsible AI (fairness, transparency, privacy, security) using integrated tools for fairness, explainability, and content. Finally, Azure provides developer environments such as ML Studio, AI Studio/ Foundry, and DSVM to collaboratively and scalably prototype and manage AI solutions.

 

Chapter Summary

This chapter provides a comprehensive overview of Artificial Intelligence (AI) and Machine Learning (ML) technologies on Azure, covering basic concepts, types of learning, the ML lifecycle, available platforms and services, as well as responsible AI practices and developer tools.

·      AI and ML concepts: AI aims to enable machines to perform intelligent tasks, while ML is a subdiscipline that allows systems to learn from data without explicit rules. On Azure, you can choose between custom models and pre -trained services that can be integrated with each other.

·      Types of machine learning: Supervised learning (models with labeled data), unsupervised learning (pattern discovery without labels), and deep learning (deep learning with multilayer neural networks), each supported by specific Azure services.

·      ML lifecycle: Includes data collection and preparation, training, evaluation, deployment, and ongoing monitoring, with Azure tools that facilitate each phase and support MLOps practices.

·      Azure Machine Learning: Unified platform for managing the ML lifecycle, with collaborative workspaces, training on scalable resources, AutoML, model management, deployment with managed endpoints, and tools for responsible AI like fairness and explainability.

·      Azure Cognitive Services: Offers pre -trained AI capabilities for vision, language, speech, decision making, and document analytics, accessible via API or SDK, ideal for rapid integrations without training.

·      Generative AI with Azure OpenAI and Foundry: Azure OpenAI provides generative models like GPT-4 and DALL-E, while Foundry offers a hub for multiple models, complex AI agents, and centralized management with monitoring and security tools.

·      Integration with Azure services: AI solutions integrate with API Management, Event Grid, Functions, Logic Apps, various storage services, network security, and Key Vault, enabling modular and scalable cloud architectures.

·      Responsible AI: Microsoft promotes ethical principles such as fairness, transparency, safety, and accountability, supported by Azure tools to measure, mitigate, and monitor bias, errors, and model safety.

·      Developer tools: Azure ML Studio for collaborative data science, Azure AI Studio/ Foundry for generative AI and agents, and Data Science Virtual Machine for preconfigured development and prototyping environments.  

 

CHAPTER 8 – The DevOps Service

 

Introduction

Azure DevOps is a platform offered by Microsoft that integrates a series of services useful for planning work, managing source code, automating builds and releases, managing packages, and monitoring software quality. Essentially, Azure DevOps provides a complete DevOps ecosystem that allows development teams to collaborate effectively and continuously release high-quality software.

In modern software teams, the DevOps model represents a set of practices and tools designed to unite development (Dev) and IT operations (Ops). The goal is to accelerate the software lifecycle, from code writing to deployment in production, while improving quality and reliability. Azure DevOps supports this approach by providing integrated services that cover all phases: from code version control and work scheduling to continuous delivery. integration / continuous delivery (CI/CD), testing and monitoring.

The main services included in Azure DevOps are:

·      Azure Repos: A Git- based (distributed) or TFVC (centralized) version control system for managing source code and developer collaboration.

·      Azure Pipelines: A CI/CD service that automates the build, test, and release of your applications, supporting pipelines defined as code (YAML) and integration with many deployment environments.

·      Azure Boards: An agile project management tool for tracking work through work items, Kanban boards, Scrum backlogs, progress reporting, and team collaboration.

·      Azure Artifacts – A package and dependency management service that allows you to host private feeds for components like NuGet, npm, Maven, Python libraries, etc., enabling safe code sharing and reuse.

·      Azure Test Plans: (Not covered in detail in this ebook) A service for managing manual and automated tests, including test case planning and feedback gathering.

Throughout this student ebook, we'll explore the core services (Azure Repos, Pipelines, Boards, Artifacts ) and additional related concepts, building on the content of the provided slides. Each section focuses on a key topic and maintains a didactic and informative tone, with explanations of key concepts, definitions of important terms, hands-on practical examples, and even "visual cues" explained through text (i.e., descriptions of any diagrams or flows that can aid understanding).

 

Outline of chapter topics with illustrated slides

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Repos is Azure DevOps ' versioning service. It supports both the distributed Git system and the centralized TFVC. With Git, you get local history, lightweight branching, and pull requests to integrate code after review. Branch policies enable requirements such as code reviews, valid builds, and health checks. Pull requests enable discussions, suggested changes, inline comments, and automatic checks via Azure Pipelines. You can protect your main branch from direct pushes and use forks to collaborate with external contributors. Commits can be linked to work items on Azure Boards, and you can apply linting and security scans to builds. Permission management ensures the minimum access necessary. Consult the documentation for more information on Azure Repos and branch policies.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Pipelines performs Continuous Integration and Continuous Delivery. Pipelines are defined in YAML: they live in the repository, are versioned, and are reusable. Key elements include triggers, stages, jobs, steps, agent pools, variables, and artifacts. You can leverage templates and conditions for different paths, and integrate GitHub or Azure Repos for pull request validation. Status checks block the merge if the build fails. For container orchestration, you can use multi-stage pipelines with deployment to AKS or App Service. See the YAML schema and Pipelines overview documentation for details.

 

Immagine che contiene testo, schermata, Carattere, software

Il contenuto generato dall'IA potrebbe non essere corretto.Release strategies in Azure DevOps define gates and approvals between Dev, Test, and Production environments. You can set checks such as human approvals, branch checks, required templates, and resource checks. Gates can include work item queries, test results, and security scans. Deployment jobs provide logs and lifecycle hooks, while protection rules ensure quality requirements. You can implement canary and blue-green deployments and automate rollbacks in the event of problems. The documentation on Environments and Checks and Deployment Strategies is available for further information.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Artifacts offers private feeds for NuGet, npm, Maven, Python, and Universal Packages. It supports semantic versioning, package retention, and upstream sources for caching from public registries. Integrate pipelines to securely publish and consume packages. Tools like Dependabot and Renovate help monitor versions, while SBOM and SCA scans verify licenses and vulnerabilities. Views allow you to promote packages across environments. Consult the documentation for more information on Azure Artifacts and upstream sources.

 

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Boards lets you manage work items like Epics, Features, User Stories, Tasks, and Bugs, supporting both Scrum and Kanban. You can link work items to commits, pull requests, and builds to track the entire lifecycle. Advanced queries and dashboards show burndown, lead time, and quality. Process templates are configurable, and collaboration is facilitated by mentions, dependencies, discussions, and attachments. Integration with GitHub Issues and DevOps Pipelines enables automations such as automatically closing work items. See the boards overview and link work items to Git guides.

 

Immagine che contiene testo, schermata, Carattere, software

Il contenuto generato dall'IA potrebbe non essere corretto.Integrating quality gates and security checks into pipelines reduces defects and risks. Use unit and integration tests with JUnit or TRX reporting, code coverage, and static Analysis tools like SonarQube and CodeQL, and SCA for dependencies. You can enable Microsoft Defender for Cloud to report risks and implement a Secure Supply Chain with signatures and attestations. Policies may require minimal coverage or no coverage for critical vulnerabilities. See the Publish Test Results and Secure DevOps Kit resources for more details.

 

Immagine che contiene testo, schermata, software, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.With Infrastructure as Code and Configuration as Code, you can describe resources and configurations using Bicep, ARM, Terraform, or Ansible, and release them with automated pipelines. Bicep simplifies ARM templates with reusable modules and type safety. Configuration as Code, like Azure App Configuration and Key Vault, manages parameters and secrets for each environment. You can integrate validation, approvals, and policies to ensure compliance. Use Blueprints and Landing Zones to standardize, and Drift Detection to prevent divergences. Learn more with the Bicep documentation. overview and Terraform pipelines.

 

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.With Azure Kubernetes Service, you can implement CI/CD for microservices: build images, push to Azure Container Registry, and deploy via kubectl, Helm, or GitOps. Multi-stage pipelines automate build, scan, push, and deploy. Azure Monitor Container Insights provides logs and metrics, while for security, you can use Workload Identity, Network Policies, and Azure Policy. Reliability is ensured by readiness and liveness probes, autoscaling, and Pod Disruption Budgets. See the AKS CI/CD and Container Insights documentation for more details.

 

Immagine che contiene testo, schermata, software, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Governance ensures releases meet security and regulatory standards. Azure Policy enforces rules such as mandatory private endpoints or required tags, and verifies compliance with reports. In DevOps, approvals, mandatory templates, and branch policies control changes. Auditing and log analytics track activities. Integration with Defender for Cloud DevOps provides security recommendations, while Azure Monitor workbooks aggregate build, error, and time metrics. For privacy, adopt the Security Development Lifecycle and manage secrets in Key Vault. See the Azure Policy and Defender for Cloud DevOps sources.

 

Immagine che contiene testo, schermata, software, Icona del computer

Il contenuto generato dall'IA potrebbe non essere corretto.In Azure DevOps, the main unit is the organization, which contains projects, boards, pipelines, and tests. Permissions are managed by level through security groups and access levels, while service connections authorize deployments. Managed Expiring identities and PATs increase security, as does tenant-level conditional access. Scalability is achieved by separating projects, using Area Paths and Teams, and standardizing templates and policies. Centralize artifact feeds and shared environments to streamline management. See the Organization Overview and Permissions documentation for more information.

 

1. Azure Repos: Version Control and Collaboration

Azure Repos is the Azure DevOps module dedicated to version control, or source code version management. It supports two version control systems: Git, which is distributed, and TFVC (Team Foundation Version Control), which is centralized. The choice between the two depends on the project's needs, but Git is currently the most popular system for most teams due to its flexibility and speed.

a) Azure Repos Core Concepts

·      Git repositories: Azure Repos lets you create an unlimited number of private, cloud-hosted Git repositories where you can store your code. Each repository serves as a repository for your project's history, containing all your commits (history of changes), branches (code ramifications), and version tags.

·      Branches and History: The ability to create branches Lightweight (i.e., resource-efficient) is key with Git. Developers can work on parallel branches, for example by creating a dedicated branch for a new feature (a feature branch ), without affecting the stability of the main branch (often called main or master ). All changes are tracked in local and remote history, ensuring complete traceability. With TFVC, however, code control is centralized on a server, and files are often checked out and released (checked in); TFVC can be useful in legacy contexts, but offers less flexibility than Git.

·      Pull Request (PR): A pull request is a proposal to integrate changes from one branch to another (usually from a feature branch to main ). In the Git workflow, the use of PRs is fundamental: a developer, having completed a feature on their branch, opens a pull request to request that their code be reviewed and possibly merged into the main branch. Azure Repos provides an interface for PRs that allows reviewers to examine the code, make inline comments (on individual lines of code), propose changes ( suggested changes ) and approve or deny the merge request. During the PR, you can also trigger automatic checks, such as running builds and tests via Azure Pipelines to ensure the new code doesn't introduce errors.

·      Branch Policies: To maintain high code quality, Azure Repos allows you to define branch policies. Branch policies are rules that must be met before a pull request can be completed (i.e., before the code is merged into the target branch ). Examples of branch policies include requiring a minimum number of reviewers (e.g., at least two code reviewers must approve), requiring a work item linked to the commit (to track why that code was written), or requiring a CI build to pass successfully and that certain status checks (such as minimum test coverage or the absence of known vulnerabilities) be met. Branch policies can also be used to secure the branch. main by preventing direct pushes to it: every change must go through approved PRs.

·      Collaboration and Code Review: Azure Repos simplifies collaboration: in addition to comments in PRs, you can @mention colleagues to engage them in the discussion, and any discussions remain linked to the code and tracked in the project's history. Azure Repos also offers the ability to use forks, which create a copy of a repository in your own space (e.g., for contributors external to the main project), with the ability to propose changes via PRs from the fork to the original repository. This is useful for open-source projects or collaborations with external teams.

·      Azure Boards Integration: Commits and PRs can be linked to Azure Boards Work Items (which we'll cover later). This creates end-to-end traceability: for example, a requirement or bug tracked in Boards can be specifically associated with the code changes that resolve it. When the PR is completed, the work item can be automatically updated (e.g., marked as resolved).

·      Permissions and Security: Azure Repos allows you to manage access permissions at the project or individual repository level. You can limit who can contribute, approve PRs, create branches, and so on, following the principle of least privilege (giving access only to those who need it).

b) Practical Azure Repos Examples

·      Branch Policy. The Alpha team wants to ensure that every change on the branch main is of quality. In the project, configure branch policies on the branch main by requiring that: (a) each PR have at least two approving reviewers ; (b) it be linked to a work item justifying the change; and (c) the automatic verification build passes successfully before merging. Additionally, they enable the Auto-complete option on PRs, meaning that once all approvals are obtained and all checks are passed, the PR will be automatically completed, merging the code into main without manual intervention.

·      Example 2: Feature Branch Workflow. A student is working on a new feature called “ OAuth Login ” for a project. He creates a branch called feature/ oauth -login from develop. As he develops, he commits to the branch. When he’s ready, he opens a pull request to merge feature/ oauth -login into develop. He marks the PR as draft until it’s fully ready, to signal to his colleagues that the work is still in progress. After further testing, he removes the draft status, assigns two reviewers, and thanks to the configured policies, they immediately see that they need to approve and that the validation build (automatically run by a CI pipeline) has passed. The reviewers add comments and suggestions directly to the code (for example, suggesting renaming a feature for clarity). The developer applies the suggestions and updates the PR. Finally, with two approvals and automatic verification, the PR is completed and the feature/ oauth -login branch is merged into develop. Finally, delete the feature branch as it is no longer needed, keeping the repository clean.

c) Important Definitions for Azure Repos

·      Version Control: A system that tracks changes in the source code over time, allowing you to revert to previous versions and work on various features in parallel.

·      Git: A distributed version control system. Each contributor has a complete local copy of the repository, including its history. It offers advanced features such as local branching, merging, rebasing, and more.

·      TFVC: A centralized version control system typical of Team Foundation Server/Azure DevOps Server. Code resides primarily on a centralized server; developers check out files, modify them, and then check back in their changes. Less flexible than Git for many modern situations.

·      Branch: A branching of code. It allows you to separate work into parallel work; each branch has its own set of commits. The default branch is often main (or master), which contains finished or released code.

·      Pull Request (PR): A request to merge changes from a source branch into a target branch. It allows for code review and discussion before the changes are permanently integrated into the target branch.

·      Merge: The operation of merging changes from one branch into another branch.

·      Branch Policy: Rules and requirements that a branch policy must meet in order to be completed. They help enforce quality standards (e.g., code review, successful testing, etc.).

·      Fork: A personal copy of a repository, typically used to propose changes to projects to which you don't have direct access. In the context of Azure Repos, it allows you to collaborate externally while keeping the original repository secure.

d) Visual Hint (Text Description)

typical Git workflow diagram: a graph showing a main branch called main (protected), from which a branch branches off develop for integrating ongoing features. From develop, feature branches are created, such as feature/XYZ. Each feature branch follows the cycle: develop commit push to remote repository → pull request to merge into develop code review & build validation in the PR → merge into develop once approved. Finally, develop is periodically merged into main via a final PR (perhaps at the end of a release). During each PR, a CI system (Azure Pipelines) automatically runs a build and test suite to ensure the new change is stable. This flow (known as Git flow or similar variations) highlights how Azure Repos and Pipelines work together to manage code in a collaborative and controlled manner.

 

2. Azure Pipelines: Continuous Integration and Automated Delivery

While Azure Repos manages your code, Azure Pipelines is the Azure DevOps service responsible for automating build, testing, and release. In other words, Azure Pipelines implements CI/CD: Continuous Integration and Continuous Delivery/Deployment.

With Azure Pipelines, teams can configure build and release pipelines that run whenever appropriate conditions are met (for example, a commit to the repository). These pipelines can perform operations such as compiling code, running automated tests, analyzing code quality, packaging an application, and even deploying to environments such as virtual machines, cloud services, or containers.

a) Pipeline as code (YAML)

One of the strengths of Azure Pipelines is that it allows you to define pipelines "as code," that is, via textual definitions in YAML format stored in the repository itself. This approach has several benefits:

·      The pipeline definition is versioned along with the code: every change to the pipeline is tracked.

·      Multiple pipelines can share configurations thanks to YAML templates.

·      You can reuse pipeline definitions and components across projects.

A typical YAML pipeline file contains:

·      Trigger: Defines when to start the pipeline. For example, trigger: [ " main " ] indicates to run the pipeline at every commit on the branch. main. It is possible to specify different triggers (even on tags, or scheduled). In the case of PR validation pipelines, the trigger on commits is often not used, but rather the pr: section to specify that the pipeline should fire on pull requests to certain branches.

·      Variables: Configurable parameters used in the pipeline, such as an SDK version, environment names, etc. They can be defined directly in the YAML or in separately manageable variable groups, and can also be secrets (e.g. passwords) integrated perhaps via Azure Key Vault.

·      Jobs and Steps: The heart of the pipeline. A pipeline can be divided into stages, each with one or more jobs (parallel processes) that execute a series of steps. Each step could be, for example, the execution of a script, the use of a predefined task (such as "Build.NET," "Run Tests," "Publish Artifacts"), deployment to an environment, etc.

·      Agent pool: Indicates where jobs run. Azure Pipelines provides ready-to-use Microsoft-hosted agents on various platforms (Windows, Linux, Ubuntu, macOS). You can also configure self- hosted agents for greater control or to access on-premises resources.

·      Artifacts: Ability to publish and store pipeline output artifacts, such as packages, binaries, and.zip archives containing build results. These artifacts can then be used in subsequent phases (for example, a deployment phase can retrieve the artifact produced by the build phase).

·      Multi-stage strategies: With YAML, you can define multi-stage pipelines that include both build (CI) and release (CD) in a single flow. Each stage could represent an environment (Dev, Test, Prod ) with approval logic between them (we'll cover the details of release strategies in a dedicated section).

·      Conditionals and dependencies: The YAML pipeline allows you to express conditions (e.g., run certain steps only if the previous build failed or only on a certain branch ) and dependencies between stages (e.g., run the deployment stage only if the test stage passed).

As an alternative to YAML, Azure Pipelines also offers a classic interface (Classic pipelines) that can be defined via a web UI; however, the preferred modern approach is infrastructure-as-code with YAML pipelines.

b) Integration with GitHub and Repos

Azure Pipelines can integrate with Azure Repos or GitHub repositories. A common case is continuous validation of PRs: when there is an open pull request to main, the pipeline automatically runs on that PR branch, providing immediate feedback to developers (for example, if tests fail). In the YAML definition, this scenario is configured as:

This way, the pipeline only starts when there's a Pull Request (PR) and not with every commit. The results (success/failure) appear directly on the PR page as mandatory status checks: if the pipeline fails, the PR can't be completed until the issue is resolved.

Azure Pipelines also supports general Git integration: for example, it can monitor a GitHub repository and trigger on new commits or tags. This allows Azure Pipelines to be used even for projects hosted outside of Azure DevOps.

c) Pipeline Execution and Monitoring

Once defined, the pipeline can be run manually or via configured triggers. Azure Pipelines provides a web interface for:

·      View the history of pipeline executions (the various runs with their respective results, duration, associated commit, etc.).

·      Observe the detailed logs of each execution step (useful for debugging in case of errors).

·      View the outputs and artifacts produced.

·      Restart failed pipelines and perhaps resume from a certain stage, if applicable.

You can also set up notifications so your team receives alerts on Teams, email, or other channels when a pipeline fails or a deployment succeeds.

d) Practical Azure Pipelines Examples

·      Example 1: CI Pipeline with Tests and Artifacts. A student team develops a.NET application. They set up a YAML pipeline that, upon each commit to main, performs the following steps: (a) restore packages (.NET dependency restore ); (b) compile the code ( dotnet build); (c) run unit tests ( dotnet test), also generating a code coverage report ; (d) publish the test results and coverage file; (e) if the tests pass, create an output package (e.g., a.zip file with the compiled product or a Docker container) as an artifact ; (f) publish the artifact in the pipeline results. With this CI pipeline, the team immediately sees if a commit causes failed tests and always has the latest working build of the app available.

·      Example 2: CD pipeline with multiple environments. After the CI phase in the previous case, the team also wants to automate the deployment. They thus create a multi-stage pipeline: the first stage is build+test (CI) as described above. The second stage could be the deployment to the Dev (development) environment, which takes the produced artifact and deploys it, for example, to an Azure App Service or a test VM. A third stage could be the deployment to the Production environment, but protected by manual approval: that is, the pipeline waits for a manager to manually approve the step before deploying to production. Within this multi-stage pipeline, the team also implements a conditional check: the deployment to Prod occurs automatically only if the Dev deployment was successful and if, for example, the percentage of tests passed is above a certain level. Otherwise, the pipeline stops and reports an error.

e) Important Definitions for Azure Pipelines

·      Continuous Integration (CI): The practice of frequently integrating (ideally several times a day) all developers' code into a shared repository, verifying each integration through automated builds and tests. This allows for quick identification of bugs or conflicts.

·      Continuous Delivery/Deployment (CD): An extension of CI that also automates the continuous delivery of software to staging or production environments. Continuous Delivery means the software is always in a releasable state, and deployments to production still require human approval; Continuous Deployment also eliminates human intervention by automatically deploying every verified change.

·      Pipeline: An automated chain of steps (build, test, deploy, etc.) executed either as a result of events (e.g., commit ) or manually. It represents the CI/CD flow.

·      YAML: ( Yet Another Markup Language) is a human-readable data serialization format used to define pipelines as code in Azure DevOps.

·      Agent: This is the runtime that executes pipeline jobs. An agent takes instructions (steps) and executes them on a specific machine. An agent can be hosted by Microsoft (in the cloud) or self- hosted.

·      Artifact: A product generated by a pipeline that is preserved and can be used at later stages. It can be an executable file, a NuGet package, a Docker container, a static website repository, etc.

·      Stage/Job/Step: Levels of organization in a pipeline. Stage is a logical phase (e.g., Build, Test, Deploy ), a Job is a group of steps executed together on an agent, and a Step is a single command or task.

·      Release: In classic pipeline contexts, a release is a deployment of software into an environment; with multi-stage YAML pipelines, the concept of release is built into the deployment stages.

·      Approval: A manual action required to allow a pipeline to continue or deploy to a specific environment. It introduces human control into an otherwise automatic process.

f) Visual Hint (Text Description)

Imagine a graphical representation of the CI/CD process: a series of icons linked in sequence. The pipeline begins with an icon of a developer committing code to Azure Repos /GitHub. This triggers a Build (represented by a gear icon) in Azure Pipelines, during which the code is compiled and tested. If the build is successful, we move on to a Package icon: this is the packaging phase where an artifact is created, such as a.zip file or a Docker image. Next, a Deploy to a server/cloud icon indicates the application is released to the target environment. Finally, a Monitoring icon suggests that the application is being monitored after deployment (e.g., via Azure Monitor, logs, etc.). Above some arrows in the diagram, we might have Check icons representing quality checks (unit tests passed, security verification) that act as gates between one phase and the next. This diagram illustrates the automated chain that can be implemented with Azure Pipelines where each commit travels through build, test, and deploy to the end user.

 

3. Release Strategies, Approvals and Quality Controls

An important part of the DevOps cycle is managing releases across various environments (development, test, production) in a controlled and secure manner. Azure Pipelines (especially with multi-stage pipelines in YAML, or with classic Release pipelines ) allows you to define advanced release strategies, including manual approvals, automatic checks ( quality gates ), and phased deployment strategies.

a) Stages and Environments

Typically, when implementing Continuous Delivery, you divide the process into phases corresponding to the environments:

·      For example, Dev (development), Test (testing), and Production (production). Each phase will have its own specific deployment or configuration jobs. Azure DevOps introduces the concept of Environment to represent a deployment target (which can be a set of resources, a specific machine, a Kubernetes cluster, etc.). Environments can have associated security settings and controls.

b) Approvals and Gates

To move from one phase to another (for example from Dev to Test, or from Test to Prod ), you can set:

·      Manual approvals: Designated people ( approvers ) must actively approve the move to the next stage. For example, before deploying to production, approval from the QA manager or product owner can be required.

·      Automatic gates: automated controls that perform checks before allowing passage. Some examples of gates:

a)    Work Item Query: Check that all work items linked to the release are in an appropriate state (e.g., no active high-severity bugs open).

b)    Test results: Check, for example, that the percentage of tests passed is above a threshold or that there are no critical tests that failed.

c)    Security scans: Integrate findings from security tools ( static code analysis, container scan, etc.) and block the release if serious vulnerabilities are found.

d)    Execution time or interval: for example, a gate can force you to wait a certain amount of time and recheck a condition (useful for example to check after 1 hour from deployment to staging if there are errors in the logs before proceeding).

These approaches ensure that release pipeline advancement occurs only if certain quality conditions are met.

c) Deployment Jobs and Controls in Environments

Azure Pipelines offers Deployment jobs that are specialized for releases: they provide more detailed log output and allow you to define pre-deploy and post- deploy actions (execution hooks before and after the actual deployment, for example to notify users, take database snapshots before an update, etc.). Additionally, for each environment you can define environment Protection rules – environmental protection rules – which effectively act as guardrails: for example, requiring approvals for that specific environment, or ensuring that only pipelines with certain authorizations can distribute there.

d) Advanced Release Strategies

deployment to all users at once is often avoided to reduce risk. Azure DevOps supports the implementation of strategies such as:

·      Canary release: Initially deploy a new version of the application to only a small percentage of users or a portion of the server (e.g., 5-10%), monitor behavior (errors, metrics), and then gradually increase the percentage to 50% and finally 100% if all goes well. This strategy reduces the impact of potential issues, allowing them to be detected on a smaller scale before affecting all users.

·      Blue-Green deployment: Maintain two environments (Blue and Green), one with the current production version and the other with the new version. Deploy the new version to one of the two, run tests, and then swap environments ( user routing is directed to the updated environment). In Azure, for example, you can use slot swapping on App Services.

·      rollback: If after a release, metrics are detected beyond critical thresholds (e.g., the error rate exceeds a certain value, or CPU consumption is abnormal), the pipeline can trigger an automatic rollback by redeploying the previous version known to be stable.

To implement canary or blue-green deployments on Azure services like AKS (Azure Kubernetes Service) or App Service, pipelines are often orchestrated with specific scripts or extensions. For example, on AKS, you could manage them with gradual deployments. Increase pods with the new version in a Kubernetes deployment; on App Services as mentioned with slots.

versioned artifacts from previous releases, so that you can quickly re-deploy a previous version in case of emergency.

e) Practical Examples of Release Management

·      Example 1: Approvals and Gates in the Pipeline. Company XYZ has a release pipeline with Test and Production stages. When moving from the Test to Prod phase, they set up a manual approval required by the department manager (for example, the QA lead must click Approve before proceeding), and an automatic gate that checks the build's quality. Specifically, the gate verifies, via an integration with SonarQube, that code coverage is at least 80% and that there are no open critical vulnerabilities. Only if both of these conditions are true and human approval is obtained, does the pipeline deploy to Prod.

·      Example 2: Incremental Canary. For a large web service, the team adopts a canary strategy for the production phase. The deployment pipeline in Prod is configured to initially update only 1 in 10 instances (10%) with the new version. It then pauses for a 30-minute monitoring period (using a timed gate). During this time, monitoring metrics (via Azure Monitor Application Insights) monitor errors and performance. If no issues are identified, continuation is automatically approved (perhaps by an automatic gate), and the pipeline proceeds to update additional instances until 50% is reached. It rechecks, and finally reaches 100%. If, during one of these phases, a key indicator (e.g., HTTP 500 error rate) exceeds a threshold, the pipeline fails and managers are notified. At that point, they can decide to perform a quick rollback (manually or with a dedicated pipeline, which redeploys the previous version to all instances).

f) Important Definitions for Release Strategies

·      Stage (Stage): A grouping of jobs in a pipeline, usually corresponding to an environment (e.g., Dev, QA, Prod ). The transition between stages can be conditional or manual.

·      Environment: A logical object in Azure DevOps that represents the target of a deployment (can map to a set of resources: VMs, containers, cloud services, etc.). It allows you to manage permissions and controls specific to that environment.

·      Approval: Explicit consent given by an authorized person to continue a pipeline beyond a certain point.

·      Gate: An automatic check performed by Azure Pipelines to verify conditions before advancing. It can be repeated over time, for example, to wait for stable conditions.

·      Canary release: A gradual deployment strategy to an increasing portion of users/instances, with constant monitoring to validate the new version.

·      Blue-Green deployment: A strategy in which two identical environments (blue and green) are used alternately; the "color" is released on the one currently not in use and then all traffic is moved there.

·      Rollback: Reverting to a previous version in production, typically done if the new version causes problems.

g) Visual Hint (Text Description)

Let's imagine a block diagram depicting three pipeline stages in sequence: Dev -> Test -> Prod. Between Dev and Test is an automatic check symbol (a gear with a checkmark) representing gates (e.g., checking test results). Between Test and Prod is an icon of a person giving the OK, representing the required manual approval. In the Prod block, to illustrate a canary, we could imagine a pie divided into 10%, 50%, and 100% slices, colored as needed, indicating that deployment occurs first on a small percentage of servers (10%), then half, then all. Next to it, a stylized monitoring graph shows a stable line (indicating that the indicators are under control before moving on). This mental picture highlights how Azure DevOps can orchestrate highly refined releases to minimize risk, with strong quality controls integrated into the process.

 

4. Azure Artifacts: Managing Packages and Dependencies

Azure Artifacts is the Azure DevOps service dedicated to package management. In a typical development process, applications are composed of many components and external dependencies (third-party libraries, tools, etc.). Azure Artifacts allows teams to have private feeds where they can securely publish and share packages, whether internally produced or mirrored from external packages.

a) Key Features of Azure Artifacts

·      Private package feeds: A feed is like a package repository. Azure Artifacts allows you to create private feeds for various package types, such as NuGet (for.NET libraries), npm (for Node.js modules), Maven (for Java), Python ( PyPI ), and even a generic type called Universal Packages (for arbitrary repositories). Private feeds allow your team to publish packages that may not need to be publicly available on the internet, and control access to them.

·      Versioning and Retention: Each package can exist in multiple versions (e.g., 1.0.0, 1.0.1, 2.0.0, etc., perhaps following semantic versioning conventions ). Azure Artifacts can be configured to retain only a certain number of versions per package, for example, the latest 20, deleting the oldest ones to save space, or after a certain period of time (Retention policy).

·      Upstream Sources: A powerful feature for combining internal feeds with external sources. An upstream source is a link from the private feed to a public registry (example: NPMjs, NuGet.org, Maven Central). This allows the team to use the Azure Artifacts feed as a caching proxy: if someone requests an external package (e.g., Newtonsoft.Json version X on NuGet ) that isn't already in the feed, Azure Artifacts retrieves it from NuGet.org and caches it in the internal feed. This means all project dependencies (internal or external) flow through the feed, providing greater control and replicability (if the external registry is temporarily unavailable, the cached copy in the internal feed still ensures the package can be restored).

·      Scoping by project/team: You can control the visibility of feeds, such as creating organization-wide shared feeds or feeds that are visible only to certain teams or projects.

·      Pipeline Integration: Azure Pipelines can publish packages to an Azure Artifacts feed as a result of a build. For example, at the end of a library's CI pipeline, you can add a step to publish the generated NuGet package to the internal feed. In pipelines where that package is required, you can add authentication to the feed, and when restoring dependencies, the system will fetch the package from the private feed. Additionally, credential management is facilitated through Service Connections or built-in authentication mechanisms (for example, Azure Artifacts provides an Artifacts Credential Provider for dotnet / nuget and similar, which allows us to authenticate with Azure DevOps credentials ).

·      Dependency monitoring tools: While not a core feature of the Azure Artifacts service itself, it's common to use tools like Dependabot (for GitHub) or Renovate that monitor the dependencies declared in a repository and offer automatic updates. In combination, Azure Artifacts provides a controlled location for these updates. Furthermore, including the generation of a SBOM ( Software Bill of Materials, a brief definition is provided) and the use of SCA (Software Composition Analysis) scanners in the processes helps identify problematic licenses or known vulnerabilities in the included dependencies.

·      Promotion Views: Azure Artifacts feeds support the concept of views, such as creating an “@Local”, “@Prerelease”, or “@Release” view for the purpose of promoting packages through maturity stages. An initially published package can appear only in the prerelease view for testing, and then be “promoted” to the release view when stable. This adds an additional level of control over which package versions are considered reliable.

b) Practical Azure Artifacts Examples

·      Example 1: Publishing an internal library. The Backend team develops an internal.NET library called Contoso.Utils. Whenever they make changes and increment the version, an Azure Pipelines pipeline builds the library and publishes the resulting NuGet package to the Contoso -Packages feed on Azure Artifacts. The package initially appears in the @Prerelease view. After other services have integrated and tested that version, the package maintainer marks it as valid and promotes it to @Release. This lets other teams know that the version in @Release is approved for production use. Additionally, a retention policy is set: only the last 5 versions marked as releases and the last 10 prereleases are retained; the others are automatically deleted to avoid cluttering the feed.

·      npm packages. A university course provides students with an Azure Artifacts feed for Node.js. Students add the feed as an npm source in their configuration file. The university has set up an upstream to npmjs.com, but with rules: if certain libraries have known vulnerabilities or incompatible licenses, they are blocked. When a student runs npm install, packages are downloaded from the internal feed: if the package has already been downloaded by someone else in the past, it's served from the internal cache (speeding up installation and reducing external bandwidth consumption); if it's the first time, Azure Artifacts retrieves it from npmjs.com, keeps a copy, and then provides it to the student. This mechanism also ensures that everyone is using exactly the same versions (avoiding surprises due to changes to external packages if the versions aren't fixed).

c) Important Definitions for Azure Artifacts

·      Package: An archive containing a reusable software component (library, module, etc.), often with metadata such as version number and dependencies. Examples:.nupkg file for NuGet,.jar for Maven, tar.gz for npm, etc.

·      Feed: An organized collection of packages, similar to a repository. May have access controls and upstream sources.

·      Upstream Source: A link configured in a private feed that points to a public registry or other feed. This allows packets to be retrieved and cached from external sources via the internal feed.

·      SBOM (Software Bill of Materials ): literally “software bill of materials,” it is a detailed list of all the components and libraries (with their versions) included in a software product. Having an SBOM helps you quickly track whether a certain system is affected by a newly discovered vulnerability (because you can check whether library X version Y is present).

·      SCA (Software Composition Analysis): Practices and tools for analyzing software dependencies (e.g., open source) to identify known vulnerabilities, licenses, and obsolescence. Examples: OWASP Dependency Check, WhiteSource, Black Duck, Snyk, etc.

·      View: A filter or subset of a package feed, used to separate different stages (e.g., development packages vs. validated packages).

·      Retention Policy: A retention policy that defines how many (or for how long) artifacts or packages are retained before being automatically deleted.

d) Visual Hint (Text Description)

Let's try to imagine a package flow: A simple diagram might show three blocks: Package Production, Package Promotion, Package Consumption. In the “Production” block, a gear represents the build pipeline that publishes a library, say version 1.0.0, to the internal feed. An arrow then points to “Promotion” with two rectangles: one Prerelease and one Release; the package appears first in Prerelease. After testing, an arrow indicates promotion to Release. Finally, from the Release block, arrows point to various application projects (application icon) that extract that package from the feed during their build (Consumption). In parallel, a cylinder representing npm /Maven central connected to the feed via upstream shows that if a project requests an external package, it is served through the internal feed (with a lightning bolt indicating caching). This visual emphasizes how Azure Artifacts acts as a central node for internal and external packages, ensuring dependency control.

 

5. Azure Boards: Agile Work Management and Collaboration

Software development isn't just about code and machines, it's also about people and processes. Azure Boards is the Azure DevOps component designed to help teams efficiently plan, organize, and track work, supporting agile methodologies like Scrum and Kanban and fostering collaboration.

a) Azure Boards Essentials

·      Work Items: These are the heart of Azure Boards. A work item represents a unit of work or information that needs to be tracked. Common types of work items include:

a)    Epic: A high-level initiative that can take weeks or months to complete, broken down into smaller features.

b)    Feature: A mid-level functionality, often composed of multiple user stories.

c)    User Story (or Product Backlog Item in Scrum ): A description of functionality from the end-user's point of view (“As a [type of user] I want [goal] so that [benefit]”).

d)    Task: a technical activity to be performed (often the result of a User Story).

e)    Bug: A report of a defect that needs to be fixed.

f)      Other possible types depending on the process template (for example in the CMMI template there are Requirement, Change Request, etc.).

·      States and Workflow: Each work item has a State field that indicates its progress (e.g., New, Active, Resolved, Closed, etc., depending on the type and process). Work items follow a defined workflow that establishes which states exist and how to transition from one state to another (e.g., from Active to Resolved only if certain fields are filled in). The default process templates (Agile, Scrum, Basic, CMMI) define these states and the flow, but you can customize them if needed.

·      Backlog and Sprint ( Scrum ): For Scrum adopters, Azure Boards provides the Product Backlog, an ordered list of to-do items (typically Epics, Features, User Stories, or PBIs). You can plan iterations (Sprints) and assign a number of items to each Sprint. Sprint Board tools help you see the tasks planned for the week/period and track completion.

·      Kanban Board: For those who prefer Kanban or simply want to visualize the status of work in progress, each backlog can be viewed as a Kanban board with columns representing states or phases of the flow (To Do, Doing, Done, or more detailed). WIP limits (Work-In-Progress limits ) can be set on the board to limit the number of items in a column (for example, a maximum of 3 items in “ Doing ” per developer) to avoid starting too many jobs without finishing them.

·      Tags and Filters: Work items can be assigned tags to categorize them (e.g., “UI,” “ Backend,” “ Urgent ”). You can create custom queries to list specific work items (e.g., “all open bugs labeled Urgent assigned to me”).

·      Dashboards and metrics: Azure Boards allows you to create custom dashboards with various widgets, such as a Burndown chart (a graph showing how much work remains in a Sprint over time), cycle charts (lead time, cycle time), work distribution pie charts by area, and more. These visualizations help the team monitor their process and identify any bottlenecks.

·      Integration with Repos and Pipelines: A crucial aspect is that Azure Boards doesn't exist in isolation: if a developer includes a reference to the work item in the commit message or PR description (e.g., " Fixed login bug. Work item #102"), Azure DevOps will create a link. This way, it can be traced that work item 102 (the login bug) was fixed by commit X and PR Y and finally included in build Z. This end-to-end traceability allows you, for example, to see which user stories and bugs have been completed for each release. It's even possible to activate automations: for example, automatically close a Bug work item when the associated PR is completed.

·      Collaboration in discussions: Within each work item, there's space for comments and discussions. Team members can exchange information, attach files, mention users (@name) to engage them, etc. All of this is tracked within the context of the item. For example, if a tester wants clarification on a bug, they can mention the developer directly in the work item bug, and the subsequent conversation is logged there.

Practical Azure Boards Examples

·      Example 1: Scrum in Azure Boards. A class of students is developing a project in Scrum mode with 2-week sprints. They use Azure Boards with the Scrum process. On the product backlog, they have listed 20 user stories, estimated in terms of effort (i.e., points). They plan the first sprint by dragging the highest-priority user stories into Sprint 1 and assigning tasks to the various members under each user story. During the sprint, they use the Sprint Board, which displays “To Do/ Doing / Done ” columns for the current sprint’s tasks. Every day, they hold a stand-up meeting and update the board: when someone starts a task, they move the card to Doing, and when they complete it, to Done. This way, everyone has visibility into the status. Towards the end of the sprint, they look at the automatically provided Burndown Chart: if the line is above the ideal trajectory, it means they are behind and need to catch up or revise the scope. When they close the sprint, any unfinished stories go back to the backlog or are moved to the next sprint.

·      Example 2: Kanban with WIP limit. A team adopts Kanban without fixed iterations. They created a customized Kanban board with the columns: To Do, In Progress, In Review, and Completed. They set a WIP limit of 5 in the “In Progress” column to avoid putting too many items in progress at once. A team member only takes a new item if there are fewer than 5 in progress. If they reach the limit, they focus on finishing the ones they've started before starting new ones. This helps them maintain focus and reduce multitasking. Furthermore, when an item goes to “In Review,” they know it's awaiting code review or testing, and they can easily see if there are many items stuck in review so they can dedicate resources to them. They also defined some rules such as Definition of Done to know when they can truly consider an item complete (e.g., “the code is merged to main, the tests pass, the documentation is updated, and the item is closed in the system”).

b) Important Definitions for Azure Boards

·      Work Item: Tracked work item (user story, bug, task, etc.).

·      Backlog: An ordered list of work items to be completed, typically ordered by priority (most important at the top).

·      Sprint: A period of time (usually 1-4 weeks) in which a Scrum team develops a product increment. It has a clearly defined start and end point and clear objectives.

·      Kanban: An agile methodology focused on the continuous flow of work, visualized on a board. It does not involve time- boxed iterations like Scrum, but emphasizes the continuous management of priorities and WIP limits.

·      WIP Limit (Work In Progress Limit): The maximum number of work items that can be in a given state (or assigned to a person) at a time. This is used to prevent overload and excessive multitasking.

·      Burndown Chart: A graph that shows how much work remains in a sprint (or project) over time, comparing it to the ideal completion rate. It helps determine whether the team is ahead of, on track with, or behind plan.

·      Dashboard: Customizable panel where you can add various widgets (charts, query lists, indicators) to get an overview of the project status.

Visual Hint (Text Description)

Imagine an Azure Boards dashboard: a virtual Kanban board divided into columns: To Do, Doing, and Done. There are “cards,” colored boxes, each corresponding to a work item (story, task, bug). Each card has a short title (“Implement OAuth Login,” “Fix Research Bug,” etc.), an icon or avatar indicating who it is assigned to (e.g., a student avatar), and perhaps a colored tag indicating its type or priority. Some cards have a small link icon indicating that that item has a Pull Request or Build associated with it ; others may have a comment icon indicating that there are discussions. At the top of the Kanban columns, for example, “(WIP: 5/5)” is written in the Doing column, indicating that the limit of 5 items in progress has been reached. On the sides, you can imagine graphs like the burndown chart for the current sprint or a pie chart showing the distribution of work types (X% bugs, Y% user stories). This scenario illustrates how Azure Boards allows the team to visualize work, quickly understand who's doing what and how much remains to be done, and maintain alignment with project goals.

 

6. Code Quality and Pipeline Security

A crucial aspect of DevOps is ensuring that rapid iteration does not compromise the quality and security of the software product. Azure DevOps, through Azure Pipelines and integrations with other tools, allows you to automate quality assurance and security scans as part of the build and release cycle. This reduces defects in production and prevents vulnerabilities, incorporating the concept of DevSecOps (Development, Security, and Operations).

a) Test Integration and Code Coverage

Continuous Integration phase, in addition to compiling the code, it is essential to run automated tests. Azure Pipelines supports running unit tests, integration tests, UI tests, etc., and publishing the results. Using standard formats such as JUnit, NUnit, TRX, etc., test results are aggregated and made visible in the pipeline details (for example, showing the number of tests passed, failed, or skipped).

In addition to test counts, it's important to measure coverage (code coverage): this metric indicates the percentage of lines of code exercised by tests. Azure Pipelines can collect coverage reports generated by tools like Cobertura, JaCoCo, and Coverlet and display them. For example, it can display "Code coverage: 82.3%." Quality gates can be set based on these numbers (e.g., disallow merging of a PR if coverage drops below a certain value).

b) Static Code Analysis (SAST) and Dependency Analysis (SCA)

During your CI pipeline, it's good practice to include static code analysis, which is automated tools that analyze source code for code smells, potential bugs, or coding standard violations. Tools like SonarQube or CodeQL (from GitHub) can integrate with Azure Pipelines:

·      SonarQube provides metrics on code duplication, broken quality rules, and classifies detected issues by severity ( blocker, critical, etc.). It also offers a “Quality Gate,” which is a collection of conditions (e.g., at least 80% coverage, no open high-severity bugs, duplication percentage below X%) that determine whether the code quality is acceptable.

·      CodeQL runs security queries on your code to find known vulnerability patterns (buffer overflows, injections, misconfigurations, etc.), allowing you to detect potential flaws.

At the same time, dependency analysis ( SCA, Software Composition Analysis) is essential because many vulnerabilities reside in third-party libraries. Tools and services like OWASP Dependency -Check, Snyk, WhiteSource, or GitHub Dependabot check the versions of the libraries used against databases of known CVEs. Azure Pipelines can include an SCA step (for example, using an OWASP Dependency Check container or integrating the Snyk CLI) and fail the build if a dependency with a high-risk vulnerability is found.

c) Containers and safety

If your project produces Docker or OCI containers, you can integrate container scanners like Trivy (open source) or Microsoft Defender for Cloud (which has a container registry scanning component). These scanners check the final container image for vulnerable system packages or insecure configurations.

Microsoft has introduced Defender for Cloud DevOps (in preview), which provides a set of security recommendations specific to DevOps pipelines. For example, it suggests enabling dependency checks, avoiding hard- coding secrets, etc., and integrates with Azure DevOps to provide centralized visibility into the security status of pipelines.

d) Enforcing Quality Gates

Azure DevOps allows you to set branch- or pipeline -level policies that enforce quality criteria. For example, you can set a pull request to fail if the build pipeline, including tests and static analysis, fails. This means no code can enter main if it breaks tests or drops coverage below the threshold, or if SonarQube reports a critical issue.

Additionally, you can specify that the results of certain security tools be considered blocking. For example, if we integrate a CodeQL scan into the PR, we can configure any high-severity alerts from that scan to be resolved before merging.

e) Secure Supply Chain: From code to executable

As supply chain threats increase (e.g., attacks where someone compromises the build process or packages), concepts such as:

·      Signing: Digitally signing produced artifacts (e.g. signatures on binary files or containers) to guarantee their integrity and provenance.

·      Attestations: Signed records that certify that a certain process (build) has performed certain checks on a piece of code. For example, an attestation might state, “This build ID 202 on commit ABC ran the tests and passed them, and was launched from the pipeline defined as code in repository XYZ.”

·      SBOM: As mentioned before, generating and attaching an SBOM to the artifact allows you to know exactly what that artifact contains in terms of software components.

Azure Pipelines can generate and attach this information and, with tools like Microsoft DevOps Security Kit ( AzSK ), or through integration with external systems, help your team build a pipeline that complies with security best practices.

f) Practical Examples of Quality & Safety

·      SonarQube Quality Gate Pipeline. A student - run open-source project is undergoing quality assurance. They have a SonarQube server where the CI pipeline sends results on each run. They've defined the SonarQube Quality Gate to require at least 80% coverage, no bugs greater than Minor, and no critical code smells. In the pipeline YAML file, they include a step that waits for the SonarQube result and fails if the Quality Gate doesn't pass. Therefore, if a student submits code without sufficient testing or with serious issues, the pipeline fails and the PR will not be mergeable until the issues are resolved (e.g., by writing tests or fixing the code).

·      Example 2: Security Job on Pull Request. For a major website, the CI pipeline has been enhanced with a security stage that runs on every pull request. This stage performs:

a)    CodeQL: Code analysis for known vulnerabilities.

b)    Dependency check: SCA scan of libraries.

c)    Container scan (if it produces a Docker image).

d)    If any of these detects an issue with severity High or Critical, the step marks the build as “ failed ” and produces a detailed report (e.g. “Use of vulnerable Log4j library version detected – CVE-XXXX”).

e)    The PR is automatically marked with a comment from a bot that attaches the findings and prompts the developer to fix them before proceeding. This ensures that no code with obvious vulnerabilities is integrated.

g) Important Definitions for Quality & Safety

·      SAST ( Static Application Security Testing): static code security analysis. It performs checks on the source code without executing it, identifying insecure patterns.

·      DAST (Dynamic Application Security Testing): dynamic security analysis, performed by running the application and testing its behavior (e.g. web scanner).

·      SCA (Software Composition Analysis): already defined, analysis of software dependencies.

·      DevSecOps: The philosophy of actively integrating security practices into the DevOps flow, so that security is “ built -in” at every step (design, coding, testing, deployment) and not a separate final phase.

·      Quality Gate: A set of quality metrics that must be met for code to be considered acceptable. A term often used in SonarQube.

·      Attestation: certification of a fact; in a DevOps context, it is a metadata package that certifies that a certain step has been completed respecting certain conditions (signed so that it cannot be altered).

·      Secure DevOps Kit / AzSK – A set of extensions and scripts provided by Microsoft to help assess security in DevOps practices (e.g., configuration checks on Azure, on pipelines, on code).

·      Microsoft Defender for Cloud DevOps: Cloud security service that extends protection to pipelines and repos, providing recommendations on how to improve their security.

h) Visual Hint (Text Description)

Let's imagine a quality dashboard for a project: in the completed build pipeline, we see a box that says:

·      Tests Passed: 1,530 (out of 1,530) with a green check mark.

·      Security Scan: Passed with a green shield icon.

·      Code Coverage: 82.3% with a bar graph showing the target exceeded (perhaps an 80% threshold). Next to this is a code quality speedometer graph from SonarQube, showing “Quality Gate: OK.” If it were displayed, we would see indicators like “Bugs: 0, Vulnerabilities: 0, Code Smells: 5 (minor).” This virtual dashboard gives a sense of how testing and security results are aggregated and made easily readable: at a glance, the team sees that the build not only passed, but also meets the quality and security criteria set before proceeding with the release.

 

7. Infrastructure as Code ( IaC ) and Configuration as Code ( CaC )

The effectiveness of DevOps extends beyond application code: it also affects how we manage the infrastructure and configurations that run applications. This is where concepts like Infrastructure as Code and Configuration as Code come into play. In Azure, these concepts automate the creation and management of cloud resources, maintaining consistency across environments and tracking changes.

a) Infrastructure as Code ( IaC )

Infrastructure as Code means describing the infrastructure (networks, servers, databases, cloud services, etc.) with textual definitions, similar to how application code is written. In practice, instead of manually creating resources via portals or imperative commands, declarative configuration files are written that specify the desired state of the infrastructure. These files are then applied through tools that create/modify resources to achieve that state.

Common technologies for IaC include:

·      ARM Templates: Azure's native mechanism (Azure Resource Manager Templates) based on JSON files, which define resources and parameters.

·      Bicep: A Domain Specific Language (DSL) for Azure that simplifies the syntax compared to ARM JSON templates. Instead of writing verbose JSON, Bicep offers a cleaner, more modular syntax, while still compiling to ARM templates under the hood.

·      Terraform: A popular open-source tool that allows you to define infrastructure (not just Azure, but also cross-platform) with its own declarative language (HCL). Terraform tracks the state of the infrastructure and applies changes in a planned manner.

·      Ansible, Chef, Puppet: tools more oriented towards configuration and automation on existing infrastructure ( Ansible often used as an “imperative” IaC combined with declarative for provisioning).

In an Azure DevOps context, you can integrate with these tools easily:

·      You can write Bicep / Terraform files to the repository.

·      The Azure Pipelines pipeline runs for example az deployment for ARM/ Bicep, or Terraform commands ( terraform init /plan/ apply ) to create or update the infrastructure.

The advantages of IaC:

·      Repeatability: It is possible to recreate identical environments starting from the script, useful for testing and staging.

·      Versioning: Infrastructure files are in version control (e.g. Azure Repos / GitHub), so every change to the infrastructure is tracked, reviewable, and correlated with commits and PRs.

·      Consistency: Reduces human error and configuration drift ; if there is a difference between the actual and defined state (drift), the tools report or correct it.

Configuration as Code ( CaC )

Configuration as Code is a complementary concept in which application or environment configuration is also extracted and treated as code. Examples:

·      Management of application parameters, feature flags, connection strings in dedicated systems such as Azure App Configuration or versioned configuration files.

·      Manage secrets (passwords, API keys, certificates) in secure systems like Azure Key Vault and have applications read them at runtime or pipelines inject them when needed.

·      Using tools like Helm (for Kubernetes) where the configuration values for deployments are specified in charts and values files.

In practice, CaC means avoiding ad-hoc manual configurations across environments (which would then be lost or manually replicated) and instead maintaining such configurations within controlled files or services, with the ability to apply versioning and push changes in a pipelined manner.

b) Integration into Pipelines and Controls

A typical advanced DevOps scenario:

·      Infrastructure pipeline: A dedicated pipeline that runs, for example, terraform plans to show what changes would be made to the infrastructure, and then waits for approval from a manager (since changing infrastructure is sensitive) before running terraform. apply that makes the changes. These pipelines also publish details (such as the plan result, logs, any outputs such as created IP addresses, etc.) as artifacts or comments.

·      Validation and linting: Before applying an IaC script, the pipeline can perform syntactic validation (e.g. bicep build just to check that the Bicep file is compilable) and lint (e.g. policy check: Azure Policy can evaluate an ARM template before deployment to see if it violates company policies).

·      Approvals and Policies: As mentioned, infrastructure pipelines often have manual or conditional approvals. Additionally, Azure offers Blueprints and Landing Zones, which are collections of templates, policies, and recommended configurations for creating compliant infrastructure. In DevOps, we can incorporate these concepts by defining that only approved blueprints can be applied.

·      Drift detection: Monitor whether the real infrastructure diverges from the declarative code. Some tools ( Terraform, in combination with Azure Policy) can flag if someone manually modifies resources, creating a misalignment. DevOps best practice dictates that every change should be made in the code.

c) Practical IaC / CaC Examples

·      Example 1: Terraform Pipeline. The Ops team writes Terraform configurations for the production infrastructure. They create a dedicated Azure DevOps pipeline: when there's a Terraform code change on the branch main of the “infra” repo, the pipeline runs terraform init (initialize), terraform plan (calculate the diff). The plan result is published as an artifact and the pipeline pauses, requesting approval. A reviewer reviews the plan (which says, for example, "A new VM will be created, security rule X will be modified...") and, if everything is in order, approves it. At that point, the pipeline proceeds with terraform. apply that implements the changes. This ensures human control over infrastructure changes, avoiding errors.

·      Example 2: Centralized configuration management. A multi-environment project (Dev, Test, Prod ) avoids having differences between environments in configuration files within the code. Instead, it uses Azure App Configuration to store configuration variables (e.g., API endpoints for Dev/Test/ Prod, feature flags enabled or disabled, etc.) and Azure Key Vault for secrets (DB passwords, keys). During the deployment pipeline, there is a step that seeds (or verifies) the values in App Configuration and Key Vault for the target environment. The application, when running in Prod, for example, reads its settings directly from the configuration service. This ensures that the difference between Dev/Test/ Prod lies in these external configurations and that these configurations are versionable ( App Configuration allows additional labels for versioning the configs ) and with fine-grained access control.

d) Important Definitions for IaC / CaC

·      IaC (Infrastructure as Code): Management and provisioning of infrastructure resources via configuration definition files, enforced with automated tools.

·      Bicep: A Domain- Specific Language for Azure that simplifies Azure Resource Manager templates. It provides a more readable and modular syntax for defining Azure resources.

·      Terraform: An open-source IaC tool that supports many platforms (Azure, AWS, GCP, etc.). It uses.tf files and an execution engine that applies diffs declaratively.

·      Azure Blueprint: A set of Artifacts (not to be confused with Azure Artifacts ) that can include ARM templates, policies, roles assignment, to define a repeatable basic configuration (e.g. an entire cloud landing zone setup).

·      Landing Zone: A pre- configured Azure environment with a standard architecture (networking, subscriptions, security policies, monitoring) on which to build your own applications. Often used in an enterprise context as an approved starting point.

·      Drift: A difference between the infrastructure state documented in the code and the actual state. This can occur if someone manually modifies resources or if IaC scripts partially fail. Drift is risky because the IaC definition no longer reflects reality, and subsequent applications may generate inconsistencies.

·      Azure Policy: A mechanism in Azure for enforcing governance rules (e.g., preventing the creation of a certain resource type, enforcing mandatory tags, etc.). In an IaC context, policies can validate templates before deployment or continuously evaluate existing resources.

e) Visual Hint (Text Description)

Consider an infrastructure pipeline diagram: there's a flow that begins with a file icon (a Bicep / Terraform file ) and progresses to a validation step (a gear that checks syntax/policy), then a plan step (a document with differences "+ create, ~ modify, - delete"), then a manual approval step (an icon of a user approving). After approval, there's an apply step that actually creates the resources (a cloud icon with elements appearing). Finally, a policy symbol (scale) representing Azure Policy, which continuously monitors the state for compliance. To the side, a configuration store (database icon) labeled "App Config / Key Vault" powers the application: this highlights that configurations are not hardcoded into the code, but centralized. This representation epitomizes the DevOps approach, where infrastructure and configuration are also rigorously handled by code and the pipeline.

 

8. DevOps on Azure Kubernetes Service (AKS): Deployment and Observability

Many modern applications adopt microservices architectures running in containers. Azure offers Azure Kubernetes Service ( AKS ) to orchestrate containers at scale. Integrating AKS into your DevOps workflow means you can continuously build and deploy containers and effectively monitor your Kubernetes environment.

a) Continuous Deployment on AKS

The typical CI/CD flow for a containerized app on AKS includes:

1.    Container image build: The pipeline builds a Docker image (or OCI image) from a Dockerfile (or other container configuration) in the repository.

2.    Image security scan: Before considering that image valid, you can perform a scan (e.g. with Trivy or Azure Security Center/Defender) to ensure that it does not contain known vulnerabilities in the system packages.

3.    Push to container registry: The image is pushed to a registry. Azure offers Azure Container Registry (ACR) as a private registry for images. The image is tagged with a version tag (e.g., v1.2.3 or the commit ID ).

4.    Deployment on AKS: There are several methods:

o  Use kubectl with traditional Kubernetes YAML manifests (Deployment, Service, etc.) that are versioned in the repo. The pipeline applies ( kubectl apply ) updated manifests (e.g. by updating the image to the new version).

o  Use Helm charts if your Kubernetes configuration is complex; the pipeline runs helm upgrade -- install to release the new version of the chart with the appropriate values (for example, passing it the new image tag).

o  Using a GitOps approach: In this case the pipeline does not deploy directly to AKS, but updates a configuration repository ( manifests GitOps ) and then an operator in the cluster (e.g. Flux or Argo CD ) detects the change and synchronizes the cluster to that state. GitOps delegates the responsibility of applying the changes by observing the declarative source to the cluster.

5.    Service Mesh / Additional steps: In advanced contexts, there may be steps to interact with a service mesh (e.g. Linkerd, Istio ) or update routing configurations, etc., if the environment requires it.

b) Monitoring and Diagnostics on AKS

Once your application is running on AKS, Azure provides observability tools:

·      Azure Monitor for Containers (Container Insights): Integrates with AKS and collects logs (e.g., container logs, Kubernetes system logs) and metrics (CPU/memory usage per pod, number of pods in a deployment, node status, etc.). This provides visibility into the performance of your cluster and applications in Azure Monitor's log analytics and graphs.

·      Prometheus and Grafana: AKS can be configured with the Container Insights add-on that exports data to a Log Analytics workspace, but some prefer to use the classic open-source stack: Prometheus to collect metrics from the cluster and apps (often with exporter ), and Grafana to visualize them. Azure Monitor can also consume Prometheus metrics through built-in configurations or via Managed. Grafana.

·      Kubernetes Dashboard: There is a Kubernetes web dashboard (which however must be enabled and secured appropriately on AKS), although a lot of information can be obtained via the Azure Portal which shows information about the cluster and nodes, and via Visual Studio Code with the k8s plugin for developers.

c) Security Considerations on AKS

·      Workload Identity: Traditionally, applications on AKS used an approach called Managed Identity (or pod identity via add-on ) to securely access other Azure resources (such as Key Vault). Recently, there has been a push for Workload Identity integrated with Azure AD (Microsoft Entra ID): in short, Kubernetes pods can obtain a federated identity with Azure AD and obtain access tokens to resources without the need for static secrets. This increases security by eliminating the need to store credentials in the cluster.

·      Network Policies: In AKS (especially on Azure CNI network plugin) you can use network policies ( Calico, Azure NP) to control communication between pods on the network layer, improving isolation (e.g. defining that the database pod accepts traffic only from the app pod and not from the others).

·      Azure Policy for AKS: Azure Policy offers add-ons for AKS that can, for example, prevent the creation of privileged pods, ensure certain labels are present, or ensure containers don't use images from unauthorized registries. This also integrates governance at the Kubernetes cluster level.

·      Updates and Scalability: It's a good idea to keep AKS updated to the latest stable Kubernetes releases (Azure provides semi-automatic upgrades). For scalability, AKS supports Horizontal Pod Autoscaler (HPA) to automatically scale the number of pods based on metrics (e.g. CPU, or custom metrics like requested queue length), and the Cluster Autoscaler to add/remove nodes depending on load.

DevOps Examples on AKS

·      Example 1: Pipeline with build and deployment on AKS. For a microservices project, the CI/CD pipeline runs for each service: build Docker image, push to ACR, then uses kubectl to update the Kubernetes manifests in a manifest repository ( GitOps option ) or directly apply on the dev cluster. They've set up a Helm chart to facilitate deployment: the pipeline runs helm upgrade -- install appname chart/ --set image.tag =abc12345 (where abc12345 is the image tag corresponding to the current commit ). After deployment, they call a job that runs endpoint tests on the newly deployed application (smoke tests) to verify its health. Deployment logs and any rollbacks (Kubernetes can rollback if a readiness probe fails for too long) are collected in the outputs.

·      Example 2: Pure GitOps. Another team prefers GitOps: they have a second repository called “ prod-config ” where the YAML files describing the desired state of all production services live. When a service’s build pipeline produces a new image, instead of deploying it directly, it automatically opens (with a script) a pull request on the “ prod-config ” repo, changing the image tag from v1.2.2 to v1.2.3. The ops team reviews that PR and merges it. A Flux operator installed on the AKS cluster monitors the “ prod-config ” repo and sees the change: within minutes, it applies the new configuration to the cluster (downloads the new image and updates the deployment). This method ensures that the declared state (the config repo ) is always the source of truth for what should run on the cluster, and every change is tracked via PR.

d) Important Definitions for DevOps on AKS

·      AKS (Azure Kubernetes Service): An Azure service that provides a managed Kubernetes cluster (Azure manages the control plane, and you manage the worker nodes ). It allows you to run orchestrated containers at scale.

·      Docker/OCI Image: An immutable package containing the application and the required runtime environment (base system, dependencies). OCI is a standard that includes Docker as an implementation. Images are versioned with tags.

·      Azure Container Registry (ACR): Private cloud registry for container images and other OCI artifacts, integrated with Azure (for authentication, scanning, georeplication, webhooks ).

·      Helm: Package manager for Kubernetes. A Helm chart is a package that contains parameterizable Kubernetes YAML templates, useful for deploying complex applications by configuring them with a values file.

·      GitOps: An operating model where the desired state of the system (infrastructure or applications) is represented in a Git repository. Any changes to this version-controlled repository are automatically applied to the system through a continuous synchronization process. FluxCD and ArgoCD are popular implementations for Kubernetes.

·      HPA ( Horizontal Pod Autoscaler ): Kubernetes component that automatically adjusts the number of running pods for a deployment based on metrics (e.g., scale up pods if CPU > 70% for more than X minutes, scale down if < 30%, etc.).

·      Readiness/ Liveness probes: Checks defined for containers: readiness probes indicate whether a container is ready to receive traffic (the kube -proxy will exclude it from service until it is ready), liveness probes indicate whether a container is alive or blocked and allow Kubernetes to restart that container automatically if they fail.

·      Pod Disruption Budget (PDB): A rule that tells Kubernetes how many pods can be down at the same time during scheduled operations (e.g., node drains) to ensure a minimum number of pods are always up. Useful for maintaining high availability during maintenance.

e) Visual Hint (Text Description)

We can imagine a drawing that connects pipelines and clusters: on the left, a CI flow produces a container image (represented by a cube with the Docker logo), which is pushed to a Container Registry (a cylinder with the ACR logo). An arrow then leads to a Kubernetes Cluster (AKS) icon. Above this arrow are shield icons (for the security scanning step) and a gear (for application deployment ). The AKS cluster is drawn as a set of three machines/nodes running several containers (small colored cubes) called cart -service, catalog -service, etc., with green “Ready” indicators. Next to the cluster is a graph and magnifying glass indicating monitoring, and a network symbol with a padlock indicating security policies. This shows how the code flows from source to container, is deployed to the cluster, and is then monitored and governed during execution, all orchestrated by DevOps pipelines integrated with Azure.

 

9. Governance and Compliance with Azure DevOps and Azure

Implementing DevOps at enterprise scale means not only automating but also maintaining control over what is done, by whom, and how. Governance and compliance are terms that refer, respectively, to the management of IT guidelines/criteria and adherence to internal or external regulations (security, legislative regulations, industry standards). Azure DevOps, along with Azure, offers tools to ensure that development and release processes comply with these rules.

a) Azure Policies and Controls

Azure Policy is an Azure service that lets you define and enforce rules at the subscription or resource group level. For example:

·      Only allow creation of resources with private endpoints (no public database access).

·      Require all resources to have certain tags (e.g., “ costCenter ” for accounting).

·      Prevent the use of specific resource types or SKUs (e.g., unapproved VMs).

·      Force disk encryption or geo- redundancy on storage.

Azure Policy continuously assesses the health of your resources and provides a percentage of compliance with the assigned rules. For example, you might see that out of 100 resources, 64% are compliant and 36% are non-compliant with a certain initiative (policy set). This appears on dashboards and allows you to identify deviations.

b) Governance in Azure DevOps

Within Azure DevOps, there are governance mechanisms:

·      Branch policies and approvals we talked about, which are a type of technical governance over code quality.

·      Required Templates: Azure DevOps may require specific files (such as a security file) to be present in a repository folder or pipelines to include certain templates before they can operate. These can be thought of as centrally enforced guidelines (e.g., "each pipeline must import the standard security template").

·      Controlled openness: Not everyone can do everything: Azure DevOps has granular permissions for who can create pipelines, who can modify them, who can access package feeds, etc. A good governance setup strictly defines roles and permissions (example: only the DevOps lead can create production deployment pipelines ; regular developers can execute but not modify them).

·      Auditing: Azure DevOps provides an audit log of important actions: e.g., who changed permissions, who deleted a pipeline, who added a new secret variable, etc. This is useful for investigating incidents or ensuring accountability.

DevOps Processes

On Azure you can enable diagnostics for Azure DevOps (which, being a cloud service, is essentially outside of the classic Azure logs, but provides integrations) and send logs to Azure Monitor/Log Analytics:

·      You can create Workbooks on Azure Monitor that combine data: for example, cross-referencing pipeline data (e.g., build failure rate) with infrastructure metrics (e.g., correlating whether failures increase when there is low memory available on self- hosted agents, etc.).

·      Monitor deployments: Count how many releases have been made in the last month, how many were successful vs. failed.

·      Monitor repositories: e.g., number of commits per week, number of open/closed PRs, average code review time (this with Azure DevOps APIs and then visualizing with PowerBI or workbooks ).

Defender for Cloud DevOps (also mentioned above) provides a layer of recommendations: for example, it highlights whether a repo contains clear text credentials, whether a pipeline uses overly privileged tokens, whether quality checks are missing, etc. This is part of supply chain governance.

d) Security and Least Privilege

An important compliance principle is Least Privilege (Least Privilege): Each user or service should have access only to what they need. In Azure DevOps, this means:

·      Use specific Service Connections with limited scope for pipelines that need to deploy to Azure (e.g. a contribution-only service connection config to a resource group and not to the entire subscription if possible).

·      Prefer temporary mechanisms for access: for example, use short-expiry Personal Access Tokens (PAT) for scripts, or Managed Identities instead of static keys to let Pipeline and Azure communicate.

·      Enable Conditional Access and Multi- Factor Authentication for users signing in to your Azure DevOps organization, especially if you manage critical assets.

·      Manage security groups well (Project Collection Admins, Project Admins, Contributors, Readers, etc.) by ensuring people are in the correct groups and removing unnecessary access in a timely manner.

e) Practical Governance & Compliance Examples

·      Example 1: Policy and compliance. A company's IT requires all cloud resources to have an Environment tag (Dev, Test, Prod ) and an Owner tag. They create a definition in Azure Policy that denies the creation of resources that don't have those tags. This means that if a developer's IaC pipeline attempts to create a resource without tags, Azure will reject it, forcing the team to comply. On the Azure portal, the IT department regularly checks the compliance report: ideally, 100% of resources comply with the policy; if anything is non- compliant (e.g., a resource created before the policy and without a tag), it is remedied by adding the missing tag.

·      Example 2: Auditing in Azure DevOps. After an incident (e.g., an internal Artifacts feed was accidentally deleted, causing disruptions), the team wants to understand what happened. They use Azure DevOps ' audit log feature and discover that an intern's account, due to a misunderstanding, performed the action. Thanks to auditing, they know exactly when and who performed the action. This event leads to improved governance: the intern is removed from the permissions group that allowed them to delete feeds, leaving them with only read permissions. They also enable notifications for certain critical actions (for example, if a project or feed is created/deleted, an administrator receives an alert).

·      Example 3: DevOps Monitoring process. The DevOps team creates a workbook in Azure Monitor that shows: "Average build pipeline execution time," "Number of releases in Prod this month," and "Azure Policy compliance percentage of Prod resources," all on a single page. They notice, for example, that when compliance drops (some non- compliant resources ), it often coincides with an increase in pipeline errors (perhaps because someone created resources manually without following the process, causing inconsistencies). This way, they can focus on those events and intervene in the future with training or additional automation.

f) Important Definitions for Governance & Compliance

·      Governance: The set of processes, rules, and controls by which an organization manages and controls IT resources in accordance with its necessary policies and regulations.

·      Compliance: The state of alignment with these rules/policies. In Azure, often expressed as a percentage of resources that comply with the policies.

·      Azure Policy: An Azure service for defining governance rules applied to cloud resources.

·      Auditing (Audit log): A record of actions performed in a system, useful for subsequent checks and investigations.

·      Security Development Lifecycle (SDL): A software development process with security integrated into all phases (from requirements, design, implementation, testing, and release). Microsoft has an internally adopted SDL that establishes guidelines.

·      Least Privilege: the principle of least privilege, meaning giving users/systems only the strictly necessary permissions and nothing more, to limit the potential damage of errors or compromises.

·      Workbook: Interactive Azure Monitor tool for creating custom reports and dashboards from log data, metrics, and other sources (can combine text, charts, and log queries into a single display).

Visual Hint (Text Description)

To visually represent governance and compliance, let's imagine an IT manager-style dashboard:

·      On one side, a bar chart shows Compliance 64% perhaps in yellow, and a list of policies with red marks for those violated by some resource.

·      On the other hand, a line graph shows the deployment trend (e.g. number of releases per month).

·      In the middle, a shield icon with a gear represents Defender for Cloud DevOps, and a stylized open book represents a combined Workbook.

·      Additionally, we might see a “User – Action – Date” table that pulls in the audit log.

·      In one corner, the Azure DevOps logo with a padlock above it symbolizes permissions and access control. This composition conveys the idea that, in addition to developing and releasing quickly, we're also ensuring that everything happens according to the rules, in a transparent, controlled manner.

 

10. Account Organization, Permissions, and Project Scalability

The final piece of the Azure DevOps landscape concerns how to structure and manage the DevOps environment itself as teams grow and projects multiply. Azure DevOps is a flexible platform that can support everything from hobbyists with a single project to enterprise organizations with dozens of teams and hundreds of projects.

a) Organization and Projects

The main container in Azure DevOps is called an Organization. When you create an Azure DevOps account, you have at least one Organization (often named after your company or team). Within an Organization, you can create one or more Projects. A Project is a separate unit that contains its own repositories, pipelines, boards, artifact feeds, etc. Projects are useful for isolating contexts: for example, a company might have a project for each product or line of business. Within the same project, it's easy to link elements together (e.g., commits and work items) and share resources; between different projects, the separation is more clear-cut (although mechanisms exist for linking work items between projects or using cross-project artifact feeds, subject to authorization).

b) Security and Access

Permissions in Azure DevOps are granular and inheritable. They are based on:

·      Scope ( area ): there is a scope hierarchy: Organization -> Project -> ( within Project: repos, pipelines, artifacts feed, boards area paths, etc.).

·      Security Groups: Azure DevOps defines built -in groups (e.g. Project Collection Administrators at org level, Project Administrators at project, Contributors, Readers, Build Administrators, etc.). You can also create custom groups and include Azure AD users or groups.

·      Access levels: Individual users also have a licensed access level: for example Basic (standard for developers, allows full access to everything in the organization for which they have permissions), Stakeholder (free but limited: access only to work items and a few other features, designed for non-technical members such as managers, customers to see the status), or advanced levels ( Basic+TestPlans if advanced testing features are needed).

An example: a classic developer has Access Level Basic, and is placed in the Contributors group of project X. In that project, he will have the default contributor permissions: he can contribute to the code, edit work items, run pipelines, but he will not be able to, for example, delete the project, change protected repository settings, or change permissions for others.

Pipelines and other services can have service identities. For example, an Azure Service Connection is essentially an identity (such as an Azure AD-registered app with a certificate or a Service Principal ) with permissions on Azure resources, stored in DevOps for use in pipelines. These connections are project- or org- level and also have controls (e.g., an admin must authorize a new service connection to be used in a pipeline the first time).

It is also important to manage PAT (Personal Access Token) and other tokens with expiration and rotation, and to prefer integrated mechanisms (for example, using Oauth integrated with Azure AD to avoid using fixed credentials in pipelines).

Azure DevOps supports integration with Azure AD to control access (e.g., ensuring only people in your corporate tenant can access your organization, using conditional access policies like MFA, etc.). You can also use Azure AD groups directly to assign roles (instead of managing users individually).

c) Organize many teams

Within a project, especially if large, you can define Area Path and Iteration Paths to organize the work of different teams or components, while remaining within the same project. For example, the "Web App" project could have " Frontend " and " Backend " area paths and separate teams that filter work items by area. Or, there could be an area path for each group of components. Iterations, on the other hand, define sprint or milestone calendars.

When necessary, however, separating work into different projects can be useful to isolate permissions (e.g. an external vendor only works on project X and sees nothing of project Y), or to avoid too many different artifacts being mixed together (each project generates its own pipelines, backlogs, etc. and does not “pollute” the view of the others).

d) Reuse and Scalability

In complex environments, to avoid duplication and facilitate standards:

·      You can create reusable pipeline templates (YAML templates) that live in a centralized repository, so all teams can import them. Examples include a standard pipeline template for.NET builds, a template for security scanning, and so on. When you need to update it (e.g., add a new security step), simply edit the centralized template and all pipelines that include it will benefit from the change.

·      artifact feeds: Perhaps all projects use a common artifact feed to share libraries. This feed can reside in a dedicated "Central Packages" project, and other projects can access it with read-only permissions.

·      environments and approvals: if multiple projects need to deploy to the same Prod environment (let's assume microservices on a shared cluster), that environment Prod in Azure DevOps can be defined at the org level and shared, with a single approver group defined for it. This way, any pipeline from any project that wants to release to that environment will trigger the same approval and logging mechanism.

Azure DevOps is designed to scale: multiple teams can work in parallel, and by customizing processes and roles, each team sees and interacts only with what is relevant to them.

e) Practical Examples of Organization & Permissions

·      Example 1: Projects and Teams. A software company has 3 products and creates 3 separate Projects: Product A, Product B, and Product C. All developers are in the same Azure DevOps Organization ( ACMECorp ). Some developers work on multiple projects, others only on one. Permissions are managed with groups: e.g., “Team A Devs ” group with Contributor access to Project A, “Team B Devs ” for Project B, and so on. So if a developer changes teams, they can simply move them to another group. The managers of each product are assigned as Project Administrators in their respective projects, so they can manage their project's backlog and permissions but not affect those of others. A centralized package feed, “ACME Shared Libraries,” is created in Project A and shared for read by Projects B and C, because common libraries reside there.

·      Example 2: Stakeholders and Access Levels. A professor acting as a client for a student project simply wants to view progress: he is added as a Stakeholder user ( not counting on paid licenses) and receives permissions to read the project. He can view the Boards (backlog, sprint, work items) and pipeline results, but cannot edit code or launch pipelines. This is sufficient to review implemented user stories and comment on priorities, without risk.

·      Example 3: Service Connection and Managed Identity. A deployment pipeline on Azure requires permissions on a resource (e.g., web deploying to an App Service). Instead of using usernames and passwords published in scripts (which would be dangerous), the team creates a Service Connection in Azure DevOps (Azure Resource Manager), linked to a specially created Managed Identity in Azure with permissions only on the App Service's resource group. The first time the pipeline uses this service connection, an admin authorizes it. From that moment on, the pipeline can deploy, and Azure DevOps will manage the identity token; the pipeline never exposes secrets.

f) Important Definitions for Organization & Permissions

·      Organization ( Org ) – Highest level of containment in Azure DevOps, can contain multiple projects, users, and groups.

·      Project: A unit in Azure DevOps that contains isolated repositories, pipelines, boards, artifact feeds, etc. Project names are unique per org.

·      Security Group: a set of users with predefined roles ( Contributors, Readers, etc.) or custom roles, to which permissions on a scope are associated.

·      Access Level: general user license/rights (Basic, Stakeholder, etc.) that enable or disable certain functions (for example, Stakeholder cannot see the source code or run builds).

·      Service Connection: Secure configuration in Azure DevOps to connect pipelines to external services (Azure, GitHub, Docker registries, etc.) while storing credentials securely.

·      Managed Identity: An Azure-managed identity that can be associated with resources (VMs, App Services, or logical entities), allowing that entity to authenticate without having static keys. In DevOps, the service connection can often take on a managed identity to perform operations on Azure without managing secrets.

·      Conditional Access: Azure AD capabilities to impose additional conditions on access (e.g., require MFA, restrict access from corporate networks, etc.) that can also be applied to Azure DevOps users if the organization is joined to the AD.

·      Area Path / Iteration: categorizations used in Boards to divide work into functional areas (area path ) or time cycles ( iteration / sprint).

g) Visual Hint (Text Description)

We can summarize the structure and permissions in a mental matrix: Imagine a table with rows for Org, Project A, and Project B, and columns for Admin, Contributor, and Reader. The cells contain a few user or group names: e.g., the IT team is in the Org /Admin row, Alice (project manager of Project A) is in the Project A/Admin row, Dev Team A is in Project A/Contributor, an external stakeholder is in Project B/Reader, etc. This would visualize the permissions matrix. Next to it, a block diagram: a large “Organization” block containing two blocks, “Project A” and “Project B.” In the Org block, there’s a globe symbol (global settings, collection admin), while in the Project blocks, icons appear for Repos, Pipelines, Boards, etc. An icon indicates that there’s an Artifacts feed in Project A that’s shared with Project B (arrow from A to B). This communicates how the Azure DevOps environment is organized and how roles are distributed to ensure that collaboration occurs in an orderly and secure manner.

 

11. Summary Table of Main DevOps Services

Below is a table summarizing the main Azure DevOps services covered and their key features:

Azure DevOps Service

Main Purpose

Key Features

Azure Repos

Code version control ( Git /TFVC)

Git repositories ; branch management ( branch policy, branch protection ); pull requests with code review; work item integration; centralized TFVC support for legacy projects.

Azure Pipelines

Continuous Integration/Delivery (CI/CD)

Build and release pipelines (YAML as code or classic); cloud or self- hosted agents ; integration with GitHub/Azure Repos (CI triggers, PR validation ); multi-stage deployment across environments; variable and secret management; artifact publishing; testing support and integrated quality assurance.

Azure Boards

Agile project management

traceable work items (Epic, User Story, Task, Bug); backlog and sprint planning (Scrum); Kanban boards with WIP limit; dashboards and reports (burndown, lead/cycle time); connection between commits/PRs and work items for traceability ; integrated notifications and discussions.

Azure Artifacts

Package and dependency management

Private feeds for packages ( NuGet, npm, Maven, Python, Universal); package version control and retention policies; upstream sources for caching public registries; pipeline integration (publish and consume packages in CI/CD); views ( prerelease /release) for promoting packages; access control on feeds for teams/projects.

 

Note: Azure DevOps also includes Test Plans (for manual and acceptance testing), which are not covered in depth in this ebook. Additionally, many cross-functional capabilities (such as quality assurance, security, and infrastructure management) are enhanced by integrating Azure services (e.g., Azure Policy, Key Vault, etc.) with processes orchestrated via Azure DevOps.

 

Conclusions

Adopting Azure DevOps as a software lifecycle platform brings numerous benefits to a team, especially for students entering the world of professional development:

·      Unified and cohesive workflow: All the necessary tools (coding, planning, building, releasing ) are gathered in a single integrated suite. This means less time spent gluing together different tools and more consistency in processes. For example, a work item on Boards is directly linked to commits on Repos and builds on Pipelines, providing end-to-end visibility.

·      Automation and speed: With Pipelines, tasks that previously required manual intervention (running builds, testing, deployments) are automated and repeated reliably. This reduces human errors and enables more frequent and consistent releases. For a student team, automating builds/tests means spending more time coding and less time manually configuring environments.

·      Improved software quality: Thanks to mechanisms such as code review (pull request ), continuous testing, static analysis, and quality policies, problems are caught before the code reaches the end user. Integrating security testing and verification into the standard process ensures that quality is not an afterthought but an integral part.

·      Effective collaboration: Azure DevOps is designed to support teamwork. Whether it's commenting on code in a PR, discussing a bug in Boards, or sharing a package via Artifacts, the platform facilitates contextual communication. This is educational for students: they learn collaboration practices similar to those they'll encounter in the IT workforce.

·      Transparency and traceability: Every change, every commit, every build is tracked and linked to reasons and people. For a project leader or instructor, it's easy to see the progress, understand what's included in a given release (thanks to the work item- commit links ), and verify everyone's contributions.

·      Flexibility and extensibility: Azure DevOps is suitable for both small, single projects and organizations with hundreds of developers. Teams can start simple (for example, with a basic pipeline and a single repo) and then, as they grow, enable more advanced features (multi-repo, microservices, strict compliance, etc.). Furthermore, the platform is extensible: there are extension marketplaces for integrating third-party tools, and APIs for automating or customizing specific workflows.

·      Adopting a DevOps culture: Perhaps the greatest benefit is the cultural impact: tools like Azure DevOps encourage the adoption of a DevOps mindset —that is, breaking down silos between dev and ops, taking shared responsibility for the finished product, and iterating rapidly but in a controlled and measurable way. Students using Azure DevOps learn not only the technique, but also a collaborative way of working, oriented towards continuous improvement.

In short, Azure DevOps offers a complete ecosystem for implementing DevOps. From the initial idea (work item) to production deployment and beyond (monitoring and feedback), every step can be managed with a high degree of automation and control. This results in software delivered faster, with fewer defects, and in a predictable manner. For students, mastering these tools prepares them to join corporate teams already aligned with these practices, bringing added value with the ability to navigate and optimize modern development pipelines.

Azure DevOps embraces the philosophy that "every company is a software company" and provides the means to realize this vision, where collaboration is at the core, supported by robust processes and cutting-edge technology. Whether you're an academic project, a startup, or a large enterprise, adopting a DevOps approach with Azure enables you to be more agile, responsive, and focused on quality —essential characteristics for success in today's technology landscape.

 

Chapter Summary

This chapter provides a detailed overview of the key Azure DevOps services, explaining the capabilities of version control, continuous integration, work management, package management, code quality, infrastructure-as-code, DevOps on Kubernetes, governance, and account organization.

·      Azure Repos and version control: Azure Repos supports Git and TFVC for source code management, offering unlimited private Git repositories, branch management, pull requests with code review, and branch policies to ensure quality and security. It integrates with Azure Boards to track work associated with commits.

·      Azure Pipelines and CI/CD: Azure Pipelines automates build, test, and release with pipelines defined in YAML that are versioned alongside the code. It supports cloud or self- hosted agents, integration with GitHub and Azure Repos, multi-stage deployment, and variable, secret, and artifact management. It also provides detailed execution monitoring and notifications.

·      Release strategies and quality controls: Multi-stage pipelines allow you to define deployment phases across different environments (Dev, Test, Prod ) with manual approvals, automatic gates, and advanced release strategies such as canary release, blue-green deployment, and automatic rollback to minimize risks.

·      Azure Artifacts for Packages: Manages private feeds for NuGet, npm, Maven, Python, and Universal packages, with versioning, upstream sources for caching external packages, promotion views ( prerelease /release), and pipeline integration for secure package publishing and consumption.

·      Azure Boards and Agile Management: A tool for planning and tracking work through work items ( Epics, Features, User Stories, Tasks, Bugs), backlogs, Scrum sprint planning, Kanban boards with WIP limits, dashboards, and integration with commits and PRs for complete traceability. Supports discussions and integrated collaboration.

·      Code quality and security in pipelines: Azure Pipelines integrates automated testing, code coverage, static code analysis (SAST), dependency analysis (SCA), and container scanning to ensure quality and security. You can enforce quality gates to block non-compliant code merges and integrate digital signatures and attestations for a secure supply chain.

·      Infrastructure as Code and Configuration as Code: Describes the automation of infrastructure management through declarative files (ARM Templates, Bicep, Terraform ) and application/ version configuration management (Azure App Configuration, Key Vault). Pipelines perform validations, approvals, and enforce policies to ensure consistency and security.

·      DevOps on Azure Kubernetes Service (AKS): CI/CD cycle management for containerized applications on AKS with image builds, security scanning, deployment via kubectl, Helm, or GitOps, monitoring with Azure Monitor, Prometheus, and Grafana, and security via Workload Identity, network policies, and Azure Policy.

·      Governance and compliance: Azure Policy enforces governance rules across cloud resources, while Azure DevOps manages granular permissions, auditing, and access control to ensure compliance and security. The principles of least privilege and continuous monitoring of DevOps processes are emphasized.

·      Organization, permissions, and scalability: Azure DevOps structures the environment into Organizations and Projects with security groups and access levels (Basic, Stakeholder). It supports multiple team management, pipeline template reuse, shared feeds, and centralized approvals for shared environments, ensuring secure and organized collaboration.  

 

CHAPTER 9 – The Security Service

 

Introduction

This educational guide aims to guide students through a clear and comprehensive journey through the key cybersecurity issues in a Microsoft Azure environment, starting with general concepts and moving on to more advanced practices. Cloud security is a top priority today, and Microsoft Azure offers tools and methodologies that, when understood and applied correctly, can reduce risks and ensure the protection of data and resources. The first step is to understand the operational principles of security, namely the importance of a proactive, multi-layered approach that goes beyond defending the perimeter and considers every component as a potential point of vulnerability. This is where the Zero Trust model comes from, a paradigm based on the idea that nothing should be considered secure by default, not even internal users, and that every access must be constantly verified. Zero Trust in Azure translates into rigorous controls, multi-factor authentication, and continuous activity monitoring, elements that dramatically reduce the risk of compromise. Another fundamental pillar is identity and access management, which in Azure is achieved through Azure Active Directory and related tools. Properly configured identities, the use of conditional access policies, and privilege segmentation are essential practices to prevent a single compromised account from jeopardizing the entire environment. Data encryption provides an additional layer of protection: in Azure, data can be encrypted both at rest and in transit, using service-managed or custom keys, thus ensuring information confidentiality even in the event of unauthorized access. Network security is equally crucial and includes implementing firewalls, filtering rules, segmentation via virtual networks, and the use of VPNs for secure connections. Protecting resources also means implementing backup strategies and recovery policies that ensure business continuity in the event of incidents or attacks. Azure offers integrated backup and disaster recovery solutions, which must be configured and tested regularly to ensure their effectiveness. Monitoring and incident response complete the operational framework: tools like Microsoft Defender for Cloud and Azure Monitor allow you to detect anomalies, generate alerts, and initiate corrective actions promptly. Application security is another key topic, as vulnerabilities in code can provide a gateway for attackers. Azure provides services for secure application management, such as dependency analysis, API protection, and the use of secure containers. Finally, cloud compliance and automation are key elements that enable high standards to be maintained over time: Azure provides tools to verify regulatory compliance and automate security processes, reducing the risk of human error and improving efficiency. Each section of this guide is designed to explain concepts in a simple and accessible way, with practical examples demonstrating how to apply the solutions in real-world operations. The goal is to provide a solid foundation of knowledge that allows for secure operation on Azure, understanding both the tools offered by the platform and the best practices to adopt. Through this path, students will acquire useful skills not only for managing cloud infrastructure but also for addressing daily cybersecurity challenges with awareness and professionalism, integrating theory and practice into a coherent approach geared toward protecting corporate data and resources.

 

Outline of chapter topics with illustrated slides

 

Immagine che contiene testo, schermata, software, Pagina Web

Il contenuto generato dall'IA potrebbe non essere corretto.Azure adopts a shared security model between provider and customer. Microsoft protects the infrastructure, hypervisor, and managed services, while the organization manages identities, networks, data, and applications. The central tool is Microsoft Defender for Cloud, a CNAPP platform that offers secure scores, security recommendations, protection plans for virtual machines, containers, and databases, and integration with Microsoft Sentinel. The secure score measures posture against best practices, while the Regulatory Compliance section maps technical controls to key standards and enables improvement plans. The alert dashboard highlights threats and risky configurations, while insights suggest priority actions such as enabling MFA or setting up immutable backups. Training and culture are crucial: security awareness reduces human error, such as phishing or credential misuse. Practical examples include secure score analysis, application of high-impact recommendations, and governance through policies and management groups. A dashboard with key indicators and a subscription map facilitate continuous monitoring.

 

Immagine che contiene testo, schermata, Viso umano, software

Il contenuto generato dall'IA potrebbe non essere corretto.The Zero Trust model is based on three principles: explicit verification, least privilege, and breach assumption. In Azure, explicit verification means using MFA, Conditional Access, and risk assessments. Least privilege is achieved through RBAC, Privileged Identity Management for temporary roles, and periodic access reviews. Breach assumption involves network segmentation with NSGs and firewalls, continuous monitoring with Azure Monitor and Sentinel, and incident response playbooks. Practically speaking, elevated administrative roles can only be granted with PIM for a limited time, mandatory MFA, and a documented reason. Network segmentation limits flows between subnets and services. A three-pillar diagram with practical examples and authentication flows visually represents these principles.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Microsoft Access ID, formerly Azure Active Directory, is the identity service for authenticating users and applications. Conditional Access defines rules based on user, group, access risk, device compliance, and location. Enabling MFA strengthens security, using various methods such as Authenticator, SMS, voice, or FIDO2, and adopts passwordless authentication wherever possible. Administrative roles are assigned granularly and preferably via PIM. Groups allow delegation and RBAC assignments on resources, while specific policies are defined for external identities. Managed Identities enable authentication to Azure services without static secrets. Examples include mandatory MFA access policies for medium-risk users, assignment of Security Reader roles for auditing, and Application Administrator roles for app managers. A table maps roles and responsibilities and groups and resources.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.In Azure, encryption at rest is enabled by default on many resources, with Microsoft-managed keys. You can switch to customer-managed keys via Key Vault for greater control, rotation, and revocation. For data in transit, mandatory TLS is used, setting the minimum version and forcing HTTPS. SQL uses Transparent Data Encryption for files at rest, while Storage also supports double encryption. Key Vault provides keys protected by HSM, access policies, RBAC, and logging. It's important to design the key hierarchy, define rotation, and integrate secret management into your pipelines. Examples include creating a key in Key Vault for Storage, enabling auto-rotation and logging, and setting Minimum TLS 1.2 on App Service. A diagram shows the flows between Key Vault and the services.

 

Immagine che contiene testo, Viso umano, schermata, persona

Il contenuto generato dall'IA potrebbe non essere corretto.Access control in Azure is based on RBAC, which assigns permissions at various levels: management group, subscription, resource group, or individual resource. Predefined roles such as Contributor, Reader, and Owner are used, as well as minimal custom roles. Explicit deny is rarely used, but specific access policies are structured for services such as Key Vault or Storage, preferring access based on modern RBAC. Credentials are managed with Key Vault, Managed Identity, and Entra ID, reducing long-lived secrets. It's essential to enable periodic access reviews and audit logs for all operations, connecting them to Azure Monitor or Sentinel to detect privilege escalations or unusual activity. Practical examples include assigning Contributor to the application team, Reader to support, and Owner only to the platform team, as well as quarterly reviews and the automatic removal of inactive users. A role-based scope matrix and a request, approval, and expiration flow illustrate the process.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure network security combines layer 4 and layer 7 controls. Network Security Groups apply allow and deny rules on ports, protocols, source, and destination at the subnet or NIC level. Azure Firewall offers stateful filtering, DNAT and SNAT, application rules, and threat intelligence. VPN Gateways or ExpressRoute are used for hybrid access. Private Endpoints allow you to expose PaaS services on private IPs, while Standard DDoS protection is enabled on critical networks. Flow monitoring is done via Network Watcher and Azure Monitor for alerts on latency or open ports. Practical examples include configuring rules to allow HTTPS only from Front Door, SQL only from apps to databases, and deny. all inbound from the Internet. Administrative access via P2S VPN uses certificates and MFA. A hub-and-spoke diagram shows firewalls in the hub, NSGs in the spokes, and VPN connections and private endpoints.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure resource protection is based on security policies, backups, and change tracking. Azure Policy enforces requirements such as mandatory private endpoints or tags, measuring compliance. Backup Center manages daily backups, immutability for Blobs, long-term retention for SQL, and timely restores. Change tracking via Azure Automation allows you to monitor configurations and patches, and self- remediation can be applied where possible. Regular backups and disaster recovery ensure resilience against ransomware and human error. Examples include soft delete and versioning on Blobs, immutable policies for critical archives, backups with point-in-time recovery, and semi-annual restore tests. A backup and retention timeline and a policy-resource matrix help ensure compliance.

 

Immagine che contiene testo, schermata, Rettangolo, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.An effective monitoring program uses Azure Monitor for metrics, logs, and traces, Log Analytics workspace for queries, and Microsoft Sentinel as a SIEM and SOAR to correlate events and automate response. Alerts are configured for key signals such as privileged account creation, anomalous traffic, or MFA failures. Workbooks provide real-time visibility, while incident plans Response processes define roles, runbooks, and communications. Periodic exercises and post- incident reviews improve response. Defender for Cloud sends specific alerts to Sentinel for multi-source correlation. Practical examples include SOAR playbooks that manage impossible travel alerts and security workbooks for failed logins and at-risk users. A flow visualizes the incident management phases, from alerts to lessons learned.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Application security includes robust authentication via OIDC or OAuth2 with Entra ID, Managed Identity for services, and granular authorization via roles and claims. Regular vulnerability scans, both static and dynamic, are performed, and observability is maintained via audit logs. In Azure, App Service, AKS, and Functions integrate identity and private networking; Web Application Firewall on Application Gateway or Front Door is used for L7 protection. Dependencies are managed via SBOM and scanners such as Defender for DevOps and CodeQL, with regular package updates. Authentication and sensitive actions are logged and sent to Log Analytics or Sentinel. Examples include APIs protected with Entra ID and scopes, role-based access, rate limiting on Front Door, build pipelines with SAST and SCA, and merge blocking in the presence of critical vulnerabilities. A schema represents the user, WAF, application, and logging flow.

 

Immagine che contiene testo, schermata, Carattere, design

Il contenuto generato dall'IA potrebbe non essere corretto.Compliance in Azure is managed through Defender for Cloud and Azure Policy, which enforce and measure technical controls. Automated workflows, such as Logic Apps, Functions, or Runbooks, enable recommendations to be transformed into concrete actions: automatic tagging, port closures, policy enforcement, private endpoint provisioning, and secret rotation. Cost management helps monitor the financial impact of security, while periodic reporting documents compliance. Continuous compliance integrates into the DevOps cycle with policy as code, compliance testing, drift remediation, and the use of blueprints and landing zones. Practical examples include initiative repositories, pipelines that apply policies to each deployment, and quarterly reports with control status and planned corrective actions. A diagram represents the DevOps and compliance cycle, linked to Azure services.

 

1. Overview and Operating Principles of Azure Security

In Azure, security is addressed as a shared responsibility between the cloud provider (Microsoft) and the customer. Microsoft ensures the protection of the underlying cloud infrastructure —including datacenters, hardware, physical networks, and core managed services—while the customer (the organization using Azure) is responsible for securely configuring everything it builds in the cloud: user identities and permissions, virtual networks, service configuration, data protection, and hosted applications. This model therefore requires Azure users to adopt security best practices for the resources they create or manage in the cloud, taking full advantage of the security tools the platform provides.

A central element of Azure security is Microsoft Defender for Cloud, a solution classified as a Cloud-Native Application Protection Platform (CNAPP). Defender for Cloud offers a unified dashboard with key indicators of the security health of your Azure environment. Among these indicators is the Secure Score, a percentage that measures the security posture of your resources against best practices and enforced policies: the higher the score, the more the environment adheres to recommended security standards. Another important dashboard is the Regulatory Compliance section, which provides a view of the environment's level of compliance with key regulatory and industry standards (such as ISO 27001, SOC 2, PCI DSS, HIPAA, etc.), showing which technical controls are met and which require action. Additionally, Defender for Cloud lists security alerts generated by threat detections or risky configurations, and offers recommendations (insights) with prioritized actions to improve security, such as enabling MFA on important accounts, closing unused network ports, or configuring immutable backups.

It's important to emphasize that an effective security strategy relies not only on technical tools, but also on processes and corporate culture. Azure provides many technical means to protect systems and data, but if users and administrators aren't trained and aware of threats (e.g., phishing, credential misuse, social engineering), the risk of incidents remains high. Investing in security awareness —i.e., security training and awareness programs for all staff—is essential to reducing human error.

Practical examples:

·      Continuous improvement: Use the Secure Score as a priority guide. For example, if Defender for Cloud reports a low score due to unimplemented high-impact recommendations, such as enabling MFA for all administrative accounts or closing open RDP/SSH ports, these actions should be taken immediately. Once implemented, you can observe the increase in the Secure Score and monitor progress month by month.

·      Centralized governance: Define Azure policies at the Management Group level (the highest level that groups all your organization's Azure subscriptions) to apply uniform controls. For example, you can assign policies that mandate the use of private endpoints and prohibit public IPs on services, ensuring that all underlying subscriptions comply with these requirements. Azure also allows you to group multiple policies into an Initiative dedicated to a compliance standard—for example, one that covers the controls required by the ISO 27001 standard—making it easier to manage regulatory compliance on a large scale.

 

2. Zero Trust Model

One of the foundations of modern security, also adopted in Azure, is the Zero Trust model. Unlike traditional perimeter security (where everything within the corporate network is implicitly trusted), Zero Trust is based on the opposite assumption: never implicitly trust anything and explicitly verify every access. In short, Zero Trust is based on three key principles:

a)    Explicit verification ( Verify Explicitly ) – Every access request must be authenticated and authorized based on all available data (user identity, device used, geographic location, time, sensitivity of the requested resource, detected risk level, device compliance status, etc.). In Azure, this principle translates into the widespread use of multi-factor authentication (MFA), Conditional Access controls ( Conditional Access Access) and identity risk assessment systems: for example, if a login comes from a non-compliant device or an unusual location, the requester may be asked for an additional authentication factor or may be denied access.

b)    Least Privilege Access ( Least Privileged Access) – Each user or entity should have only the minimum permissions needed to perform their job, only for as long as necessary. This limits the impact of compromised credentials or human error. In Azure, this is implemented through the strict assignment of roles based on the principle of Role-Based Access Control (RBAC ) on cloud resources. Furthermore, Privileged Identity Management (PIM ) is used for highly privileged accounts: administrators are granted elevated privileges only temporarily, upon request and approval, and these privileges automatically expire after a defined period. Periodic access reviews are also performed to revoke those that are no longer needed.

c)    Assume Breach – It is necessary to assume that a breach can always occur and design containment measures and response plans accordingly. In practice, networks and resources are segmented in a granular manner so that even if one segment is compromised, the rest remain isolated (the principle of micro-segmentation ). Furthermore, continuous monitoring and advanced logging systems are activated: services such as Azure Monitor and Microsoft Sentinel constantly collect and analyze logs to identify anomalous behavior and generate alerts in the event of potential incidents. Finally, incident response plans are prepared ( Incident Response ) detailed to react quickly and in a coordinated manner to any breach, with isolation, forensic analysis and recovery procedures.

Azure incorporates these Zero Trust concepts into many of its services and features. For example, for explicit verification, it offers Azure Conditional Access as part of Entra ID (Azure AD), which allows you to define sophisticated condition-based rules; for least privilege, it provides the RBAC model with hundreds of predefined roles and the ability to define custom ones, as well as tools like PIM to manage high-privileged administrators; for breach management, it provides resources like Network Security Groups (NSGs) and Azure Firewalls to segment and filter traffic, and advanced monitoring and threat analytics services like Sentinel.

Practical examples:

·      Just-in-Time Administrative Access: A company implements PIM for administrative accounts in Azure. When an IT worker requires Global Administrator or Owner rights on a resource, they must trigger a request through PIM. The platform grants the role for, for example, two hours after receiving approval from a manager, and only if the user has performed MFA. Each activation also requires a documented reason. After the two-hour period, the privileges automatically expire. This way, even if an administrative account were compromised, the attacker would have a narrow window (or no elevated privileges if the role is not activated) to cause damage, limiting the potential impact.

·      Network segmentation: A network architecture in Azure is designed according to Zero Trust by separating the application layers. For example, you can have three subnets: web, apps, and databases. The resources in each subnet are associated with NSGs with rules such that: the subnet web accepts incoming traffic only on HTTPS port (443) coming from outside; the subnet app accepts traffic only from the web subnet (e.g. API calls) and only on specific ports as needed; the subnet The database only accepts connections from the app subnet on the database port (e.g., 1433 for SQL Server). All other traffic, in any direction not explicitly permitted, is denied. Additionally, security flow logs and anomalous connection monitoring are configured to promptly detect and block attempts at lateral movement or data exfiltration.

 

3. Identity and Access Management

In a cloud environment, digital identities (users, services, devices) are the new perimeter to defend. Azure offers a dedicated service for centralized identity management: Microsoft Entra ID, formerly known as Azure Active Directory (Azure AD). This service authenticates users and applications and governs who can access what. Through Entra ID, administrators can create and manage users and groups, assign roles, and define conditional access policies consistently across the entire organization.

key concept is Conditional Access. This allows you to set policies that evaluate conditions at the time of access and apply additional controls or restrictions. For example, you can require mandatory Multi- Factor Authentication (MFA) if the Entra ID system detects that the access is coming from an unusual location or if the calculated risk of access for the user is high (Azure AD analyzes various risk signals, such as authentication from new locations or potentially compromised devices). Other conditions could be the device's compliance status (for example, only allowing access from updated company PCs with active antivirus) or the type of application being accessed. With MFA enabled—using methods such as the authenticator app on the phone, SMS, voice calls, or FIDO2 devices for passwordless access—you add a crucial layer of security: even if a user's password were stolen, the attacker would be unlikely to have the second factor required to gain access. Microsoft is increasingly promoting passwordless solutions, that is, authentication without a traditional password, relying on biometrics or registered secure devices.

Permissions are managed using Azure's Role-Based Access Control (RBAC ) model. RBAC allows you to assign roles to users, groups, or service identities, determining which Azure resources they can access and with what privileges. Roles can be assigned at different scope levels: at the Management Group level (inheriting across all subscriptions in the organization), at a single Subscription level, at a Resource Group level, or at a single resource level. Azure provides dozens of predefined roles —such as Owner (full control of all operations within a certain scope), Contributor (ability to create and modify resources but not manage permissions for others), Reader (read-only), as well as roles specific to specific services—and offers the ability to create custom roles for more granular needs. A good security practice is to assign users the most restrictive role possible that still allows them to perform the required tasks (principle of least privilege). You should avoid granting excessive privileges such as Owner across the entire subscription unless absolutely necessary.

To increase security when managing elevated roles, Azure Active Directory (Enter ID) also includes Privileged Identity Management (PIM ). With PIM, users are not always assigned the elevated administrative role, but can request it for a limited time ( just-in-time ) and only with prior approval. As described in the Zero Trust section, an administrator can temporarily become Global Administrator or have owner privileges on a resource for the duration strictly necessary, after which the rights expire. Each activation is logged and may require MFA and justification. This reduces the window in which a highly privileged account could be compromised, significantly improving security.

In addition to human users, Azure AD also manages identities for managed services. Identities are system-managed identities that can be assigned, for example, to a virtual machine or an Azure application, allowing that resource to authenticate to other Azure services (such as a database or a Key Vault) without having to store credentials in code or configuration files. In practice, instead of saving usernames and passwords (or secret keys) to allow two components to communicate, a managed identity is used: Azure recognizes it and allows access based on the permissions assigned to it. This eliminates the risk associated with static secrets, which could be stolen or not renewed in time.

At the same time, Azure offers access policy mechanisms for specific resources. For example, a service like Azure Key Vault (where cryptographic keys and secrets are stored) can use dedicated access policies to define who can read, write, or delete secrets in the vault. However, even in these cases, the current trend is to use unified RBAC on Azure to control access to vaults and other resources, so as to have a consistent model across all resources.

Another key aspect of access management is monitoring and review. Azure records in detail in its audit logs all relevant identity and resource management operations—for example, assigning or removing a role, creating a new user, etc. These logs should be periodically analyzed, preferably by integrating them with Azure Monitor or sending them to the Microsoft Sentinel SIEM, so as to raise alarms if anomalous actions occur (such as the sudden assignment of elevated privileges to an account that previously lacked them, or a series of failed logins that could indicate intrusion attempts). Furthermore, it is good practice to activate periodic Access Reviews, which are review campaigns during which the owners of the various groups or roles verify whether the users still assigned to those roles actually need them. Azure AD facilitates this process by offering automated review capabilities: for example, you can configure a quarterly review of all users with the Contributor role or higher on a certain scope, and automatically remove those who do not confirm (or whose manager does not confirm) the need for such access. Additionally, you can set policies to automatically remove accounts or logins that have been inactive for a certain amount of time, thus dynamically maintaining the principle of least privilege.

Practical examples:

·      Adaptive Conditional Access policy: A university using Azure AD for students sets a Conditional Access policy that enforces MFA when students access university services from off-campus or from untrusted networks, or if the access risk calculated by Azure AD is medium or high (for example, because the account has recently failed login attempts). Additionally, the session can be limited: if access is from an unmanaged device, the policy could prevent downloads of sensitive files or force a login retry after a short period (session control).

·      Granular role assignment: A company assigns the Security Reader role to the audit team, allowing auditors to view security configurations and reports without being able to modify anything. Similarly, the Application Administrator role is assigned only to application managers, allowing them to register applications in Entra ID but not to have access to other administrative areas. This ensures that each user group only has the privileges necessary for their work.

·      Database access with RBAC: Instead of sharing database administrative credentials among developers, a company creates a Resource Group for the project and places the database there. The application developers are assigned the Contributor role on that Resource Group, allowing them to manage the database (e.g., apply schemas, manage data) but without having rights to change subscription-level security settings. The IT support team only gets the Reader role on the Resource Group, which is sufficient to monitor the database's status and read logs, but not to make changes. The Owner role remains exclusive to the platform team or senior administrators, who use it only for extraordinary operations.

·      Periodic access review: An organization sets up a quarterly review for all users with high administrative roles (e.g., Owner, Contributor on production environments). Every three months, managers must approve their members' continued access to their roles; the system automatically removes those who aren't confirmed or have been inactive for a long time. During one such review cycle, for example, it's discovered that a former designer was still in the group with the Owner role on some resources. Thanks to the review, their access is revoked, preventing potential inadvertent abuse.

 

4. Data Encryption and Key Management

Encryption is a fundamental pillar to protect data both when it is stored ( at rest ) and when transmitted over the network ( in transit ). Azure takes an extensive approach to data encryption at rest: many Azure services automatically encrypt stored data using Microsoft-managed keys. For example, files and blobs in Azure Storage, databases in Azure SQL Database and Cosmos DB, and virtual machine disks are encrypted by default without user intervention. This ensures that even in the event of unauthorized access to physical media or backup files, the data will remain unreadable. However, for advanced security and compliance needs, an organization may want to have granular control over the encryption keys: Azure allows you to switch between service-managed keys ( Microsoft- managed keys ) and customer-managed keys ( CMKs ). Using Azure Key Vault, the key and secret management service, companies can generate or import their own cryptographic keys and configure Azure services (Storage accounts, SQL, etc.) to use those keys to encrypt data. This way, customers maintain full control over their keys (they can rotate them, revoke them, and define access to them) and meet regulatory requirements that require internal management of encryption keys.

For data in transit, the general rule is to always encrypt communications using secure protocols. Azure allows (and sometimes requires) the use of TLS ( Transport Layer Security) for web services. For example, for web applications hosted on Azure App Service, it's possible (and considered a best practice) to completely disable unencrypted HTTP connections and accept only HTTPS, perhaps even setting the minimum supported TLS version (currently at least TLS 1.2). Many managed Azure services, such as Azure SQL, require encrypted connections or support them natively. A special case of integrated at-rest /in- transit encryption is Transparent Data Encryption (TDE) for Azure SQL Database: TDE automatically encrypts database and log files "on disk," while database connections are encrypted via TLS.

Azure Key Vault plays a crucial role in managing encryption keys and secrets. Key Vault is a service that offers secure storage for keys, secrets, and certificates. Keys can reside in secure hardware modules ( HSMs ) managed by Microsoft, ensuring a high level of protection. Key Vault allows you to fine-tune access to keys (for example, only certain services or identities can use a key to decrypt data), perform cryptographic operations ( signing, encryption ) without exposing the key material, and provide a complete audit log of every access or use of each key. It's good practice to design a key hierarchy: for example, have a master key used only to encrypt, and in turn secondary keys (data encryption keys) used for the actual data. This simplifies key rotation: you can periodically change the secondary keys and re-encrypt the data, keeping the master key stable (or rotating it at longer intervals and with controlled procedures). Azure Key Vault supports automatic key rotation (for example, configurable to generate a new version of the key every 90 days) and sends notifications or triggers alarms if keys are about to expire.

In summary, with Azure you should always: encrypt data at rest (using your own keys if necessary), encrypt data in transit (using TLS everywhere, even between internal services if possible), and protect your keys in a secure vault, with restricted and logged-in access.

Practical examples:

·      Customer-managed keys on Storage: For an application that stores sensitive data on Azure Blob Storage, the company creates a new encryption key in Azure Key Vault (or imports one generated by its on-premises HSM). It then configures the Storage account to use that Key Vault key to encrypt all blobs. It also enables automatic key rotation in the Key Vault (for example, every 6 months) and activates Key Vault access logging. This way, if an employee were to access data on the storage outside of company policies, the files would remain encrypted and access to the key would be tracked (or even denied if unauthorized).

·      Enforce TLS: A company website is published on Azure App Service. Administrators set the “Minimum TLS Version” to 1.2 and enable the HTTPS Only option, so that any HTTP requests are automatically redirected to HTTPS. They also upload a valid SSL certificate for the site's domain to the service. This ensures that all communications between users and the site (and between the site and any backend APIs ) are encrypted. Similarly, for an internal application communicating with a Cosmos DB database, end-to-end encryption is enabled and server certificate validation is enforced, ensuring that data in transit over the network is always protected.

 

5. Network Security (Firewall, NSG and VPN)

Network security in Azure is achieved by combining controls at Layer 4 (Transport) and Layer 7 (Application) of the OSI model. The two main tools offered by the platform for filtering traffic are Network Security Groups (NSGs) and Azure Firewall, supported by other services for specific scenarios (such as VPN Gateways or Azure DDoS Protection).

Network Security Group (NSG): This is a component that applies to a virtual network subnet or directly to a VM's network adapter (NIC) and contains basic security rules. Each rule defines whether to allow or deny a certain type of traffic, specifying the port or port range, protocol (TCP/UDP), and source and destination addresses. For example, an NSG rule can allow incoming traffic on TCP port 80 only if it comes from a certain IP range (or an internal subnet ) and block all traffic from other sources. NSGs operate at layer 4 (and partially layer 3 for addresses) and are similar to traditional stateless firewalls ; they do not analyze the content of the payload, but only basic headers. They have the advantage of being very specific and fast, and are used to segment and isolate traffic within the Azure Virtual Network.

Azure Firewall: It is a managed stateful firewall service (i.e., it tracks connections and can apply rules with context). Azure Firewall operates as a centralized appliance (typically located in a hub network in hub-and-spoke topologies ) and offers advanced features: it can perform NAT (Network Address Translation) Translation ) inbound and outbound (DNAT/SNAT) to publish internal services or to ensure that all traffic to the Internet exits with a certain IP. It supports application-level (L7) rules, such as allowing or denying HTTP requests to certain domains (FQDN) regardless of IP, and integrates threat intelligence feeds to automatically block known malicious addresses. In practice, Azure Firewall can filter more intelligently and centrally than NSGs, and is often used in conjunction with them: NSGs protect each individual subnet /VM, while the Firewall applies blanket policies to all traffic crossing the perimeters between networks (e.g., between the Azure network and the Internet, or between Azure and the on-premises network).

VPN and hybrid connectivity: In many scenarios, the Azure network is not isolated but needs to communicate with the outside world, such as the on-premises corporate network. Azure offers VPN Gateways to create encrypted Site-to-Site (S2S) connections between the company's on-premises network and Azure over the internet (using protocols such as IPsec /IKE). It also supports Point-to-Site (P2S) connections to allow individual clients (such as laptops of off-site employees) to join the Azure virtual network via VPN. An alternative to internet-based VPNs is Azure ExpressRoute, a service that provides a dedicated, private link (via a connectivity provider) between the on- premises network and Azure, with guaranteed bandwidth and low latency, often used for advanced enterprise needs.

Private Endpoint: To improve the security of communications to Azure PaaS services (such as Azure Storage, Azure SQL, etc.), you can use Private Endpoints. A Private Endpoint is essentially a private network interface in the customer's VNet that connects internally to the PaaS service, assigning it a private IP. This way, for example, instead of accessing an Azure SQL database via its public hostname, the application can connect to the internal private IP assigned as the Private Endpoint, preventing traffic from crossing the internet. This increases security by eliminating unwanted public exposure.

DDoS Protection: Azure includes basic protection against Distributed Denial of Service (DDoS) attacks on public resources by default. For mission- critical environments, it's recommended to enable Azure DDoS Protection Standard on certain virtual networks. This advanced, paid service detects and mitigates large-scale DDoS attacks with tailored policies and customizable response thresholds, ensuring service continuity even under attack.

Network monitoring: To keep an eye on what's happening at the network level, Azure provides tools like Network Watcher. For example, it allows you to enable Network Security Group Flow Logs, which are logs of all traffic allowed or denied by NSGs. These logs can then be analyzed (including with analytics tools or SIEMs) to identify intrusion attempts or misconfigurations. Network Watcher also offers features like network topology visualization (to see at a glance how subnets, peerings, and gateways are connected), connectivity tests between network points, and connection monitoring to detect if certain routes or end-to-end paths are interrupted. By integrating this with Azure Monitor, you can set alerts for anomalous conditions, such as if a VM starts receiving traffic on ports that should be closed or if the latency of a VPN connection exceeds a certain threshold.

Practical examples:

·      Multi-level filtering rules: A corporate web application is exposed to the Internet through a managed Azure service called Front Door. To ensure security, multiple levels of filtering are used: Front Door itself (which acts as a global entry point) only accepts HTTPS connections and routes traffic to a pool of web servers in the VNet. In the VNet, the subnet 's NSGs web only allows traffic from Front Door on port 443. The subnet app (which hosts the application servers) only accepts traffic from web VMs on the specific application port and blocks any direct traffic from the Internet. The subnet db only allows connections from the app subnet on the database port (e.g. 1433). Additionally, all NSGs have a Deny rule. All final, which blocks any other traffic not explicitly permitted. In parallel, an Azure Firewall in the hub inspects outbound traffic: for example, it prevents servers from contacting external domains known to host malware.

·      Administrative access via P2S VPN: To securely manage virtual machines and other services within the Azure network, a company avoids exposing management ports (SSH, RDP) to the Internet. Instead, technicians use a Point-to-Site VPN to access the network remotely. Each technician has a client certificate installed on their device and must authenticate with MFA to establish the VPN. The VPN is configured in split-tunnel mode, sending only traffic destined for the management subnets on Azure via the encrypted channel, while the rest of the client's Internet traffic follows the normal path. This way, management occurs via a secure and controlled channel, reducing the attack surface of the machines compared to public access.

 

6. Resource Protection and Backup

Beyond preventing attacks, a good security program also ensures resilience in the event of an incident. In Azure, this means implementing data and configuration protection measures, including preventive policies, regular backups, and change tracking, so you can quickly restore normalcy if something goes wrong.

Azure Policy and Compliance: Azure offers the Azure Policy service to define and apply security policies consistently across all resources. With Azure Policy, a company can set rules such as "do not allow the creation of X resources without encryption enabled, " "require all resources to be tagged as belonging to a project," or "prohibit the exposure of dangerous ports on virtual machines." Policies can either deny non-compliant configurations (preventing their creation or update) or simply flag non-compliant resources. They also produce a compliance score: in the Azure portal, you can see how many and which resources are compliant or not with each defined control. For example, if there is a policy that requires Private Endpoints to be enabled on all databases, the compliance dashboard will show the percentage of databases that comply with this rule and the list of those that need to be fixed.

Backup and restore: Azure Backup Center allows you to centralize and manage backups of various types of resources – from virtual machines to SQL databases and files – by defining backup policies to perform daily (or other frequency) copies of the data. A key element of a modern backup strategy is immutability: Azure Blob Storage, for example, supports WORM (Write-Once, Read- Many ) configuration, which prevents the modification or deletion of saved data for a set period, ensuring that backups cannot be compromised even if an attacker obtains elevated privileges (a typical ransomware attack is to delete or alter backups; with immutable storage, this becomes impossible for the defined retention period). For SQL databases, in addition to daily backups, Azure offers PITR (Point-In-Time Restore ), which is the ability to restore a database to the state it was in at any point in the last X days (typically 7, 14, or 35 days depending on the service tier ) via continuous transaction logs. Additionally, you can configure LTR (Long- Term Retention) to retain monthly or annual backups for many years (e.g., to comply with regulatory requirements). For virtual machines, you can schedule backups of the entire VM (snapshots) and retain multiple versions.

Site Recovery (DR): Disaster Recovery is enabled by services like Azure Site Recovery, which orchestrate the replication of virtual machines and applications from one Azure region to another (or from on-premises to Azure) so that, in the event of a catastrophic failure of an entire geographic region or data center, the machines can be restarted at the secondary location. Combined with backups and failover policies ( such as failover groups for databases), this ensures that even extreme events like natural disasters or massive attacks do not disrupt critical operations beyond a tolerated minimum.

Change Tracking and Auto- remediation: Azure provides tools for tracking resource configuration changes. For example, using Azure Monitor and Azure Automation, you can enable change tracking for virtual machines: every change to installed software, important configurations, or system settings is recorded, so if a problem suddenly appears, you can check what has recently changed on that VM. Similarly, the Azure Activity Log records all “infrastructure” changes made to resources (creation, setting changes, scaling, etc.). Based on this data, you can also set up automatic corrections (auto- remediation ): for example, if a policy reports that someone has created a VM without mandatory tags, you can configure the policy itself to automatically add the missing tag; or, if a log detects that a critical service has been stopped, an automation script can attempt to restart it without waiting for manual intervention.

Essentially, by combining prevention (policies that avoid insecure configurations), cure (regular backups and recovery plans), and change monitoring, you can build a resilient Azure environment, where failures are avoided or detected early and data can always be recovered.

Practical examples:

·      Data protection on Blob Storage: For a critical data archive on Azure Blob (such as company logs or financial documents), the company enables Soft Delete and Versioning features. Soft Delete ensures that if a blob is accidentally or maliciously deleted, it remains recoverable for a certain period (for example, 14 days). Versioning, on the other hand, automatically tracks every change to the blobs, preserving previous versions. Furthermore, for the most critical containers, an immutability policy is applied, setting, for example, that all written blobs are immutable for 30 days. This ensures that not even an administrator with access to the storage account could delete or alter that data within the established period.

·      Database backup plan with recovery testing: A company has a SQL database in Azure that hosts a critical application. A backup policy is set up with a PITR that allows restores to any time within the last 14 days and an LTR that retains month-end backups for seven years. Every six months, the IT team performs a disaster recovery test: they use Azure Backup to restore the database in a test environment, following a runbook (automated procedure) that configures a new database instance and redirects the test application. This exercise ensures that the backups are actually usable and that the team knows how to proceed quickly in the event of a disaster.

 

7. Monitoring and Incident Response

Implementing security controls reduces the risk of incidents, but does not eliminate them completely. It is therefore essential to have a robust system for continuous monitoring and incident response capabilities ( Incident Response ) in Azure, to detect threats early and respond in a coordinated manner.

Azure Monitor and Log Analytics: Azure Monitor is the central service for collecting metrics and logs from all your Azure resources. It allows you to aggregate performance data (CPU, memory, disk usage, request latency, etc.) and events (application logs, system logs, Azure activity). Log data can be sent to a Log Analytics Workspace, where it can be queried and correlated using KQL ( Kusto Query Language). For example, you can use Log Analytics to search all access logs to see who generated 403 errors on a given service, or to count how many VMs have rebooted in the last few days. Azure Monitor also allows you to configure alerts on any metric or log: for example, you can set an alert to go off if the number of failed Azure AD logins exceeds a certain threshold in an hour, or if a VM is shut down after hours, or if incoming traffic to an application suddenly increases (a potential sign of a DDoS attack).

Microsoft Sentinel (SIEM/SOAR): For a unified view of security, Azure offers Microsoft Sentinel, a Security Information and Event Management (SIEM) and Security Orchestration, Automation, and Response (SOAR ) service. Sentinel can aggregate data from Azure Monitor/Log Analytics, as well as external sources (e.g., on-premises system logs, threat intelligence feeds, and third-party service logs via connectors). Sentinel is used to define correlation rules that identify potential security incident conditions: for example, the combination of a new high-privileged user creation event, followed by anomalous activity on a VM, could generate an incident in the SIEM. Each incident aggregates the various related events and can be analyzed by security operators. The SOAR part of Sentinel allows you to associate automated response playbooks (often built using Azure Logic Apps) with incidents: for example, if an “Impossible Travel” alert is triggered (i.e., a user logging in twice in quick succession from geographically distant locations, indicating possible credential theft), you can automate a playbook that resets that user’s credentials, forces a password change, notifies the Security Operations Center (SOC) team, and perhaps temporarily locks the account until the activity occurs.

Incident Response Plans: Technology aside, it is critical to have a defined Incident Response process. Response. A good response plan includes clear roles and responsibilities (for example, following the RACI model, defining who is Responsible, who must Approve, who must Consult, and who must Report for each type of incident), detailed procedures for various incident categories (data breach, ransomware, service outages, etc.), and tools for internal and external communication during the crisis. Azure can facilitate this by including Automation runbooks for repetitive tasks and integrating services like Azure DevOps or Teams to track and communicate incident status.

Exercises (e.g., table -top exercises ) should be conducted regularly, in which the security and IT team simulates an attack or serious malfunction and follows the response plan, to test its effectiveness and familiarize staff with it. After each real incident or simulation, a post- incident review should identify what worked and what didn't, so as to continuously improve the process.

Defender for Cloud Integration: Monitoring systems also include workload -specific solutions. For example, Microsoft Defender for Cloud (mentioned in the overview section) not only provides recommendations but also generates security alerts when it detects suspicious activity on resources such as virtual machines, containers, databases, IoT, etc. It's important to integrate these alerts into the overall process: Defender for cloud can be configured to automatically send alerts to Microsoft Sentinel, thus unifying incident management in a single console.

Practical examples:

·      Implementing a SOAR playbook: As mentioned, if Sentinel generates an incident for Impossible Travel (a user logged in from two different countries within half an hour), an automated playbook can be triggered. For example, the playbook immediately disables the suspicious user's account and requests a password reset, sends an email or Teams message to the security team with the alert details, and creates a help desk ticket to track the event. In parallel, it triggers a Lambda/ Logic App function that searches the access logs for other clues (such as IP addresses used) and updates the ticket with this information. This type of automation limits potential damage while waiting for a human operator to take over the in-depth analysis.

·      Security and monitoring dashboard: A corporate SOC creates a workbook (interactive dashboard) on Azure Monitor/ Sentinel to gain real-time visibility into key security metrics. For example, the dashboard displays: the number of failed system logins in the last 24 hours, the count of new endpoints registered with MFA, the list of high-risk users identified by Azure AD Identity Protection, and recent changes to NSG or firewall rules. Each element has indicators that indicate if the value is abnormal (for example, a spike in failed logins compared to the average). This allows the team to quickly identify anomalous behavior even without waiting for a formal alert.

 

8. Application Security

Security isn't just about infrastructure, but also about the applications running in Azure. Securing cloud applications requires attention on multiple fronts: user authentication and authorization, code and dependency security, secure configuration of application services, and application activity monitoring.

Authentication and authorization in applications: Ideally, applications should not implement "homemade" authentication mechanisms, but integrate robust identity services. In Azure, applications can use Microsoft Login ID (Azure AD) to authenticate users via standard protocols such as OAuth2 and OIDC ( OpenID Connect). For example, a web app can use Login ID to log in corporate users, automatically leveraging its MFA and Conditional Access capabilities. For services within the architecture (e.g., microservices that communicate with each other), it is recommended to use Managed Identity Services. Identities and Azure AD tokens instead of sharing static secrets. Authorization should be granular: use application roles or claims in JWT tokens issued by Azure AD to determine what each user or constituent can do (for example, a “ role: approver ” claim that the app reads to allow access to certain features).

Code Security and DevOps: Applications must also be protected from vulnerabilities in the code and libraries used. A good practice is to adopt the DevSecOps model, incorporating security checks into the development cycle. For example, static code scans (SAST) should be performed regularly to identify security bugs (SQL injection, XSS, etc.) and dependency scans (SCA) should be performed to identify third-party libraries affected by known vulnerabilities. Azure offers tools like Defender for DevOps that integrate with CI/CD systems (GitHub Actions, Azure DevOps pipelines) to perform these analyses, or you can use open-source tools like CodeQL or Trivy. It's also important to generate a SBOM (Software Bill of Materials ), which is a list of all software components and their versions, so you can quickly identify if a certain product is affected by a known threat (for example, the Log4j library in the case of Log4Shell). If critical vulnerabilities (high severity CVEs) are found, the build process should flag them and potentially block production release until they are fixed or mitigated.

Securely configuring application services: Many applications in Azure run on managed services like App Service, Azure Functions, or container clusters like AKS (Azure Kubernetes Service). These platforms offer native integrations with Azure security services: for example, App Service and Functions can be isolated in a virtual network and access databases only through Private Endpoint ; AKS can use solutions like Network Policies to filter traffic between pods and integrate with Azure AD for authentication to cluster APIs. When applications expose web interfaces, a Web Application Firewall (WAF) should always be considered. In Azure, you can enable a WAF on Application Gateway or Azure Front Door instances, defining rules that block application-layer attacks like SQL injection, XSS, requests to malicious URLs, and so on. A well-configured WAF can stop many categories of attacks before they reach the application itself.

Protecting application data and secrets: Applications often require API keys, connection strings, certificates—all sensitive data that must be protected. The golden rule is to never include secrets in code or cleartext configuration files. Azure Key Vault should be used to securely provide these secrets: for example, a web app can retrieve the database connection string from the vault on the fly, or better yet, use a Managed Identity to connect to the database without a password. This is the concept of secret - less: avoiding manual password/secret management, relying on more secure mechanisms like managed identities and centralized vaults.

Application logging and monitoring: Applications should generate logs, especially security events, such as user authentication logs and logs of sensitive operations (such as modification of critical data, password resets, etc.). These logs should be sent to Azure Monitor/Log Analytics and potentially Sentinel for analysis in the event of an incident. Tools like Application Insights help collect telemetry and track application errors, which can often indicate exploit attempts (for example, persistent 401/403 errors could indicate unauthorized endpoint scans).

Practical examples:

·      Secure API with Entra ID and rate limiting: Develop a REST API to be used by third-party clients and applications. Instead of managing separate accounts, developers integrate Azure AD, meaning entities calling the API obtain an OAuth2 token from Entra ID with specific scopes or roles. The API validates the incoming token on each call, ensuring that the calling user or app is authenticated and authorized to perform that specific operation. Additionally, Azure Front Door with WAF is configured in front of the API, allowing rate limiting rules to be enabled, such as limiting the number of requests each client can make per second, preventing abuse or brute force attacks. The WAF also automatically blocks known application attack patterns.

·      CI/CD Pipeline with Security Checks: The DevOps team configures the build and release pipeline so that security tests are run with every code commit. For example, using plugins in the build agent, a SAST scan of the source code is launched for vulnerabilities and an SCA scan is launched that analyzes the NPM/ nuget / PyPI packages or base containers used for known CVEs. If, say, a known High severity vulnerability is found in a library, the pipeline can mark the build as failed and notify developers that they must update that component before deploying. Only after the code passes all tests (including security tests) is the application deployed to Azure, greatly reducing the likelihood of vulnerabilities being introduced into the production system.

 

9. Compliance and Security Automation

As an organization's Azure infrastructure grows, it becomes crucial to ensure that all security rules are consistently applied and that the company can demonstrate compliance with internal and external standards. In parallel, the use of DevOps methodologies and automation can help maintain a high level of security while reducing manual effort and errors.

Compliance dashboard: As mentioned previously, Microsoft Defender for Cloud includes a Regulatory Compliance section that displays status against various standards. For example, if your organization must comply with the GDPR, ISO 27001, and CIS Benchmark, the dashboard will highlight the percentage of controls met in your Azure environment for each of these standards and which controls require action. This visibility is very useful for audits and verifications: instead of manually checking dozens of configurations, you have a centralized report. Azure Policy is closely linked to this, as many compliance controls translate into implemented Azure policies (e.g., "Encrypt all disks with active encryption" could be an ISO 27001 rule – Azure Policy can automatically check it for all VMs).

Automated remediation: Relying solely on manual checks can be inefficient; Azure allows you to automate many security actions. For example, with Azure Logic Apps or Functions, you can create workflows that react to specific security events or recommendations. If Defender for Cloud reports that a VM has opened port 22 (SSH) to the internet, you could have an automated process that immediately closes the port and alerts the administrator. Or, if a new resource is created without the required tags, an automated function could add them, preventing the non-compliant element from being left behind. Azure's Automation Account allows you to run runbooks (predefined PowerShell or Python scripts) in response to events; so if a backup fails, another can be automatically attempted, or if a user is added to a privileged group, the security team can be immediately notified. In practice, every repetitive or standardized phase of the security lifecycle can be orchestrated by automation tools, reducing response time and ensuring no critical steps are missed.

Controlling security costs: Implementing security controls in the cloud can impact costs (for example, enabling detailed logging everywhere, keeping analytics running 24/7, and retaining data for extended periods). Azure offers Cost Management + Billing, a tool for monitoring and managing costs, which can also be used for security. For example, you can track how much you spend on security services ( Sentinel, Defender for Cloud, backup, etc.) and optimize budget allocation. Often, however, security costs should be viewed as investments: a cost management dashboard can help highlight how increased security spending (e.g., more logging ) corresponds to a reduction in risk or the avoidance of much higher costs related to incidents.

DevSecOps and Policy as Code: To manage security in highly dynamic cloud environments, continuous compliance practices are integrated into the DevOps cycle. One example is the concept of Policy as Code: Azure policies and security configurations are managed as versioned code (e.g., JSON files of policy definitions kept in a Git repository ). Every change to these policies goes through code review and CI pipelines, and once approved, they are deployed to Azure (perhaps first to a test environment, then to production). This ensures that security rules are subject to the same rigor as application code and that any changes are traceable. Furthermore, compliance tests can be incorporated into application release pipelines: for example, before deploying a new infrastructure (using IaC, Infrastructure as Code, such as Bicep or Terraform ), run a scan with compliance tools (such as Terraform Compliance or Azure Resource Manager policy aliases) to ensure that what you are about to build complies with all corporate policies. If something is out of standard, the pipeline flags it or blocks the deployment. This proactive approach prevents the creation of non-compliant resources from the start.

Blueprints and landing zones: Microsoft provides concepts like Azure Blueprints and landing zones, which are reusable templates of Azure environments with predefined governance. A blueprint can contain definitions of policies, roles, and basic resources; applying it creates a new environment (such as a subscription for a new project) already configured with all the required security rules, without having to apply them later.

Reports and audits: Finally, it's important to prepare periodic reports on your security posture. For example, a quarterly report to management could include Secure Score trends, the number of incidents occurred and resolved, compliance with key standards, and corrective actions taken. These reports, in addition to satisfying any external audit requirements, also help keep the organization focused on the issue and make informed decisions (such as where to invest to further improve security).

Practical examples:

·      Policy as Code Implementation: A cloud team creates a dedicated Git repository for Azure governance rules. This repository contains Azure Policy and Initiative JSON files (policy sets) that define requirements such as "all disks must be encrypted with CMKs" or "do not create NSGs with overly permissive rules." Every change to this repository undergoes code review. An automated pipeline checks the policy syntax and then deploys them to the target subscriptions using Azure CLI scripts. Additionally, for each new application released, a pipeline step is executed that imports these policies in evaluation-only mode onto the resource model the app will create, flagging in advance if anything would violate the rules. Only if the infrastructure passes the compliance tests is the app actually built. This ensures that developers and project teams adhere to security policies from the start, seamlessly integrating into the DevOps process.

·      Reporting and continuous improvement: The cloud security manager prepares a quarterly report for the company's risk department. For example, Defender for Cloud's Secure Score shows a 65% improvement in compliance last quarter, thanks to the implementation of 10 high-impact recommendations (detailed in the report). A list of critical controls that are still non-compliant is included (for example, the need to enable MFA for some external accounts or implement encryption on a couple of legacy storage accounts), and a corrective action is planned for each, including the owner and expected date. This formalized reporting process helps maintain a continuous improvement cycle, in which security posture is regularly measured, reported, and improved.

 

Conclusions

Azure security is therefore an ongoing journey involving technologies, people, and processes. In this guide, we've explored how Azure provides a wide range of tools and services to protect infrastructure, identity, network, data, and applications, and how these components can be orchestrated according to best practice principles (Zero Trust, least privilege, end-to-end encryption, proactive monitoring). For a student or novice professional, the world of cloud security can seem complex: the advice is to approach it in a structured way, starting with the basic concepts (such as shared responsibility and Zero Trust principles) and gradually delving into the more specific aspects (identity, network, data, applications). Experimentation is also important: Azure offers free learning environments and tiers with which to try setting up a secure network, applying a policy, generating an alert on Sentinel, etc. Only with practice will you truly understand how these elements integrate. Finally, let's remember that security isn't a product you buy, but a process: it requires ongoing attention, constant updates on new threats and defenses, and a widespread culture that involves everyone (from managers to developers, from administrators to end users). With the basic knowledge gained from this guide, you're ready to delve deeper and tackle practical security challenges on Azure.

 

Chapter Summary

This chapter provides a comprehensive overview of the practices and tools for ensuring security in the Azure cloud environment, covering aspects from identity management and network protection, to data encryption, monitoring and incident response, regulatory compliance, and automation.

·      Shared Responsibility Model: Microsoft secures the cloud infrastructure, while the customer is responsible for securely configuring the resources they create, with tools like Microsoft Defender for Cloud that monitor security posture and regulatory compliance.

·      Zero Trust Model: It is based on explicit access verification, the principle of least privilege, and the presumption of breach, implemented through MFA, RBAC, PIM, network segmentation, and continuous monitoring with services such as Azure Sentinel.

·      Identity and Access Management: Microsoft Access ID manages users, groups, and conditional access policies with MFA and temporary privileges via PIM, as well as managed identities for services and periodic access review to maintain the principle of least privilege.

·      Encryption and key management: Azure automatically encrypts data at rest and in transit, with the option to use customer-managed keys through Azure Key Vault, which offers security, access control, automatic rotation, and full auditing.

·      Network Security: Protection relies on Network Security Group for basic rules, Azure Firewall for advanced filtering, VPN for secure connectivity, Private Endpoint for private access to PaaS services, DDoS protection, and monitoring tools like Network Watcher.

·      Asset protection and backups: Azure Policy enforces security and compliance policies, while Backup Center manages backups with immutability and point-in-time recovery; Azure Site Recovery enables disaster recovery, and change tracking tools with auto- remediation improve resilience.

·      Incident monitoring and response: Azure Monitor collects metrics and logs, while Microsoft Sentinel integrates SIEM/SOAR to correlate events and automate responses via playbooks ; incident plans Response and periodic exercises ensure operational readiness.

·      Application Security: Apps must integrate Entra ID for authentication and authorization, adopt DevSecOps with security scans, configure securely managed services, protect secrets with Key Vault, and monitor activity via logs and Application Insights.

·      Compliance and automation: Defender for Cloud and Azure Policy ensure visibility and consistent enforcement of security rules; automation through Logic Apps and runbooks reduces errors; DevSecOps and Policy as Code practices integrate security into the lifecycle; and periodic reporting supports continuous improvement. 

 

CHAPTER 10 – The automation service

 

Introduction

Azure Automation is a managed Microsoft Azure cloud service that lets you automate repetitive tasks and orchestrate workflows across Azure and hybrid environments (i.e., combinations of cloud and on-premises infrastructure). In practice, automation allows you to transform manual tasks—such as starting and stopping virtual machines, periodically cleaning up unused resources, running backups, or regularly rotating secrets and passwords—into reusable and schedulable runbooks (automated scripts).

Through Azure Automation, a company can achieve several key benefits:

·      Operational efficiency: Repetitive tasks are performed automatically, freeing up human operators' time for more complex tasks.

·      Reliability: Automated processes reduce human errors and ensure consistent results; a script always performs the same steps, in the same order, ensuring consistency in operations.

·      Governance and auditing: Every action performed by runbooks is tracked in logs, enabling detailed audits. You can always trace who or what performed a specific operation and when, useful for security and compliance audits.

·      Increased security: Automation can systematically enforce security rules (e.g., automatically shutting down critical resources after hours to reduce the attack surface, or rotating access keys at regular intervals). Additionally, by managing tasks using controlled identities and permissions, potentially risky manual actions are avoided.

·      Integration with other Azure services: Azure Automation integrates with many other services (such as Monitoring, Storage, Database, etc.), allowing you to trigger scripts in response to events (e.g. an alarm event) and interact across various infrastructure components.

A concrete example of what can be done with Azure Automation is automated virtual machine (VM) lifecycle management. Traditionally, a cloud administrator might manually start or stop a VM through the Azure portal; however, with automation, these actions can be scheduled and standardized. Imagine having a series of runbooks with meaningful names like CreateVM.ps1, DeleteVM.ps1, StartVM.ps1, and StopVM.ps1. Each of them creates a new VM, deletes a VM, starts an existing VM, and stops a VM, respectively. These runbooks can be scheduled to run automatically on a schedule (for example, CreateVM.ps1 can be run every Monday at 9:00 AM to create a test VM, and DeleteVM.ps1 every Friday at 6:00 PM to delete it; or StartVM.ps1 every morning before work to power on certain VMs, and StopVM.ps1 in the evening to power them off and save costs). Additionally, each execution leaves a searchable trace: for example, starting a VM using StartVM.ps1 will record a log with the start time and the outcome of the operation.

How does Azure Automation work internally? A typical illustration would show that everything starts with an event or schedule: this event triggers a specific runbook ; the runbook performs a series of actions (such as interacting with the Azure API to launch a VM or modify a service); finally, all the activity is logged for future auditing and monitoring. In the conceptual diagram, you'll often see icons for a VM, a storage account ( Storage ), a secret management service like Azure Key Vault, and a monitoring service. These icons indicate that automation involves different types of resources: for example, a runbook might launch a VM (VM icon), read or write configuration files to a Storage account (Storage icon), retrieve a password or certificate from Key Vault (Key Vault icon), and finally send logs to Azure Monitor or Log Analytics (Monitor icon).

In short, Azure Automation offers a centralized environment for defining and controlling automated scripts, with the goal of streamlining, securing, and governing the operational management of even complex cloud infrastructures. In the following chapters, we'll explore the various components and features of this service in detail, demonstrating how to implement these automations in practice.

 

Outline of chapter topics with illustrated slides

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Automation is a managed service that lets you perform repetitive tasks, orchestrate operational flows, and apply configurations across Azure and hybrid environments. Automation lets you transform manual operations, such as starting and stopping VMs, cleaning resources, backing up and rotating secrets, into reusable and scheduled runbooks. Key benefits include operational efficiency, reliability, governance through auditing and security, and integration with other Azure services. A concrete example is the automatic creation of virtual machines via scripts, as seen in the dashboard with the CreateVM.ps1, DeleteVm.ps1, StartVm.ps1, and StopVm.ps1 runbooks. Visual diagrams show the flow: event, runbook, action, and logging, with icons for VM, Storage, Key Vault, and Monitor.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.A runbook is an automated script that encapsulates an operational procedure. In Azure Automation, you can create runbooks in PowerShell, Python, or as visual graphs, offering flexibility for different experience levels. Runbooks can be started manually, via schedule, webhooks, or integrated with services like Logic Apps. Managing variables, credentials, and modules is essential, as is using Managed Identity for secure access to resources. It's important that runbooks are idempotent, meaning they can be re-executed without side effects. A practical example is the scheduled start of a VM ten minutes before the start of a shift, with a status check and notification to Teams. The diagrams suggest a flowchart that begins with parameter input, moves on to authentication, status validation, action, and finally logging and notification.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.The Automation Account is the central container that hosts runbooks, schedules, variables, connections, certificates, credentials, and modules. This is where you define managed identities, authorizations via RBAC and IAM, and integrate logs with services like Log Analytics. Best practices include separating accounts for different environments and workloads, enabling diagnostic settings, versioning runbooks, and using Key Vault for secure secret management. A practical example is the Ops- Prod account, which accesses Storage and Key Vault and restricts execution to authorized networks via Private Endpoint. The visual diagram shows the Automation Account in the center, with connected edge assets and flows to Log Analytics.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.The Hybrid Runbook Worker allows you to run runbooks on local servers, both on-premises and VMs in other clouds, while maintaining orchestration and logging in Azure. It's ideal when automation needs to access internal resources or follow corporate policies that require actions within the private network. Configuration involves installing the agent, registering the server in the HRW group, and selecting Hybrid execution for runbooks. Latency, machine availability, patch management, and the principle of least Credential privilege. A practical example is launching an MSI installer on Server01 and writing logs to Log Analytics. The diagram shows the flow between Azure Automation and the HRW server, including command, execution, logs, and network restrictions.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Update Management in Azure Automation lets you discover, plan, and apply patches to Azure VMs and on-premises servers, both Windows and Linux. You can create deployment schedules, define update inclusions and exclusions, set pre- and post-application scripts, and generate compliance reports. Patch automation reduces vulnerability exposure and ensures policy compliance. It integrates with Maintenance Configuration to coordinate reboots and with Change Tracking to monitor changes. Practical examples include scheduled monthly patches with pre- and post-application checks and exceptions for unstable drivers. The visual timeline shows the scanning, planning, application, validation, and reporting phases, with success or failure indicators.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Automation State Configuration extends PowerShell DSC with a cloud pull service, allowing you to deploy configurations and modules, register nodes, and monitor compliance. With DSC, you declare the desired configuration, while the Local Configuration Manager applies and maintains the correct state over time, correcting any drift. It's ideal for system hardening, installing application features, and setting standard parameters like TLS and auditing. Examples include defining security policies and declaratively configuring application servers like IIS. The visual diagram shows LCM on each node, with arrows pointing to the Automation pull server and the compliance panel.

 

Immagine che contiene testo, schermata, Carattere, linea

Il contenuto generato dall'IA potrebbe non essere corretto.runbooks can be integrated into larger flows via Logic Apps, Power Automate, and REST APIs or webhooks. This enables scenarios such as on-call management, ITSM ticketing, operational notifications, and approvals. You can call runbooks from custom applications, send Adaptive Cards to Microsoft Teams, or react to Event Grid events. Common patterns include notification and approval via Teams, incidents, and more. Automation for alerts and secret rotation in Key Vault. A practical example is the runbook that shuts down development VMs, publishes the summary to Teams, and archives the logs. The diagram shows the sequence: alert, Logic App, Teams approval, runbook, and CMDB update.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Enforcing a security baseline is essential in Azure automation. RBAC and IAM are used to assign minimal roles, Managed Identity to authenticate runbooks without hard-coded credentials, and audit logs to track activities and changes. Policies enforce the use of MSI and mandatory configuration of diagnostic settings. Policy initiatives can be linked to management groups to ensure systematic enforcement. Practical examples include automatically defining policies that prevent non-compliant deployments and monthly job reliability reports. The visual checklist includes RBAC, Identity, Logs, Policy, and a flowchart connecting jobs, logs, workbooks, alerts, and auditing.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.With Cost Management + Billing integrated with Automation, you can create runbooks that optimize costs by shutting down idle VMs, resizing SKUs, and archiving storage to lower-cost tiers. You can read cost data via API or export, generate reports, and alerts on budget overruns. Best practices include consistently tagging resources, scheduling shutdowns for non-productive environments, and verifying SLA impacts. Examples show runbooks that analyze usage metrics before deallocating, send summaries to Teams, and move stale blobs to Archive. The diagram visualizes the cost policy, with inputs from Cost Management, rules, actions, and feedback.

 

Immagine che contiene testo, schermata, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.Best practices for Azure Automation include detailed documentation of runbooks and procedures, testing in separate environments before production, and using environment variables for greater flexibility. It's important to maintain READMEs and notes with objectives, prerequisites, and failure scenarios, link runbooks to work items, use versioning and PR reviews, and release only after integration testing. Configurability is achieved by moving parameters into variables, Key Vault, or App Configuration and avoiding hardcoding. Security is ensured with Managed Identity, minimal RBAC, and secret rotation, while reliability requires idempotent runbooks and recovery strategies. Cost governance is achieved by automating the cleanup of orphaned resources and scheduled shutdown. The visual diagram shows a ready-to-use checklist and a CI/CD workflow for runbooks, with the lint, test, import, deploy, and monitor phases.

 

1. Runbooks and Task Automation

The runbook is the heart of automation in Azure Automation. A runbook is essentially an automated script that encapsulates an operational procedure. In simpler terms, it's a sequence of commands or instructions (which may include conditional logic, loops, calls to other services, etc.) designed to perform a specific task with minimal or no manual intervention.

Within Azure Automation, there are various types and formats of runbooks: you can create them using scripting languages such as PowerShell (very common in Microsoft environment) or Python, or through a graphical interface that allows you to build runbooks in the form of flowcharts (the so-called runbooks). (graphical or visual ). This flexibility allows people with different skill sets to use the service: an experienced PowerShell administrator can write complex scripts, while those who prefer a more visual approach can drag predefined tasks into a graphical workflow.

Runbook Execution Modes: Once created, a runbook can be executed in several ways:

·      Manually: An operator can start a runbook on demand, for example from the Azure portal or via PowerShell, when needed.

·      Schedule: You can set a time and frequency (for example, every day at midnight, or every Monday at 7:00) to automatically run the runbook. This is one of the most powerful features: it allows you to create real recurring jobs for maintenance or periodic checks.

·      Webhooks and APIs: Azure Automation allows you to expose runbooks via unique URLs ( webhooks ) or REST API calls. This allows external systems or custom applications to trigger runbooks by simply sending an HTTP request. For example, a ticketing system could send an API call to a runbook to perform a verification as soon as a ticket is opened.

·      Integration with other services (e.g., Logic Apps): A runbook can be launched as part of a flow orchestrated by services like Azure Logic Apps or Power Automate (we'll see details in Chapter 7). These services can act as "directors," calling runbooks as subtasks within larger business processes.

Automation Asset Management: To write effective runbooks, Azure Automation also provides spaces to manage assets such as Variables, Credentials, Certificates, and Modules:

·      Variables are useful for storing data that runbooks can access and that might change over time ( for example, an environment name, a configuration value, etc.), without having to change the script code.

·      Credentials (and certificates ) are used to securely store sensitive information such as usernames and passwords or keys that runbooks will use. Azure Automation allows you to manage these credentials by encrypting them and referencing them in the script without exposing them in clear text.

·      Modules are additional libraries or packages (such as PowerShell modules) that can be imported into your Azure Automation environment to extend the functionality available in runbooks. For example, there are specific modules for interacting with Azure services (Azure Azure Modules ), with Office 365, with SQL Server, etc. By importing these modules, your runbooks will be able to use additional specific cmdlets and functions.

Runbook execution security: A key concept in runbook management is the use of Azure Managed Identities. A Managed Identity is an identity automatically provided by Azure to a service (in this case, the Automation account or the runbook itself) to allow it to authenticate with Azure services without needing to store credentials in the code. In practice, instead of entering a password or access key in the runbook (which is not recommended and insecure), a managed identity is assigned: behind the scenes, Azure will provide an authentication token when the runbook needs to, for example, interact with a virtual machine or read a secret from Key Vault. This improves security by eliminating the need for static secrets in the script and makes it easier to manage permissions through Azure Active Directory and Role-Based Access Control (RBAC).

Idempotence and robustness: It is considered good practice to write runbooks Idempotent, meaning designed so that if executed multiple times, the final effect is the same as a single run, without unwanted side effects. For example, a runbook that powers on a VM should first check the VM's state: if it's already powered on, it might skip re-running the startup command, or it might execute it anyway, but the net result remains "VM powered on." This avoids problems if, by mistake or necessity, a runbook is launched more times than expected. Similarly, in the event of a mid-execution error, a well-designed runbook should be able to be relaunched once the error has been resolved, without causing inconsistencies (for example, avoiding creating duplicates of a resource if the first creation failed halfway).

Practical example: Consider a company that wants to ensure a certain virtual machine is up and running every morning before the start of a shift. Without automation, a technician would have to remember to log in and start the VM manually every day. With Azure Automation, you can create a runbook (e.g., StartWorkVM.ps1 ) that:

1.    Check the current time and compare it with the shift start time (e.g. 9:00).

2.    If there are 10 minutes left until the start of the shift, check the current state of the VM (is it powered off?).

3.    If the VM is off, it proceeds to start it; if it is already on, it does nothing (idempotent behavior).

4.    After starting (or if it was already started), perhaps send a notification on Microsoft Teams or via email to the managers, letting them know that “VM X is powered on and ready for use.”

This runbook can be scheduled to run every weekday at 8:50 AM, so that it automatically completes the procedure. Note a few design considerations: the runbook could use a variable for the VM ID or name, so that the same script can be reused for other VMs simply by changing the variable; it will use the credentials or associated Managed Identity to obtain permissions to power on the VM; it will include checks on the VM's current state to ensure idempotent; and finally, it will use the Teams API or email (providing the appropriate forms and credentials) to send the final notification.

runbook flowchart: The internal workings of a runbook can be represented using a flowchart. Imagine the diagram mentioned in the slide: it starts with parameter input (for example, the name of the VM to be managed or other contextual parameters), then moves on to an authentication step (the runbook obtains the necessary permissions, for example, via Managed Identity, to interact with Azure resources), then performs state validation (checking initial conditions, for example, checking whether the VM is powered off before attempting to start it), proceeds with the actual action (powering on the VM), and finally performs logging and notification operations (writing the outcome of the operation to the logs and sending notifications if necessary). This basic pattern—input, authentication, condition, action, output—is found in many runbooks and helps to design them clearly.

In conclusion, runbooks are the fundamental tool for automating tasks: understanding how to write them, parameterize them, secure them, and integrate them with the rest of the Azure environment is essential to fully exploiting Azure Automation. In the following chapters, we'll explore where they reside (Automation Account), how they can be run in hybrid environments, and how they interact with other features.

 

2. Automation Account: The Central Container

All the runbooks and configurations we've discussed must reside somewhere within Azure. In Azure Automation, that central organizational unit is the Automation Account. An Automation Account is an Azure entity (typically created via the Azure portal or provisioning scripts) that serves as a container for everything related to automation in a specific context. Think of the Automation Account as the "headquarters" where runbooks and related artifacts live and are managed.

In fact, inside an Automation Account you will find:

·      The runbooks themselves, which are created or imported into your account, reside in your account and can be organized, edited, and launched from there.

·      Associated Schedules: You can define recurring or one-time times in your account for certain runbooks to run. For example, a schedule “Every day at 8:00 AM” can be created and then associated with a runbook to trigger it at that time.

·      The Variables, Credentials, Connections (i.e. definitions of connections to external services), Certificates and Modules mentioned in the previous chapter. All these assets are managed centrally in the Automation Account, allowing the runbooks contained within it to access them.

·      Managed Identity settings for the account: You can enable an Azure AD identity for the Automation account itself, so that all runbooks within it can use it to access Azure resources with the permissions assigned to that identity.

·      Logging and diagnostics configurations: An Automation Account can be connected to logging and monitoring services (such as Azure Monitor Logs, also known as Log Analytics) to log all runbook executions, the outputs generated, any errors, etc. This is essential for tracking activities and for debugging.

Through access control (IAM – Identity and Access Management – integrated with Azure RBAC), we can also define who within the organization has access to the Automation Account and to what. For example, we could give a team of developers the “Automation Runbook Contributor” role, allowing them to create and edit runbooks, but perhaps not the “Automation Operator” role if we don't want them to run them in production; or we could limit only certain users to updating saved credentials. Azure RBAC allows you to assign granular roles across Azure resources, including the Automation Account and its components.

Best practices in managing Automation Accounts: Since the Automation Account is such a critical container, there are some guidelines that should be followed for optimal use:

·      Environment separation: It's a good idea to create separate Automation Accounts for different environments, such as one for Production and one for Development/Test. This way, test runbooks can be tested without interfering with production runbooks, reducing the risk of accidentally running scripts in the wrong environments. Likewise, if different business units or projects have different automation needs, you could separate them to keep everything organized and apply specific rules to each.

·      Diagnostic settings enabled: From the moment you create your Automation Account, it's a good idea to enable diagnostic log collection to a Log Analytics Workspace or Storage account. This includes job logs ( runbook execution ), update logs (if using Update Management), error logs, etc. Having this data allows you to monitor and generate alerts about failing runbooks, jobs taking too long, etc., ensuring visibility into your automation.

·      Runbook versioning: When modifying complex runbooks, it's helpful to maintain versions or backups. Azure Automation itself provides a distinction between draft and published runbooks, but for greater control, scripts are often managed externally with version control systems ( Git ). By integrating a DevOps flow (which we'll discuss in Chapter 10), you can ensure that every change is tracked and tested before being updated in your Automation account.

·      Using Azure Key Vault for secrets: If your runbooks require passwords, keys, or certificates, a best practice is to not only use the Credentials area of your Automation Account, but also consider linking your account to Azure Key Vault, the service that specializes in secure secret management. This way, runbooks can retrieve updated secrets from the Key Vault on the fly (such as periodically rotated passwords) without those values ever being visible or statically stored in your Automation Account. This adds an additional layer of security and centralization to key management.

·      Least Privilege Principle: The Automation Account (and its managed identity) should only have access to the resources strictly necessary for the runbooks it contains. For example, if the runbooks in a given account only manage virtual machines in a specific Resource Group, the associated identity should have permissions limited to that Resource Group and perhaps only specific actions (e.g., starting/stopping VMs). This limits the potential impact in the event of a problem or abuse.

Practical example: Let's imagine an Automation Account called Ops- Prod used by the operations team for activities on the production environment. Following best practices:

·      Ops- Prod account was created separately from Ops-Test (used for internal testing). Both have similar runbooks, but they point to different resources.

·      On Ops- Prod, a Managed Identity has been enabled with the minimum necessary RBAC roles (e.g. “Contributor” on some key production resources).

·      Runbooks in Ops - Prod use secure variables and credentials to reference production resources (such as connection strings, server names, etc.), and take some sensitive values from the corporate Key Vault.

·      The Automation Account diagnostic settings send all logs to Log Analytics, where the monitoring team has set up alerts that notify you if a job fails or if a runbook takes more than X minutes (could indicate a hang or problem).

·      The Ops- Prod account is configured to run only on authorized networks: Using a Private Endpoint, communications from the Automation Account to Azure services (to run runbooks on machines in a specific virtual network) are limited at the virtual network level. This means runbooks cannot interact with resources outside the designated corporate network, adding additional security and compliance controls.

·      From an organizational perspective, only members of the Operations team have contributor access to Ops- Prod, while other teams may have read-only access to see logs but not to run or edit runbooks.

Conceptual diagram: The diagram in this section showed an “Automation Account” block in the center, surrounded by icons representing the various assets: runbooks, schedules, variables, credentials, modules, etc., all connected to this central container. Arrows also point from the Automation Account to a Log Analytics symbol, indicating that logs and diagnostic data are sent to a centralized monitoring system. The set of icons suggests that the Automation Account is the hub where both incoming elements ( runbook definitions, assets, configurations) and outgoing elements (logs, output) converge.

In short, the Automation Account is the foundation upon which to build your automation strategy: carefully configuring this element in accordance with best practices ensures that your runbooks can operate correctly and securely, while also providing the necessary control and monitoring mechanisms.

 

3. Hybrid Runbook Worker: Hybrid Automation

Azure Automation is a cloud service, but there's often a need to automate operations that need to happen outside the cloud or within local or restricted environments. Consider tasks involving physical servers in the corporate datacenter, or virtual machines residing in other clouds or isolated networks with limited internet access. To extend the power of Azure Automation to these scenarios, there's a feature called Hybrid. Runbook Worker (HRW).

A Hybrid A Runbook Worker is an agent installed on a machine (this can be an on-premises server, either physical or virtual, in your local data center, or even a VM hosted in another cloud environment or in Azure itself, but acting as a "bridge" to a private network). This agent registers the machine as a hybrid worker with an Automation Account. From then on, the Automation Account will be able to submit runbooks to be executed directly on that machine, rather than running them in the Azure cloud.

What does this mean? In practice, we have two modes of execution for runbooks:

a)    In the cloud (Azure): Where runbooks run within the Azure Automation cloud environment (on Azure-managed workers). This is the default setting and is ideal for tasks that interact with Azure services or otherwise do not require access to resources behind the corporate firewall.

b)    Hybrid ( Hybrid Worker): where runbooks run on the local machine where the agent is installed. In this case, Azure acts only as an orchestrator: it tells the worker "run this runbook," and the worker runs it locally on its machine, while maintaining a connection to Azure to report output, logs, and execution status. From the user's perspective, everything continues to be managed from the Automation Account (you launch a runbook as usual), but in reality, "behind the scenes," that execution is happening elsewhere.

When to use a Hybrid Runbook Worker? Typical cases include:

·      Access to on-premises resources: If a runbook needs to interact with a database or system that resides only on the local network (for example, shutting down a physical server via IPMI command, reading a shared file on an internal file server, or running scripts on a server that is not exposed to the internet), then that runbook must be run from within the local network. HRW enables this by acting as an “extended arm” of Azure Automation within the on- premises network.

·      Compliance or policy requirements: Some organizations have rules that prevent certain scripts from running in the cloud for confidentiality or control reasons; with HRW, the script resides and runs locally but still benefits from centralized coordination.

·      Complex multi-cloud or hybrid environments: Your company may have infrastructure spread across Azure, AWS, physical servers, and more. Azure Automation with HRW can serve as a single point of management for scripts running across all these different locations, using agents installed where needed.

How to configure a Hybrid Runbook Worker? The essential steps are:

·      On the server (Windows or Linux) chosen to act as the worker, install the Microsoft Monitoring Agent (MMA) or the specific Azure Automation agent (previously, HRW used MMA, but this functionality is now integrated into the new Azure Monitor agent for Arc machines). During installation, provide the registration credentials for the Automation Account to which the worker will connect.

·      Within your Automation Account, you define a Hybrid Worker group and register the newly installed server to this group. You can have multiple servers in the group for resiliency or to distribute workloads.

·      When creating or editing a runbook, you can choose to run it on a Hybrid Worker instead of the cloud. This can be done by specifying the name of the HRW group as the execution target.

·      From that point on, the runbook runs on the local server: the agent downloads the runbook code from the Automation Account, runs it on the machine, and communicates constantly with Azure to send logs and results. If we open the Azure portal to view the job, we'll still see it similar to the others, with its outputs, only marked as run on a specific Hybrid Worker.

Things to keep in mind with HRW:

·      Latency and connectivity: Execution depends on the connection between the on- prem server and the Azure Automation service. The server (via the agent) must be able to reach Azure (egress to the internet on Azure Automation entry points). This introduces slightly higher latency than running on-premises in the cloud to Azure, so runbooks that require low latency or very fast interactions must be accounted for.

·      Worker availability: If the server acting as the Hybrid Worker is down, offline, or experiencing problems (e.g., maintenance, crash, network down), the runbooks intended for that worker will fail because there is no one to execute them. It is therefore important to monitor worker health and perhaps have more than one for critical tasks (redundancy).

·      Worker Maintenance: HRW servers should be managed like any other server, ensuring they are patched (paradoxically, Azure Automation could help keep these servers patched as well via Update Management, which we'll discuss in Chapter 5), that they have adequate resources to run scripts (CPU, RAM), and that the agent is up to date.

·      Security and permissions: The runbook executed on a Hybrid Worker runs under a certain local security context. If it's a Windows server, it usually runs as a service under Local System or a specific configured user. Ensure that local account has the minimum permissions required (least privilege principle) to perform the requested actions on the server or internal network. For example, if the runbook needs to access an internal database, the account it runs under must have the correct credentials for that database. Furthermore, on the Azure side, the Automation Account identity may still be used in combination (e.g., the runbook to contact Azure will continue to use Azure's Managed Identity for cloud resources, while for on-premises resources it will use local permissions).

Practical example: a company has a legacy application installed on an on-premises server, and to update this application, an installer (.msi ) must be periodically run on the server. This process can be automated with a runbook, but since the server is on- premises, we will use a Hybrid Worker:

·      We install the HRW agent on Server01 (the local server where the installation takes place).

·      We register Server01 in the Hybrid Worker group of the Automation Account Ops- Prod.

·      We create a runbook called InstallAppUpdate.ps1 that copies the new.msi file (perhaps from internal storage or a package) and runs it on the server, waiting for it to complete. The runbook might then check whether the installation has successfully written certain files or registry keys as a check.

·      We schedule this runbook to run monthly, or we launch it manually when needed. When it runs, Azure Automation sends the job to Server01. The agent on Server01 runs InstallAppUpdate.ps1: this script runs locally, installs the application, and then sends logs (installation results, any messages) to the Azure Automation service. We'll track this operation in the centralized logs (Log Analytics) as usual.

·      If successful, we can see in the portal that the job completed successfully; if there was an error (e.g., the installer returned an error), the log will capture the error and we can take action accordingly.

Explanatory diagram: the slide image shows the interaction: one side is Azure Automation (the cloud) and on the other a server labeled as Hybrid Runbook Worker. You'll see a command arrow from Azure Automation to the HRW server (indicating the runbook is being sent to be executed), then an execution arrow on the server, representing the task being executed locally, and then a return arrow with the logs from HRW to Azure (the results are sent to the cloud). Additionally, barriers or private network icons are drawn to indicate that the HRW server is within a secure corporate network: only the outgoing channel with Azure Automation is open, while the Automation Account respects the boundaries of that network (for example, if Server01 has a firewall, outgoing traffic to Azure is allowed, but no incoming traffic from Azure directly, because it's the agent that polls the cloud). This ensures that the minimum security opening is from the internal network to Azure on HTTPS, without requiring public inbound traffic.

In short, the Hybrid Runbook Workers extend the power of Azure Automation to environments that would otherwise be excluded, offering a mix of flexibility (I can automate virtually any system from anywhere) and centralization (I maintain a single point of control in Azure). However, keeping these agents connected, secure, and up-to-date is essential to ensure hybrid automations are as reliable as fully cloud-based ones.

 

4. Update Management: Managing VM Updates

Keeping systems up to date with the latest patches and security updates is a crucial part of IT systems administration. Azure offers an integrated solution for automating patch management on virtual machines, called Update Management, which is part of the Azure Automation platform. Update Management allows you to centrally control the update status of Azure virtual machines, as well as physical servers or VMs on-premises (or in other clouds) as long as they are registered, on both Windows and Linux systems.

In practice, Update Management scans machines to see which updates (operating system, security patches, critical updates) are not yet installed, and provides the tools to schedule and manage their automatic installation.

Update Management Key Features:

·      Missing Update Detection: When a VM is enabled for Update Management (via the Log Analytics agent or Azure Monitor), Azure Automation periodically scans the machine to determine which updates are available but not yet applied. This creates a compliance report showing, for example, that VM X has 5 critical and 2 optional updates pending.

·      Patch deployment schedules: The operator can create one or more deployment schedules specifying when updates should be applied to groups of machines. For example, you can schedule the Sales department's VM group to be updated on the third Saturday of the month at 2:00 AM. Each schedule specifies which machines to involve, which update categories to include (critical, security, all, or exclude specific updates if known to cause problems), whether to automatically reboot the machines if necessary, and a maximum time window for the operation.

·      Inclusions and exclusions: At a granular level, you can specify that certain patches should not be installed in an update deployment (e.g., exclude a particular cumulative update if it is known to cause incompatibilities with existing software) or, conversely, include only certain classes of updates. This provides fine-grained control over patch application.

·      Pre- and Post-Update Scripts: A very useful feature is the ability to run custom scripts before and after patch installation. For example, before applying updates, you might want to run a " pre -patch" script that gracefully stops an application service so that the operating system update doesn't interfere with ongoing processes. After rebooting and installing, a "post-patch" script could restart that service and perform a health check on the application. These scripts ensure that maintenance is coordinated with the specific needs of the applications running on those machines.

·      Compliance and tracking reports: After a patch cycle is executed, Azure Automation generates detailed reports. You can see which updates have been installed on each machine, which ones, if any, failed and why, and the overall compliance status (e.g., "All machines are updated no later than 30 days ago" or "There are machines with critical patches that are more than 2 months old"). This allows you to demonstrate compliance with corporate or regulatory policies (many regulations require patches to be applied within a certain timeframe after release).

Benefits of patch automation: Automating patches reduces vulnerability exposure (security patches are applied promptly, reducing the time a system remains vulnerable) and ensures compliance with any security regulations or internal policies. Furthermore, it relieves administrators of the operational burden of having to connect to dozens of servers and update them manually or with isolated scripts, centralizing the process.

Integrations with other Azure features: Update Management doesn't exist in isolation, it integrates with:

·      Maintenance Configuration: Azure allows you to define maintenance windows (especially for dedicated Azure machines or dedicated hosts ) and control reboots. Update Management can respect these preferred reboot times, for example, by applying patches only within a defined maintenance window, thus coordinating with agreed-upon service windows.

·      Change Tracking and Inventory: Another Azure Automation feature that tracks configuration changes on machines (e.g., changes to the Windows registry, files, services, software installation/uninstallation). After applying patches, Change Tracking can highlight exactly what has changed on the system, such as which new updates appear in the program list or which version of a certain DLL file has been updated. This enhances visibility, allowing for better diagnosis of subsequent issues (knowing which patches have been applied) and for an audit trail of the changes.

Practical example: Suppose you manage a fleet of Windows servers in Azure, and you want to implement a monthly patching cycle:

·      We configure all VMs for Update Management (just associate them with a Log Analytics workspace and enable the Update Management solution).

·      We create an update schedule called “Monthly Patch – Windows Server” that activates every first Saturday of the month at 3:00 AM. We include all production Windows VMs in this schedule, choosing to install only updates classified as “Critical” or “Security,” excluding, for example, optional updates or drivers (perhaps we want to avoid updating hardware drivers automatically to avoid running into problems, unless necessary). We also set “Reboot if necessary” with a timeout of, for example, 30 minutes for reboots.

·      Let's add a pre -patch script: this script could, for example, check to see if certain custom applications are stopped or in a quiescent state, and it could note which services are running. Let's also include a post-patch script: for example, after the update, check to see if the “ XYZApplicationService ” service is running, and if not, try restarting it, and perhaps send an alert if it doesn't start.

·      On the scheduled night, Azure Automation runs the following procedure: on each target machine, it first runs the pre script, then installs the patches according to the selected criteria, reboots the machine if required by any patches, and then, once restarted, runs the post script. All of this happens in parallel according to the given configurations.

·      In the morning, the team can review the generated report: let's say that out of 50 servers, 48 were able to fully update, while two encountered problems (perhaps one didn't reboot because of a blocked process, or another failed to install an update). From the report, we can see which patches weren't applied and any error messages, so we can manually intervene on those two servers (for example, retry the update or open a ticket with Microsoft if necessary). Meanwhile, the 48 updated servers ensure that the vast majority of the infrastructure is protected from the latest threats.

Illustrative diagram: The slide presented a timeline of the Update Management phases: starting with Scan ( detect necessary updates), then Planning (user-defined schedule), then the Application phase of the updates themselves ( patching ), followed by Validation (post-installation verification, possibly control script), and finally Reporting. Checkpoints with success or failure indicators are highlighted along the timeline: for example, after the Application phase, if it is successfully completed, a green check appears; if it fails, a red error indicator appears on the report. This highlights that at each phase it is possible to determine whether the operation was successful or not, and take appropriate action (in many cases, errors in the Application phase could trigger automatic alerts, for example).

In conclusion, Update Management is a powerful tool for ensuring that machines remain up-to-date in a consistent and documented manner. Integrated within Azure Automation, it benefits from centralization and advanced scheduling and logging capabilities. In the next chapter, we'll look at another aspect of automation, relating to consistent system configuration (Azure Automation State Configuration).

 

5. State Configuration: Azure Automation State Configuration (DSC)

In addition to automating specific or scheduled tasks, Azure Automation also offers capabilities for declaratively managing ongoing system configuration. This is achieved through Azure Automation State Configuration, which is essentially Azure's cloud implementation of the PowerShell Desired State Configuration (DSC ) concept.

What is PowerShell DSC? It's a Microsoft technology that allows you to define, through declarative code, how a system (Windows or even Linux via DSC for Linux) should be configured. Instead of writing an imperative script that executes steps to configure a machine, with DSC you write a sort of "configuration document" that lists the desired settings: for example, "on server X the IIS role must be installed, service Y must be running, file Z must exist with this content, etc." This document is then applied to the machine by a special agent called the LCM (Local Configuration Manager). The LCM on the managed node is responsible for:

·      Apply the initial configuration (bring the system to the desired state, installing what is missing, configuring parameters, starting services, etc.);

·      Monitor for drift: Recheck the current state at regular intervals and, if anything has changed from the desired configuration (for example, a service that should have been “Started” is now “Stopped” because someone manually stopped it, or a configuration file was manually modified), take corrective action and return the system to the desired state.

In traditional environments, DSC can operate in push mode (an orchestrator server sends the configuration to the nodes) or pull mode (the nodes fetch the configuration from a central server periodically). Azure Automation State Configuration provides a cloud pull server: nodes registered in the service will fetch their configuration from the Automation Account and report their compliance.

How Azure Automation State Configuration works:

·      In the Automation Account, you import or create DSC configurations. These are special PowerShell.ps1 scripts that define, using the DSC language, a desired state for certain types of nodes. For example, we might have a configuration called “ WebServerConfig ” that specifies that the IIS role is installed and a website with certain characteristics is present. Or a “ SecurityBaseline ” configuration that sets certain Windows security policies (e.g., auditing level, advanced firewall settings, etc.).

·      Once the configuration (which is generic) has been defined, it can be compiled in Azure Automation to generate node-specific MOF configurations. Registered target nodes (or machines) are then defined: these machines (which can be Azure VMs or on-premises servers with the Azure DSC agent) are registered with the Automation Account and associated with a specific configuration. For example, we could say that the VMs “ServerWeb01” and “ServerWeb02” adopt the “ WebServerConfig ” configuration; while the “DomainController01” machine adopts the “ BaselineSecurity ” configuration.

·      Each node runs a Local Configuration Manager (LCM), configured to contact the Azure Automation service regularly (e.g., every 15–30 minutes). When it contacts Azure, if there's an assigned or updated configuration, it downloads (pulls) it and applies it.

·      The node then sends its compliance status to Azure: essentially a report indicating whether the configuration is Compliant (everything is in order) or whether it is Non-Compliant (for example, it failed to apply a part, or someone made a local change that violates the configuration and the node fixed it or is attempting to fix it).

·      In the Azure portal, State Configuration section of the Automation Account, you can see the list of nodes, what configuration they have, and whether they are Compliant (green) or have errors (red), with details on any deviations detected.

Advantages of a declarative approach (DSC) over traditional imperative scripts:

·      Consistency over time: Once a desired state is declared, the DSC system continues to maintain that configuration over time. If someone manually changes something on a server (either intentionally or accidentally), DSC will detect it and correct it, restoring compliance. In contrast, a traditional script might be run once and then the system can drift. DSC guarantees zero drift (or quickly suppresses accidental drift).

·      Reuse and standardization: A DSC configuration can be applied to dozens or hundreds of servers, ensuring that they all have exactly the same configuration. This is particularly useful for enforcing security baselines (e.g., all Windows servers must have certain audit and firewall settings enabled) or for configuring server roles (e.g., each new web server must have IIS installed with certain features, making it easier to onboard new servers).

·      Declarative vs. Procedural: Thinking declaratively, the administrator specifies what must be present or what state must be in place, delegating the logic of how to achieve it to the system. This leads to clearer definitions and fewer errors than having to write complex procedures that handle numerous cases (for example, a DSC block might say "make sure service X is Running"; it will then be up to the agent to decide from time to time whether to start it because it is stopped, or reinstall it if it is missing, etc.).

·      Integration with Infrastructure-as-Code: DSC fits well with DevOps concepts, because configurations (DSC scripts) can live in a repository, be versioned, tested, and deployed as code, aligning configurations and application code.

Typical Azure Automation State Configuration scenarios:

·      System hardening and baseline: Enforce uniform security configurations (e.g., password policies, registry settings to disable insecure protocols like TLS 1.0, enable advanced logging, set login banners, etc.).

·      Installing features or software: Specify that a certain Windows feature (server role) or package must be installed on a server. DSC will install it if it's missing. For Linux, it can ensure that certain packages are present or that certain system configurations (files under / etc ) are defined in a certain way.

·      Repetitive application configurations: e.g., using DSC to define a default site with a certain configuration on all web servers, or to ensure that a certain application config file is always updated. If someone manually changes that file, DSC can revert it to the desired version (although for complex application configurations, sometimes integration with more specialized tools like Chef or Ansible is needed ; DSC can still cover many basic cases).

·      Compliance and auditing: Even if configurations were managed by other tools, registering nodes in Azure Automation DSC at least allows you to monitor compliance with a set of requirements (think of it as an automatic auditing tool: if a node is found to be non- compliant with a certain setting, it immediately appears in red and you can take action).

Practical example: The IT department wants to ensure that all Azure web server VMs comply with certain security and configuration rules:

·      You write a DSC configuration called WebServerBaseline. Inside, for example, you specify:

a)    Feature “IIS” must be Present (so if the VM does not have the web server role, it will be installed).

b)    “IIS Admin” service must be in Running state and set to “ Automatic ”.

c)    TLS1.0 protocol must be disabled in the registry ( registry key XYZ set).

d)    The file “C:\ inetpub \ wwwroot \welcome.html” must exist with some standard content (e.g. a welcome banner or standard information).

·      This configuration is uploaded to the Automation Account and assigned to all VMs in the web pool (e.g., VM1, VM2, VM3). Each VM is configured with the local DSC agent.

·      Once assigned, each node downloads and applies it: if VM2 didn't have IIS installed, it will install it; if VM1 had TLS1.0 enabled, the agent will disable it, etc. During the process, if any steps fail (perhaps the IIS installation fails due to internet failure, for example), the system reports non-compliance.

·      Subsequently, after the initial application, each node will continue to run periodic checks. For example, if an administrator on VM3 mistakenly enables TLS1.0 a month later, the next DSC check will find that the configuration is noncompliant (TLS1.0 should be disabled, but is enabled). It will report the discrepancy and attempt to correct it by disabling TLS1.0 again, automatically bringing the VM back into compliance. The team may then see a notification that the drift has been corrected, or a correction event will appear in the report.

Illustrative diagram: The image in the slide showed many servers (nodes) with a small gear above them indicating the LCM on each node. Each LCM has an arrow pointing to a small icon representing the pull server (Azure Automation State Configuration), meaning "the node asks the server for the configuration." Arrows return from the server to the nodes with the configuration. Then another arrow from the node returns to a compliance panel (in the Azure portal) where you can see an indicator whether the node is compliant or not. Essentially, the diagram highlights the one-to-many relationship of the service: a single Automation Account distributes configurations to many nodes and centralizes the status of all of them.

In conclusion, Azure Automation State Configuration allows you to implement declarative and self-healing configuration policies on your servers, elevating the level of automation from simple script execution to continuous maintenance of a desired state. It's an important tool for ensuring standardization, security, and stability in your environments, especially when combined with the other features we've discussed ( runbooks for immediate operations and DSC for long-term consistency).

 

Runbook Integration with Other Services ( Logic Apps, Power Automate, Webhooks )
Automations built with Azure Automation, especially runbooks, are not isolated entities: they can be triggered and connected to other services and workflows, enabling advanced scenarios in DevOps and IT Operations. In this chapter, we will examine how runbooks can integrate with orchestration and communication tools such as Azure Logic Apps, Power Automate, APIs and webhooks, as well as with operations management ecosystems (alerts, ITSM systems, Teams notifications, etc.).

a) Azure Logic Apps and Power Automate:


Azure Logic Apps is a cloud service that lets you create automated workflows through a graphical interface, integrating different services and systems via predefined connectors. Microsoft Power Automate offers similar features that are more end-user-oriented and integrate with Microsoft 365 applications, but conceptually the two services overlap significantly. Both can orchestrate complex, multi-step processes and call external (or internal) services via connectors or HTTP.

·      A typical scenario is a workflow that reacts to a certain event or trigger (for example, when an email arrives in a certain inbox, or when an item is created in a helpdesk system, or when a monitoring alert is triggered ). This flow can involve data transformation, sending notifications, and – thanks to the specific connector – execution of an Azure Automation runbook. Logic Apps has a built-in connector for Azure Automation, which allows you to say: “Run runbook XYZ on this Automation Account, optionally passing these parameters, and wait for it to complete.”

·      Conversely, a runbook could also call a Logic App or a Power Automate flow, if it needs to leverage particular connectors, for example to interact with services for which a connector exists (less commonly, it is usually the Logic App that calls the runbook and not vice versa).

·      Power Automate also opens the door to integration with environments such as Microsoft Teams, SharePoint, user approvals, etc., and can be used by less technical staff (for example, an analyst can create a flow that launches a certain runbook at the press of a button in Teams without writing code).

b) Webhooks and REST APIs:

Azure Automation allows you to directly expose runbooks via webhooks, which are public URLs (protected with a long token) that, when invoked, launch the associated runbook. This is a simple and straightforward way to integrate runbooks with any system capable of making HTTP requests. For example, a third-party tool that doesn't have a ready-made connector could POST to the webhook URL, optionally passing a JSON payload. Azure Automation receives the request and launches the designated runbook, providing that payload as input. This allows you to integrate with virtually anything, from a self-service portal button to an event in another cloud, and so on, without having to go through Logic Apps unless necessary.
Additionally, Azure Automation has REST APIs (part of the general Azure APIs) that allow you to programmatically launch runbooks, retrieve job status, and so on. However, these require Azure AD authentication (so we're not talking about anonymous webhooks here, but authenticated API calls), and can be used in scenarios where an internal application, with the right credentials, starts a runbook as part of its process.

c) Integration usage scenarios:

·      On-call and incident management: Imagine having a monitoring system (like Azure Monitor or other software) that raises an alert at 2 a.m. because a server is not responding. Instead of immediately calling the on-call engineer, we could have a Logic App that intercepts the alert, automatically launches a first-attempt resolution runbook (for example, a runbook that restarts a service on the server and checks to see if it comes back up), and simultaneously sends a notification via Microsoft Teams or SMS to the on-call staff. The Logic App could wait for the runbook to resolve the issue ; if the runbook resolves the issue, perhaps it updates a ticket system saying “Automatically resolved at 2:05”; if it doesn’t, it alerts a human. This eases the burden on on-call staff and reduces downtime.

·      IT Service Management (ITSM) Integration: Runbooks can be integrated with tools like ServiceNow, BMC Remedy, or the Azure Help Center (Azure DevOps, GitHub Issues, etc.). For example, opening a high-priority ticket can trigger a flow that performs some automated checks (via runbooks ) and updates the ticket with the collected information; or a technician from the ticket can press a button that calls an Azure Automation webhook to perform an action (such as collecting logs from a system).

·      Business processes and process automation: Beyond IT contexts, runbooks can be integrated into broader workflows. For example, an employee onboarding process might include a step where a runbook automatically creates a virtual machine or development environment for the new hire after requirements have been collected in a form.

·      Operational notifications and approvals: Often, some automated operations may require human review before making irreversible changes. For example, shutting down all VMs in a department by the end of the month can be automated, but you may want confirmation from a manager. With the Teams integration, you can send an Adaptive Card (interactive card) to a Teams channel or chat to someone, asking: “Do you want to approve the shutdown of VMs X, Y, Z?” with Approve/Reject buttons. The user clicks Approve, and the approval is returned to the Logic App, which then runs the runbook that performs the shutdown. This combination of notification + human approval + automated execution allows you to implement authorization workflows across IT operations in an elegant and auditable way.

Practical integration example: Let's consider a complete scenario:
A development virtual machine shouldn't be left running outside of office hours to save costs, but occasionally a team might request an extension if they're working on a long test. We can build a flow that:

·      Every day at 7:00 PM, a Logic App wakes up and checks which development VMs are powered on. For each, it sends a message to the development team's Teams channel ( Adaptive Card) listing the powered-on VMs and asking: “Do you want to shut down these VMs now? If you need them to stay powered on for a few more hours, click Snooze.”

·      If no one interacts within 30 minutes, the Logic App proceeds to launch the Stop -DevVMs runbook which automatically shuts down all powered-on development VMs.

·      If someone clicks “Snooze for 2 hours” on the Teams card, Logic App reschedules the shutdown for later (e.g., 9:00 PM).

·      When the Stop -DevVMs runbook is run (either at 7:30 PM if there is no response or deferred), it shuts down each affected VM and archives logs for each (e.g., writing to a centralized log file how many VMs were shut down, which ones, and when) and sends a summary message to Teams: “3 development VMs were shut down: VM1, VM2, VM3 at 7:30 PM. Have a good evening!”

·      Additionally, it might update a configuration database (CMDB) or an internal log to track that those resources are no longer running as of that time.

In this scenario we have: a scheduled trigger, a potential human intervention via Teams (thanks to Logic App's integration with Teams and Adaptive Cards), a runbook executed as the final part to perform the hard IT action (VM shutdown), and then final notifications.

Integrated Sequence Diagram: The image shown corresponds to a similar flow:

·      You will see an alert or initial event icon (it could be a monitoring alert for example).

·      This is followed by an Azure Logic App block, which processes the event.

·      From Logic App, an arrow points to the Teams logo for an approval (the word approval appears next to Teams in the diagram, indicating that there is an approval step in Teams).

·      After approval via Teams, an arrow leads to the Azure Automation runbook execution ( runbook gear icon ).

·      Finally, a final block indicates the CMDB (Configuration Management Database) or system of record update. In other words, the diagram summarizes an incident management scenario: an alert, then automation ( Logic App + Teams for approval), then action on Azure (the runbook that implements the resolution), and finally logging the action taken in the company's configuration system.

Ultimately, the true power of automation comes when runbooks are integrated into broader business flows: this enables automatic reactions to events, streamlines processes involving different people and systems, and bridges gaps between platforms (thanks to the flexibility of webhooks and APIs). For a student or professional learning Azure Automation, it's important to understand not only how to write a runbook, but also how to integrate it into the broader cloud and on-premises ecosystem to create end-to-end solutions.

 

7. Security and Governance Baseline for Automation

When implementing automation solutions at scale, security and governance become critical. While Azure Automation offers significant operational benefits, it must be carefully managed to avoid introducing vulnerabilities or loss of control. In this chapter, we'll discuss how to establish a solid security baseline for Azure Automation and how to govern automated tasks in compliance with corporate policies.

Runbook and Automation Account Security:

·      RBAC (Role-Based Access): As mentioned in the Automation Account chapter, it's essential to apply the principle of least privilege to all elements involved. This means assigning human users appropriate roles (e.g., an operator can run runbooks but not modify them, a developer can create them but not necessarily run them in production, etc.) and, most importantly, assigning the identity under which the runbooks operate only the strictly necessary permissions on Azure resources. For example, if a runbook only needs to restart machines in a certain resource group, the managed identity should have restart permissions on those VMs, but not global permissions across the entire subscription. Azure offers predefined roles and the ability to create custom ones to achieve this.

·      Managed Identity: It is highly recommended (and in some contexts required) that each Automation Account have a Managed Identity enabled, to avoid the use of static credentials within runbooks. Additionally, runbooks should use managed identities whenever they interact with Azure services. For cases where a credential is absolutely necessary (e.g., for external systems that don't integrate with Azure AD), consider storing it in the Automation Account's credential service or Key Vault and not within the script.

·      Credential Protection: If you use Credential assets in your Automation Account, ensure they are protected with appropriate access controls (e.g., only certain runbooks or users can see/use them) and rotated periodically if possible.

·      Network Isolation: To increase security, especially in hybrid or large enterprise environments, you can isolate runbook execution on private networks. We mentioned the use of Private Endpoints for the Automation Account; furthermore, Hybrid Runbook Workers running on- prem already respect existing network protections (so no open ports from the outside). This ensures that any malicious actions or gross errors cannot propagate freely across the Internet or in uncontrolled environments.

b) Audit and logging:

·      Azure Audit Log: Azure maintains an audit log of every significant change. For Azure Automation, this includes events such as creating, modifying, and deleting runbooks, changing configurations (e.g., adding credentials), manually starting jobs, etc. These audit logs should be reviewed regularly or integrated with SIEM systems to detect anomalous activity (for example, if someone creates an unauthorized runbook or runs it at an unusual time).

·      Job logs and output: Runbook output and execution logs (including errors with stack traces) are sent to Log Analytics (if configured) or otherwise available in your account. These operational logs can be analyzed to see what was done. For governance purposes, you could set up workbook or monthly reports that show, for example, how many changes to resources were made via runbooks, how many times a certain runbook failed (reliability), etc.

·      End-to-end traceability: It's helpful to correlate Azure Automation logs with those from other systems. For example, if a runbook is launched in response to a monitoring alert, include a reference to the alert ID in the logs so that reading the logs for that run can easily trace the triggering event. Conversely, when a runbook performs an action on a resource, that resource will have an action performed by the runbook 's identity in its Activity Logs. Ensuring that identity has a clear name (e.g., "Automation-VM-Shutdown- Prod ") helps you immediately understand, when reading the logs of a powered-off VM, that the shutdown was performed by that identity, presumably a known runbook, and not by an intruder.

c) Azure Policy for Azure Automation

Azure Policy is the service that allows you to enforce rules and configurations on Azure resources. You can also define specific policies for Azure Automation, and for automation scenarios in general, such as:

·      A policy might require all Automation Accounts to have Diagnostic Settings enabled for Log Analytics (to ensure logs are not lost and are centralized). Otherwise, the account is non- compliant and the policy can be configured to automatically bring it into compliance ( deployIfNotExists ).

·      A policy could prohibit the creation of runbooks that don't conform to certain criteria; for example, custom policies could analyze runbook content (this is advanced, not native, but theoretically can be done with Azure Automation and Azure Policy in combination with external scripts) or, more realistically, prohibit the creation of Automation Accounts in unapproved regions, or the failure to associate an identity.

·      Importantly, as mentioned in the slide: policies to enforce the use of Managed Identity and security parameters. For example, a set of initiative policies could mandate that: every Automation Account must have an active managed identity; every runbook that interacts with Key Vault must use that identity (these things are sometimes implemented with manual and automated checks).

·      Runbook -controlled resource policies: Another aspect is using Azure Policy to govern the effect of runbooks. If you create runbooks that, for example, deploy resources, it's a good idea to have active policies that ensure those resources comply with certain parameters (tags, naming conventions, placement, etc.). Therefore, automation should work in conjunction with policies: runbooks can even be written to remediate non-compliant resources flagged by policies. For example, if there's a policy that states "all VMs must have the 'Owner' tag," we could have a runbook that periodically checks for non-compliant resources and applies remediation (sends reports or adds temporary tags).

d) Examples of security and governance initiatives with automation:

·      Blocking non-compliant deployment policies: An organization can define a set of policies such that if someone attempts to create a resource that doesn't comply with the rules (it doesn't have certain required tags, or tries to create a resource type prohibited in that environment), Azure Policy automatically rejects the operation (a "deny effect "). This ties into automation: if a misconfigured runbook or a user via the runbook attempts to create something not permitted, the policy prevents it. Additionally, the runbooks themselves can be used to deploy and update these policies (via infrastructure automation).

·      Monthly job reliability reports: From a governance perspective, it can be helpful to monitor how well automations are performing. One example cited is generating a monthly report that analyzes all jobs executed by runbooks and calculates reliability indicators: for example, success vs. failure rate, average execution time, and main causes of failure. This can be done by importing Azure Automation logs into a reporting tool or even with a dedicated runbook that extracts data from Log Analytics and sends a report via email. Having these reports included in a monthly review process helps identify problematic runbooks (which frequently fail), understand if optimizations are needed, or if permissions need to be revised.

Security baseline visualization: The slide featured a sort of checklist and a diagram: the key points (RBAC, Identity, Logs, Policy) listed as elements of a secure automation checklist. And a diagram connecting job -> log -> workbook (dashboard) -> alert -> review. This illustrates a virtuous cycle: each job produces logs, the logs feed dashboards or reports ( workbooks ), which can trigger alerts if something is out of line (e.g., too many errors, excessive time), and downstream, there is a human review of these indicators to make decisions (e.g., improve a runbook, add resources if a job is taking too long, etc.). Governance means precisely having these control chains that ensure automation remains under control and aligned with objectives.

Ultimately, to use Azure Automation in production, especially in enterprise contexts, you need to invest in defining a clear security baseline (who can do what, with which identities, what logs are collected) and in governance mechanisms that monitor and enforce best practices (policies, audits, reporting). Enterprise environments often have security and compliance teams: Azure Automation, if properly configured, isn't an obstacle for them; in fact, it can become an additional tool (think of runbooks that automatically correct non-compliant configurations), but it must be treated with the same rigor as any other critical resource.

 

8. Cost Optimization with Automation

One of the goals often pursued in cloud computing is reducing operating costs. Azure offers cost management and billing tools to monitor and plan spending, but automation can take cost management to the next level, proactively optimizing resource use. In this chapter, we'll see how Azure Automation can be used to create processes that help reduce and optimize cloud costs.

a) Optimization scenarios via runbooks:

·      Shutting down idle resources: A classic example is the automatic shutdown of unused virtual machines. Many organizations, for example, shut down test, development, or demo VMs outside of business hours, as keeping them on 24/7 would be a waste of money. A runbook can be scheduled to shut down ( deallocate ) certain VMs at 8:00 PM and turn them back on at 7:00 AM the following morning, Monday through Friday. Or it can shut down VMs it detects as idle (low CPU/RAM usage) for a certain amount of time.

·      Automatic scaling: Similarly, runbooks can help you switch SKUs or service tiers of resources based on usage. For example, if a SQL database in Azure is underutilized, it could scale to a lower tier during off-peak hours and scale back to a higher tier during peak hours. This can be orchestrated with runbooks that schedule SKU changes based on usage metrics obtained through monitoring APIs.

·      Cleanup of unused resources: Cloud environments often have so-called "orphaned" resources—unattached disks, unassigned public IPs, forgotten development instances, stale log files, etc. These resources, even if not actively used, can generate costs (e.g., storage, reserved IPs). A runbook can periodically scan the subscription for such resources and generate a report or automatically delete them according to predefined rules. For example, automatically delete backups older than X days if they are no longer needed.

·      Storage tiering: For data that needs to be persisted but not accessed frequently, Azure offers storage tiers (Hot, Cool, Archive) with decreasing costs. A runbook can scan blobs in a storage account and automatically move those that haven't changed for many months to the tier. Archive (which costs much less), leaving only recent data in Hot. This is done via the Azure Storage API and can save a lot of money on large archives.

·      Advanced cost-based scheduling: By integrating with the Azure Cost Management API, runbooks could even react to budget thresholds. Imagine having a monthly budget for a subscription: a runbook can check daily how much budget has been consumed and, if a certain threshold is exceeded (e.g., 90% mid-month), take corrective actions such as shutting down non-critical resources or sending notifications to teams to reduce usage.

b) Access to cost data: Azure makes cost and usage data available through:

·      Cost Management API: An API that provides aggregated cost data (e.g., spending by service, by resource, or trends over time). A runbook can call these APIs if authorized (typically requiring access to billing data, which can be granted via an automation account with Cost Management Reader permissions ).

·      Cost exports: Azure can generate daily cost breakdown files (CSV). A runbook could load this data and process it, for example, to identify the resource that is costing the most and shouldn't, etc.

·      Usage metrics: For some optimizations (such as deciding whether to shut down a VM due to inactivity), performance metrics (CPU, network, etc.) are more important than costs. These are available from Azure Monitor. A runbook can retrieve a VM's CPU usage over the last hour and, if it's below a threshold, decide to shut it down.

Best practices for cost-oriented automation:

·      Consistent resource tagging: A crucial element is the use of tags on Azure resources. Tags (e.g., " Environment:Dev," " Owner:TeamA," " Criticality:High /Low") allow you to categorize resources. Cost optimization runbooks should use tags to understand what to do: for example, shut down only non-productive VMs (" Environment:Dev " or "Test"), and perhaps leave those with " Criticality:High " always on. Or move only blobs with the " ArchiveEligible:Yes " tag to Archive. In short, tags guide automation to know what it can safely touch.

·      Schedule cost operations at appropriate times: for example, shutdown activities should be scheduled outside of usage hours (turn off at night, turn on in the morning). Cost analysis and data movement activities can be performed daily at night or on weekends, so as not to interfere with user-perceived performance.

·      Evaluate the impact on SLAs and operations: Not all resources can be shut down without impact. For example, shutting down a database production VM to save costs is rarely feasible because it interrupts a critical service. Therefore, automation must be carefully calibrated to intervene only where there is margin (test environments, redundant resources, backup services, etc.). Furthermore, scaling down too many resources could degrade performance; a balance must be found and perhaps thresholds applied (e.g., never going below a certain SKU, etc.).

·      Monitor and report: Every cost optimization action should be tracked and communicated. If a runbook shuts down VMs, it should send an email or notification to managers with the list of resources shut down and an estimated savings calculation (“By shutting down these 3 VMs from 8:00 PM to 8:00 AM, we save about X euros per day”). This raises awareness and builds trust in the automated process, as well as providing a searchable log.

c) Practical examples:

·      DevTest team wants to reduce waste: they create a runbook AutoShutdownNonProd, which shuts down all VMs with Environment=Test or Dev tags in their subscriptions every evening. This runbook then sends a Teams message to the “ DevTest Team” group stating, “Test VMs have been shut down. Estimated savings: €50 if they remain shut down until tomorrow morning.”

·      Another runbook OptimizeStorageCosts runs monthly: it reads the list of storage accounts costing more than, say, €100 from Cost Management and checks how much data is in Hot vs. Cool vs. Archive. For each, if it sees at least 500 GB of data unchanged for > 6 months in Hot, it moves it to Cool or Archive. Then it sends a report with “Moved 500 GB of log data from account X to Archive, estimated monthly savings: €Y.”

·      A possible runbook is also setting up budget alerts: Azure natively allows you to configure alerts when certain budget thresholds are exceeded. But we might also want to automate the response to a budget overrun: for example, if monthly spending exceeds the budget allocated to the QA environment, a runbook could automatically scale down some resources (reduce the number of VMs in the test cluster, suspend lab environments, etc.) to stay within the budget. This is tricky because it affects business priorities, but it is feasible with the right rules.

d) Cost Optimization Diagram: The attached image illustrated a hypothetical cost flow:

·      Input from Cost Management (which provides spending and usage data),

·      logical rules (in a runbook or workflow) that decide actions (shut down VMs, reduce SKUs, archive data),

·      performing these actions,

·      and a feedback loop, perhaps with people or systems (for example, notification that the action has been taken, or whether the actions were successful or if there were impediments). This is a continuous cycle: every month or week, based on updated cost and usage data, decisions are made to optimize and then the results are measured.

In short, Azure Automation can become a valuable ally in Cloud Cost Management, implementing decisions that would otherwise remain manual or require constant intervention. Automating cost governance saves you money without having to remember to perform repetitive housekeeping tasks every time, and ensures that cloud resource usage remains aligned with needs, avoiding waste.

 

9. Azure Automation Best Practices and Final Thoughts

As we reach the final chapter, we summarize some general best practices for using Azure Automation effectively and securely, many of which have emerged in previous chapters, and add some final considerations. These best practices cover methodology, automation lifecycle management, code quality, and operational strategies to ensure that automation delivers benefits without introducing regressions.

a) Documentation and maintainability:

·      Document Runbooks: Each runbook should contain clear descriptions of its purpose, the parameters it uses, prerequisites, and any side effects. This can be done by adding comments at the beginning of the script (for PowerShell/Python runbooks ) or by maintaining a separate README file. In complex environments, it can also be helpful to have some sort of wiki or database where each runbook records who wrote it, when, what it's used for, who to contact with questions, and perhaps a link to the source code if it's stored in an external repository.

·      Notes on objectives and failure scenarios: In the documentation, it's a good idea to also include the expected results (e.g., "this runbook should reduce the number of test VMs; if it finds more than 5, it will shut them down until it gets back to 5"), and how the runbook behaves in the event of problems (e.g., "if the VM doesn't respond, it retries 3 times and then generates an alert"). This helps anyone reading the logs understand whether the observed behavior is intended or not.

·      Linking to work items: If your organization uses tracking systems (Azure Boards, GitHub issues, Jira ), it's good practice to link each runbook change to a work item (ticket/bug/feature). For example, if you enhance a runbook to add a feature, that information should be tracked. This way, if in the future a question arises, "Why does this runbook do this?", you can reference the discussion in the work item and understand the historical reasons.

b) Development and testing of automations ( DevOps for runbooks ):

·      Separate test environments: Never test directly in production. Create a test Automation Account or use the sandbox/test environment to try out new runbooks or changes. Populate the test environment with dummy or test resources that the runbooks can act on without causing any real impact. For example, if we develop a runbook that shuts down VMs, we'll use test VMs, not production ones, for testing.

·      CI/CD Pipeline for Runbooks: Treat runbooks as actual code (Infrastructure as Code). This ideally means storing scripts in a repository ( Git ). From there, implement a CI/CD ( Continuous Integration/ Continuous Deployment) pipeline:

o  Lint / Validation: Automated tools check the syntax of runbooks, such as PSScriptAnalyzer for PowerShell ( linting, static best practices) or style analysis.

o  Testing: If possible, write automated tests for your runbooks. Unit testing infrastructure scripts isn't always easy, but you can mock up parts ( using Azure cmdlets ) or run the runbook in " WhatIf " mode, if supported. Alternatively, at least conduct thorough manual testing in a test environment for various scenarios (including error cases).

o  Import and Version: The pipeline could automate the import/update of the runbook in the test Automation account, and then, if the tests pass, in the production Automation account. Azure has APIs for updating runbooks, so this can be scripted.

o  Review (PR): Every significant change should be reviewed by a colleague (pull request code review), especially for critical runbooks, to catch errors or implications that the author may have missed.

·      Release only after integration: Once a runbook is tested in isolation, also consider integration testing if it interacts with other processes (e.g., if a runbook is called from a Logic App, test the entire chain in staging ). Only when you are confident that everything is working as expected should you deploy it to production (perhaps initially closely monitoring the first few runs, or releasing it disabled and then activating it at a controlled time).

c) Configurability and flexibility:

·      hard-coded values: Don't hard-code values that could change into your script. If a runbook needs to operate on a specific resource (e.g., a virtual machine name, a path, an email address for notifications), it's best to pass it as a parameter or store it in an Automation Account variable. This allows you to reuse the runbook in different contexts and easily adapt it.

·      Use Key Vault and variables for sensitive information: As mentioned, any sensitive strings (passwords, keys) should not appear in the code. Additionally, parameters such as connection strings or URLs should be able to be changed without editing the runbook. Using global variables or integrating with a Key Vault makes runbooks more generic.

·      Parameterize the environment: If the same runbook is used in Dev and Prod, it might behave slightly differently (e.g., in Dev it might send notifications to a test Teams channel, in Prod to a real channel, or in Dev it works on a different subscription ). You can use environment variables or naming conventions to let the runbook “discover” the context it's running in and adapt its behavior. For example, we might have a Boolean variable IsProduction in the Prod account set to true, and false in test, which the script can read to decide whether to actually delete resources or just simulate it.

·      Dependency management: Keep imported modules (libraries) up to date and load only the ones you need. Remove obsolete modules from your Automation Account to reduce potential conflicts. This is part of the periodic maintenance and cleanup of your automation environment.

d) Security and reliability in the code:

·      Managed Identity and Secret Rotation: Ensure that runbooks don't use long-term static credentials. If they absolutely must (for external services), provide a mechanism to update these credentials (rotation), perhaps integrating it into the runbook itself (for example, a runbook that rotates a password every so many days). However, it's best to delegate to Key Vaults and managed identities where possible.

·      Idempotent and retryable runbooks: Let's reiterate the principle of idempotence: provide health checks at the beginning. Furthermore, implement recovery strategies: if a step fails due to a transient error (e.g., an API call that times out), the runbook could wait a few seconds and retry a couple of times before giving up, to handle transients. If a runbook interacts with many elements, consider continuing beyond non-critical errors, perhaps accumulating a final report of which sub-operations succeeded and which failed, rather than aborting everything at the first error (this depends on the context).

·      Transactions and compensations: For activities that modify multiple resources, consider what happens if the runbook fails midway. For example, if a runbook creates three resources and fails on the third, will the first two remain orphaned? It might be helpful to implement compensation logic (in the error catch, delete what was created before to leave the environment clean, or clearly mark the need for manual intervention). This is difficult, but it's what distinguishes a robust runbook from a basic one.

e) Cost control and orphan resources:

·      Automate cleanup: As discussed in Chapter 9, ensure that automation itself is subject to cost control: avoid having unused Automation Accounts (they cost a few euros but still), superfluous modules, etc. Plan runbooks that turn off what is not needed, even related to tests (e.g. if there are test Hybrid Workers turned on unnecessarily).

·      Monitor usage: Understand how and to what extent runbooks are being used. For example, if some runbooks haven't been run for months, assess whether they're still needed or need updating.

6. Culture and processes:

·      Train users: Anyone with access to create or edit runbooks should receive guidance on these best practices. For example, an inexperienced developer might write a runbook that works but doesn't follow security rules (e.g., a hard-coded password ). Good governance also includes training and internal review checklists.

·      Emergency Procedure: Consider what to do if a runbook ends up in a loop or produces unwanted cascading effects. Have a quick way to disable all schedules (Azure doesn't have a " panic " option). button ”, but an admin could manually disable schedules if they notice something is going wrong, or disable the Automation Account temporarily). Simulate disaster scenarios (e.g. “what if a bad runbook shuts down all the prod VMs, how do we notice and react?”) and prepare countermeasures (alerts, manual steps).

f) Epilogue and visual scheme:

The final slide, as described, included a visual summary: a checklist of points to remember (docs, tests, security, etc.) and a CI/CD flow demonstrating how to adopt a virtuous cycle in runbook development. The steps in the illustrated CI/CD workflow include:

·      Lint: static code checking (best practice enforcement).

·      Testing: Running automated tests.

·      Import: Load the runbook into the environment (test, then prod ).

·      Deploy: activation in production, perhaps with scheduled or integrated execution.

·      Monitor: Continuously monitor operation with logging and alerts.
This continuous integration and deployment cycle ensures that automations remain reliable over time and can evolve without breaking anything.

In conclusion, Azure Automation is a rich ecosystem that, if fully exploited, allows for a self-sufficient infrastructure across many operational aspects, from orchestration to configuration to cost-effective shutdown. But this potential must be harnessed with discipline: attention to the best practices listed above will make the difference between a set of isolated scripts and a truly robust, enterprise- grade automation platform. The hope is that students or professionals who complete this guide will have the conceptual tools to begin implementing Azure automation in real-world contexts, fully aware of both the opportunities and responsibilities they entail.

 

Conclusions

Azure Automation is therefore a cornerstone for intelligent IT infrastructure management, reducing manual intervention and increasing efficiency. Runbooks are the heart of automation: scripts or graphical flows that execute procedures in a secure and repeatable manner, with the possibility of integration via APIs, webhooks, and Logic Apps. Idempotent design and the use of Managed Identity ensure robustness and security, avoiding static credentials. The Automation Account serves as a central container for runbooks, assets, and configurations, with best practices that include separation of environments, advanced logging, and integration with Key Vault. The Hybrid feature Runbook Worker extends automation to on-premises and multi-cloud systems, maintaining centralized control. With Update Management, the platform automates patching and compliance, reducing risk and operational overhead. State Configuration (DSC) introduces a declarative approach to ensure consistent and self-repairing configurations over time. Integration with external services and approval flows (Teams, ITSM) amplifies the value of runbooks in complex scenarios. Security and governance are essential: RBAC, auditing, policies, and continuous monitoring prevent abuse and ensure compliance. Automation also becomes a cost optimization lever, with runbooks that shut down idle resources, scale services, and manage storage. Finally, adopting DevOps, versioning, and CI/CD practices for runbooks ensures quality, traceability, and scalability. In short, Azure Automation is not just a technical tool, but a strategic ecosystem that, if properly managed, enables efficiency, security, and innovation in IT processes.

 

Chapter Summary

This chapter provides a detailed guide to Azure Automation, explaining how to automate operational tasks, manage resources, and ensure security, governance, and cost optimization across cloud and hybrid environments.

·      Runbooks and automation: Runbooks are automated scripts in Azure Automation that perform tasks without manual intervention. They can be written in PowerShell, Python, or created visually, run manually, scheduled, via webhooks, or integrated with other services like Logic Apps. They manage variables, credentials, and modules and use Managed Identity for security, enabling idempotent and robust runbooks. A practical example is automatically starting a VM before the start of a shift.

·      Automation Account: This is the central container that hosts runbooks, schedules, variables, credentials, modules, and manages identities and logging. It is recommended to separate production and test environments, enable diagnostics, version runbooks, and integrate Azure Key Vault for secure secret management, applying the principle of least privilege. An example is a dedicated Automation Account for the production environment with Managed Identity, centralized logging, and network restrictions via Private Endpoint.

·      Hybrid Runbook Worker: Allows you to run runbooks on local machines or other isolated networks using an agent registered in your Automation Account. This is useful for accessing on-premises resources, compliance requirements, or multi-cloud environments. The agent executes runbooks locally, communicating with Azure for logs and status. It's important to monitor worker connectivity, availability, and security. An example is automating the installation of updates on an on-premises server using Hybrid Worker.

·      Update Management: Automates patch management on Azure VMs and on-premises servers. It allows you to detect missing updates, schedule deployments, exclude specific patches, and run pre- and post-update scripts. It provides compliance reports and integrates with other features like Change Tracking. An example is a monthly patching cycle with application service startup and shutdown scripts and success or failure reports.

·      Azure Automation State Configuration (DSC): Implement declarative and self-healing configurations via PowerShell DSC, maintaining consistent system state over time. Nodes download the configuration from Azure Automation and report compliance. Useful for hardening, role installation, and compliance. An example is configuring a web server that ensures IIS is installed, TLS1.0 is disabled, and standard files are present, with automatic correction of any drift.

·      Integration with other services: Runbooks can be triggered or orchestrated by Logic Apps, Power Automate, webhooks, and REST APIs, enabling complex scenarios such as on-call automation, integration with ITSM systems, business processes, and workflows with human approvals via Teams. One example is a flow that shuts down development VMs with notification and the ability to snooze via Adaptive Card in Teams.

·      Security and governance: It's essential to apply least-privilege RBAC, use Managed Identity, protect credentials, isolate networks with Private Endpoints, and monitor through audit logs and job logs. Azure Policy can enforce configurations and compliance on Automation Accounts and managed resources. Reliability reporting and continuous auditing are recommended to maintain security and compliance.

·      Cost optimization: Azure Automation helps reduce waste by shutting down idle resources, resizing SKUs, cleaning up orphaned resources, and moving data to lower-cost storage tiers. It can integrate cost management data and usage metrics, acting on budget thresholds. Best practices include consistent tagging, scheduling at appropriate times, and monitoring with notifications. Practical examples include shutting down test VMs and archiving unused data.

·      Best practices: Document runbooks, use test environments, adopt CI/CD pipelines with linting, testing, and reviews, parameterize scripts, use Key Vault, ensure idempotence and retry, manage dependencies, automate cleanup and monitoring, train users, and prepare emergency procedures. A virtuous development cycle ensures reliable and secure automation.  

 

CHAPTER 11 – The analysis service

 

Introduction

When it comes to data integration and orchestration in the cloud, Azure Data Factory is one of the most powerful and versatile tools available. As companies generate and collect information from heterogeneous sources—relational databases, CSV files, APIs, ERP and CRM systems—the challenge is not just to acquire this data, but to transform it, consolidate it, and make it available in a consistent and automated way for analysis and decision-making. Azure Data Factory was created with this very goal: to offer a serverless platform capable of orchestrating complex data pipelines without requiring the user to worry about the underlying infrastructure. The concept of the pipeline is central: think of it as an assembly line where each stage corresponds to a specific activity, from copying data to transforming it, all the way to publishing it to a final destination. ADF's strength lies in its flexibility: you can define parameterizable pipelines, schedule their execution with time- or event-based triggers, integrate custom scripts, and even orchestrate flows involving external services. All of this takes place in a scalable environment, where Azure takes care of allocating resources and ensuring optimal performance. Let's consider a concrete example: a company that processes sales data from an ERP every day, normalizes it, and uploads it to a data lake to then make it available to business intelligence tools. With ADF, this process becomes fully automated, reducing manual errors and processing times. The modular approach and the ability to use parameters make pipelines reusable and adaptable to different scenarios, while integration with services like Azure Key Vault and managed identities ensures credential protection and compliance with security best practices. Furthermore, detailed execution monitoring allows performance analysis and identification of bottlenecks, ensuring constant control over the entire flow. In short, Azure Data Factory is not just a technical tool, but a strategic enabler for building modern data architectures capable of supporting advanced analytics, machine learning, and decision-making based on reliable information. Understanding how it works is a key skill for anyone wishing to work in the world of data integration and analytics on an enterprise scale.

 

Outline of chapter topics with illustrated slides

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Data Factory lets you create automated pipelines that orchestrate data ingestion, transformation, and publishing. A pipeline is a logical container of activities such as copy, data flow, notebook, and web activities, which can be scheduled, parameterized, and monitored as a single unit. Activities are broken down into data movement, transformation, and control. This approach separates logic from infrastructure, enabling serverless scaling. Practical examples include daily ingestion from ERP to Data Lake, CSV file normalization, and end-to-end orchestration with scheduled triggers and parameters to manage environments and variables. Pipeline runs are execution instances identified by a Run ID, while triggers launch pipelines based on a schedule, window, or event. Datasets and Linked Services are abstractions for data and connections. Best practices include modular pipelines, the use of parameters, credential isolation with Enter and Key Vault, enabling cluster time-to-live, and detailed monitoring using the execution plan icon. The diagram shows the orchestrated flow: Copy, Data Flow, Publish, and a table of triggers with their use cases.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Data Lake Storage Gen2 provides scalable, cost-effective, and secure storage for structured and unstructured data, built on Azure Blob Storage with hierarchical namespace, POSIX ACLs, and HDFS-compatible ABFS driver. This is the foundation of the medallion. architecture: bronze, silver, gold. Practical examples are the structuring of containers into raw data, processed data, and analytics results, integration with Spark/ Synapse via abfss URIs, and granular permission management with ACLs and Enter roles to separate domains such as sales and finance. The hierarchical Namespace enables directory and atomic file operations, while ABFS is the driver optimized for big data. Delta and Parquet are columnar formats for performance and transactionality. Best practices include enabling hierarchical namespaces, using Parquet and Delta, a consistent naming convention, controlled data retention, soft deletion, versioning, and separation of workspaces for the least privilege. The folder tree represents the bronze, silver, and gold levels with group ACL rules.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Synapse Analytics integrates SQL, both serverless and dedicated pools, and Apache Spark for parallel analysis on large datasets, working natively with ADLS Gen2. Spark offers distributed in-memory computing and supports Python, Scala, and SQL. Practical examples include data preparation with PySpark notebooks and saving to Delta tables, interactive queries with serverless SQL on Parquet or CSV files in storage, and integration between Spark and Dedicated SQL pools via a high-performance connector. Spark pool is a managed cluster with autoscale and TTL, serverless SQL is a pay -per-query engine, and the Spark-SQL Connector enables efficient exchange between engines. Best practices include using Delta Lake for transactional reliability, partitioning, caching, separation of interactive workloads from batches, and management of workspaces and linked services with managed identities. The diagram shows the integration between ADLS, Spark, and Dedicated SQL, with read, write, and caching paths.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.The lakehouse combines the flexibility of a data lake with the structure and performance of a data warehouse, typically on Delta formats and with read-only SQL endpoints. In Synapse and Fabric, the medallion The architecture drives progressive data quality through bronze, silver, and gold. Practical examples include defining dimension and fact tables with surrogate keys and star schema, generating gold views for KPIs, and exposing the lakehouse SQL analytics endpoint for T - SQL queries and direct connection to Power BI via DirectLake. The star schema is the analytics-optimized model, Delta Lake is the transactional format, and the SQL analytics endpoint is the read-only interface to Delta tables. Best practices include reducing model complexity, normalizing dimensions, using surrogate keys and SCD, and carefully documenting fields and relationships, as well as applying data contracts and quality checks on layers. The diagram shows the medallion. architecture and mapping of dimension tables, facts and quality flows.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Stream Analytics is a PaaS service for streaming data processing from IoT Hubs, Event Hubs, or Kafka, with output to Power BI, ADLS, SQL, and Cosmos DB. It supports a SQL-like language with windowing, joins with reference data, and geospatial functions. Practical examples include detecting temperature thresholds for real-time alerts and live Power BI dashboards, sliding windows to calculate moving averages, and joins with reference data to enrich streams. Streaming Units represent compute and memory resources, window functions enable temporal aggregations, and reference data are static datasets for lookups. Best practices suggest designing idempotent queries, managing late- arrival data and time zones, consistently using input partitioning, monitoring job metrics, and triggering alerts. For heavy loads, dedicated ASA clusters with VNET and Private Link are recommended. The diagram shows the pipeline from the IoT Hub or Event Hub stream, through the ASA query, to Power BI or ADLS, with an example query and time window.

 

Immagine che contiene testo, schermata, diagramma, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.Power BI offers a semantic model that describes measures, hierarchies, and relationships for interactive reporting and self-service analysis. Models can be Import, DirectQuery, Composite, and, in Fabric, DirectLake on Delta. Practical examples include creating a model with dimension and fact tables like Date, Product, and Sales, DAX measures like Revenue and Margin %, using time hierarchies and descriptions for usability, and sharing certified models between workspaces. The semantic model is the data structure ready for visualization, the star schema is recommended for performance and simplicity, while build permission controls who can create content from the model. Good practices include human-readable entity naming, hiding technical columns, centralizing measures, using role-level security, validating with Performance Analyzer, and adopting certified shared models. The schema shows the star with one-to- many relationships and a list of documented DAX measures.

 

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.Microsoft Purview offers modern data governance with a unified catalog for assets such as tables, files, and reports, Data Maps for multicloud metadata scanning, glossaries, governance domains, and data products that group assets useful for specific use cases. Practical examples include automatically scanning ADLS, Synapse, and Power BI to populate the catalog, creating a data product like "Retail Sales" that aggregates gold tables and KPI reports with ownership and access policies, and evaluating data quality with low-code rules and scoring for columns, assets, and products. The governance domain defines organizational boundaries for rules and ownership, the data product is a group of assets with context and policies, and the glossary is the shared business vocabulary. Best practices include federated governance with central common rules and domain responsibilities, documenting terms and definitions, and managing access according to the minimum Privilege and quality and metadata monitoring. The screenshot shows the catalog, classifications, policies, and owner links, with a domain map.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Mapping Data Flows in Azure Data Factory and Synapse enable scalable visual transformations with managed Spark: filters, standardizations, joins, aggregations, enrichments, and writes to targets. They offer detailed execution plan monitoring, tuning, and parameters. Practical examples include standardizing dates and amounts, handling null values, deduplication and enrichment with master data, and implementing quality checks through validation rules. handling and reject sinks, and performance optimization with broadcast joins for small tables and repartition on unbalanced data. The Integration Runtime TTL reduces cluster startup times, broadcast joins distribute small sizes across all nodes, and the execution plan shows the phases/stages with times and counts. Best practices suggest a preference for Parquet and Delta, monitoring of the four critical phases, avoiding unnecessary sorts, source partitioning, limited logging, and isolation of heavy transformations. The diagram shows the transformations from source to sink, with a monitoring panel.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.The security of analytical data in Azure is ensured by native controls such as encryption at rest and in transit, RBAC, Private Endpoints, and Defender for Cloud. Microsoft Defender for Cloud assesses posture against standards and frameworks such as ISO/IEC 27001 and GDPR, providing recommendations and reports. Practical examples include enabling regulatory compliance policies for subscription and monitoring of failed controls, integration with Microsoft Purview Compliance Manager for a centralized view, and the application of Managed Identities and Key Vault for secret management, and network isolation for data services. Security standards are sets of controls mapped as Azure Policy initiatives, MCSB is Microsoft's cloud security benchmark, while the Compliance dashboard shows the percentage of passed or failed controls. Best practices are the principle of least privilege, use of Private Link and VNET integration, remediation automation, and audit trail retention. The map shows Identity, Network, Data Protection, and Monitoring controls, with links to typical recommendations.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Monitor provides metrics, logs, and alerts for end-to-end observability, while Microsoft Cost Management enables analysis, budgeting, and cost optimization based on a pay -as- you -go model, paying for log ingestion and retention, alerts, and advanced metrics. Practical examples include creating budget alerts to monitor monthly spending with email notifications or alerts when thresholds are exceeded, and configuring anomaly alerts. Alerts for unusual variations, and optimization of log collection by reducing unnecessary logs, using sampling and differentiated retention. The Log Analytics workspace is the container for logs with KQL queries; cost scopes define the scope of analysis; and various types of alerts can be set based on budget, credit, or department. Best practices include labeling resources for cost allocation, exporting costs to Power BI, and using reserved instances and savings plans where compatible, and constant monitoring via dashboard. The dashboard displays key metrics such as CPU, Throughput, Failures, and a consumption and cost graph with budget thresholds.

 

1. Azure Data Factory: Data Pipeline Orchestration

Imagine needing to automatically collect and transform data from various sources every day: Azure Data Factory (ADF) is the Azure tool designed to orchestrate these processes. ADF allows you to build automated data pipelines that manage the ingestion, transformation, and publication of data from heterogeneous sources. With Azure Data Factory, we can design complex data flows in a serverless way, meaning we don't have to worry about the underlying infrastructure: Azure will provide the necessary resources and automatically scale based on load.

What is a pipeline? It's a logical container of processing activities. Think of a pipeline as a data assembly line: within it, you can define different steps or activities, such as copying data from one source to another ( Copy ), performing complex transformations on large volumes of data ( Data Flow ), launching a notebook or custom script for specific processing, or triggering calls to external web services ( Web Activity ). These activities are orchestrated and managed with a single pipeline, which can be planned (scheduled over time), parameterized (made flexible with configurable parameters), and monitored as a single entity.

Activities in an ADF pipeline fall into three main categories:

·      Data movements: Activities that move or copy data from one system to another (for example, from a database to a data lake ).

·      Transformations: Activities that modify or process data (such as data flow tasks, Spark scripts, stored procedures, etc.).

·      Control: Flow control activities, such as conditions, loops, or calls to external functions, that help define orchestration logic (e.g., wait for a process to complete, or branch the flow based on a result).

This division separates the process logic from the infrastructure: it means that pipeline designers focus on what to do with the data, leaving Azure to perform these operations efficiently and at scale. In practice, ADF ensures that even complex flows can scale elastically (adding computing power as needed) without the user having to manually manage servers or virtual machines.

Let's look at a practical example to understand the usefulness of Azure Data Factory: suppose we have a company with an ERP system that generates CSV files with daily sales every day. With ADF, we can create a pipeline that automatically starts every night, retrieves the CSV file generated by the ERP, manages it by loading it into an Azure Data Lake (a data storage space), then runs a transformation to normalize the data (for example, convert dates to a standard format, calculate sales totals, clean up any outliers), and finally publishes the cleaned data by inserting it into a relational database or preparing it for display in a report. All of this happens without manual intervention, thanks to the defined pipeline. Another example: With ADF, you can orchestrate an end-to-end flow that integrates data from different sources (ERP, CRM, log files) and ultimately generates a single output ready for analysis, using scheduled triggers (e.g., every hour or every day at midnight) and parameters that allow you to reuse the same pipeline across different environments (development, test, production) or for different date ranges.

Some key concepts of Azure Data Factory are:

·      Pipeline run: Each run in the pipeline is a distinct execution instance, identified by a Run ID. This is useful for monitoring and distinguishing between different pipeline starts (for example, to check the daily execution history and verify their success).

·      Trigger: This is the mechanism that initiates the execution of a pipeline. Triggers can be of various types, typically time-based (for example, a scheduled trigger that starts the pipeline at a certain time every day), based on recurring time windows (for example, every hour from 9:00 AM to 6:00 PM, typical for micro-batch streaming processing ), or event-based (for example, the arrival of a new file in storage that triggers the pipeline execution). Thanks to triggers, pipelines can be executed automatically without human intervention.

·      Datasets and Linked Services: These are configuration objects in Azure Data Factory that represent data and connections to sources/destinations, respectively. A Linked Service is essentially a connection definition to an external resource (such as a SQL database, a storage instance, a data warehouse, an API, etc.), including connection strings and credentials. A Dataset, on the other hand, represents a specific set of data within a source or destination (for example, a specific table in a database or a file path in storage). In a pipeline, copy or transformation activities define which input dataset to read and where to write the output (output dataset), using linked services to physically connect to those resources. This abstraction makes pipelines more reusable and manageable: you can change resource connections (for example, moving from a test database to a production database) simply by modifying the linked service, without altering the pipeline logic.

Best practices and usage tips: To design effective pipelines with Azure Data Factory, it's a good idea to follow some guidelines. It's recommended to break down complex processes into more modular pipelines, perhaps by functional area or processing phase, and make them interact if necessary (for example, a main pipeline can call secondary pipelines for specific sub-tasks). Parameters should be used extensively in pipelines and datasets to make solutions flexible and adaptable (for example, passing parameters such as the date to process, the name of the input file, etc.). To securely manage connections and credentials, it's best to use Azure Login ID (formerly known as Azure Active Directory) and Azure Key Vault: Linked Services can be configured with authentication via Azure Managed Identity so you don't have to enter passwords in the parameters, and any secrets (access keys, sensitive strings) can be stored in the Key Vault, isolating the credentials from the code. When using Data Flow tasks (big data transformations on Spark clusters), it's important to consider enabling TTL (Time To Live) on data integration clusters. This setting allows the Spark cluster to remain active for a short period even after a job has completed, allowing close executions to reuse the same cluster without having to restart it from scratch each time (saving time, especially in frequently running scenarios). Finally, Azure Data Factory provides an excellent monitoring system: through the monitoring interface, you can follow the pipeline execution plan and view the execution times, any errors, and other details for each task. A practical tip is to frequently check the detailed execution plan icon (an eye or magnifying glass icon in the monitoring interface) to analyze pipeline performance and identify bottlenecks or errors in specific tasks.

With Azure Data Factory, the result is that infrastructure takes a back seat: data developers can focus on business logic and data transformation, leaving Azure to reliably orchestrate and scale the process. In this chapter, we've seen how ADF makes it possible to define complex and automated data flows, essential for building modern data integration and business intelligence solutions.

 

2. Azure Data Lake Storage Gen2: Fundamentals and Best Practices

Exponential data growth requires a scalable, cost-effective, and secure storage system. Azure Data Lake Storage Gen2 (ADLS Gen2) addresses this need by providing high-performance storage for both structured (e.g., tables, CSV) and unstructured (images, log files, JSON data, etc.) data. ADLS Gen2 is built on the Azure Blob Storage service, but extends its capabilities by introducing a hierarchical namespace and other enhancements that make it similar to a traditional file system and efficient for big data loads.

A key feature of ADLS Gen2 is the hierarchical namespace: by enabling this option (which is usually available when creating the storage account, by checking the " Enable hierarchical namespace "), the data lake supports directory and file structures with atomic behavior on file operations. In other words, we can organize data into folders and subfolders, and operations such as renaming or moving files will be atomic (i.e. they either fail or succeed completely, without inconsistent intermediate states), which is not guaranteed in traditional blob storage. This allows for data management in a more natural way and with better performance in analytics scenarios, since many big data applications (such as Hadoop ) expect a file system-like structure. Furthermore, ADLS Gen2 implements POSIX-style ACLs (Access Control Lists), which are advanced permission mechanisms that allow for granular access to files and folders (for example, we could give a certain Azure AD group permission to read a specific folder but not another). These ACLs complement the Azure Role-Based Security (RBAC) model, offering a dual level of protection: on the one hand, access can be controlled at the container and account level via Azure roles, on the other, permissions can be detailed at the user level. of file systems with ACLs.

To interact efficiently with ADLS Gen2, Azure provides a specific driver called ABFS (Azure Blob File System). ABFS is a driver compatible with HDFS ( Hadoop Distributed File System), optimized for large volumes of data. This means that big data analytics tools (such as Apache Spark, Hive, Azure HDInsight, Azure Synapse ) can read and write to ADLS Gen2 using paths starting with abfss:// as if they were accessing a Hadoop file system. The integration is native and performant, making it easy to adopt ADLS Gen2 as the foundation for any data lake project.

In the architectural context, ADLS Gen2 is often the foundation of the so-called medallion architecture (a "medallion" architecture), which divides data into three levels or "medals" called Bronze, Silver, and Gold. Each level represents a stage of data processing and quality:

·      Bronze is the raw level, where the data is stored exactly as it arrives from the sources, without significant transformations. Here, for example, we will find all the original files just extracted from the source systems ( database dumps, exported CSV files, IoT sensor data, etc.). The idea is to have a complete and unchanged history of the source data.

·      Silver is the intermediate level (sometimes also called cleaned or refined ), where bronze data is processed to correct errors, enriched with additional information, and normalized into homogeneous structured formats. In this area, the data is clean and partially processed, ready for more specific analysis. For example, at the Silver level, we might have bronze CSV files imported in Parquet format, with cleaned fields and uniform encodings, or normalized tables.

·      Gold is the level of curated data ready for final analysis. Here, the data is high-quality and aggregated or transformed exactly as required by business analyses or final reports. The Gold level typically contains relational tables or views ready for business intelligence, calculations already performed (such as KPIs), and data available for use by tools like Power BI, data science applications, or other end consumers.

This three-tier architecture helps manage complexity: each medallion level has its own purposes and managers, and increasingly stringent quality controls apply as you move from bronze to gold. Azure Data Lake Storage Gen2, with its containers and directories, makes this division easy to implement: a common practice is to create separate containers or directories for bronze, silver, and gold data. For example, a company's data lake might have three macro-folders: / raw -data ( bronze ), / processed -data (silver), and / analytics-results ( gold ). Each of these can have subfolders further organized by data domain or subject (e.g., sales, logistics, marketing), and ACLs can be set on each so that only authorized teams access the appropriate tier (for example, the data engineering team has write access to bronze and silver, while data analysts have read-only access to gold ).

Practical examples of using ADLS Gen2: A typical scenario is integration with distributed analytics systems like Azure Synapse Analytics or Azure Databricks. Using the ABFS driver, a data scientist can mount the data lake on their Spark cluster and access the data with a simple path like abfss://processed-data@mystorage.dfs.core.windows.net/vendite/2025/. This way, they can read silver data for analysis or write the results to the gold tier. Another practical example is managing permissions to separate environments or departments: for example, data from the Finance department could reside in a dedicated folder accessible only to finance staff, separate from data from the Sales department. Thanks to POSIX ACLs, this separation can be achieved even within the same storage account, ensuring that a data engineer from one area does not accidentally read data from another area without authorization. From a performance standpoint, columnar file formats like Parquet and transactional format systems like Delta Lake are highly recommended over Azure Data Lake Storage Gen2: Parquet organizes data by columns and enables much faster compression and processing on large datasets, while Delta Lake adds ACID capabilities (atomic transactions, data versioning, and data time-travel management ) while maintaining data on Parquet storage. Azure Data Lake Storage Gen2 fully supports both, enabling faster and more reliable analytics.

Best practices for ADLS Gen2: There are some guidelines to follow to make the most of a data lake on Azure. First of all, enabling the hierarchical namespace is almost always recommended to achieve the benefits described (unless there are specific compatibility requirements). It's a good idea to adopt a consistent naming convention for folders and files, for example, including the data domain and the applicable date in Bronze /Silver/Gold folders to make it easy to find the datasets (e.g., / raw -data/sales/2025/01/ for raw sales data from January 2025). Data retention should be planned: ADLS supports soft delete (logical deletion with the possibility of recovery within a certain time) and versioning (maintaining multiple versions of files as they are modified). Enabling these features helps prevent data loss due to accidental deletion or corruption. Naturally, it's important to monitor storage costs and perhaps implement retention policies that delete unneeded data after X years, especially at the Bronze tier, which can grow significantly. On the security side, in addition to ACLs, it is good to use Azure Active Directory roles for the principle of least privilege ( least privilege ): Each user or application should have access only to the areas of the data lake that are essential to their work, minimizing data exposure. Finally, for complex environments, it may be useful to keep different workspaces or storage accounts separate for different purposes (e.g., development vs. production, or different accounts for different lines of business), in order to isolate data and reduce the risk of data mixing.

Azure Data Lake Storage Gen2 is therefore the backbone of a data lake solution on Azure: it offers cloud scalability (we can store petabytes of data and pay only for what we use) combined with file system capabilities and advanced security, making it an essential tool for managing and organizing large amounts of data in business and academic environments.

 

3. Azure Synapse Analytics: SQL and Spark Integration

In the era of Big Data, analyzing vast amounts of information requires flexible tools that combine disparate technologies. Azure Synapse Analytics is Microsoft's answer to this need: a unified platform that integrates SQL analytics engines (both serverless and with dedicated pools) and the Apache Spark engine for distributed processing, all tightly integrated with data stored in Azure.

Azure Synapse combines two souls: a traditional data warehouse (with SQL pools) on one side and a big data environment (with Spark pools) on the other, all orchestrated and managed from a single studio. Synapse allows you to work natively with data in Azure Data Lake Storage Gen2: this means that both SQL queries and Spark jobs can access the same files and data in the data lake without having to duplicate or move them. This closeness between the data warehouse and data lake is a key feature of Synapse, distinguishing it from traditional solutions.

Let's look at the two main components in more detail:

·      SQL Pools: In Synapse we find both dedicated SQL (also known as Synapse Dedicated SQL Pools (formerly Azure SQL Datawarehouse) and serverless SQL. Dedicated SQL pools are scale-out data warehouse clusters where the user pre-allocates a certain amount of capacity (measured in performance units called DWUs or provisioned instances) and can load data into distributed tables, running high-performance T-SQL queries on large datasets. The serverless model, on the other hand, doesn't require pre-allocation: it allows you to run on-demand SQL queries directly on files in the data lake (for example, Parquet, CSV, or JSON files), paying based on the data read by each query. This is very useful for interactive data exploration or for scenarios where you don't want to import everything into a database.

·      Apache Spark Pools: Synapse integrates Apache Spark, one of the most popular frameworks for processing big data. Synapse Spark is fully managed, meaning you can create a Spark pool (cluster) with just a few clicks, specifying its size and configuration, and Azure takes care of managing the infrastructure. Spark in Synapse supports the main languages used in data science and data engineering notebooks: Python (with PySpark ), Scala, SQL Spark, and even.NET (C#) if needed. Spark pools can be configured with autoscale (i.e., they can increase or decrease the number of nodes based on load) and with a TTL (Time to Live), which determines the inactivity period after which the cluster automatically shuts down to avoid consuming resources unnecessarily.

The tight integration of these two worlds enables truly powerful scenarios. Practical examples: a data engineer could use a PySpark notebook in Synapse to perform data preparation: suppose they have raw ( bronze ) data in the data lake, such as log files; with Spark, they could clean and transform these files, aggregate information, and then save them in Delta format as silver tables in the data lake. Immediately afterward, an analyst could run a serverless SQL query on those Delta files to check the results, or even connect a BI tool to read those tables directly. In another scenario, imagine having a large dedicated SQL pool with historical company data (a consolidated data warehouse ) and receiving fresh data via Spark (for example, streaming IoT data processed in real time). Synapse allows you to integrate Spark and SQL: there is a high-performance connector that allows Spark to write directly to the tables in the dedicated SQL pool, or vice versa, to read from them. This means that previously complex workflows to connect are now seamless: for example, the results of a calculation in Spark (such as a predictive model applied to raw data) can be immediately written to a dedicated data warehouse table, bridging the world of file storage ( datalake ) with the relational world (data warehouse ) without having to leave the Synapse platform.

Azure Synapse also provides integrated management tools: a single interface ( Synapse Studio) where you can write SQL code, develop Spark notebooks, build orchestration pipelines ( Synapse integrates features similar to Azure Data Factory for creating ETL pipelines), and monitor everything. The Spark pool, as mentioned, is managed, so we don't have to manually configure, for example, the Yarn /HDFS environment as we would on-premises; we can launch a Spark cluster in just a few seconds. Serverless SQL, on the other hand, is always ready, requiring no provisioning: every time we write a query on the files, Synapse allocates resources behind the scenes and executes it, returning the results quickly.

Best practices and usage considerations: When making the most of Synapse, it's worth taking a few precautions. One is using Delta Lake as the format for tables in the data lake (especially for the Silver and Gold tiers): as explained, Delta provides transactional reliability, versioning, and read performance, which is ideal in a context where Spark and SQL need to share data. Another tip is to partition data where possible: for example, if we store large Parquet tables in the data lake, defining partitions (by date, by region, by category) greatly improves the performance of both Spark and serverless queries, because it allows you to read only the files relevant to the query. Caching: Spark allows you to cache frequently used datasets in memory; if we have key data that is reused in multiple calculations, using caching in Spark can reduce execution times. From an architectural standpoint, it's a good idea to separate interactive workloads from batch ones: Synapse allows for multiple Spark pools and naturally also distinguishes between ad-hoc (serverless) interactive queries and production ( dedicated ) queries. This means it's a good idea to keep, for example, a Spark cluster dedicated to heavy processing at night separate from a smaller cluster reserved for exploratory analyses by data scientists during the day. This way, the loads don't compete for the same resources and you can better manage costs and performance. Regarding security and governance, Synapse allows you to use Azure Managed Identities and securely integrate Linked Services (connections to external data sources). A best practice is to centralize access to resources through these managed identities, avoiding the use of hard- coded credentials. Finally, it's important to monitor Synapse resource usage: like any powerful service, inefficient use can lead to high costs. Synapse provides monitoring and logging for SQL queries (you can see how much your on-demand queries processed and how much they cost) and Spark jobs (application logs, execution times of each stage, CPU/memory usage for tuning if needed).

In short, Azure Synapse Analytics represents an all -in-one ecosystem for data analytics on Azure: its strength lies in the ability to run SQL analytics at data warehouse scale and distributed analytics with Spark at data lake scale on a single platform, taking full advantage of unified storage on Azure Synapse Gen2. For a student, Synapse embodies the concepts of both data warehousing and big data processing, offering a practical platform where they can apply both skills without having to jump between completely different tools.

 

4. Lakehouse and Medallion Architecture: Merging Data Lake and Data Warehouse

In recent years, the evolution of data architectures has led to the convergence between traditional data warehouses and data lakes, giving rise to the concept of a lakehouse. A lakehouse is essentially a data lake with typical characteristics of a data warehouse: it offers the flexibility to store heterogeneous data like a data lake, but at the same time guarantees the data quality, structure (schema), and performance typical of a data warehouse. In practice, the lakehouse aims to be a “single place” where both raw and refined data reside, enabling both exploratory approaches (typical of data lakes ) and structured analytical approaches (typical of DWs).

A key enabling technology for lakehouses is the use of file formats and management systems that bring ACID transactions and file schema management to the data lake. The most popular of these is Delta Lake (originally developed by Databricks and now open-sourced), which runs on top of Parquet files, managing atomic commits, data versioning, and schema enforcement. With Delta Lake, a data lake can behave more like a database (accept transactions, ensure consistency), while maintaining the scalability and low cost of object storage.

In Azure, both Synapse and the new Microsoft Fabric platform embrace the concept of a lakehouse. In Synapse, this paradigm is seen with the integration of Spark and serverless SQL on the same data lake (as described in the previous chapter). In Fabric, there's a specific object called a “ Lakehouse ” that allows you to upload data to Delta and simultaneously make it available via a SQL endpoint.

The Medallion Architecture, which we've already discussed, fits perfectly with the lakehouse concept: the Bronze, Silver, and Gold tiers become phases within the lakehouse itself. In the lakehouse context, the Gold tier is often modeled similarly to a traditional data warehouse, with star or snowflake schemas, dimension and fact tables, and so on, but keeping the data in file format (e.g., Delta tables in the data lake ) and offering a read - only SQL endpoint to access that data.

Concrete examples: Let's take an analytics project where we want to analyze sales for a retail company. Raw data ( Bronze ) will have arrived in the data lake ( lakehouse ) from store checkouts and the e-commerce site. After a cleansing and enrichment phase (Silver), we could design the final data model (Gold) as follows: we create a fact table ( Sales ) where each row represents a single sales transaction with references to various dimensions, and several dimension tables ( e.g., DimDate for dates, DimStore for stores, DimProduct for products), each with a surrogate primary key (i.e., an artificial key, usually incremental numeric, that we use to link it to the fact ) and all the descriptive attributes (the product dimension will have product name, category, price, etc.). This star model (a central fact table linked to many dimension tables) is the typical star schema optimized for analytical queries: it allows for efficient data aggregation and filtering. Once we have created these tables in our lakehouse (in Delta format on the Gold layer ), we can generate aggregate views or tables for our KPIs (Key Performance Indicators ), for example, a view that calculates total sales and margin by product and month.

The beauty of the lakehouse is that these tables are on files (Delta), so we maintain the costs and flexibility of a data lake, but at the same time we can expose them through a SQL endpoint as if they were in a traditional relational database. Azure Synapse serverless, for example, can act as a read endpoint: we create external views of the Delta tables in serverless SQL and allow users to query them with T-SQL. In Microsoft Fabric, the lakehouse even has a built-in component called SQL Endpoint that appears as a database, through which you can run queries with T-SQL and get results directly on the Delta data.

Another advantage is integration with BI tools like Power BI: with the lakehouse approach, Power BI can be connected directly to the Delta data in the Gold layer. DirectLake is an emerging feature (in Fabric) that allows Power BI to read data directly from the lakehouse, bypassing traditional imports or direct queries and ensuring high performance (by loading the data into memory in an optimized way). This means that a Power BI report can reflect data updated in the lakehouse in near real time, without having to rely on a separate data warehouse.

Best practices and important aspects: Designing a lakehouse requires keeping both data lake and data warehouse rules in mind. For example, it's crucial to keep model complexity under control: having too many tables and complicated relationships can make it difficult to understand and maintain, so it's a good idea to simplify where possible, perhaps denormalizing slightly when this doesn't negatively impact it. Dimensions should be well normalized internally to avoid redundancies (for example, separate the date dimension from the time dimension if necessary, rather than having all time information replicated on each fact record). The use of surrogate keys is recommended: these are surrogate keys, typically integers, that act as primary keys in dimensions and are included in facts as foreign keys; this is independent of any natural keys (e.g., the original product code), making the model more robust to changes in the source systems. Furthermore, to manage the history of dimensions (for example, if the name of a product changes over time, or if a store changes its area of operation), data warehouses use Slowly Changing techniques. Dimensions (SCD): Even in a lakehouse, it is good to apply similar concepts, for example, maintaining versions of records in dimensions with effective dates, so that you can analyze sales data in relation to the correct dimension for that historical period.

From a governance and reliability perspective, each layer ( Bronze, Silver, Gold) should have data contracts and quality controls. This means clearly defining what is expected of the data at that level (schema, quality, business rules) and ensuring that each transformation pipeline verifies these rules, perhaps producing data quality reports. Tools like Azure Data Factory / Synapse Pipelines can implement control steps or use services like Great Expectations or Purview's own rules (which we'll discuss in the next chapter) to ensure that the data meets expected standards before promoting it from one level to the next. It's also good practice to carefully document fields and relationships: since end users (analysts, data scientists) will often consume the data directly in a lakehouse, it's essential that they understand the meaning of each column, the units of measurement, and the relationships between tables. A data catalog or glossary (as we'll see in Purview) can help, as can comments on fields or internal team documents.

In short, a Lakehouse Azure data architecture combines the benefits of data lakes and data warehouses. For students new to data analytics, understanding this paradigm means understanding how to design systems where the data pipeline provides raw, clean data, and then analytical models, all within the same scalable environment. This chapter highlighted the importance of structuring data ( medallion architecture (star schema) even in a distributed file system context, to achieve both the flexibility and performance required by modern analytics.

 

5. Azure Stream Analytics: Real-Time Data Processing

In today's world, many applications generate continuous streams of data: IoT sensors sending measurements every second, constantly flowing application logs, real-time financial trading data, and so on. Azure Stream Analytics (ASA) is Azure's PaaS service designed to handle just these streams, allowing you to analyze and react to data in real time, without having to manually set up and manage complex streaming clusters (like those based on Spark Streaming or Flink ).

Azure Stream Analytics works by allowing you to define a continuous processing query, similar to an SQL query, that is applied to incoming events. These events can come from various streaming sources, typically: Azure IoT Hub (for IoT scenarios, data ingestion from devices), Azure Event Hubs (for general streams, such as application logs, telemetry, event queues), or even Kafka (Azure offers a compatible Kafka interface on Event Hubs, so ASA can read from Kafka endpoints). The query defined in ASA can perform filters, aggregations, joins, and more on the data in flight, and as it produces results, it sends them to one or more configured outputs —which can be services like Power BI (to visualize live results on dashboards), Azure Data Lake Storage (to historicize results to files), SQL databases (to store processed events), Cosmos DB (for low-latency results in a NoSQL database), and others.

The Stream Analytics query language is familiar to those familiar with SQL, but with extensions to handle the temporal nature of streaming data. For example, ASA introduces the concept of a window into queries, allowing aggregations to be calculated over moving or fixed time windows. Several types of windows are supported, such as tumbling windows, hopping windows, and sliding windows. A tumbling window is a fixed window that follows one another without overlapping (e.g., 1-minute windows that start every minute exactly: 12:00-12:01, 12:01-12:02, etc.); a hopping window is similar but can overlap (e.g., a 5-minute window that starts every minute – so 12:00-12:05, then 12:01-12:06, etc., used for moving averages); A sliding window is defined by the event, essentially the aggregate over a period of time related to each event (for example, "for each event, calculate the average of the 5 minutes preceding that event"). These concepts allow for logic such as "tell me the number of events in the last 10 seconds updated every second" or "if the average temperature over the last 5 minutes exceeds a threshold, generate an alarm."

Practical examples of ASA: A classic case is anomaly or threshold detection. Imagine a cold chain with temperature sensors on refrigerators: the sensors continuously send readings to the IoT Hub. We can set up an ASA query that calculates the average temperature for each sensor over a rolling window (e.g., 5 minutes) and checks whether it exceeds a certain threshold. If so, the query can emit an alarm event that is sent, for example, to a real-time Power BI dashboard and a notification service (or a database that records the event). This way, if a refrigerator's temperature rises above the limit, the system will alert you within seconds and you can take timely action. Another example is enriching streams with static data: suppose we receive product IDs and sales quantities via streaming from various stores. By themselves, these IDs aren't very informative, but ASA allows you to join the stream with static reference data (e.g., a CSV table of products with name and category). We can load this reference table statically, and the ASA query, as events arrive, can join each event with the corresponding product information, producing an output stream already enriched with names and categories. This is incredibly powerful for avoiding post-processing: the streaming results are already complete.

Azure Stream Analytics also offers geospatial functions to work with geographic coordinates, so you can, for example, detect whether an object enters or leaves a certain geographic area ( geofencing functionality ) directly using the query language.

From a resource perspective, ASA introduces the concept of Streaming Units (SUs), which represent the sum of CPU and memory allocated to execute queries. The more SUs we assign to the ASA job, the more events per second it can handle and the more complex the query can be. Allocation should be sized based on throughput: during development, it's common to start with 1-3 SUs and then increase as the load increases.

ASA Best Practices: Writing streaming queries requires care to ensure accuracy and performance. A first guideline is to design idempotent queries where possible: this means that if for some reason an event is processed twice (which in theory shouldn't happen in ASA under normal conditions, but could happen in recovery scenarios), the final effect should not duplicate results. An example is to avoid simple, windowless cumulative counts, which would accumulate upon reprocessing. In general, appropriate use of time windows helps divide the stream into manageable chunks and reason about them. It's important to handle late arrival data: ASA has settings that define a grace period for events that arrive late compared to their timestamp (for example, an event generated at 10:00 AM that only arrives at 10:05 AM due to network latency). We can specify in the queries how to handle these cases (include them in the window anyway, discard them, etc.). Time zones must also be handled correctly in temporal analyses, often converting timestamps to UTC for consistency. Furthermore, if data sources are partitioned (for example, Event Hubs allows partitions), it's a good idea to use the same partitioning key for queries in ASA to ensure that related events are processed by the same node and maintain local order when needed.

Monitoring is crucial: Azure Stream Analytics offers metrics (visible in Azure Monitor) such as ingress and egress events per second, processing latencies, SU utilization, etc. Setting up alerts on these metrics can help you identify if, for example, throughput is saturating resources (indicating that we may need to increase SUs) or if the job is failing. In production, for very high loads and mission- critical scenarios, Azure also offers Azure Stream Analytics Cluster mode: an isolated cluster dedicated exclusively to your ASA jobs, with fixed capacity, across which you can distribute multiple jobs. This also enables advanced features such as integration into a Virtual Network (VNet) for network isolation and the use of Private Link to connect sources and destinations privately, without going through public endpoints – improving security.

In conclusion, Azure Stream Analytics is a valuable tool for building real-time analytics pipelines without having to delve into the complex details of open-source streaming platforms. For a student, learning ASA means understanding how to logically express operations on continuous data streams in SQL-like form and learning to think in terms of time (which is not trivial at first), which is an increasingly in-demand skill in modern data analytics.

 

6. Power BI: Semantic Models for Self-Service Analytics

Power BI is a popular Microsoft business intelligence platform, known for its ability to easily create interactive visualizations and dashboards. But behind the simple interface lies a key component for effective analysis: the semantic model. In Power BI (and Analysis Services in general), the semantic model is the layer where data tables, the relationships between them, calculated measures, and other objects such as hierarchies and KPIs are defined. In this chapter, we'll explore how the Power BI data model works and why it's so important for successful self-service analysis.

When we import data into Power BI (for example, from Excel, a database, a data lake, etc.), it is structured into a series of tables within the model. We can think of the model as a small in-memory database: the tables can have relationships (joins) between them, typically one-to-many relationships connecting dimension tables (e.g., the dates table, the products table) to the fact table (e.g., sales). This is exactly the star schema we discussed in the previous chapter, applied within Power BI.

, the semantic model is not just a data schema, but also a layer where measures are created and dynamic calculations are defined using the DAX (Data Analysis Expressions) language. For example, we could have a measure called Revenue in the model that sums the sales field, and a Margin % measure that divides the margin by the revenue, possibly with more complex formulas that respect context filters (DAX allows you to define calculations that intelligently respond to filters applied in the visualizations, such as “ Year -to-Date”, values compared to the previous year, etc.). Hierarchies (for example, a date -> month -> quarter -> year hierarchy) can be set in the model to facilitate drill-down navigation in the charts.

Power BI supports several ways to import data into your model:

·      Import mode: The data is actually imported and stored in the Power BI file/report (in the in-memory Vertipaq engine ). This typically offers the best query performance, because the data is in- memory and optimized for compression, but it requires enough memory to hold it, and the data can become stale if not refreshed regularly.

·      DirectQuery: Data remains at the source (for example, in the company's SQL database), and Power BI sends real-time queries to that source upon user interaction to obtain results. This ensures data is always fresh and doesn't require importing, but it can be slower for each action and depends heavily on the underlying system's performance and network latency. It's best used on sources that can handle frequent query loads and on relatively optimized datasets.

·      Composite model: This is a combination of the two previous modes. For example, it allows you to import some tables (perhaps small or frequently used ones) and keep others in DirectQuery (perhaps very large ones or those with sensitive data that we don't want to duplicate). The model manages this duality, but introduces a certain amount of complexity.

·      DirectLake: This mode is new and available in the Fabric ecosystem; it allows Power BI to directly access data on a lakehouse in delta format without going through a standard internal dataset. It could be considered an evolution of DirectQuery optimized for data lakes, using intelligent caching to achieve performance close to that of import. For a student just starting out with Power BI, DirectLake may not be immediately available unless using Fabric, but it's worth mentioning as a future direction.

Regardless of the mode, the semantic model in Power BI acts as a single point of truth for calculations. A great advantage of Power BI and analytical models in general is that once you define a measure (e.g., Total Sales = sum of the amount column in the Sales table), you can reuse that measure across all charts and analyses, and Power BI will automatically recalculate it based on the filters you apply (e.g., if I create a chart with sales by region, it will apply the sum across groups of regions; if I filter by year, it will restrict the data to the current year, and so on). This encourages centralization of measures: it's best to define all the important measures in the model once and let users build their reports from those, so as to maintain consistency (e.g., "Operating Margin" is calculated the same way across all reports).

Practical example of building a model in Power BI: Let's imagine we want to analyze sales. We import a sales table (containing: date, product code, quantity, price, etc.), a products table (product code, name, category), and a dates table (a list of dates with information such as month, quarter, year, holidays, etc.). In the model, we connect the sales table to products via the product code, and sales to dates via the date. Now let's build some DAX measures: for example, Total Sales = SUM(Sales[Price] * Sales[Quantity]) if the data requires a revenue calculation; or if there's already a total field, we can do Total Sales = SUM(Sales[Amount]). Let's create Total Quantity = SUM(Sales[Quantity]). And perhaps Margin % = DIVIDE(SUM(Sales[Margin]), SUM(Sales[Amount])) assuming we have a margin field. We can also add measures like YTD Sales = TOTALYTD([Total Sales], 'Date'[Date]) to calculate the cumulative year-to-date, or other advanced metrics. Once this model is created, users can drag "Total Sales" onto a column chart to see sales, and filter by product category (thanks to the relationship with the Products table) and by year (thanks to the Dates table). In practice, they have a self- service experience because they don't have to write SQL queries: the semantic model answers for them based on their filter and view selections.

Best practices for Power BI models: A well-designed model is crucial for performance and maintainability. A first tip is to give tables, columns, and measures readable and meaningful names. Often, when importing from raw sources, you end up with technical names or codes; it's a good idea to rename them in the model to something understandable (e.g., prod_id becomes Product ID, sales_amt becomes Sales Amount, etc.), especially if the report will be used by non-technical people. Furthermore, columns that aren't needed for analysis purposes should be hidden: sometimes you import tables from databases with many fields, but perhaps the business only needs 10 of the 50 columns; the others can be hidden in the model to avoid confusion. To optimize queries, it's important to correctly set the direction of the filters on the relationships (in Power BI, the default is "single," meaning one-to-many, unidirectional, which is fine in most cases with a star schema; the two-way filter should only be used when necessary for specific calculations, such as with bridge tables).

DAX measures should be written with care to verify their performance on large volumes: it's a good idea to use tools like the Performance Analyzer integrated into Power BI Desktop to see if a visualization is taking too long (a sign of a complex measure that needs optimizing, or perhaps a modeling issue). Often, the key is to pre -aggregate data if the granularity is too fine, or to create intermediate measures to simplify nested calculations.

Another important aspect is row-level security (RLS): Power BI allows you to define roles that allow certain users to see only a subset of the data (for example, a regional manager sees data only for their region). Implementing RLS in the model (typically through filters on dimension tables) allows a single report to serve different users, showing each only what they are authorized to see, which is very useful in a business context.

Finally, as your organization grows, it's helpful to promote well-crafted models to certified or shared models. In Power BI Service, you can publish a dataset (model) to your workspace and mark it as certified or promoted, so other analysts know it's a reliable source and can reuse it for new reports instead of recreating it from scratch. This embodies the concept of a "single version of the truth": it's better to have a single, well-curated sales dataset than for each team to create their own, potentially resulting in discrepancies.

In short, Power BI and its semantic models represent the data presentation and consumption component of our ecosystem. For a student, learning to model data in Power BI means acquiring the ability to transform raw tables into structured information ready for analysis, learning a language like DAX for advanced calculations, and understanding how modeling choices impact the efficiency and accuracy of the reports created.

 

7. Microsoft Purview: Data Catalog and Data Governance

As an organization accumulates data across various systems (data lakes, databases, reports, etc.), it becomes increasingly important to know what data exists, where it is located, who owns it, and how it is defined. Data governance comes into play, the set of processes and tools that ensure controlled and quality management of information assets. Microsoft Purview is the Azure service designed for data governance, offering a unified catalog of data assets and powerful classification, search, and control functions.

The heart of Purview is the Data Catalog: it allows you to register and consult all of your company's data assets. An asset can be a table in a database, a file in a data lake, a Power BI report, and much more. This is possible thanks to the Data Map, a component that scans data sources and collects metadata (table names, columns, data types, locations, lineage (i.e., tracking data sources), etc.). Purview can connect to a wide range of sources (Azure SQL, Azure Data Lake, Azure Synapse, Salesforce, Amazon S3, etc.) to extract this information. For example, we could configure Purview to scan our Azure Data Lake Storage and all of our Azure database instances: it will automatically create catalog entries for each file and table found, recording their schema, path, and even statistics such as data volume.

Once the catalog is populated, users (typically data engineers, data stewards, analysts) can search for data in Purview as they would with a search engine. For example, they could search for "customer" and find all the tables in the various databases that relate to customers. Each asset in the catalog can be enriched with descriptive metadata: it's possible to associate glossary terms, notes, and indicate the owner (responsible owner) of that data. Purview's Business Glossary is a corporate glossary where business terms (e.g., "Order," "Active Customer," "IT Expense") are formally defined and can be linked to data assets to clarify their meaning. This helps resolve ambiguities: if I have a cust_id table and link it to the glossary term "Customer," everyone will know that that column represents the customer according to the shared standard definition.

In addition to the catalog, Purview introduces the concept of governance domains and data products. A governance domain is a logical grouping of resources and rules, often aligned with the organizational structure or thematic areas (e.g., a "Finance" domain, a "Human Resources" domain). This allows you to delegate responsibility for their data to individual units (domains), while maintaining some global rules defined by the central governance team. This approach follows the principle of federated governance: some policies and guidelines are shared (e.g., classification of sensitive data, GDPR compliance), but detailed management is in the hands of the domains, which have more direct knowledge of their data.

A data product in Purview is a concept that groups together various data assets (potentially of different types) that together provide value for a specific purpose or use case. It's a bit like creating a data package useful for a specific scenario. For example, a company could create a data product called "Retail Sales" by inserting some gold tables from the data lake related to store sales, plus some related Power BI reports, perhaps even the dataset in Power BI. It should clearly define who is responsible for this product (owner), what access policies apply, and ensure it is documented. The idea is inspired by Data Mesh approaches, which encourage the sharing of data as reusable products.

Purview practical examples: A typical use case is asset mapping for compliance and discovery. For example, a company wants to be GDPR compliant and ensure it knows where personal data resides. By configuring Purview, it can scan all databases and data lakes and use automatic classifications: Purview has a library that recognizes sensitive data types (credit card numbers, emails, addresses, social security numbers, etc.) and can automatically tag columns that appear to contain that data. Compliance officers can then search for "email" through the catalog and see all columns or files containing personal email addresses, to ensure they are adequately protected. Another example is building a centralized glossary: suppose departments have been using terms like "active customer" for years, with slightly different definitions between marketing and support. Using Purview, the governance team can officially define "Active Customer" in the glossary (e.g., "Customer with at least one purchase in the last 12 months") and link all the tables/columns in the various systems representing active customers to the glossary. This way, anyone opening a customer dataset in Purview will see the term and its definition linked, clarifying any doubts. Furthermore, as mentioned, a data product can be created: for example, the Sales data team creates the product "Retail Sales Q3 2025" where it aggregates datasets of sales, product master data, and standard reports on the quarter, and makes it available to business managers through Purview (which displays the details, contact information of the person who created it, and perhaps the quality status of the data).

Purview also includes features for evaluating and monitoring data quality: through integrations (for example, with Azure Data Factory or other tools), you can capture information on the quality rules applied and the quality scores obtained for each dataset (e.g., percentage of null values, adherence to the expected format, etc.). Purview can display these metrics and rate datasets based on their quality. This is very useful for understanding whether a given data product is reliable or has issues with certain columns.

Data governance best practices with Purview: Implementing a tool like Purview is only effective if accompanied by clear organizational processes and roles. One suggestion is to adopt a federated governance approach: that is, appoint data stewards within each company domain who will be responsible for maintaining their domain's metadata and data quality in Purview. Meanwhile, a small central governance team defines standards (for example, which classifications to use, which glossary terms to create, how to evaluate quality). This way, Purview doesn't become a "static" catalog, but a living resource maintained over time. Documenting terms and definitions is another crucial point: the glossary should be populated and updated with input from business units, and ideally integrated with internal training so that everyone uses Purview as a reference. On the access side, Purview itself doesn't manage data access permissions (it's not a firewall), but it tracks access policies: it's a good idea to record in Purview which policies or access controls (for example, masking sensitive data) are active for each source, so as to have a complete picture.

Finally, integration with other Microsoft tools helps create a cohesive ecosystem: Purview can connect with Microsoft Privacy or Compliance Manager for compliance (e.g., pushing personal data inventory to these tools to assess privacy risk), and with Azure Data Factory to push lineage (tracking data from sources to outputs). Monitoring metadata and quality through Purview also means triggering notifications or internal dashboards on trends (e.g., how many assets have been scanned, how many have increased in the last month, how many have quality issues).

Simply put, Microsoft Purview provides the infrastructure for "making sense" of a company's data assets. For a student, understanding Purview means approaching the governance dimension, often overlooked in comparison to technology but vital: data is only valuable if we know how to find it, understand it, and trust it, and tools like Purview are there to ensure just that.

 

8. Mapping Data Flows: Scalable Visual Transformations

In the chapter on Azure Data Factory, we mentioned Mapping Data Flows as one of the activities available for transforming data at scale. Let's now delve deeper into what they are and how they work. Mapping Data Flows (hereinafter MDFs) in Azure Data Factory and Synapse Pipelines offer a visual and declarative approach to building complex data transformations, running on Spark clusters managed behind the scenes. Simply put, they allow you to create, via a graphical interface, transformation flows (diagrams) composed of data sources, a series of transformation steps, and sinks ( destinations), all without writing code, yet achieving big data-like performance.

An MDF appears as a canvas where we can drag and drop components. We start by defining a Source (for example, a Parquet file in the data lake, a table in SQL, etc.), then we add transformations such as Filter (to filter rows based on conditions), Select/ Derived Column (to select columns or create ones derived from expressions), Aggregate (for aggregations such as sum, average, counts on groups), Join (to join two data streams based on common keys), Sort or Alter Row, Union, Lookup (similar to a join with a reference dataset), and finally define a Sink where to write the results (this can also be various types of destination: CSV/Parquet/Delta file on the data lake, SQL table, etc.). Each transformation is configurable with conditions and expressions, and Azure automatically generates the necessary Spark code under the hood.

The power of Mapping Data Flows lies in combining visual simplicity with the scalability of Spark. There's no need to worry about cluster management: when a data flow is executed as part of an ADF/ Synapse pipeline, behind the scenes Azure spins up (or reuses) a Data Flow-optimized Spark cluster known as Azure Integration Runtime in Data Flow mode and translates the configured transformations into Spark jobs in Scala. This means you can potentially process a 100 million-row file with joins and aggregations simply by drawing the flow, and Azure will execute it, distributing the load across multiple nodes. During development, there's also the option of using Debug mode with an active debug cluster, which allows you to preview the data at each step to verify that the transformations are doing what you expect.

Examples of what can be done with Mapping Data Flows: Imagine we have a dataset of financial transactions in which the amount fields are sometimes written with a decimal point, sometimes with a period, and some records have null values or odd date formats. We can create a data flow that takes this raw data, passes it through a standardization transformation (for example, using expressions to remove non-numeric symbols from the amounts and convert them to numbers, and transforms the dates into the standard ISO format), then applies a filter to discard transactions with zero or invalid amounts. We could then perform a lookup on a reference table with exchange rates to add, for each international transaction, the corresponding amount in local currency. We might also want to identify duplicates: add an aggregation step that counts how many times the same transaction ID appears, and then a filter to isolate those with a count > 1, perhaps writing them to an exception sink (an error log file). This entire flow is easily designed and configured, and the result could be a clean and enriched stage of transactions ready to be loaded into the Silver/Gold tier of the data lake.

Another example: Suppose we need to merge and transform data from two sources: a CSV file of customers and a JSON file of orders, to produce a combined analysis output. In a data flow, we can insert two sources (customers, orders), perform any individual transformations (e.g., select only certain columns, calculate derived columns like "order year" or "VIP customer yes/no" based on criteria), then perform a join between the two flows on customerID to associate customer information with each order, and finally write the result to a new, ready-to-use Parquet file. In the process, we could add an aggregation calculation to sum the total orders per customer and perhaps mark those above a certain threshold as "top customers."

A useful thing about MDFs is that they include mechanisms to handle errors: for example, there is the possibility to set the destination of rows that fail to be written (the so-called rejects) in sinks. row, as if it were a secondary output for errors, often used to track data that hasn't passed certain quality rules). This allows for robust pipelines: instead of crashing when dirty data is detected, we can isolate those specific records in a log, and still have the pipeline complete with all the rest of the correct data.

Monitoring and tuning: When running a Mapping Data Flow, Azure offers a very interesting monitoring detail: the data flow execution plan. You can see a graphical representation of the execution phases (stages) with information on the time spent and the number of records processed in each stage. This is useful for understanding where the pipeline is spending the most time, given performance: for example, we might notice that the join takes a long time compared to other operations, and perhaps discover that this is due to the data distribution being skewed on a certain key. To help in these cases, data flows offer tuning options: for example, broadcast join can be enabled when one of the two tables is small – this way, that table will be broadcast to all nodes, making the join more efficient (small data is replicated and large data doesn't need to be heavily re-split ). Alternatively, you can manually set the partitioning key before a join or aggregation, so you can control how the data is distributed across the clusters (this is useful if you know that a certain field is better balanced than another). The Integration Runtime running the data flows can have a TTL (Time to Live), as mentioned above, which reduces startup times if we run multiple data flows closely together: in practice, the Spark cluster stays warm and ready for a certain amount of time.

Best practices for Mapping Data Flows: First, if performance is your goal, it's advisable to use efficient formats like Parquet or Delta for input and output (compared to uncompressed CSV, Parquet allows for much faster reads/writes and storage compression). Carefully monitoring the four critical phases of a data flow is helpful: in general, we can think of these phases as cluster startup, data reading from sources, processing transformations, and writing to sinks. Each of these can become a bottleneck depending on the situation (for example, if the source data is on a slow-response system, the reading phase will be the bottleneck; if the transformation is very complex or skewed, it will be the computation phase; if the sink is latency-intensive, writing can cause delays). Having visibility into these stages allows you to identify where to optimize. Avoid unnecessary sorts: Global sorting of data is an expensive operation in distributed environments, so unless it's really necessary (for example, when you want sorted output for a specific reason), it's best to avoid it. Aggregations or joins often don't require global sorting, and if sorting is needed to define ranks or similar, there are analytic functions that can be cheaper alternatives. Leverage source partitioning: If the source supports parallelized reading (for example, a partitioned database, or a set of files across multiple folders), configuring the source to read in parallel across multiple partitions can reduce read times. Conversely, limit logging to what's necessary: debug mode with excessive log detail helps understand what's happening, but once in production, it's best to keep only essential logs, since writing logs for each processed record (for example) would slow down dramatically. Finally, if a data flow is becoming very complex and difficult to maintain, consider isolating heavy transformations: you can split a flow in two, writing an intermediate output, then reading it and continuing with the remaining transformations. This can also help you rerun only a part in case of errors or parallelize the flows.

For beginners, Mapping Data Flows represent an intuitive way to approach ETL/ELT concepts for big data: you can learn what a join, an aggregation, or a data transformation does by seeing it visually, while also understanding that an engine like Spark is behind the work. It's a great meeting point between the no-code/low-code world and the world of big data engineering.

 

9. Analytics Data Security in Azure

When building data solutions in Azure, from Data Factory ingests to Synapse analytics to Power BI dashboards, you need to carefully consider security and compliance. Azure provides a set of built-in controls to protect analytical data, ensure only authorized people/services can access certain information, and adhere to regulations and security best practices. In this chapter, we'll examine some of the key tools and approaches for securing a data architecture on Azure, focusing on the specific services discussed in previous chapters.

Security at rest and in transit: First, Azure protects data at rest (i.e., stored on disk) with encryption by default. Services like Azure ADLS Gen2, Azure SQL, and Azure Synapse automatically encrypt data on disk (using Microsoft-managed keys, with the option to provide your own). This means that files and databases are encrypted, and if someone physically obtains the disks, they can't read them without the key. Similarly, in- transit communication to these services typically occurs over SSL/TLS encrypted protocols (HTTPS for storage, etc.), ensuring that intercepting network traffic doesn't reveal cleartext data. These mechanisms are often transparent to the user—it's just a good idea to ensure they're left enabled (Azure allows you to disable encryption in some cases for backwards compatibility, but there's usually no reason to do so).

Access Control (Identity and Network): Azure implements the classic RBAC ( Role-Based Access Control) model on virtually every service: it involves assigning predefined or custom roles to identities (users, groups, or application identities such as Managed Identity, Service Principal ) that determine what they can do on a resource. For example, on the Data Lake we can give a certain group the read-only “Data Reader” role, and an ETL service a “Data Contributor” role to read and write; on a Synapse workspace we can give a data scientist permissions to run notebooks but not to publish pipelines, and so on. It is essential to apply the principle of least Privilege: Granting the user/service the minimum level of access necessary for its function, and nothing more. This limits the damage in the event of compromised credentials or human error.

In addition to identity, Azure also allows you to control access to services via networking. Services like Azure Storage, SQL, and Synapse offer firewalls and virtual network integration: we can decide that a certain storage account is accessible only from specific IP addresses ( IP whitelist ) or only from within a certain corporate VNet (Virtual Network). Furthermore, with Private Endpoint, we can ensure that an Azure service (for example, a storage account) has a private IP address within the corporate network, eliminating exposure to the public Internet. This way, even if authentication fails, an external attacker won't even be able to reach the service endpoint unless they're within the authorized network. In the data context, it's common to isolate, for example, the Data Lake within a VNet and allow access only to data services ( Synapse, adf ) that are also integrated into the VNet via Managed VNet or similar capabilities.

Defender for Cloud and compliance: Microsoft offers a service called Defender for Cloud (formerly Azure Security Center) that helps monitor and strengthen the security of Azure resources. For data, Defender for Cloud can continuously assess our setups against best practices and security standards. For example, there's a set of security controls recommended in the Microsoft Cloud Security Benchmark (MCSB) that includes rules like "Storage account should have private endpoints or service endpoints” or “Key Vault should have soft-delete enabled,” etc. Defender compares our configuration with these rules and flags any that are non-compliant, suggesting remedies (for example: “enable the firewall on this service,” “force MFA on this account,” etc.). Additionally, there is a Regulatory Compliance module where we can select various standards such as ISO/IEC 27001, GDPR, NIST and see a mapping of how well our infrastructure adheres to those controls. For example, for GDPR there might be a control that requires encryption of personal data: Defender will show whether all databases with personal data are effectively encrypted or if any are non-compliant.

An important compliance concept in Azure is Azure Policies: rules that can be set at the subscription or resource group level to prevent or report unwanted configurations (for example, preventing the creation of resources in unapproved regions, or requiring all storage containers to have logging enabled). Often, policy packages are grouped into Initiatives to cover an entire standard (the policy package for the CIS benchmark, for PCI DSS, etc.). Activating these initiatives on a subscription effectively activates continuous monitoring: any resource that violates a policy appears as non- compliant and may even be included in a compliance report.

Practical examples of applied security measures: Let's imagine we want to secure a data analytics project with a data lake and Synapse. One possible approach: create an Azure Virtual Network dedicated to the data services, put the Synapse workspace and the Azure Data Factory instance in Managed VNet mode, and configure Private Endpoints for the Storage account and Synapse 's dedicated SQL. This way, all components communicate over a private network. Enabling Azure Defender on these resources will ensure that if someone, for example, disables the firewall or leaves a data store open, a warning is triggered. Additionally, we can use Managed Service Identities: Azure Data Factory and Synapse have managed identities that we can authorize to the Data Lake (instead of using account keys), improving credential security. We store specific credentials (such as connection strings to external databases) in Azure Key Vault and, again, grant only Data Factory access to those keys.

An often overlooked aspect is the audit trail: ensuring access and usage logs are preserved. Azure, for example, allows you to enable diagnostics and logs for almost all services (e.g., logs of reads/writes to the data lake, logs of queries executed on Synapse, logs of pipeline publishers, etc.) and send them to a Log Analytics Workspace or Event Hub for later analysis. This way, if there's a security incident, you can trace who did what.

Main best practices summarized:

·      Implement at least Systematically privilege: periodically review access, remove users who are no longer needed, use groups to assign roles (rather than granting permissions to individuals, so if someone changes roles, simply remove them from the group).

·      Protect data in motion and at rest: Keep Azure default encryption enabled (usually there is nothing you need to do, it's by default) and if required by internal policies, use Customer Managed Keys (for example, bringing a key into Key Vault to encrypt data instead of the MS-managed one, to be able to do key rotation ).

·      Isolate your network where possible: prefer Private Link and VNet Service Endpoints for connections between services (so our data, for example, from ADF to Storage, never passes through public IPs). If you use virtual machines or containers for custom processing, place them in the same VNet to reach private services.

·      Enable Defender for Cloud and its policies: actively correct recommendations. For example, if it tells you that a certain storage device doesn't have logging enabled or a certain SQL server isn't enforcing TLS encryption, take action immediately.

·      Automate remediation where possible: Azure Policy allows you to not only detect but also remediate in some cases (e.g., if someone creates storage without encryption, the policy can automatically enable it). This eliminates the risk of human error.

·      Keep an eye on Azure Monitor and set up security and compliance dashboards: for example, centralize the percentage of compliance with standards over time and strive to reach 100%.

In short, data security in Azure is achieved through a layering of defenses: from identity (who you are), to the network (where you connect from), to the data itself (encryption, column access control, etc.), up to continuous monitoring ( Detect & Respond ). A student should understand that, in parallel with functional aspects (such as data transport and analysis), there must always be attention to these protection and compliance aspects, as they are an integral part of any production project.

 

10. Monitoring and Managing Costs in Azure

The final piece of the puzzle we'll discuss concerns solution observability and cloud cost management. Azure provides integrated tools for monitoring both application health (monitoring performance, errors, and usage) and spending trends to avoid unexpected bills. In data analytics environments where many different services may be involved (pipelines, databases, clusters, storage, etc.), controlling these two aspects is essential to maintaining reliable and cost-effective solutions.

Azure Monitor is the umbrella service for end-to-end monitoring in Azure. It includes the collection of metrics (numeric values sampled over time, such as CPU usage, memory, I/O, latencies, request counts, etc.) and logs ( events and detailed traces, such as error messages, execution of specific steps, debug output). Through Azure Monitor, you can set up Alerts on metrics or logs to receive notifications or take automatic actions when certain conditions are met (for example, if a Spark cluster's CPU usage remains above 80% for more than 10 minutes, it sends an email or scales the cluster; or if an ADF pipeline fails, it sends an SMS to the on-call person).

A key component of Azure Monitor for analyzing logs is Log Analytics: a workspace where you can send and store logs from various sources (Azure services, but also agents on on-premises machines, custom applications, etc.) and query them with a powerful language called KQL ( Kusto Query Language). For example, logs from ADF or Synapse pipeline executions, Synapse SQL query logs, and custom metrics can end up in Log Analytics, and the user can write queries to aggregate them, visualize them, and identify trends or anomalies.

For cost management, Azure offers Cost Management + Billing: a portal and set of APIs/alerts to monitor cloud spending. In large enterprise contexts, Azure resources are often divided into cost scopes: for example, per subscription, per resource group, or tag. You can define monthly/quarterly budgets for a scope (for example, "maximum subscription spend DataProject = €5,000 per month”) and then receive alerts as you approach the limit. Azure Cost Management offers reports and breakdowns: we can see how much we are spending in total and per service (e.g.: 30% on VMs, 20% on Databases, 10% on Data Factory, etc.), and identify the most expensive resources.

It's important to understand the pricing model for the services we've discussed. For example, Azure Data Factory costs based on the pipelines executed and the Data Flow clusters activated (i.e., pay -per-use); Synapse Dedicated costs per active instance hour (whether used or not); Synapse Serverless costs per TB of data read by queries; Spark Pool costs based on the duration and size of the cluster; ADLS costs based on GB stored and operations performed; Power BI has different licensing models (per user or per capacity), etc. Understanding these models helps you use resources efficiently.

Monitoring and cost optimization examples: Imagine you have a nightly ETL pipeline that needs to finish by 6 a.m. You can set up an alert in Azure Monitor that goes off if the pipeline isn't completed by a certain time (using ADF logs) to notify your team. Or you can monitor the average query latency of your Synapse endpoint: if you see an increasing trend, you might discover from monitoring that a particular Spark job has been putting a lot of load on the cluster in the last few days and decide to increase the number of nodes or optimize its code.

On the cost side, a practical example: suppose the team forgot to turn on a Synapse Spark cluster over the weekend. Cost Management will show an abnormal increase for the Synapse service. Furthermore, thanks to budget alerts, if you set a budget, you might receive a “You have reached 80% of your budget for this period” alert that triggers an investigation, leading to the cluster being found. Another example is log ingestion optimization: Azure Monitor charges a fee for each GB of logs ingested and for their retention. If we are collecting too many detailed logs (perhaps very verbose debugging from applications), we might see the “Log Data Ingestion ” item in the costs very high. With an analysis, we can decide to lower the logging level or set sampling rules (with filtering, Azure Monitor can ingest only X% of certain logs to reduce the volume) or reduce the log retention time (if we don't need logs from 3 years ago, we could keep only 30 days of history, lowering costs).

Optimization Tools: Azure Advisor and specifically the Cost Recommendations section provide suggestions such as “You have these 10 underutilized databases, you could scale them to save X per month” or “If you convert this payment to a Reserved Instance for 1 year you save Y%”. The Reserved Instances and Savings Plans are Azure mechanisms for optimizing costs by committing to consistent usage: for example, if you know you'll be keeping a dedicated Synapse running for many months, you can reserve it for 1 or 3 years at a discounted rate compared to pay -as- you -go. Purchasing reserved capacity for Data Factory or other services can also provide discounts if you have certain usage of a certain amount.

Final best practice for operations management: Tagging all resources with labels like project, environment, or owner is extremely useful both for understanding who/which department is consuming resources and for filtering cost reports (I can add up the costs of all resources tagged as env:production ). Creating monitoring dashboards that include both technical indicators (performance, throughput) and cost indicators provides a unified view of the system's health. For example, a dashboard could show: number of successful/failed pipeline runs, average cluster CPU utilization, amount of data processed daily, cumulative spending for the current month vs. budget, etc. This helps teams be proactive.

In conclusion, once you've built a data solution, the work isn't over: you need to monitor and monitor it over time. Azure provides the tools to do this, but they need to be configured and used consistently. For a new student, this may seem secondary to "getting the analytics pipeline up and running," but in the professional world, monitoring and cost management are what separate a long-term successful project from one that causes incidents or budget overruns. Learning to use Azure Monitor and Cost Management is therefore an integral part of the skillset of a good data engineer or cloud solution provider. architect.

 

Conclusions

Azure Data Factory thus represents the perfect culmination of a journey that has shown us the strategic importance of having a tool capable of orchestrating complex data flows in a simple, secure, and scalable way. The ability to create automated pipelines that manage data ingestion, transformation, and publication without manual intervention allows organizations to reduce errors, accelerate processes, and ensure operational consistency. The serverless approach eliminates the burden of infrastructure, while the flexibility offered by triggers, parameters, and control activities allows solutions to be adapted to different scenarios and easily reused. Integration with services like Azure Key Vault and the use of managed identities strengthen security, while advanced monitoring allows performance to be optimized and bottlenecks to be identified. In a context where data is at the heart of decisions, ADF becomes the starting point for advanced architectures that include data lakes, lakehouses, and analytics tools like Synapse and Power BI, creating a coherent, governance-oriented ecosystem. The best practices discussed, from modularity to secure connection management, represent the foundation for robust implementations that comply with enterprise standards. Ultimately, mastering Azure Data Factory means acquiring a key skill for designing modern data integration solutions capable of supporting advanced analytics, machine learning, and data- driven decision-making, transforming complexity into efficiency and paving the way for an intelligent, future-ready infrastructure.

 

Chapter Summary

The paper describes various technologies and practices for processing, modeling, security, monitoring, and cost management in the Azure data ecosystem, with a focus on tools such as Azure Data Factory, Synapse Analytics, Power BI, and Azure Stream Analytics.

·      Power of Data Flow Mappings: Data Flow Mappings combine visual simplicity and Spark scalability, running distributed transformations on Spark clusters automatically managed by Azure Integration Runtime, with debug modes for data previews during development.

·      Data modeling in Power BI: Power BI lets you transform raw data into structured semantic models, using DAX for advanced calculations and table relationships, facilitating consistent, self-service analysis.

·      Data import into Power BI: Data can be imported in- memory for improved performance, with the model functioning like an in-memory database and supporting star relationships between fact and dimension tables.

·      Security and networking in Azure: Azure offers identity- and networking-based access controls, such as firewalls, Virtual Network integration, and Private Endpoints to restrict service access to authorized networks only, improving data protection.

·      Monitoring and cost management in Azure: Azure Monitor and Log Analytics allow you to collect metrics and logs to monitor performance and errors, while Cost Management + Billing allows you to set budgets, alerts, and analyze expenses to maintain reliable and cost-effective solutions.

·      Azure Stream Analytics: ASA makes it easy to build real-time analytics pipelines with SQL-like language, offering performance metrics, dedicated cluster mode, and network integration for security and scalability.

·      Azure Synapse Analytics: Combines a SQL data warehouse and a Spark big data environment, enabling native access to data in Azure Data Lake Storage Gen2 without duplication, with simplified management of autoscaling Spark clusters and support for multiple languages.

·      Semantic Models and Measures in Power BI: The semantic model serves as a single point of reusable calculations, with DAX measures that dynamically update based on filters, promoting consistency and self-service for end users.

·      Auditing and data protection: Azure lets you enable diagnostics and logs to track access and operations, as well as maintain data encryption at rest and in transit, with the ability to manage custom keys for advanced security policies.

 

CHAPTER 12 – The governance service

 

Introduction

governance is the set of tools, controls, and processes that allow you to centrally manage an organization's cloud resources, controlling access to those resources, and ensuring compliance with internal policies and guidelines. Key elements of Azure governance include Management Groups, Subscriptions, Azure Policies, Azure Blueprints, access control with Role-Based Access Control ( RBAC ), and cost management with Cost Management. The goal is to ensure that every application or workload in the cloud meets corporate standards for security, quality, compliance, and budget, reducing risk and simplifying day-to-day operations.

In Azure, governance operates through a hierarchical model and centralized rules involving various components: Management Groups create a hierarchical structure above subscriptions, allowing policies and security initiatives to be applied at a high level and automatically inherited downstream. Azure Policies define configuration rules that are continuously evaluated and applied; if a resource does not comply with an assigned policy, Azure can block its deployment or flag it as non-compliant. Access control is managed through roles and permissions assigned with RBAC, applicable to different scopes (single resource, resource group, subscription, etc.), ensuring that each user has only the minimum necessary privileges ( principle of least privilege ). To ensure compliance with security standards, Azure also provides tools such as Microsoft Defender for Cloud, which continuously assesses the security status of the environment against benchmarks and regulations (e.g., CIS, PCI-DSS, ISO 27001) and provides scores and recommendations on how to improve the security posture. On the cost front, the Cost Management feature allows you to define spending budgets and set alerts when predetermined thresholds are reached, as well as offering detailed analytics to identify cost trends and potential optimizations. All these components are integrated into the Azure portal, particularly in the Governance section, which provides a unified view from which administrators can apply policies, manage permissions, monitor compliance, and control costs.

Practical example: Imagine a company looking to establish robust governance for its Azure environment. First, it creates a root management group ( Tenant Root Group ) and, below it, two Management Groups: one dedicated to the Production environment and one to the Development environment. On the Production Management Group, the company assigns an Azure Policy initiative containing several key rules. For example, it requires the use of Private Endpoints for all storage services and databases, so that they are only accessible via the corporate private network (ensuring greater security and isolation). It also requires each resource to have certain mandatory tags (such as Environment and Department ) to facilitate classification and cost allocation across different projects or departments. Finally, it defines a monthly budget for Production subscription expenses, sending automatic alerts at 80% and then 100% of the budget to avoid uncontrolled overspending. In parallel, it uses RBAC to manage permissions: it assigns application development teams the Contributor role on the resources in their subscriptions (allowing them to create and manage resources, but not to alter other users' permissions), while reserving the Owner role for the centralized platform team on the subscriptions themselves (so that only the central team has full control and can manage permissions). In this combined scenario, governance ensures that the various teams can work independently on their cloud resources, while always respecting company-wide constraints and controls: no critical resource can escape security rules (thanks to policies), costs will be monitored and allocated correctly (thanks to budgets and tags), and access will remain limited according to each individual's role (thanks to RBAC).

It's helpful to introduce some key Azure governance terms here, which will be covered in the following sections. Specifically, an Initiative is a set of policies grouped together (often to achieve a common goal, such as various security rules); an Assignment indicates the application of a single policy or initiative to a specific scope (which can be a Management Group, a Subscription, or a Resource Group); and finally, Compliance represents the degree to which resources adhere to the assigned policies and is automatically assessed by the system, highlighting any non-compliant resources for action.

 

Outline of chapter topics with illustrated slides

 

Immagine che contiene testo, schermata, software, Pagina Web

Il contenuto generato dall'IA potrebbe non essere corretto.Governance in Azure is the set of tools, controls, and processes that allow you to centrally manage resources, access, and compliance. Key elements include Management Groups, Subscriptions, Policy, Blueprints, RBAC, and Cost Management. The goal is to ensure that each workload meets security, quality, compliance, and cost standards, reducing risk and simplifying operations. Management Groups create a hierarchy above subscriptions, with policies and initiatives inherited by their children. Azure Policy applies configuration rules, while RBAC manages access at a granular level. Defender for Cloud assesses compliance, and Cost Management provides analysis and spend control tools. A practical example: a company creates management groups for Production and Development, imposes Private Endpoints and mandatory tags, enables budgets with alerts, and assigns roles via RBAC. Key terminology: initiative, assignment, and compliance. Visually, the hierarchy extends from the tenant root group down to resources, with inherited policies and RBAC enforcement points.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Policy lets you create and assign rules to govern resource configuration, maintaining automatic compliance. Policies enforce standards such as allowed regions, approved SKUs, or required tags, and can deny, modify, or verify resources during creation and updates. Effects include Deny, Modify, Audit, and Append. Policies are in JSON and are grouped into Initiatives for compliance applications. Typical examples: limit available regions, allow only approved SKUs, require specific tags, or enforce Private Endpoints. The engine continuously evaluates and can perform remediation where necessary. Best practices: Assign policies at the highest level, version initiatives, formalize exemptions, and periodically monitor compliance. Visual tooltip: Table of common policies with effect and use cases.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Azure Blueprints simplifies the deployment of compliant and repeatable environments by combining Policy, Role assignments, Resource Groups, and ARM or Bicep templates in a versionable definition. It allows you to reuse configurations, apply controlled updates, and ensure consistency between development and production environments. Benefits include governance as code, versioning, resource locking, and visibility into assignments. An example: a production blueprint that creates network and load resource groups, applies deny public IP policies, deploys VNets with Private Endpoints, and assigns targeted roles. By modifying the blueprint, assignments can be updated. Best practices: small and specific blueprints, consistent naming, parameter documentation, and alignment with Microsoft standards. Visually, a diagram shows the blueprint components and the Define, Publish, Assign, Update flow.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Role -Based Access Control, or RBAC, manages granular permissions by assigning roles to users, groups, and identities at different levels: resource, resource group, subscription, or management group. This ensures segregation of duties and enforces the principle of least privilege. Common roles include Owner, Contributor, and Reader, as well as specific roles like Storage Blob Data Reader. Managed Identities facilitate secure access without managing secrets, which must be stored in the Key Vault. Examples: assign Readers to the audit team, Contributors to specific resource groups, or User Access Administrators to the platform team; create custom roles and monitor changes via activity logs and alerts. Best practices: avoid broad assignments, favor groups over individual users, use PIM and Just-In-Time for privileged roles. Visual tip: roles-permissions table and JIT request flowchart.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Management Groups organize subscriptions hierarchically, allowing you to apply policies and RBAC with inheritance. They facilitate large-scale management and separation by domain, such as Production and Development. A typical structure: tenant root group, business group, subscriptions, and subgroups. By applying an initiative at a high level, all child subscriptions and resource groups inherit the rules. Examples: applying ISO 27001 or Microsoft Cloud Security Benchmark initiatives, enforcing mandatory tags, denying public IPs, or enabling Defender for Cloud on all subscriptions in a domain. Best practices: Design the hierarchy based on function or compliance, use consistent naming, limit exceptions, and monitor the impact of initiatives. Visual: Hierarchical tree with policy and role inheritance.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.FinOps tools to analyze, monitor, and optimize cloud costs. You can define budgets, receive alerts when thresholds are exceeded, identify anomalies, allocate costs using rules, and export data to Power BI. Alerts include budget alerts, credit alerts, and department quota alerts, which are automatically triggered when thresholds are reached. Examples: monthly budget with thresholds and designated recipients, cost allocation rules using tags, and Power BI dashboards for consumption analysis. Best practices: apply consistent tags, configure reserved instances or savings plans, set log retention to optimize costs. Visual: spending vs. budget graph, key tag table for allocation.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.Tags classify and make resources searchable, such as Environment= Prod, Department=Finance, Project=Migration, or Owner=Alessandro. They are essential for governance, security, costing, and automation, enabling tag-based cost allocation policies and rules. Policies can require mandatory tags and automatically add them with the Modify effect ; tags enable filters and log queries. Examples: Searching for resources in production for audits, operational restrictions on resources with specific tags, cost allocation by department, and automatic deprovisioning of closed assets. Best practices: Enterprise tag catalog, syntax validation, variant avoidance, coverage dashboard, and tag matching with RBAC and Policy. Visual: Canonical tag table, inheritance flow, and automatic remediation.

 

Immagine che contiene testo, schermata, numero, software

Il contenuto generato dall'IA potrebbe non essere corretto.Azure supports numerous compliance standards through Microsoft Defender for Cloud, which represents security frameworks and benchmarks and generates reports in the Regulatory Compliance Dashboard. This includes generic benchmarks like MCSB and standards like CIS, ISO 27001, PCI DSS, and SOC. Each standard contains automatically assessed controls; non-compliances generate recommendations and remediation. Standards can be assigned as Azure Policy initiatives and generated compliance reports. Examples: Enable CIS and ISO 27001, use the dashboard to identify and remediate non-compliant resources, and track trends with Azure Workbooks. Best practices: Integrate Purview Compliance Manager, align policies with standards, automate remediation, and assign ownership for failed controls. Visualization: Standard table with assessments, status icons, and a map of prioritized controls.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.The Activity log tracks all resource operations, useful for audits and investigations. Alerts help you quickly respond to events such as errors, anomalous metrics, or noncompliant policies. For continuous auditing, collect logs and metrics in Azure Monitor, set up queries and dashboards, and use Cost Management alerts and Defender dashboards for security. Examples: alerts for deployment errors, 90-day activity log export, alerts for exceeded budgets or violated policies. Best practices: set meaningful thresholds, avoid noisy alerts, use Action Groups for notifications, and protect logs with retention and controlled access. Visual: dashboard with activity logs, alert list, and resolution times.

 

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.Automation simplifies the management of policies and repetitive tasks. With Azure Automation, Policy Remediation, and Event Grid, you can schedule automated actions, such as deployments, remediation, tagging, or VM startup and shutdown. Examples include a runbook that sets missing tags, manages VM startup and shutdown, or applies storage remediation without a Private Endpoint. You can schedule policy deployments and track executions. Best practices include script versioning, using Managed Identity, logging output, and testing in development environments. Automations should be coordinated with Policy and Blueprint for consistency. Visually, a table of scheduled tasks with status and event-action pattern, such as a budget alert that triggers runbooks to shutdown test resources.

 

1. Management Groups

Management Groups are a way to organize multiple subscriptions hierarchically, allowing you to centrally apply common configurations and controls. In enterprise environments with numerous Azure subscriptions (for example, for different departments, teams, or projects), Management Groups help maintain global order and consistency. Imagine the structure as a tree: at the top is the Tenant Root Group (the default root group for each Azure AD tenant), under which the company can create a Management Group hierarchy that mirrors its organization. For example, a Contoso company might have a Management Group that encompasses all the others, with two Management Groups named Production and Development, each containing the relevant Azure subscriptions. This hierarchical organization allows you to apply policies or assign RBAC roles at a high node in the hierarchy, knowing that all the elements below it (subscriptions, resource groups, and individual resources) will automatically inherit those settings. This makes it possible, for example, to apply a common set of security rules across the entire company with a single intervention on the main Management Group, rather than having to manually replicate the same configurations on each subscription. Management Groups therefore facilitate large-scale management and also allow for logical separation of different administrative domains; for example, a multinational company could separate the Azure resources of different subsidiaries or lines of business by creating separate Management Groups under the same tenant.

By using Management Groups in combination with Azure Policies, you can ensure that all child subscriptions adhere to unified standards. For example, by applying a security policy initiative (such as a set of rules for compliance with the ISO/IEC 27001 standard or the Microsoft Cloud Security Benchmark ) directly to the corporate Management Group, every subscription under that umbrella is automatically assessed and held compliant with those security controls. Similarly, at the Management Group level, you could impose mandatory tags for all resources (for example, requiring the Project and Owner tags on every resource created, for organizational and cost-effectiveness reasons), or apply a rule that denies public IPs on all virtual machines in internal projects, or even bulk enable services like Defender for Cloud across all subscriptions. All of these top-down regulations ensure consistency and reduce the risk of misaligned or non-standard configurations (so-called drift). configurative ) between the various subscriptions.

Best practices: When designing Management Groups, it's important to reflect the company structure or governance needs. You can choose a hierarchy based on organizational functions (e.g., a Management Group for Finance, one for IT, one for Research, etc.) or on environments (e.g., Production vs. Test/Development ), depending on where it makes sense to apply common rules and where separation is more important. It's a good idea to adopt a clear naming convention for groups, so that their name clearly indicates their position in the hierarchy and their purpose (e.g., Contoso-Prod is the group for all Contoso production subscriptions ). It's also a good idea to minimize localized exceptions: if you apply a policy at the Management Group level, it's best not to exclude too many substructures or specific resources, otherwise governance becomes fragmented and difficult to manage. Finally, before assigning highly restrictive initiatives at high levels, it's a good idea to evaluate their impact: for example, test them on a subset of resources or in a non-productive subscription, monitoring that they don't unintentionally block legitimate activity, and then gradually roll them out with confidence throughout the hierarchy.

Azure Policy

Azure Policies are the heart of Azure's technical governance mechanism, allowing you to establish detailed rules for resource configurations and have them automatically enforced by the system. In other words, while Management Groups define where certain settings apply (organizational scope), Azure Policies define what is controlled and how.

Purpose and operation: An Azure Policy is essentially a rule expressed in JSON format that specifies a condition to check for on resources (or resource creation/modification actions) and an effect to apply if the condition is not met. The purpose is to maintain automatic compliance with best practices and business requirements. For example, you can create a policy that mandates the use of specific Azure regions (prohibiting the deployment of resources in other unapproved regions), or a policy that requires encryption of all disks, or a policy that prohibits the use of overly expensive or non-standardized virtual machine SKUs. Once assigned to a specific scope (a Management Group, a subscription, or even a single Resource Group), the policy is continuously evaluated by Azure: every time someone attempts to create or modify a resource in that scope, the system checks whether the action violates the policy. Azure also periodically re-checks all existing resources to flag any non-compliant items.

Policy Effect Types: When a policy condition is violated, the action taken depends on the "effect" defined in that policy. The most common effect types are:

·      Deny: The non-compliant action is blocked. For example, if a policy exists that denies the creation of virtual machines in a certain region, an attempt to create a VM in that region will immediately fail with an error message, effectively preventing you from decommissioning.

·      Audit: The action is allowed, but a non-compliance report is logged. This is useful for soft controls: for example, a policy could only report if a mandatory tag is missing, while still allowing the resource to be created. The idea is to collect compliance data without impeding work, reserving the right to address any deviations later.

·      Modify: The policy actively intervenes to correct or supplement the configuration. A typical case is a policy that automatically adds a missing tag if the user didn't specify it when creating the resource. Or it could automatically set encryption on a service if the creator left it disabled. In essence, it "saves" the user from a breach by applying a compliant default.

·      Append: Similar to Modify, this effect adds certain values or settings to the resource being created. For example, it could add a certain security setting to all created databases, without overwriting other parameters.

Policies are managed and monitored through the Azure portal (Azure Policy section). Here, in addition to defining and assigning rules, you can monitor overall compliance: Azure shows how many items are compliant or not for each assigned policy, with percentages and detailed lists. This helps teams understand any governance gaps and address them.

Often, multiple policies related by purpose are collected into an Initiative ( Initiative ), which is a logical container of policies. For example, Microsoft provides the Azure Security Benchmark initiative out-of-the-box, which groups dozens of policies related to the security of Azure resources. This allows you to assign the entire initiative instead of individual policies individually, achieving broad coverage with a single click.

Practical examples: Azure Policies can be applied in a wide variety of scenarios. Here are a few:

·      Region Restriction: A company may want to limit the Azure regions it can use to those in which it is headquartered or where certain regulations apply (for example, to prevent sensitive data from being placed in data centers outside of the EU). A Deny policy can prevent the creation of resources outside, say, "Northern Europe" and "Western Europe."

·      Control supported SKUs: To standardize infrastructure, you can ensure that only certain VM sizes or service types are used. For example, if a certain internal service only supports VMs up to a certain power level, a policy can deny the use of larger (or perhaps older/no longer recommended) SKUs.

·      Mandatory tagging: As mentioned, tags are essential for tracking costs and responsibilities. A policy might require every resource to have the Environment and Department tags. If someone tries to create a resource without these tags, the Modify effect might automatically add them with default values, or the Deny effect might block the operation until they're specified. In any case, the goal is to ensure that no resource is left without important tags.

·      Force security configurations: For example, you can create a policy that denies the creation of a data store (storage account) that isn't configured with a Private Endpoint. This way, even if an unwary user tries to create one publicly accessible from the internet, Azure will prevent it, ensuring that the private connection standard is always respected.

When a policy or initiative is assigned, Azure immediately performs an assessment on all existing resources in that scope. This means that not only are new resources audited, but previously created resources are also verified: if the policy finds non-compliant resources, it will flag them. In some cases, Azure Policy allows you to define automatic remediation actions for existing resources. For example, if you introduce a new policy that requires a specific tag, you can launch a remediation task that scans all current resources and adds that tag where it's missing. Or, if the policy requires disk encryption and finds unencrypted disks, it can automatically enable encryption on those (where supported) or send a report to administrators for manual intervention. The idea is to close the gap on legacy resources as well, not just future ones.

Best practices for policy management: To fully benefit from Azure Policy, it's recommended to first assign policies to the highest appropriate level. For example, if a rule applies to the entire organization, it's best to apply it to the main Management Group so it cascades everywhere. Applying the same policy individually to many subscriptions is less efficient and increases the likelihood of forgetfulness or inconsistencies. Similarly, it's helpful to create initiatives to group related policies, versioning them over time. Maintaining documented versions (v1, v2, etc.) of initiatives helps you understand, if changes occur, what has changed and why, and easily reproduce the same configuration in different environments (e.g., test vs. production). Exceptions ( exemptions ) should be managed carefully: Azure allows you to exempt specific resources from a policy (if there are valid reasons not to apply a certain rule to that resource). However, each exemption weakens governance somewhat, so it should only be granted in special cases, with a formal approval process and perhaps temporary (removing the exemption as soon as possible). Another good practice is to periodically monitor compliance status: have the governance or security team check Azure Policy reports to see if compliance is improving or declining. If many non-compliant resources persist, action may be needed (perhaps revising the policy if it was too stringent or improving team training on proper cloud usage). Finally, where possible, it's a good idea to automate the response to non-compliance: as we'll see later, Azure offers integrations to trigger automatic actions (scripts, runbooks ) when policy violations occur, allowing them to be corrected immediately or notified without waiting for manual checks.

 

2. Azure Blueprints

While Azure Policy helps ensure that configurations comply with certain rules, Azure Blueprints are used to deploy entire Azure environments in a standardized and compliant way right out of the box. A blueprint is essentially a template ( versionable and reusable) that combines various Azure artifacts—such as policies, roles, resource templates, and Resource Group structures—with the aim of creating complete environments that automatically follow established governance guidelines.

Purpose and use: Azure Blueprints is particularly useful when you need to provision multiple, similar environments to teams, such as multiple development and production subscriptions that must adhere to certain common configurations. Instead of manually building each environment and remembering to apply all the required policies, roles, and settings, you define a blueprint once and can then assign it to each required subscription. A blueprint can include:

·      policies and initiatives to apply (so every resource in the environment will automatically be subject to those governance rules);

·      RBAC roles to be assigned (for example, the blueprint may provide that the Reader role is immediately assigned to the security team and the Contributor role to a certain development team in the subscription, without manual intervention post-creation);

·      Basic Resource Group structure (e.g. automatically create a Resource Group called “Networking” and a “ CoreServices ” in each configured subscription, and then populate them with the relevant resources);

·      Bicep template to deploy predefined resources (e.g. a virtual network with its subnets, a set of log analytics for log collection, or other infrastructure components that must always be present).

In practice, applying a blueprint to a subscription means building a turnkey environment: the fundamental infrastructure is created and the governance rules (policies, access) are set without further manual intervention. This ensures consistency across different environments. Consider the typical Dev-Test- Prod scenario: with blueprints, you can ensure that all three environments have the same foundation (same network, same controls), perhaps differentiating the power or quantity of resources as appropriate, but knowing that nothing has been overlooked in Prod compared to Test in terms of controls.

Advantages: One of the major benefits of Azure Blueprints is that it embodies the concept of infrastructure as code for governance – sometimes referred to as governance “as code.” The blueprint is defined as code and can be saved in a repository, reviewed, versioned, and updated in a controlled manner. Each blueprint supports version control: if you initially create version 1.0 of a blueprint and assign it to ten subscriptions, you can later make improvements (for example, add a new policy or modify a resource parameter) and save the blueprint as version 1.1. Azure then lets you choose whether subscriptions that were previously on version 1.0 should be updated to 1.1: there is therefore a true lifecycle, similar to that of software, to keep environments synchronized with the latest approved definition. Another advantage offered by blueprints is the concept of locking on managed resources: resources deployed via blueprints can be marked in such a way as to prevent accidental modifications or deletions outside of the blueprint. For example, if the blueprint creates a Resource Group and its purpose is to remain there with certain policies, a user cannot freely delete that Resource Group if it is protected by a lock (unless they deliberately remove the lock with elevated permissions, of course). This helps prevent deviations from the intended configuration. Furthermore, blueprints provide centralized visibility: an administrator can see from the Blueprints interface which blueprints are published, which versions, and, most importantly, where they are assigned (which subscriptions have which blueprints active). This makes it easier to track applied governance. In short, Blueprints is ideal for repeatable environment provisioning scenarios, typical of organizations that want to offer their teams an Azure "starter kit" that already aligns with corporate standards.

Practical examples: A practical example could be a blueprint for the Production environment. We could define that when a new production subscription is created for a project:

·      the blueprint immediately creates two fundamental Resource Groups, one for the network (where to place the VNets, gateways, etc.) and one for the application workload (where the VMs, databases, and application storage will go);

·      applies key security policies to the scope of the subscription or individual RGs, such as a Deny policy that prohibits assigning public IPs to VMs or databases (thus forcing the use of the private network), and a Require Tag policy that imposes the Owner and Criticality tags on each resource;

·      distributes via template a standard Virtual Network with some predefined subnets and perhaps already a connection ( peering ) to the on-premises network or a monitoring service;

·      automatically assigns the Reader role to the Security department group on that subscription (so they have full visibility) and the Contributor role to the project team that will be using the environment, keeping any higher privileges (Owner) to the central administrator only.

All this happens in just a few minutes when you assign the blueprint to the new Production subscription. If the rules change over time—for example, you decide that a third Resource Group is now needed for a new component, or that an additional policy needs to be added—you simply update the blueprint and republish it as a new version. Existing environments marked as assigned to that blueprint can be updated to the new version with an incremental deployment process (for example, the missing new Resource Group will be created, the new policy will be applied, etc., without having to manually reconfigure everything from scratch).

Best practices for blueprints: To maximize effectiveness and maintainability, it is best to design blueprints Modular and specific. For example, instead of a single giant “All- Prod ” blueprint, you could have one for basic network configurations, one for basic security policies, one for logging /monitoring configuration, and so on. This way, if a project only needs a part, you assign only the necessary blueprints. Smaller blueprints also mean less chance of conflicts and easier testing of new versions. Consistent naming is also important: naming blueprints descriptively (e.g. “Blueprint-BaseNetwork-v1.0”) helps to immediately understand their content and purpose. Each blueprint can define parameters (for example, a unique name to give to a resource, or choosing whether to include a certain module): it is a good idea to document these parameters and provide sensible default values. Another best practice is to align blueprints with recognized security standards: many organizations map blueprint content to Azure Security Benchmark controls or other best practices, ensuring that every environment created using blueprints meets compliance requirements from the outset. Finally, be sure to update blueprints as needed: as Azure introduces new governance features (new alias policies, new services), it may make sense to periodically review blueprints to incorporate them and keep environments up to date with best practices.

 

3. Access Control (RBAC)

The security of a cloud environment depends not only on resource configurations, but also on who can do what on them. Azure's Role-Based Access Control (RBAC) mechanism addresses this very need, allowing granular permissions to be assigned to users and systems based on their assigned roles. It's an essential governance tool because it allows you to apply the principle of least restriction. privilege (least privilege) and maintain a separation of duties between teams.

Roles and scopes: Azure provides dozens of predefined roles to cover the most common use cases. Roles are essentially sets of permissions (actions allowed or denied) on specific types of resources. The three basic roles that everything starts with are:

·      Owner: Can do everything in that scope, including creating, modifying, and deleting resources, as well as managing permissions (i.e., assigning roles to others). This is generally the most powerful role and should be assigned sparingly.

·      Contributor: Can create, manage, and delete resources, but cannot manage other users' permissions (cannot assign roles). This is the typical role given to teams that need to be able to operate on resources but not alter the security structure.

·      Reader: Can only view resources and perform queries/reads, but cannot modify anything. Useful for those who need to monitor or perform audits without intervention.

In addition to these, Azure has many service-specific roles, such as Virtual Machine Contributor (similar to Contributor but limited to virtual machines and related resources), Storage Account Contributor, SQL DB Contributor, and even more specific roles like Storage Blob Data Reader (which only allows reading the contents of storage blobs, without access to other properties). Additionally, you can define custom roles if the built -in roles don't meet your specific needs: you can choose exactly what actions are allowed by building a custom role.

These roles are assigned to principals, which can be individual users, Azure AD groups (which represent sets of users, often used to facilitate collective permission management), or applications/service identities. The assignment always occurs within a specific scope: it can be the entire subscription, a single Resource Group, or even a single resource (such as a single database). Thanks to scope inheritance, if I assign a role at the subscription level, the recipient automatically has those permissions on all resource groups and resources within the subscription; conversely, a role assigned to a resource group is invalid outside of that group.

Application Identity Management: In addition to humans, applications or services often need to access Azure resources (think of a web application that needs to read data from a database, or a script that needs to start/stop virtual machines). In these cases, Azure recommends using Managed Identity Management. Identities. A Managed Identity is essentially a “virtual” user automatically managed by Azure (it has no password that the user needs to manage; Azure rotates and protects it internally) that can be connected to a service like a VM, App Service, or Function. Once a service has a Managed Identity, it can be assigned RBAC roles as if it were any other account: for example, giving an Azure Function the Reader role on a storage account so it can read data directly, avoiding the need to store access keys in code. For more general secrets (such as connection strings, certificates, API keys for external services), the best practice is to use Azure Key Vault: rather than storing these secrets in code or cleartext configurations, the application securely reads them from the Key Vault, and access to the Key Vault itself can be regulated via RBAC (for example, only the Managed Identity of application X has the Secret Reader role on the Key Vault, and therefore can fetch the necessary credentials).

Examples of RBAC assignments:

·      audit team with visibility into the cloud environment without risk of modification. To do this, create an Azure AD group containing the auditors' accounts and assign that group the Reader role on all subscriptions (perhaps by assigning it to the root Management Group, inherited through a cascade). This way, each auditor will be able to view configurations, logs, policies, etc., but will not be able to accidentally create, modify, or delete anything.

·      Application development teams typically need to work on their own resources but not on those of others. Therefore, the team working on Project A will receive the Contributor role on the Resource Group (or subscription) containing Project A's resources, allowing them to manage them (VMs, databases, etc.), while having no permissions on the Resource Groups of other projects. If another team (Project B) tries to access Project A's resources, they will not have sufficient rights. This isolation reduces the risk of interference and maintains boundaries between the various workloads.

·      central IT or cloud platform team typically maintains the highest permissions: some key users may have the Owner role on critical subscriptions, allowing them to perform any operation, including managing permissions (for example, assigning Contributors to various teams as seen above). Additionally, Azure offers the User Access Administrator role, which only manages permissions but does not grant other permissions. This role could be assigned to a dedicated account management team, allowing them to add/remove users from roles without being able to create or modify cloud resources (clearly separating those who manage access from those who manage resources). Organizations often define a process whereby new projects or teams are added to the cloud precisely through the granting of roles by these central administrators. In specific cases, custom roles could be created: for example, a role that only allows restarting or stopping virtual machines and nothing else, useful for assigning to a help desk team that needs to be able to intervene on servers without modifying their configuration.

It's important to note that every change in role assignments is tracked: in Azure Activity Log, we find specific events for the addition or removal of a role within a certain scope. This allows for auditing of security operations. For example, if a user suddenly gains the Owner role on a subscription without planning, a manager can detect it and take action (perhaps removing the assignment and verifying the incident with the security team). You can also set alerts for such critical events (we'll discuss this in the section on monitoring) so you're notified immediately.

Best practices for RBAC: Managing permissions can become complex if not done methodically. A guiding principle is to assign roles preferably to Azure AD groups rather than to individual users. This is because groups allow you to focus on functional roles (e.g., "developers of project X") rather than on individuals: when a new person joins the team, simply add them to the group and they automatically inherit all the group's permissions. If someone leaves the team, removing them from the group also removes all their access rights throughout Azure, without having to search for them individually. This greatly simplifies access lifecycle management.

Another best practice is to follow the principles of least privilege and separation of duties: avoid assigning unnecessary power to a single individual or group. For example, if a subscription-level Contributor role isn't strictly necessary (perhaps the team only needs to work on a specific Resource Group), it's best to limit it so that in the event of human error or an account compromise, the potential damage is limited to just a portion of the environment, not the entire environment.

For highly privileged roles (such as Owner or similar), Azure offers advanced features, particularly PIM ( Privileged Identity Management). PIM allows for just-in-time assignment of critical roles: a user who needs to perform an Owner action can temporarily "activate" that role for a few hours with prior approval, after which the role is automatically revoked. This means, for example, that even if John is theoretically a Global Admin, most of the time he doesn't have active powers until he explicitly requests them for a specific need. This dramatically reduces the window in which an attacker could exploit privileged accounts.

Finally, it's a good idea to periodically review RBAC assignments: Azure doesn't do this automatically, but as an internal practice, the IT department should review existing access (perhaps quarterly), verify whether those in certain roles still need it, and remove any excess. Over time, projects change, personnel rotate, and without periodic cleanup, you risk accumulating obsolete permissions that pose potential vulnerabilities.

 

4. Cost management and budget

A crucial aspect of cloud governance is ensuring costs are managed and optimized in line with budgets and business expectations. Azure provides an integrated tool called Cost Management (originally developed by the Cloudyn platform, now part of the Azure portal) that helps you monitor spending, define budgets, analyze cost items, and identify savings opportunities.

Cost analysis and monitoring: Through the portal, Cost Management offers dashboards and customizable views to examine aggregate costs according to various criteria: by service (how much is spent on VMs, databases, storage, etc.), by resource or resource group, by tag (for example, adding the costs of all resources tagged " Department: Marketing "), and by time period. Spending trends can be identified and, through extrapolations, forecasts can be made to determine whether a certain budget will be exceeded before the end of the period. A very useful tool is the creation of spending budgets: you define a maximum amount for a given entity (for example, a monthly budget of €5,000 for a development subscription, or an annual budget of €100,000 for a project), and link alert thresholds to that budget. Typically, alerts are set at 50%, 80%, and 100% of the budget, but the values are customizable. Azure then calculates cumulative spending on a daily basis and, as soon as it exceeds a threshold, generates an alert. These alerts can be sent as emails to budget owners or financial figures, so no one is caught off guard at the end of the month. For enterprise customers with credit or department-based contracts, there are credit alerts (to warn if the purchased credit is about to run out) and department quota alerts (if a department exceeds its quota). Azure also allows you to set anomaly alerts: for example, if the daily spend on a subscription is typically around €100 and suddenly one day it increases to €500, the system may consider this abnormal and send an alert even if the monthly budget hasn't been exceeded, as it could signal unexpected usage (perhaps someone accidentally activated expensive resources, or there's an ongoing attack generating costs).

Cost optimization and allocation: Once the data has been collected, the next step is optimization. Cost Management provides some recommendations (for example, it suggests purchasing reserved instances if it notices that certain VMs are constantly powered on, because the reserved instance would save money compared to the pay -as- you -go rate). Furthermore, a key element is understanding how to allocate costs internally within the company: thanks to tags, as already mentioned, it is possible to classify resources by project, department, customer, etc. Cost Management allows you to use these tags to create customized views: for example, generate a monthly report for each department that sums all the costs of resources tagged with Department: X. If there are shared costs (such as common network infrastructure or shared services), the company can define allocation rules to divide those costs across multiple cost centers. For example, if a Kubernetes cluster is used by 3 different business units, and is not easily separable, you can decide to allocate 30% of the cost to BU1, 50% to BU2 and 20% to BU3, and have the reports reflect this distribution (these rules, however, often need to be managed outside of Azure, by exporting the data and imputing it with your own logic, or by using the advanced Cost Management functions for the EA).

Another important tool is integration with external systems. Cost Management allows you to export raw cost data on a regular basis, for example, to a CSV file in a storage account, or directly into Power BI to build custom dashboards and cross-reference cost data with other company data. This is useful when you want to create more sophisticated reporting or consolidate Azure costs with those of other cloud or on-premises services.

Practical examples:

·      An IT team sets a monthly budget of €10,000 for a Production subscription. In the portal, they select 80% (€8,000) and 100% (€10,000) as the thresholds. They enter the email addresses of the IT manager and the financial controller as the alert recipients. Throughout the month, as Azure records usage, it calculates that the budget is about to be reached on the 20th of the month: an 80% alert is automatically sent. This allows the team to investigate the cause (perhaps an increase in traffic required more computing power) and decide whether to intervene (for example, by optimizing some resources) or whether the budget was underestimated. If 100% is reached, a second budget-depleted alert is triggered, clearly highlighting the anomaly compared to the initial plans.

·      A company that allocates costs across departments uses rigorous tagging. Each resource in Azure is tagged " Department" with the value of its department, and "Project" with the name of the internal project. At the end of the month, using Cost Management, the cloud economist generates a report that groups total spending by Department. For example, the Marketing department spent €3,200 in September, the R&D department €5,400, and so on, allowing them to charge these amounts to the respective company cost centers. Furthermore, the economist notes that a certain cross-departmental project, present in multiple departments but uniformly tagged as Project: Apollo, has a total cost of €7,000 (the sum of the resources tagged with that project across various departments). This information helps understand where cloud investments are focused and whether they match strategic priorities. Additionally, by examining the cost makeup, the company may discover things like “40% of that project’s spending is databases that are not used at night”—information that can lead to implementing automatic shutdown or scaling mechanisms to save money.

Best practices for cost control: The key to effective cloud financial management is visibility and accountability. To achieve visibility, as mentioned, consistent use of tags is essential: if only a few resources are tagged, reporting will be incomplete, and it will take a lot of manual work to understand who is spending what. Therefore, defining a set of financial tags (e.g., Department, Project, Environment, Owner ) and ensuring through policies that they are applied consistently is a first step. Another recommended practice is to leverage savings plans or reserved instances for resources with constant usage: for example, if I know I'll have apps and databases running 24/7 for the next few months or years, purchasing reserved capacity can reduce costs by 20–50%. Azure Cost Management often suggests these optimizations; it's worth considering and evaluating them with procurement. It's also important to set shutdown and scaling policies: the cloud allows for flexibility, so if an application isn't used at night or on weekends, autoscaling scripts or services should minimize the resources used during those periods (for example, shutting down test virtual machines at 7:00 PM and turning them back on at 8:00 AM the following morning).
From a technical standpoint, savings can also be made by optimizing log and metric management. Azure Monitor accumulates data, which also costs money: maintaining detailed logs for each service indefinitely could generate considerable expenses. Therefore, defining a retention policy (e.g., keeping 30 days of detailed logs online, then archiving older ones to less expensive storage, or deleting them if they're no longer needed) helps control monitoring costs.
Finally, establish a FinOps culture within the company: that is, ensuring that IT and business teams collaborate on cost management, with periodic reviews, joint report analysis, and shared budget responsibilities. The cloud makes it very easy to consume resources, but financial governance ensures that this happens sustainably and consciously.

 

5. Tags and organization

In the chaos that can arise from hundreds of cloud resources, tags are a simple yet powerful tool for bringing order. A tag in Azure is a key:value pair that can be assigned to almost any resource (with a few exceptions). Think of tags as colored labels we apply to folders and documents in an archive: with a few keywords, we can categorize objects in ways that transcend their physical location. Similarly, tags allow you to group resources that may reside in different resource groups or different subscriptions, but that share an important logical attribute.

Usefulness of tags for governance: Tags make it easier to find and filter resources. In the Azure portal or via scripts/APIs, I can ask "find all resources with tag Project = XYZ " and get a complete list of everything belonging to that project, even if it's scattered across multiple services. Even more importantly, Azure allows you to use tags as the basis for various policies and rules:

·      Azure Policies and Mandatory Tags: As discussed, we can implement policies that require specific tags to be present on certain resources. This ensures, for example, that no one creates resources without specifying their environment or project. The Modify effect even allows you to automatically add a missing tag.

·      Tag inheritance: Azure provides mechanisms (such as using the ApplyToChildren parameter in some policies) to propagate tags from one level up to the next. For example, if a certain tag is set on a Resource Group, all resources within it inherit that tag without having to manually assign it each time.

·      Cost management and tags: As we've just seen, tags are essential for assigning costs. Without tags, you'll only know the spending per subscription or service, but you won't be able to distinguish who used what. With tags, however, you get views by project, team, environment, etc.

·      Log queries and automation: You can write queries in Log Analytics (Azure Monitor) filtering by tag. For example, "show me all monitoring alerts related to resources tagged as Prod " to focus only on critical production events. Or, you can create cleanup scripts that delete orphaned resources with a certain tag (e.g., ToBeDeleted: True ).

Essentially, tags add custom metadata to assets, bridging the gap between technical organization (by asset and group) and logical business organization (by project, by owner, by importance, etc.).

Examples of tag usage:

·      Environment organization: If all production resources have Environment= Prod and test resources have Environment=Test, you can easily filter any view (in the portal, cost reports, queries) by environment. This is useful, for example, to see only production systems during a security audit, or to run a PowerShell command that performs a certain action (like rebooting machines) only on test systems.

·      Control tag actions: Azure even allows you to condition certain permissions on the existence of a specific tag. For example, I could create a custom role or advanced RBAC condition that says, "Allow user X to delete virtual machines only if those VMs have the tag Environment=Test." That way, even if that user sees production VMs, they won't be able to delete them because the tag doesn't match. This fine-grained control isn't widely used, but it demonstrates how tags can also contribute to operational security.

·      Expense allocation and chargebacks: As already mentioned, a practical use is to ensure each resource is tagged with Department and Project. This way, at the end of the quarter, IT can calculate exactly how much should be charged to the Marketing budget, how much to the Research budget, etc., based on the tags of the resources actually consumed. Without tags, manual estimates would be much less accurate.

·      Lifecycle management: Suppose you're running a hackathon or a temporary project called MigrationX, for which you create many cloud resources. If you tag all of them with Project= MigrationX, once the project is complete, it becomes very easy to identify them and decide what to do with them. For example, you could create a runbook that checks for resources with Project= MigrationX every month and, if the project status in the CMDB is closed, shuts them down or deletes them after notifying the owners. The tags provide the necessary context to make automatic or semi-automatic decisions about the life of the resources.

Best practices for tag management: To fully leverage the benefits of tags, some discipline is required. First, define a company tag catalog: a list of allowed tags (and their meanings) and, if possible, permitted values. For example, establish that the Environment tag will be used with standardized values (Dev, Test, Prod, UAT) (rather than allowing complete freedom, which leads to variations like "Production" spelled out, "PROD" in all caps, etc.). Or decide that the CostCenter tag must contain a 3-digit numeric code corresponding to internal cost centers. These conventions should be communicated to all teams operating on Azure.

In parallel, it's useful to implement compliance checks on the tags themselves: for example, you can use Azure Policy to verify the correctness of the tags (there's a feature to check that a tag assumes only certain permitted values, or to automatically add an Owner tag with the name of the person creating the resource, if none is specified). This prevents typos or inconsistent tag usage.

Another point is to prevent uncontrolled tag proliferation: Azure currently allows a maximum of 50 different tags on each resource, but using too many leads to confusion. It's better to have a few well-thought-out tags, and discourage the creation of superfluous or redundant tags. If a team wants to introduce a new tag, perhaps evaluate its general usefulness—perhaps an existing tag already covers the need, or it might be worth extending the official catalog.

Monitoring tag coverage is equally important: for example, create a dashboard that shows how many servers have the Owner tag filled in and how many don't, or which subscriptions have 100% of their resources tagged and which have many untagged. This type of metric helps identify where tagging practices aren't yet properly adopted, so that training or stricter policies can be implemented.

Finally, integrate tags into processes: if you enable automated procedures or tag-based alerts (as in the previous example, where an alert is triggered if a specific tag is present on a VM), encourage consistent use of those tags because certain automations won't work without them. For example, if teams know that only VMs with the AutoShutdown = True tag will be shut down at night, they'll be motivated to add that tag to test VMs to save costs; and if they know that if they don't set the Owner tag, problem notifications won't reach the right person, they'll pay attention. In short, tags work best when they become an integral part of the governance ecosystem, rather than simply an optional descriptive field.

 

6. Compliance and standards

Many organizations using Azure need to adhere to external (regulations, certifications) or internal (corporate policies, reference architectures) compliance standards. Cloud governance must also include these aspects, ensuring that the Azure environment supports and demonstrates such compliance. Azure offers numerous tools for this purpose, most notably integrated into the Microsoft Defender for Cloud service.

Azure-supported standards: Within Defender for Cloud, there's a Regulatory Compliance section where you can select and activate various security standards and frameworks. Microsoft provides both common international standards and cloud-specific benchmarks. For example, some of the available standards include:

·      ISO/IEC 27001 – the international standard for information security management systems;

·      PCI DSS – payment card data security requirements, mandatory for example if you handle credit card transactions;

·      SOC 2 – Security, Availability, Integrity, Confidentiality, and Privacy Criteria for Cloud Services, typically required in financial auditing;

·      CIS Azure Foundations Benchmark – a set of Azure-specific recommendations defined by the Center for Internet Security;

·      NIST SP 800-53 – US Government Security Guidelines, and so on.

In addition to these, Azure applies the Microsoft Cloud Security Benchmark (MCSB) by default, which is a compendium of cloud security best practices recommended by Microsoft itself, and which also serves as the basis for many of the other standards.

Automatic control assessment: Once you've selected the relevant standards and associated them with your Defender for Cloud subscriptions, Azure continuously scans your environment to verify the various required controls. Each standard is made up of dozens (sometimes hundreds) of security or configuration requirements. For each, Azure checks the status of the resources: if the control is met by all applicable resources, it's marked as passed ; if there are violations, it's marked as failed. For example, an ISO 27001 control might require all sensitive data to be encrypted at rest: Azure then checks whether encryption is enabled on all databases and storage accounts; if even one isn't, that control is considered non-compliant. These results are visible in the Regulatory Compliance dashboard, with an overall score for each standard (for example, "ISO 27001 Compliance: 75%" indicates that 75% of all controls for that standard pass, with the remainder having exceptions to address). For each failed check, Defender for Cloud provides a detailed recommendation on what to do: clicking on the item provides instructions and often automated scripts (Fix It ) to resolve the issue. For example, for "VMs without an active firewall endpoint," Azure might directly provide a button to enable the firewall on those VMs, or a link to documentation on how to configure it.

Azure Policies and Standards: Another important point is that many of these standards are also provided as predefined Azure Policy Initiatives. This means that a company can decide to assign these initiatives to its environment, enabling controls: not only will it know whether it's compliant or not, but the policies will act to prevent or correct deviations. For example, the PCI DSS initiative contains policies that deny configurations not permitted by the standard (such as virtual machines without antivirus, or storage accounts without logging ). By assigning this initiative, a company ensures that from then on, no one can create anything non-PCI compliant, because Azure will immediately prevent them via the policy. Obviously, this requires caution: unlike Defender for Cloud, which only detects and reports, policies can impact operations by blocking operations. Therefore, it's a good idea to test these initiatives in staging environments before applying them to production, or start with the Audit effect (reporting only) and then switch to Deny once you're certain.

Compliance Management Examples:

·      A healthcare company must meet stringent security and privacy standards. It therefore decides to adopt CIS Benchmark and HIPAA/HITRUST (specific standards for healthcare data). It activates these two in the compliance dashboard. After the first scan, it sees that its CIS score is only 60%: many checks are not met. For example, it identifies that "All VMs must have disk encryption enabled" is marked as failed because some test VMs were created without encryption. Based on the associated recommendation, it proceeds to enable encryption on those VMs. Another failed CIS check indicates that some subnets are missing a Network Security Group (firewall). Here too, the team follows the instructions and implements the missing NSGs. Gradually, it resolves the various gaps and sees its compliance score increase. Furthermore, to prevent regressions, it decides to assign the CIS Benchmark Azure Policy initiative to all subscriptions. This means that if anyone attempts to create a resource that doesn't meet CIS requirements in the future, they will be blocked or alerted immediately.

·      Another organization must obtain ISO 27001 certification annually. They know they will need to submit a compliance report to external auditors. Azure simplifies this task: after working to address Defender for Cloud's recommendations, the manager can generate a CSV/PDF report directly from the portal that lists all ISO 27001 controls and their status ( compliant /non- compliant ), including evidence of non-compliant resources. This document can be used as part of the certification supporting documentation. Additionally, the company uses Azure Workbooks to create a dashboard that shows month-by-month compliance progress for various standards, highlighting trends (for example, whether compliance is improving thanks to the interventions implemented or whether new issues are emerging).

Best practices for regulatory compliance and governance: the first step is to map corporate standards with those supported by Azure. Microsoft offers many, but if you need one that isn't available, you can always create custom policies to cover its requirements. It's also helpful to integrate Azure's technological advantage with broader tools: Microsoft Purview Compliance Manager, for example, allows you to track not only technical compliance (which Azure Defender handles) but also procedural and documentary compliance. Compliance Manager allows you to manage controls such as "is there a documented backup process" or "has staff received annual security training"—things that Azure alone doesn't know, but which complete the compliance picture. Centralizing findings from Azure and other sources in a single system of records helps provide a comprehensive overview for auditors and internal stakeholders.

Another best practice is to ensure that internal policies reflect external standards: for example, if regulations require encryption, ensure you always have an active Azure Policy requiring encryption on relevant resources; if a standard recommends periodic pen tests, define parameters in Azure Policy that flag resources that have not been scanned recently, and so on. In practice, use governance tools to codify regulatory requirements as much as possible.
Automation is important: when controls flag issues, it's best to have a clear understanding of who will address them and how. For example, if a critical compliance control fails (e.g., a storage gateway is open to the public internet when it shouldn't), you could immediately activate a runbook that shuts down that endpoint, or at least trigger a critical alert to the Security Operations Center. Don't wait for the next audit to fix it, but react in near real time.

Finally, compliance should be managed as an ongoing project: appoint responsible owners for each compliance area (e.g., one for networks, one for data, one for identities) so that it's clear who must follow the recommendations in those domains and who must make decisions about risk acceptance (acceptance of risk if a conscious decision is made not to implement a control for any reason). Effective governance requires collaboration between technical, legal, and compliance teams, and Azure provides the tools to objectively and monitor the state of technical compliance at all times.

 

7. Monitoring, auditing and alerts

We've seen how to set up rules and controls; another pillar of governance is monitoring the environment and being able to respond quickly to critical events. Azure provides continuous monitoring, logging, and alerting mechanisms that allow teams to stay on top of things and intervene before small issues become major impacts.

Activity Log and Audit Trail: Every administrative action or operation on Azure resources leaves a trail in the subscription's Activity Log. This log records events such as creating or deleting a VM, changing a network configuration, assigning an RBAC role, applying a policy, and so on. For each event, the timestamp, the person who performed it (user or identity), the outcome (success/failure), and some details are recorded. The Activity Log for the last 90 days can be viewed in the portal or via API and forms the basis for any audit: in the event of a security incident or malfunction, analyzing these logs helps understand the sequence of actions that led to the current situation. To retain audit logs beyond 90 days (perhaps for compliance purposes or historical analysis), you can configure forwarding to an Azure Monitor Log Analytics Workspace, where they can be retained for longer periods (even years) or exported for archiving. Through Azure Monitor, these logs can be analyzed using Kusto Query Language (KQL), a powerful tool for filtering and aggregating information. For example, you can query: "Show me all deletes in the last 6 months on subscription X" or "How many times has user Y published an Azure Resource Manager template this month?" This provides a deep understanding of activity in the environment.

Resource monitoring and metrics: In addition to administrative operations, Azure collects runtime metrics and logs for services (VM CPU, memory usage, requests to an app, database reads/writes, etc.). This data is part of Azure Monitor and can be viewed in real time and historically. For governance purposes, monitoring some of these metrics can be important: for example, keeping an eye on the deployment failure rate (if many VMs fail provisioning, there's a platform or configuration issue to investigate), tracking storage usage growth (to plan for expansion and costs), or monitoring the number of resources per type (to understand if the environment is scaling beyond expectations).

Alerts: Azure's alert system allows you to define rules—based on logs or metrics—that generate an active alert when certain conditions are met. Alerts are highly configurable: they can cover everything from infrastructure aspects (e.g., VM CPU, service queue overflow, etc.), to security aspects (e.g., threat detection by Defender for Cloud), to governance aspects (e.g., budget overruns, or detection of an untagged resource). Each alert rule can be associated with one or more Action Groups, which are sets of actions to be taken when the alert is triggered: typically, sending emails, but also SMS, webhooks, or integration with corporate incident management systems ( ServiceNow, PagerDuty, etc.).

Here are some examples of alerts useful for governance purposes:

·      Deployment failures: Set up an alert that triggers when an Azure Resource Manager deployment fails (perhaps because a policy has blocked creation, or a template error). This immediately notifies teams if new resources fail to be released, so they can correct the issue.

·      Critical policy violations: For example, if there's a policy that blocks the creation of resources without an Environment tag, we could create an alert that notifies administrators whenever that policy records a Deny event. This way, the user can be contacted and instructed on how to proceed correctly (or whether they were attempting something that highlights a new need).

·      Spending thresholds reached: As previously discussed, setting budget alerts is essential to avoid financial surprises. These alerts inform stakeholders that spending is exceeding budget expectations, allowing them to take action (e.g., blocking test environments, optimizing resources, etc.).

·      Security events: Azure Defender generates alerts when it detects anomalous behavior (e.g., a VM starting to scan network ports, a sign of compromise). It's best practice to direct these alerts to the Security Operations Center (SOC) or security management team. Similarly, a manual alert can be created, for example, to notify you if someone disables a database firewall or opens a highly sensitive port in an NSG—actions that, regardless of policy compliance, could indicate a risk.

Continuous auditing and governance integration: For effective control, it's ideal to build monitoring dashboards that provide a comprehensive view of governance status. For example, a dashboard showing the number of total and untagged resources, percentage of policy compliance, number of open critical alerts, monthly cost vs. budget, and similar indicators. Azure Monitor and Azure Dashboards allow you to aggregate widgets from various sources (including Defender for Cloud) to create these summary views. Additionally, Azure Workbooks offers compelling templates for cloud governance: for example, a workbook presents statistics on tagging and policies and highlights the top 10 errors/alerts. These tools help transform raw log data and metrics into actionable insights for managers.

Best practices for monitoring and alerts: Setting too many alerts can be counterproductive if not properly calibrated. It's best to start by setting alerts for truly important situations ( high signal -to- noise ratio ) and then refine them as needed. For example:

·      Choose sensible thresholds for metrics: a CPU alert > 80% on one VM might be fine, but on another VM 80% might be normal; so adjust the threshold and duration of the condition to avoid false positives.

·      Use suppression or advanced management rules: Azure, for example, allows you to avoid receiving 100 identical alerts if an event recurs many times in a short period of time by consolidating them. This must be configured appropriately to avoid being inundated with repetitive emails.

·      Regularly triage alerts: check which alerts are triggered most often and evaluate: are they all necessary? Do they have someone to address them? If a certain type of alert is consistently ignored, either its definition needs to be improved or it's not really useful.

·      Organize Action Groups carefully: for example, for security alerts, it's helpful to send emails to a security team distribution list and simultaneously open a ticket on an incident management system. For operational alerts (e.g., high CPU), an email to the DevOps team responsible for the affected service might suffice. Distinguishing channels prevents people from receiving irrelevant alerts or, conversely, preventing important alerts from going unnoticed because they reach too many generic recipients.

Logs (Activity Log, Log Analytics) also need to be protected: it's recommended to enable adequate retention (many standards require keeping audit logs for at least 6-12 months) and limit who can delete or modify logs. Azure, for example, allows certain data to be archived immutably ( immutable logs) to prevent tampering. Furthermore, ensure critical logs (such as security logs) are centralized: perhaps even sent to an external SIEM if the company has one, so as to cross-reference Azure events with on-premises ones.

In conclusion, well-designed monitoring and alerting serves as governance's nervous system: it immediately detects any anomalies (both technical and policy-related) and activates the organization's reflexes to respond. This is what allows for the transition from static governance ("we wrote the rules") to dynamic and proactive governance ("we see in real time whether the rules are being followed and take action if anything deviates").

 

8. Governance automation

A well-governed environment should ideally be self-governing as much as possible, automatically reacting to certain events or correcting non-standard situations without always requiring human intervention. In Azure, various services enable automation of administrative tasks and governance enforcement.

Automation tools in Azure:

·      Azure Automation Account: Provides an environment for creating Runbooks, which are scripts (in PowerShell, Python, or graphical declarative logic) that can perform virtually any operation on Azure resources (and even external systems, if desired). Runbooks can be run manually, scheduled at regular intervals, or triggered by webhooks / APIs. This service is often used for recurring maintenance, backup, cleanup, or system integration tasks.

·      Event Grid and Event Automation: Azure Event Grid allows you to intercept events from various Azure services (for example, "a virtual machine has been created" or "a new alert log is available") and trigger actions accordingly. By combining Event Grid with Azure Functions or Logic Apps, you can build serverless workflows that react to cloud events.

·      Native Azure Policy Automation ( Remediation ): As mentioned previously, Azure Policy itself can launch remediation deployments when it finds non-compliant resources, if this option is configured. For example, if a policy reports that some VMs are missing monitoring agents, a remediation action can be associated that automatically installs the agent on the affected VMs. This is a highly targeted type of automation that is integrated into the policy system.

·      Other services: Services like Azure Logic Apps (low-code workflow automation) can also be useful for governance scenarios, such as creating approval flows (requesting permission elevations, manual approvals, etc.), or for integrations with external databases or applications (sending notifications to Teams, writing granted access to a SharePoint list, etc.).

Governance automation examples:

·      Auto-tagging: If for some reason you don't want to do everything with Azure Policy, you can write a runbook that periodically scans all new resources created in the last day and assigns them missing tags based on certain rules (e.g., automatically tag Environment= Prod if they're in a production subscription, etc.). This script can then be run nightly to ensure tagging is always applied.

·      VM schedule management: Automating the startup and shutdown of virtual machines is a popular option. Using scheduled runbooks, you can save costs by shutting down test or development servers outside of office hours and restarting them in the morning. Microsoft also provides pre-packaged solutions (such as the Start/Stop VM solutions in the Automation Account) to easily configure these schedules.

·      Security remediation: Consider the previous point: a storage account deemed sensitive lacks a private endpoint. I could have a runbook that, when called with the name of that storage account, automatically creates a private endpoint associated with the corporate network. I could then connect this runbook to an alert: if a "Storage without private endpoint" alert is generated, the runbook launches and automatically resolves the issue within a few minutes, bringing the resource back into compliance. The administrator might only receive a notification that there was a problem, but it was automatically resolved.

·      Continuous baseline deployment: Another scenario is to keep certain configurations consistently applied. Imagine having a set of policies that, for some reason, tend to be removed or disabled due to human error. I could create an automated workflow that reapplies that policy initiative every week to all the scopes where it should be, ensuring that any removals are remediated (this mostly serves as a safety net against erroneous changes).

·      Reacting to budget alerts: As suggested above, suppose an alert signals that spending is going over budget. In addition to notifying individuals, we could implement automation that reduces testing cluster capacity or pauses non-essential services if the budget is threatened. Clearly, these actions must be carefully considered to avoid disruptions, but in non-critical environments, they can be useful solutions for keeping costs in check.

Best practices for automation: When it comes to writing code or configurations, automation should be approached with the same rigor you would with production software. Therefore:

·      Versioning and testing: Maintain scripts in a repository (GitHub, Azure DevOps ) for version control, code reviews if you have multiple teams, and track changes. Test runbooks in test environments before deploying them to production: a poorly written runbook could delete incorrect resources or cause disruptions, so they must be tested carefully. Azure Automation allows you to have multiple runbooks (draft vs. published) to facilitate this process.

·      Secure credentials: Runbooks often need to authenticate to Azure resources (if they run within Azure Automation in the cloud, they can use the Automation Account's identity). It's best to avoid inserting static, clear text credentials into the script; instead, as mentioned above, use a Managed Identity for the Automation Account and assign it the minimum necessary roles (e.g., if a runbook only needs to power on/off VMs, assign Contributor to the VMs but not to anything else). Or, if you absolutely must use password-based accounts, store them in an encrypted Credential Asset in the Automation Account or Key Vault and read them from there, so they never appear in plain text.

·      Execution logging: Ensure that every runbook execution leaves a trace. Azure Automation essentially records whether a job ran successfully or with errors, but it's helpful for the script to produce detailed log output (perhaps by writing the operations performed to a Log Analytics Workspace, or sending a report via email to a dedicated address). This helps with debugging if something goes wrong and generally maintains traceability: in the future, script logs can clarify whether a certain change to a resource was made by a human or by automation.

·      Coordination with policies and blueprints: Automation should not contradict or overlap inconsistently with other governance mechanisms. For example, if I have a policy that denies machines in a region, it wouldn't make sense to have a runbook that moves machines to that region. Or, if a blueprint defines certain resources, don't create a runbook that manually modifies those same resources in a divergent manner. Instead, automation should complement governance: it should do what isn't statically definable a priori. A good approach is to use automation to trigger events: let blueprints and policies set the framework, and intervene with scripts when there's a deviation or operational need (e.g., periodic cleaning, actions based on alert events, etc.).

Ultimately, automation in Azure governance allows you to scale control operations without having to linearly increase staffing: the more the environment grows, the more rules and automated checks work in the background to keep it healthy. This frees the IT team from many repetitive manual interventions, allowing them to focus on higher-value activities (such as further improving rules, analyzing trends, and optimizing costs and performance). Implementing automation requires an initial investment, but it pays off in long-term operational consistency and reliability.


Conclusions

In this chapter, we've explored the key concepts and tools related to governance in Azure: from hierarchical resource organization with Management Groups to defining and enforcing rules with Azure Policy and Blueprints ; from access management with RBAC to cost control with budgets and tags; from compliance with security standards to active monitoring with logs and alerts, to the automation of repetitive tasks. What emerges is that effective governance isn't a single product, but an integrated set of practices and technologies working together.

Azure provides the platform and tools to implement these in-depth controls, but the governance strategy must be designed with the organization's specific goals and needs in mind. For students and professionals approaching these topics, it's important to understand that each element has its role: Management Groups and subscriptions provide structure, policies define technical boundaries, RBAC roles regulate who can operate, tags tie resources to business contexts, compliance and monitoring ensure a constant overview of system status, and automation keeps everything running smoothly without constant manual effort.

Applying good governance in Azure means being able to innovate and use cloud services quickly and seamlessly, while never losing control over crucial aspects of security, quality, and cost. In other words, governance is what allows the cloud to be an asset rather than a risk for the business. With the foundational knowledge provided by this ebook, you're ready to delve deeper into each specific topic and move from theory to practice, configuring Azure environments that are not only functional but also well-governed from day one.

 

Chapter Summary

The document provides a detailed overview of the tools and practices for effectively governing Azure environments, covering organization, security, compliance, cost control, monitoring, and automation.

·      Management Groups for Hierarchical Organization: Management Groups allow you to structure multiple Azure subscriptions into a hierarchy that reflects your organization, facilitating the centralized application of RBAC policies and roles that automatically propagate to the underlying resources, improving consistency and control.

·      Azure Policies for automatic compliance: Azure Policies define configuration and compliance rules to apply to resources or actions, with effects such as Deny, Audit, Modify, and Append, allowing you to automatically and continuously maintain business and security standards.

·      Azure Blueprints for standardized environments: Blueprints combine policies, roles, templates, and Resource Group structures into reusable, versionable templates to deliver consistent and compliant Azure environments, facilitating rapid provisioning and environment lifecycle management.

·      RBAC for Access Control: Role -Based Access Control allows you to assign granular permissions to users, groups, and service identities across specific scopes, applying the principle of least privilege and facilitating separation of duties, with support for predefined and custom roles.

·      Cost management and budget: Azure Cost Management provides tools to track spending, define budgets with alert thresholds, analyze costs by tag or resource, and recommend optimizations such as reserved instances or automatic shutdown, supporting financial accountability.

·      Tags for Organization and Traceability: Tags are key-value labels applied to assets that facilitate cross-functional categorization, policy control, cost allocation, and operational automation, with best practices including standardized catalogs and compliance checks.

·      Compliance and regulatory standards: Azure Defender for Cloud and Azure Policy support continuous assessment of compliance with standards such as ISO 27001, PCI DSS, and CIS Benchmark, with reporting, recommendations, and the ability to automatically enforce policies, while also integrating broader compliance tools.

·      Monitoring, auditing, and alerting: Azure provides detailed activity logging, performance metrics, and configurable alert systems to detect anomalies, policy violations, or budget overruns, with integration with incident management systems and best practices to avoid notification overload.

·      Governance automation: Services like Azure Automation, Event Grid, and Azure Policy remediation capabilities automate tagging, asset management, non-compliance remediation, and alert responses, improving governance efficiency and consistency with version and security controls.

 

FINAL PROJECT – Creation of an e-commerce site

 

Checklist

1.    Create boxes (Management Groups and Resource Groups).

2.    From names and tags.

3.    Set security rules (Login ID, MFA).

4.    Create Key Vault for keys.

5.    Enable Defender for Cloud.

6.    Create the networks (hub and spoke) and connect everything.

7.    Create Storage for Images.

8.    Create SQL Database.

9.    Create App Service for the site.

10.     Create VM if needed.

11.     Enable Monitor and Alerts.

12.     Check the costs.

 

1. Let's prepare a box to put things in (Governance)

This section helps organize everything before creating the resources. This way, we don't get lost and everything will be organized and secure.

 

1.1 Go to the Azure portal

·      Open your browser.

·      Write: https://portal.azure.com.

·      Log in with your business account.

 

1.2 Create “Management Groups”

·      In the left menu, find Management Groups.

·      Click Create.

·      Write the name:

o  mg-root (root, the main group).

·      Then create two more groups:

o  mg- prod (for production).

o  mg- nonprod (for testing and development).

·      Confirm by clicking Create each time.

 

1.3 Move Subscriptions into Groups

·      Go to Management Groups.

·      Select mg- prod.

·      Click Add Subscription.

·      Choose the Subscription you will use for the e-commerce site.

·      Do the same for mg- nonprod (if you have test environments).

 

1.4 Apply the rules (Policy)

·      Search for Azure Policy in the portal.

·      Click Definitions Assign Policy.

·      Choose simple rules:

o  Allowed region (e.g. West Europe).

o  Mandatory tags (e.g. env, service, owner).

o  Block resources without Private Endpoint.

·      Apply these rules to the mg- prod group.

 

1.5 Decide on names and tags

·      Noun Rule (Simple and Clear):

o  Front-end Resource Group: rg-ecom-fe.

o  Data Resource Group: rg - ecom -data.

o  Network Resource Group: rg - ecom -net.

o  Security Resource Group: rg - ecom -sec.

·      Tags to ALWAYS put:

o  env = prod

o  service = e-commerce

o  owner=IT

o  costCenter =1234.

 

1.6 Control who can do what (RBAC)

·      Go to Microsoft Sign In ID.

·      Create groups:

o  AppOps (manages the site).

o  NetOps (manages the network).

o  SecOps (manages security).

·      Go to each Resource Group and assign permissions:

o  AppOps → Contributor on rg - ecom -fe.

o  NetOps → Network Contributor on rg - ecom -net.

o  SecOps → Security Reader on rg - ecom -sec.

·      Enable MFA (phone code) for everyone.

 

1.7 Place the Key Vault

·      Go to Key Vault Create.

·      Name: kv-ecom.

·      Put your passwords and keys (e.g. SQL connection) inside.

·      Block public access → use Private Endpoint.

 

Immagine che contiene testo, schermata, Carattere, software

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, Pagina Web

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, elettronica, schermata, software

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

 

2. We assign labels to objects to recognize them (Naming and Tags)

Labels help you quickly identify things and avoid confusion. If you give clear names and use the right tags, everything will be organized and easy to find.

 

2.1 Go to the Azure portal

·      Open your browser.

·      Write: https://portal.azure.com.

·      Log in with your account.

 

2.2 Decide on names before creating resources

·      Simple rule:

o  RG = Resource Group

o  FE = Front-End (the site )

o  DATA = Data (database and storage)

o  NET = Network

o  SEC = Security

Example names:

·      rg - ecom -fe → for the website.

·      rg - ecom -data → for databases and images.

·      rg - ecom -net → for the network.

·      rg - ecom -sec → for security and keys.

 

2.3 Add tags (digital labels)

Tags are like post-it notes that say what that resource is.

Tags to ALWAYS put:

·      env = prod → production environment.

·      service= ecommerce → e-commerce service.

·      owner=IT → who manages it.

·      costCenter =1234 → code for costs.

 

2.4 How to do it on the portal

·      Tags section in the creation screen.

·      Click Add Tag.

·      You write:

o  Name: env → Value: prod.

o  Name: service → Value: ecommerce.

o  Name: owner → Value: IT.

o  Name: costCenter → Value: 1234.

·      Make Save.

 

2.5 Set a rule to force tags

·      Go to Azure Policy.

·      Search Require tag.

·      Click Assign.

·      prod group.

·      So if someone forgets the tags, Azure won't create the resource.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

 

3. Who can enter? (Security and Users)

This section is used to decide who can touch what. This way, no one makes a mess and everything is safe.

 

3.1 Go to the Azure portal

·      Open your browser.

·      Write: https://portal.azure.com.

·      Log in with your account.

 

3.2 Open Microsoft Sign In ID

·      In the left menu, look for Microsoft Sign In ID (formerly Azure AD).

·      Click to enter.

 

3.3 Create groups of people

·      Go to Groups New Group.

·      Type: Security.

·      Group Name:

o  AppOps → who manages the site.

o  NetOps → who manages the network.

o  SecOps → who controls security.

·      Click Create for each group.

 

3.4 Put people in groups

·      AppOps group.

·      Click Members Add Members.

·      Choose the right people.

·      Do the same for NetOps and SecOps.

 

3.5 Grant the right permissions (RBAC)

·      Go to Resource Groups.

·      Open rg-ecom-fe (front-end).

·      Click Access Control (IAM).

·      Click Add Role.

·      Choose Contributor.

·      AppOps group.

·      Make Save.

·      Repeat:

o  rg - ecom -net → Network Contributor role for NetOps.

o  rg - ecom -sec → role Security Reader for SecOps.

 

3.6 Enable Extra Protection (MFA)

·      Go back to Microsoft Sign In ID.

·      Go to Security Multi-Factor Authentication.

·      Enable MFA for everyone (so you need the code on your phone in addition to your password).

 

3.7 Set access rules ( Conditional Access)

·      Go to Security Conditional Access.

·      Create a rule:

o  Name: Azure Secure Access.

o  App: Azure Management.

o  Condition: Only from corporate IPs or compliant devices.

·      Click Create.

 

Immagine che contiene testo, schermata, software, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

 

4. Let's build a safe to store the keys (Key Vault)

The Key Vault is like a digital safe where we store passwords, keys, and secrets. So no one sees them and they're safe.

 

4.1 Go to the Azure portal

·      Open your browser.

·      Write: https://portal.azure.com.

·      Log in with your account.

 

4.2 Search Key Vault

·      In the top menu, type Key Vault.

·      Click Create.

 

4.3 Choose where to put it

·      Subscription: choose the production one.

·      Resource Group: select rg - ecom -sec (the security one).

·      Name: write kv-ecom.

·      Region: choose the same as the rest (e.g. West Europe).

 

4.4 Set up security

·      Turn on Soft Delete and Purge Protection (so you don't accidentally delete).

·      Block public access:

o  Go to Networking.

o  Set Deny public network access.

·      Add Private Endpoint:

o  Click Add Private Endpoint.

o  Choose the security subnet (e.g. sec- subnet ).

o  He confirms.

 

4.5 Put the secrets inside

·      After the Key Vault is created, open it.

·      Go to Secrets Generate/Import.

·      Name: SQL-Connection.

·      Value: Paste the database connection string.

·      Make Create.

·      Repeat for other keys (e.g. Storage, API Key).

 

4.6 Give the right permissions

·      Go to Access policies (or RBAC if you chose that).

·      AppOps group with Get permission (to read secrets).

·      Make Save.

 

Immagine che contiene testo, schermata, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

 

 

5. Let's build a defense system (Defender for Cloud)

This part protects everything: the site, the database, the machines, and the data. Defender for Cloud is like a policeman checking to make sure everything is secure.

 

5.1 Go to the Azure portal

·      Open your browser.

·      Write: https://portal.azure.com.

·      Log in with your account.

 

5.2 Search Defender for Cloud

·      In the top menu, type Defender for Cloud.

·      Click to enter.

 

5.3 Activate protection

·      Click Settings Plans.

·      Active:

o  Defender for Servers (for VMs).

o  Defender for Databases (for SQL).

o  Defender for Storage (for Blobs and Files).

o  Defender for App Service (for the site).

·      He confirms.

 

5.4 Check your security score

·      Go to Secure Score.

·      Look at the number (the higher the better).

·      If it's low, click on recommendations.

 

5.5 Follow the advice

·      Examples of advice:

o  Enable MFA for everyone.

o  Block public access to databases.

o  Update VMs.

·      Click Fix where needed.

 

5.6 Set alerts

·      Go to Alert Settings.

·      Create rules for:

o  Strange accesses.

o  Suspicious files.

o  Unpatched VM.

·      Choose where to send the alerts (email or Teams).

 

5.7 Connect to SIEM (optional)

·      If you want to control everything in one place, connect to Microsoft Sentinel.

·      Go to Settings SIEM Connect.

 

Immagine che contiene testo, schermata, Pagina Web, software

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

 

6. We build roads that connect resources (Network)

The network is like the roads that connect homes (resources). If the roads are safe and well-maintained, everything runs smoothly.

 

6.1 Go to the Azure portal

·      Open your browser.

·      Write: https://portal.azure.com.

·      Log in with your account.

 

6.2 Create the main network (Hub)

·      Search Virtual Network.

·      Click Create.

·      Name: vnet -hub.

·      Address: 10.0.0.0/16 (it's like the neighborhood).

·      Add subnet:

o  AzureFirewallSubnet → for the firewall.

o  GatewaySubnet → for VPN.

o  BastionSubnet → to join VMs without a public IP.

·      Make Create.

 

6.3 Create secondary networks (Spoke)

·      Repeat the same thing for:

o  vnet -spoke-fe (for the site) → address 10.1.0.0/16.

§  Subnet: fe-app (for App Service), fe-pe (for Private Endpoints).

o  vnet -spoke-data (for data) → address 10.2.0.0/16.

§  Subnet: data-pe (for Private Endpoints), vm -data (for data VM).

·      Make Create.

 

6.4 Connect networks ( Peering )

·      Go to vnet -hub.

·      Click Peering Add.

·      Connect vnet -spoke-fe and vnet -spoke-data to the vnet -hub.

·      Check Use remote gateway on spokes (so they pass through the firewall).

 

6.5 Set the rules (NSG)

·      Go to Network Security Groups Create.

·      Name: nsg -fe-app.

·      Rules:

o  Block all incoming.

o  Allow egress to the Internet and Azure only.

·      Do the same for nsg -data-pe and nsg -vm - data:

o  Allow only internal and Bastion traffic.

·      Associate each NSG with its subnet.

 

6.6 Add Private Endpoints

·      Go to SQL Database Networking Private Endpoint.

·      Create an endpoint in the data-pe subnet.

·      Do the same for Storage and Key Vault.

·      So no one accesses from the Internet.

 

6.7 Set up the VPN (optional)

·      Go to VPN Gateway Create.

·      Connect the hub network to the corporate office.

·      If you want more speed, use ExpressRoute.

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, software, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

 

7. Let's build the warehouse for our items (Storage)

The warehouse is where we store images, files, queues, and tables. This way, the e-commerce site has everything it needs.

 

7.1 Go to the Azure portal

·      Open your browser.

·      Write: https://portal.azure.com.

·      Log in with your account.

 

7.2 Create storage account

·      Search Storage Account.

·      Click Create.

·      You choose:

o  Subscription: the production one.

o  Resource Group: rg - ecom - data.

o  Name: stgimg-ecom.

o  Region: same as other resources (e.g. West Europe).

·      Type: GPv2 (Generation 2).

·      Redundancy: GZRS (high security) or LRS (cheaper).

·      Make Create.

 

7.3 Block public access

·      After it's created, open the account.

·      Go to Networking.

·      Set Deny public network access.

·      Add Private Endpoint:

o  Click Add Private Endpoint.

o  Select the data-pe subnet.

o  He confirms.

 

7.4 Create the container for the images

·      Go to Container.

·      Click + Container.

·      Name: product-images.

·      Access: Private (so no one enters without permission).

·      Make Create.

 

7.5 Set rules for old files (Lifecycle)

·      Go to Lifecycle Management.

·      Click + Adjust.

·      Name: file-mover.

·      Rule:

o  After 30 days → move from Hot to Cool.

o  After 180 days → move to Archive.

·      Make Save.

 

7.6 Add more things (optional)

·      Azure Files:

o  Go to File Shares.

o  Click + File Share.

o  Name: fe- content.

o  It is used to share files between VMs and apps.

·      Queue Storage:

o  Go to Queues.

o  Click + Queue.

o  Name: img -jobs (for jobs like resizing images).

·      Table Storage:

o  Go to Tables.

o  Click + Table.

o  Name: metadata (for simple info).

 

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

 

8. We build the database for products, orders and customers (SQL)

The database is like a giant notebook where we write down all the data for the e-commerce site: products, orders, customers. It must be secure and fast.

 

8.1 Go to the Azure portal

·      Open your browser.

·      Write: https://portal.azure.com.

·      Log in with your account.

 

8.2 Search Azure SQL Database

·      In the top menu, type SQL Database.

·      Click Create.

 

8.3 Choose where to put it

·      Subscription: the production one.

·      Resource Group: rg - ecom - data.

·      Database name: sql-ecom.

·      Region: same as other resources (e.g. West Europe).

 

8.4 Create the SQL Server

·      On the creation screen, click Create new server.

·      Name: sqlsrv-ecom.

·      Choose a username (e.g. adminsql ).

·      Set a strong password (write it in Key Vault!).

·      He confirms.

 

8.5 Set the level

·      Choose Basic if you want to spend little (it's good for starting out).

·      If your site grows, you can upgrade to Standard or Premium.

 

8.6 Block public access

·      Go to Networking.

·      Set Deny public network access.

·      Add Private Endpoint:

o  Click Add Private Endpoint.

o  Select the data-pe subnet.

o  He confirms.

 

8.7 Enable security

·      Go to Security Settings.

·      Check that TDE (encryption) is enabled (it usually is already enabled).

·      Enable Auditing (to record who does what).

·      Enable Advanced Threat Protection (alerts you if something strange happens).

 

8.8 Save the connection string

·      Once the database is ready, go to Connections.

·      Copy the connection string.

·      Go to Key Vault.

·      Set the string as Secret (so App Service gets it safely).

 

Immagine che contiene testo, schermata, software, Icona del computer

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, software

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

 

9. Let's build the site: the e-commerce user interface (App Service)

The App Service is the "little house" where your site lives. We give it a name, upload the code, and securely connect it to databases and storage.

 

9.1 Enter the portal

·      Open your browser.

·      Go to https://portal.azure.com.

·      Log in.

 

9.2 Create the App Service (the site's homepage)

1.    At the top, look for App Service.

2.    Click Create.

3.    Fill in:

o  Subscription: the production one.

o  Resource Group: rg-ecom-fe.

o  App Name: app- ecom -web.

o  Operating system: Linux (it's fine and cheaper).

o  Region: same as other resources (e.g. West Europe).

o  Plan: Start with B1 (Basic). As the site grows, you can increase your level.

4.    Click Review & Create Create.

 

9.3 Put the site in “package” mode (easier to publish)

·      Open your app app- ecom -web.

·      Go to Settings Application Settings.

·      Click + New Setting.

·      Name: WEBSITE_RUN_FROM_PACKAGE
Value: 1

·      Save.

So you can upload the site as a ZIP file or get it from GitHub without any fuss.

 

9.4 Upload the site code

Option A – ZIP (very simple)

1.    Go to Deployment Center Local Git /GitHub/ZIP.

2.    Choose ZIP Upload → select the zip file of your site.

3.    Click Save.

Option B – GitHub (Automatic CI/CD)

1.    Go to Deployment Center.

2.    Choose GitHub.

3.    Select Repository and Branch.

4.    Confirm: Azure will publish every time you “ push ”.

 

9.5 Turn on site security

1.    Go to TLS/SSL settings → enable HTTPS Only.

2.    If you have a custom domain (e.g. shop.yourcompany.it):

o  Go to Custom domains Add → follow the steps (DNS CNAME/A).

o  Upload the certificate (or use App Service Managed Certificate if compatible).

 

9.6 Connect the site to the network (to talk privately with SQL/Storage)

1.    Go to Networking VNet Integration.

2.    Click Add.

3.    Choose the fe-app subnet inside vnet -spoke-fe.

4.    He confirms.

So the site can reach SQL, Storage and Key Vault only via private network.

 

9.7 Block unwanted access (Access Restrictions )

1.    Go to Networking Access restrictions.

2.    Add an Allow only from rule:

o  Front Door / CDN (if you use it),

o  Company IPs (if needed).

3.    Deny rule as “everything else”.

4.    Save.

 

9.8 Store passwords safely (Key Vault references )

1.    Go to Settings Application Settings.

2.    Create a new DB string setting:

o  Name: SQLCONNSTR_ECOM

o  Value: enter the reference to the Key Vault (the portal helps you: “Add Key Vault Reference”).

3.    Storage or API keys.

4.    Save.

This way, the app does not contain any clear text passwords.

 

9.9 Check that the site talks privately to SQL and Storage

·      Go to SQL Database Networking: Public access denied and Private Endpoint enabled (already done in Step 8).

·      Go to Storage Account Networking: Public access denied and Private Endpoint enabled (already done in Point 7).

·      Test the site: it should work without public access to your data.

 

9.10 Improve speed and protection (optional)

·      Front Door / CDN:

o  Create Azure Front Door for global cache and WAF.

o  Point your domain to the Front Door.

o  Access restriction rule to only accept traffic from Front Door.

·      Auto-scaling:

o  Upgrade your plan to Premium v3 if you need more instances and autoscale.

 

9.11 Set up “lights” to see if everything is okay (log)

1.    Go to Diagnostics / App Service logs.

2.    Enable Application Logging and Access Logging.

3.    Send to Log Analytics (the workspace created in Step 7/Monitor).

4.    Go back to Azure Monitor and create alerts for:

o  Errors 5xx,

o  High response time,

o  Crashes.

 

9.12 Test the site

·      Click Browse in your app.

·      Open the page: check images, login, cart, payments (if already configured).

·      If something goes wrong, check the logs and alerts.

 

Immagine che contiene testo, schermata, software, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, schermo, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

 

10. Let's add a virtual computer for our operations (VM)

The VM is like a fake computer in the cloud. We use it to perform special tasks (for example, processing images or using "old" programs that are still needed).

 

10.1 Enter the portal

·      Open your browser.

·      Go to https://portal.azure.com.

·      Log in.

 

10.2 Create the virtual machine

1.    Search Virtual Machines.

2.    Click Create Azure Virtual Machine.

3.    Fill in:

o  Subscription: production.

o  Resource Group: rg - ecom -data (or rg - ecom -fe if you need it close to the site).

o  Name: vm-imgproc-01.

o  Region: the same as the others (e.g. West Europe).

o  Image: Windows Server (if you need Windows) or Ubuntu (if you prefer Linux).

o  Size: Choose a small size to start (e.g., D2s_v5). If you need graphics/CAD, you'll want to choose one with a GPU in the future.

4.    Credentials:

o  Create a user and password (also put them in Key Vault ).

5.    Click Next.

 

10.3 Place the VM into the right network

1.    Net:

o  VNet: vnet -spoke-data.

o  Subnet: vm -data.

2.    Public IP: Nothing (enter “None”).

3.    Open ports: None (do not open RDP/SSH from the Internet).

4.    Click Next.

This way the VM is private and secure on your network.

 

10.4 Fast disks and diagnostics

1.    OS Disk: Select Premium SSD (faster).

2.    Boot Diagnostics: Enabled (so you see messages if there are problems).

3.    Diagnostic Storage Account: Use the Storage you created (Step 7).

4.    Click Next.

 

10.5 Extra Security (Defender & Updates)

1.    Defender for Cloud: Leave it enabled (it protects your VM).

2.    Automatic Patching: Enable Update Management (so it updates itself).

3.    Click Next.

 

10.6 Access Control (NSG)

1.    If you see Network Security Group (NSG):

o  Choose Use existing NSG and select nsg - vm -data or

o  Create rules that block everything from coming in.

2.    He confirms.

 

10.7 Create the VM

·      Click Review & Create Create.

·      Please wait for the deployment to finish.

 

10.8 Enter the VM safely (Bastion)

1.    Go to your VM Connect Bastion.

2.    If you don't have one, create Azure Bastion in the hub network ( BastionSubnet ).

3.    Click Connect:

o  For Windows: Open RDP in your browser.

o  For Linux: Opens SSH in your browser.

4.    Enter your username and password.

5.    Now you are inside the “fake computer” without using the Internet.

 

10.9 Install what you need

·      Inside the VM:

o  Install your program (e.g. image processor).

o  Connect your Azure Files folders (from Step 7) if you need shared files.

o  Configure the app to read/write to Blob Storage (with keys taken from the Key Vault ).

 

10.10 Put up alerts (if something happens)

1.    Return to the portal → Azure Monitor.

2.    Create alerts for the VM:

o  CPU > 80%.

o  Low disk space.

o  System errors.

3.    Send alerts via email or Teams.

 

10.11 Cost savings (very useful)

·      If the VM is always running, consider:

o  Reserved Instances or Savings Plans (cost less over time).

·      If you do jobs every now and then, you can:

o  Turn it off at night (with Automation or Runbook ).

o  Use Spot VM for non-critical jobs (they are cheap, but can stop).

 

10.12 High Availability (if you want more reliability)

·      If the work is important:

o  Place the VM in Availability Zones (more resilient).

o  Or use Scale Set (multiple identical VMs that turn on themselves when needed).

 

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, numero, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, software, Icona del computer

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

 

11. We keep everything under control (Monitor)

This part is used to monitor your site, database, VMs, and network. If anything goes wrong, Azure alerts you immediately.

 

11.1 Go to the Azure portal

·      Open your browser.

·      Go to https://portal.azure.com.

·      Log in.

 

11.2 Search Azure Monitor

·      In the top menu, type Monitor.

·      Click to enter.

 

11.3 Create the logbook (Log Analytics Workspace)

·      Go to Log Analytics Workspace Create.

·      Name: law-ecom.

·      Resource Group: rg - ecom -sec.

·      Region: the same as the others (e.g. West Europe).

·      Click Create.

 

11.4 Connect the resources to the notebook

·      Go to each resource (App Service, VM, Storage, SQL).

·      Look for Diagnostics or Diagnostic settings.

·      Click Add Setting.

·      Choose Send to Log Analytics.

·      Select the law-ecom workspace.

·      Save.

So all the data ends up in the same place.

 

11.5 Set the warning lights (Alert)

·      Go to Monitor Alerts Create Alert Rule.

·      Select the resource (e.g. App Service).

·      Condition:

o  CPU > 80%.

o  5xx errors.

o  Response time > 2 seconds.

·      Action:

o  Email the team.

o  Message on Teams (if configured).

·      Make Create.

·      Repeat for VM (CPU, disk), SQL (latency, errors), Storage (space).

 

11.6 Create the dashboard ( Workbook )

·      Go to Monitor Workbook New.

·      Add charts:

o  CPU App Service.

o  HTTP Errors.

o  Slow SQL queries.

o  Storage Space.

·      Save the workbook as Ecommerce -Dashboard.

 

11.7 Set automatic rules (optional)

·      Go to Automation or Logic Apps.

·      Create a flow:

o  If CPU > 90% → send message on Teams.

o  If VM is idle → shut it down to save power.

 

Immagine che contiene testo, schermata, software, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, software

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

 

12. We keep costs under control (Cost Management)

This section helps you keep track of your Azure spending. This way, you avoid surprises and save money.

 

12.1 Go to the Azure portal

·      Open your browser.

·      Go to https://portal.azure.com.

·      Log in.

 

12.2 Search Cost Management + Billing

·      In the top menu, type Cost Management + Billing.

·      Click to enter.

 

12.3 Create a budget

1.    Go to Cost Management Budget.

2.    Click + Create budget.

3.    Name: Budget- Ecommerce.

4.    Amount: write how much you want to spend per month (e.g. €500 ).

5.    Period: Monthly.

6.    Click Next.

 

12.4 Put the warnings

·      Choose when to receive alerts:

o  80% → warns you that you are almost finished.

o  100% → warns you that you have run out of budget.

·      Choose where to send the notice:

o  Email to your team.

o  Teams (if configured).

·      Click Create.

 

12.5 Look at the graphs

·      Go to Cost Analysis.

·      You see:

o  How much do you spend on App Service ?

o  How much for SQL Database.

o  How much for Storage.

o  How much for VM.

·      You can filter by Resource Group or Tag (e.g. env = prod ).

 

12.6 Find tips for saving money

·      Go to Advisor (you can find it in the portal).

·      Read the tips:

o  Shut down VMs when not needed.

o  Use Reserved Instances for VMs that remain powered on at all times.

o  Use Savings Plans to save on App Services and SQL.

o  Use Spot VM for non-critical work (they cost very little).

 

12.7 Check every month

·      Go to Reports.

·      Download the PDF or connect to Power BI to see the data.

·      Check if the budget is respected.

 

Immagine che contiene testo, schermata, software, Carattere

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

 

CONCLUSIONS

 

1. What you learn and what positions you can fill at work

Understood the fundamentals of governance in Azure

He has gained a clear understanding of what it means to govern a cloud environment, understanding the importance of tools, processes, and controls to ensure security, compliance, and efficient resource management.

Knows how to structure an Azure environment with Management Groups

Can design and implement a Management Groups hierarchy to organize subscriptions consistently with the corporate structure, facilitating the centralized application of policies and roles.

Understand how to use Azure Policy to control configurations

He learned to create, assign, and monitor policies to ensure resources meet company standards, with effects such as deny, audit, modify, and append.

It is capable of creating standardized environments with Azure Blueprints

Understands how to combine policies, roles, resource groups, and templates to deliver consistent and compliant environments, useful for DevOps and repeatable environments.

Manage permissions with the RBAC model

Understand how to assign predefined or custom roles to users, groups, or service identities, applying the principle of least privilege and ensuring access security.

Monitor and optimize costs with Cost Management

It can define budgets, configure spending alerts, analyze costs by tag, service, or project, and propose FinOps strategies for resource optimization.

Use tags to organize and track resources

He learned to design a catalog of enterprise tags, apply them systematically, and use them for governance, cost allocation, automation, and reporting.

Manages compliance with safety standards

Knows how to activate benchmarks such as ISO 27001, CIS or PCI DSS, monitor compliance with Defender for Cloud and implement automated remediation.

Implement monitoring and alerts for proactive governance

It can configure logs, metrics, alerts, and dashboards to detect anomalies, policy violations, or critical events, improving responsiveness and operational transparency.

Automate governance tasks with runbooks and policies

He has gained expertise in using Azure Automation, Event Grid, and remediation policies to automate repetitive tasks, improve consistency, and reduce human error.

How to present yourself in the world of work:

With these skills, a person can apply for roles such as Cloud Administrator, Cloud Governance Specialist, Azure Consultant or DevOps Engineer. They can enhance their profile by highlighting their ability to design secure, compliant, and optimized Azure environments, implement policies and blueprints, manage access and costs, and automate governance processes. Furthermore, they can position themselves as a key figure in supporting companies in their controlled and sustainable transition to the cloud.

 

2. LinkedIn Profile – Cloud Governance Specialist on Microsoft Azure

I'm a passionate cloud technology professional with a solid background in Microsoft Azure environment governance. After extensive study, I've acquired practical and theoretical skills that enable me to design, implement, and manage secure, compliant, and optimized cloud environments.

🔹Key skills:

·      Designing Hierarchical Structures in Azure Using Management Groups and Subscriptions

·      Creating and assigning Azure policies to control configurations

·      Deploying standardized environments with Azure Blueprints

·      Access Management with Role-Based Access Control (RBAC) and Managed Identities

·      Cost monitoring and optimization with Microsoft Cost Management and FinOps strategies

·      Advanced use of tags for organization, automation and cost allocation

·      Implement compliance standards (ISO 27001, CIS, PCI DSS) with Defender for Cloud

·      Configure alerts and dashboards for continuous monitoring and event response

·      Automate governance tasks with Azure Automation, Runbooks, and Policy Remediation

·      Proactive approach to security, compliance and operational efficiency

Professional goal:

Contribute to the digital transformation of companies by supporting them in managing the cloud in a secure, scalable, and compliant manner. I am seeking opportunities as a Cloud Administrator, Azure Consultant, or Governance Specialist, where I can apply my skills and continue to grow in a dynamic and innovative environment.

Contact me for collaborations, professional opportunities, or projects related to Azure governance.

 

3. CV based on these skills

 

Mario Rossi
Florence, Italy
mario.rossi@email.com
+39 333 1234567linkedin.com/in/ namesurname

PROFESSIONAL PROFILE:
IT professional with a strong background in Microsoft Azure governance. Specialized in designing and managing secure, compliant, and optimized cloud infrastructures. Broad expertise in policy, access control, cost management, automation, and standards compliance. Motivated to contribute to the digital transformation of companies through scalable and well-governed cloud solutions.

TECHNICAL SKILLS

  • Governance in Microsoft Azure: Management Groups, Subscriptions, Azure Policy, Blueprints
  • Security and Access: Role-Based Access Control (RBAC), Managed Identities, PIM
  • FinOps and Cost Management: Budgeting, alerts, cost analysis, resource optimization
  • Tagging and Organization: Tag catalogs, tagging policies, cost allocation
  • Compliance: Microsoft Defender for Cloud, ISO 27001, CIS Benchmark, PCI DSS
  • Monitoring and Audit: Azure Monitor, Activity Log, Log Analytics, alerts and dashboards
  • Automation: Azure Automation, Runbook, Event Grid, Policy Remediation
  • Infrastructure as Code: ARM/ Bicep Templates, standardized environment distribution
  • Tools: Azure Portal, PowerShell, Azure CLI, Power BI, GitHub

TRAINING

Advanced Course – “Governance in Microsoft Azure”
In-depth study of:

  • Hierarchical structuring with Management Groups
  • Creating and Assigning Azure Policies
  • Implementing Blueprints for Dev/ Prod Environments
  • Permission Management with RBAC
  • Monitoring and governance automation

Other studies
[Insert any academic qualifications, university courses, or IT certifications]

PROFESSIONAL EXPERIENCE
[If you don't yet have work experience in the sector, you can include personal projects, internships, or training activities. Example:]

Personal Project – Simulation of a Governed Azure Environment

  • Designing a Management Group Hierarchy for a Fictional Company
  • Implementation of policies for security, tagging and cost control
  • Creating blueprints for Dev and Prod environments
  • Configuring budget and compliance alerts
  • Automate recurring tasks with runbooks and remediation


PROFESSIONAL OBJECTIVE: Join an IT or cloud team to help design and manage well-governed Azure environments. Particular interest in roles such as:

  • Cloud Administrator
  • Azure Governance Specialist
  • DevOps Engineer
  • IT Compliance Analyst

LANGUAGES

  • Italian: native speaker
  • English: good (B2)

MORE INFORMATION

  • Availability to travel and work remotely
  • Interest in continuing education and Microsoft certifications (e.g., AZ-900, AZ-104, AZ-500)

 

4. Cover letter

 

New York, [Date]

Subject: Application for a position in the Cloud / Azure Governance field

Dear [Name of HR Manager or Company],

My name is Oliver Johnson and I would like to submit my application for an IT position, with particular interest in roles related to the management and governance of cloud environments on Microsoft Azure.

In my recent training, I have gained a structured and practical understanding of the key Azure governance tools and concepts. I have developed skills in designing scalable and secure cloud environments, using Management Groups, Azure Policy, Blueprints, and RBAC to ensure compliance with corporate standards for security, compliance, and cost optimization. I have also developed familiarity with tools such as Cost Management, Defender for Cloud, Azure Monitor, and Azure Automation, which allow me to actively contribute to the efficient and proactive management of complex cloud environments.

I'm a precise, curious person, and driven by continuous improvement. I strongly believe in the importance of governance as a strategic lever for ensuring sustainable innovation in the cloud, and I'm motivated to apply my skills in a dynamic and stimulating environment.

I would be happy to discuss my application in more detail in an interview, during which I can explain my background and the value I could bring to your team.

Thanking you for your attention, I send you my warmest regards.

Oliver Johnson
oliver.johnson @xxx.com
+39 333 1234567
linkedin.com/in/namesurname