AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

ScalableTarget

Define a scalable target.

Import

import { ScalableTarget } from 'aws-cdk-lib/aws-applicationautoscaling';

Or use the module namespace:

import * as applicationautoscaling from 'aws-cdk-lib/aws-applicationautoscaling';
// applicationautoscaling.ScalableTarget

Properties

Configuration passed to the constructor as ScalableTargetProps.

maxCapacityRequired
number

The maximum value that Application Auto Scaling can use to scale a target during a scaling activity.

minCapacityRequired
number

The minimum value that Application Auto Scaling can use to scale a target during a scaling activity.

resourceIdRequired
string

The resource identifier to associate with this scalable target. This string consists of the resource type and unique identifier. Example value: `service/ecsStack-MyECSCluster-AB12CDE3F4GH/ecsStack-MyECSService-AB12CDE3F4GH`

scalableDimensionRequired
string

The scalable dimension that's associated with the scalable target. Specify the service namespace, resource type, and scaling property. Example value: `ecs:service:DesiredCount`

serviceNamespaceRequired
ServiceNamespace

The namespace of the AWS service that provides the resource or custom-resource for a resource provided by your own application or service. For valid AWS service namespace values, see the RegisterScalableTarget action in the Application Auto Scaling API Reference.

roleOptional
IRole

Role that allows Application Auto Scaling to modify your scalable target.

Default: A role is automatically created

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter