LatestPublishedScalingConfig

class aws_cdk.aws_lambda.LatestPublishedScalingConfig(*, max_execution_environments=None, min_execution_environments=None)

Bases: object

The scaling configuration that will be applied to the $LATEST.PUBLISHED version.

Parameters:
  • max_execution_environments (Union[int, float, None]) – The maximum number of execution environments allowed for the $LATEST.PUBLISHED version when published into a capacity provider. This setting limits the total number of execution environments that can be created to handle concurrent invocations of this specific version. Default: - No maximum specified

  • min_execution_environments (Union[int, float, None]) – The minimum number of execution environments to maintain for the $LATEST.PUBLISHED version when published into a capacity provider. This setting ensures that at least this many execution environments are always available to handle function invocations for this specific version, reducing cold start latency. Default: - 3 execution environments are set to be the minimum

ExampleMetadata:

infused

Example:

# capacity_provider: lambda.CapacityProvider
# fn: lambda.Function


capacity_provider.add_function(fn,
    latest_published_scaling_config=lambda.LatestPublishedScalingConfig(
        min_execution_environments=5,
        max_execution_environments=25
    )
)

Attributes

max_execution_environments

The maximum number of execution environments allowed for the $LATEST.PUBLISHED version when published into a capacity provider.

This setting limits the total number of execution environments that can be created to handle concurrent invocations of this specific version.

Default:
  • No maximum specified

min_execution_environments

The minimum number of execution environments to maintain for the $LATEST.PUBLISHED version when published into a capacity provider.

This setting ensures that at least this many execution environments are always available to handle function invocations for this specific version, reducing cold start latency.

Default:
  • 3 execution environments are set to be the minimum