ScalingConfig - Amazon Serverless Application Model
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

ScalingConfig

Configures how the capacity provider scales EC2 instances based on demand, including maximum instance limits and scaling policies.

Syntax

To declare this entity in your Amazon Serverless Application Model (Amazon SAM) template, use the following syntax.

YAML

MaxVCpuCount: Integer AverageCPUUtilization: Double

Properties

MaxVCpuCount

The maximum number of vCPUs that the capacity provider can provision across all compute instances.

Type: Integer

Required: No

Amazon CloudFormation compatibility: This property is passed directly to the MaxVCpuCount property of an AWS::Lambda::CapacityProvider resource.

AverageCPUUtilization

The target average CPU utilization percentage (0-100) for scaling decisions. When the average CPU utilization exceeds this threshold, the capacity provider will scale up Amazon EC2 instances.

Type: Double

Required: No

Amazon CloudFormation compatibility: This property is passed directly to the ScalingPolicies property of an AWS::Lambda::CapacityProvider resource.

Examples

Scaling configuration

The following example shows a scaling configuration with maximum VCpu count and average CPU utilization.

ScalingConfig: MaxVCpuCount: 10 AverageCPUUtilization: 70.0