DEV Community

Cover image for Auto Scaling Role & Azure Virtual Machine Scale Sets (VMSS)
daniel shaibu
daniel shaibu

Posted on

Auto Scaling Role & Azure Virtual Machine Scale Sets (VMSS)

Both AWS and Azure need a way for their scaling services to perform actions on your behalf—like creating, deleting, or managing virtual machines.
They just implement it differently.

AWS: Auto Scaling Service‑Linked Role
In AWS, Auto Scaling uses a service‑linked IAM role.
This role allows Auto Scaling to:

Launch and terminate EC2 instances
Attach/detach load balancers
Read CloudWatch alarms
Update scaling groups

It’s an IAM role automatically created and only Auto Scaling can assume it.

Think of it as:
“Auto Scaling’s permission slip to manage EC2 resources.”

Azure: VM Scale Sets (VMSS) + Managed Identity
Azure doesn’t use IAM roles the same way.
Instead, VM Scale Sets use a Managed Identity (system‑assigned or user‑assigned).

This identity allows VMSS to:
Access Azure APIs
Pull secrets from Key Vault
Interact with storage accounts
Register with load balancers
Perform scaling operations.
It’s the Azure equivalent of giving VMSS a secure identity to act on your behalf.

How to Create a VM Scale Sets (VMSS)
A VM Scale Set lets you deploy and manage a group of identical virtual machines that automatically scale based on demand.
1. Create a Resource Group
A resource group is the logical container for your VMSS.

  • In Azure search for resources group and select resource group

  • click on create and fill the name, location and select region the click on review & create and then create.

2. Create the VM Scale Set
az vmss create \
--resource-group vmssResourceGroup \
--name myScaleSet \
--image windows\
--upgrade-policy-mode manual\
--admin-username azureuser \
--generate-ssh-keys


Note: This command creates:
A VM Scale Set
A load balancer
A default number of VM instances
SSH access

  1. Scale In or Out Manually
  • Go to setting in the overview and select availability + scaling and select scale

**Steps to Create an Auto Scaling Group (AWS)

**

  1. Create a launch template This defines how each EC2 instance should look (AMI, instance type, key pair, security group, etc.).

Go to: EC2 Console → Launch Templates → Create launch template

Name: e.g. web-server-template

Source template: None (for first time)

AMI: Choose your OS (e.g. Amazon Linux 2)

Instance type: e.g. t3.micro

Key pair: Select or create one

Network settings: Security group allowing HTTP (80) + SSH (22) if needed

User data (optional): Add bootstrap script (e.g. install nginx)

Click Create launch template

This template will be referenced by the Auto Scaling Group.

  • Open the AWS and search for Auto scaling group and select

  • Select Get started

Top comments (0)