@aws-cdk_aws-gamelift-alpha.AutoScalingPolicy

interface AutoScalingPolicy ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.GameLift.Alpha.AutoScalingPolicy
Gogithub.com/aws/aws-cdk-go/awscdkgameliftalpha/v2#AutoScalingPolicy
Javasoftware.amazon.awscdk.services.gamelift.alpha.AutoScalingPolicy
Pythonaws_cdk.aws_gamelift_alpha.AutoScalingPolicy
TypeScript (source)@aws-cdk/aws-gamelift-alpha ยป AutoScalingPolicy

Configuration settings for intelligent automatic scaling that uses target tracking.

After the Auto Scaling group is created, all updates to Auto Scaling policies, including changing this policy and adding or removing other policies, is done directly on the Auto Scaling group.

Example

declare const launchTemplate: ec2.ILaunchTemplate;
declare const vpc: ec2.IVpc;

new gamelift.GameServerGroup(this, 'Game server group', {
  gameServerGroupName: 'sample-gameservergroup-name',
  instanceDefinitions: [{
    instanceType: ec2.InstanceType.of(ec2.InstanceClass.C5, ec2.InstanceSize.LARGE),
  },
  {
    instanceType: ec2.InstanceType.of(ec2.InstanceClass.C4, ec2.InstanceSize.LARGE),
  }],
  launchTemplate: launchTemplate,
  vpc: vpc,
  autoScalingPolicy: {
    estimatedInstanceWarmup: Duration.minutes(5),
    targetTrackingConfiguration: 5
  }
});

Properties

NameTypeDescription
targetTrackingConfiguration๐Ÿ”นnumberSettings for a target-based scaling policy applied to Auto Scaling group.
estimatedInstanceWarmup?๐Ÿ”นDurationLength of time, it takes for a new instance to start new game server processes and register with GameLift FleetIQ.

targetTrackingConfiguration๐Ÿ”น

Type: number

Settings for a target-based scaling policy applied to Auto Scaling group.

These settings are used to create a target-based policy that tracks the GameLift FleetIQ metric PercentUtilizedGameServers and specifies a target value for the metric.

As player usage changes, the policy triggers to adjust the game server group capacity so that the metric returns to the target value.


estimatedInstanceWarmup?๐Ÿ”น

Type: Duration (optional, default: no instance warmup duration settled)

Length of time, it takes for a new instance to start new game server processes and register with GameLift FleetIQ.

Specifying a warm-up time can be useful, particularly with game servers that take a long time to start up, because it avoids prematurely starting new instances.