Skip to content

Application Auto Scaling

CloudMock emulates AWS Application Auto Scaling, supporting scalable target registration, TargetTracking and StepScaling policies, scheduled actions, and resource tagging across multiple service namespaces (ECS, DynamoDB, RDS, Lambda, SageMaker, and more).

OperationStatusNotes
RegisterScalableTargetSupportedRegister or update; idempotent
DescribeScalableTargetsSupportedFilter by namespace, resource IDs, dimension
DeregisterScalableTargetSupportedRemoves target
PutScalingPolicySupportedTargetTrackingScaling and StepScaling types
DescribeScalingPoliciesSupportedFilter by namespace, resource, dimension
DeleteScalingPolicySupported
PutScheduledActionSupportedUpsert; start/end times supported
DescribeScheduledActionsSupportedFilter by namespace and resource
DeleteScheduledActionSupported
TagResourceSupportedTags policies and scheduled actions by ARN
UntagResourceSupported
ListTagsForResourceSupported

ecs, dynamodb, ec2, rds, sagemaker, custom-resource, comprehend, lambda, cassandra, kafka, elasticache, neptune

import {
ApplicationAutoScalingClient,
RegisterScalableTargetCommand,
PutScalingPolicyCommand,
PutScheduledActionCommand,
} from '@aws-sdk/client-application-auto-scaling';
const client = new ApplicationAutoScalingClient({
endpoint: 'http://localhost:4566',
region: 'us-east-1',
credentials: { accessKeyId: 'test', secretAccessKey: 'test' },
});
await client.send(new RegisterScalableTargetCommand({
ServiceNamespace: 'ecs',
ResourceId: 'service/my-cluster/my-service',
ScalableDimension: 'ecs:service:DesiredCount',
MinCapacity: 1,
MaxCapacity: 10,
}));
await client.send(new PutScalingPolicyCommand({
PolicyName: 'cpu-tracking',
ServiceNamespace: 'ecs',
ResourceId: 'service/my-cluster/my-service',
ScalableDimension: 'ecs:service:DesiredCount',
PolicyType: 'TargetTrackingScaling',
TargetTrackingScalingPolicyConfiguration: { TargetValue: 70.0 },
}));
import boto3
client = boto3.client('application-autoscaling',
endpoint_url='http://localhost:4566',
region_name='us-east-1',
aws_access_key_id='test',
aws_secret_access_key='test')
client.register_scalable_target(
ServiceNamespace='dynamodb',
ResourceId='table/my-table',
ScalableDimension='dynamodb:table:ReadCapacityUnits',
MinCapacity=5,
MaxCapacity=1000)
client.put_scaling_policy(
PolicyName='read-capacity-tracking',
ServiceNamespace='dynamodb',
ResourceId='table/my-table',
ScalableDimension='dynamodb:table:ReadCapacityUnits',
PolicyType='TargetTrackingScaling',
TargetTrackingScalingPolicyConfiguration={'TargetValue': 70.0})
cloudmock.yml
services:
applicationautoscaling:
enabled: true
  • Scaling policies are stored but do not trigger actual scaling actions automatically
  • Scheduled actions are stored but do not execute on their cron schedule
  • No integration with CloudWatch metrics for target tracking