FunctionScalingConfig
Configures the scaling behavior for Lambda function versions, controlling the number of execution environments (sandboxes) that can be created. This configuration applies to both $LATEST.PUBLISHED and numeric function versions.
Syntax
To declare this entity in your AWS Serverless Application Model (AWS SAM) template, use the following syntax.
YAML
MinExecutionEnvironments:IntegerMaxExecutionEnvironments:Integer
Properties
-
MinExecutionEnvironments -
The minimum number of execution environments to maintain for the function version.
Type: Integer
Required: No
Default:
3Minimum:
0CloudFormation compatibility: This property is passed directly to the
MinExecutionEnvironmentsproperty of anAWS::Lambda::Functionresource. -
MaxExecutionEnvironments -
The maximum number of execution environments that can be created for the function version.
Type: Integer
Required: No
Default:
3Minimum:
0CloudFormation compatibility: This property is passed directly to the
MaxExecutionEnvironmentsproperty of anAWS::Lambda::Functionresource.
Examples
Function scaling configuration
The following example shows a function scaling configuration with minimum and maximum execution environments.
FunctionScalingConfig: MinExecutionEnvironments: 5 MaxExecutionEnvironments: 100