ScalingConfig
Specifies how the capacity provider scales Amazon Elastic Compute Cloud (Amazon EC2) instances based on demand. You set the maximum number of vCPUs that the capacity provider can provision, and the target average CPU utilization that triggers scaling.
Syntax
To declare this entity in your Amazon Serverless Application Model (Amazon SAM) template, use the following syntax.
YAML
MaxVCpuCount:IntegerAverageCPUUtilization: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
MaxVCpuCountproperty ofCapacityProviderScalingConfigof anAWS::Lambda::CapacityProviderresource. -
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. When specified, Amazon SAM constructs
CapacityProviderScalingConfigof anAWS::Lambda::CapacityProviderresource with theScalingModeset to'Manual'andScalingPoliciesset to[{PredefinedMetricType: 'LambdaCapacityProviderAverageCPUUtilization', TargetValue: <this value>}].Type: Double
Required: No
Amazon CloudFormation compatibility: This property is unique to Amazon SAM and doesn't have an Amazon CloudFormation equivalent.
Examples
Scaling configuration
The following example shows a scaling configuration with maximum VCpu count and average CPU utilization.
ScalingConfig: MaxVCpuCount: 10 AverageCPUUtilization: 70.0