Skip to content

Auto Scaling

CloudMock emulates Amazon EC2 Auto Scaling, supporting launch configurations, auto scaling groups with capacity management, scaling policies, and instance lifecycle operations.

OperationStatusNotes
CreateLaunchConfigurationSupportedCreates a launch configuration
DescribeLaunchConfigurationsSupportedLists launch configurations
DeleteLaunchConfigurationSupportedDeletes a launch configuration
CreateAutoScalingGroupSupportedCreates an auto scaling group
DescribeAutoScalingGroupsSupportedLists auto scaling groups
UpdateAutoScalingGroupSupportedUpdates group configuration
DeleteAutoScalingGroupSupportedDeletes an auto scaling group
SetDesiredCapacitySupportedSets the desired instance count
DescribeAutoScalingInstancesSupportedLists instances in ASGs
AttachInstancesSupportedAttaches instances to an ASG
DetachInstancesSupportedDetaches instances from an ASG
PutScalingPolicySupportedCreates or updates a scaling policy
DescribePoliciesSupportedLists scaling policies
DeletePolicySupportedDeletes a scaling policy
CreateOrUpdateTagsSupportedCreates or updates ASG tags
DescribeTagsSupportedLists ASG tags
DeleteTagsSupportedDeletes ASG tags
import { AutoScalingClient, CreateAutoScalingGroupCommand } from '@aws-sdk/client-auto-scaling';
const client = new AutoScalingClient({
endpoint: 'http://localhost:4566',
region: 'us-east-1',
credentials: { accessKeyId: 'test', secretAccessKey: 'test' },
});
await client.send(new CreateAutoScalingGroupCommand({
AutoScalingGroupName: 'my-asg',
LaunchConfigurationName: 'my-lc',
MinSize: 1,
MaxSize: 5,
DesiredCapacity: 2,
AvailabilityZones: ['us-east-1a'],
}));
import boto3
client = boto3.client('autoscaling',
endpoint_url='http://localhost:4566',
region_name='us-east-1',
aws_access_key_id='test',
aws_secret_access_key='test')
client.create_auto_scaling_group(
AutoScalingGroupName='my-asg',
LaunchConfigurationName='my-lc',
MinSize=1,
MaxSize=5,
DesiredCapacity=2,
AvailabilityZones=['us-east-1a'])
cloudmock.yml
services:
autoscaling:
enabled: true
  • Scaling policies are stored but automatic scaling based on metrics is not performed
  • Instance reconciliation is simulated but does not launch real EC2 instances
  • Health checks are simplified