# LatestPublishedScalingConfig

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

- Source: [`aws-lambda/lib/capacity-provider.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-lambda/lib/capacity-provider.ts#L371)
- Type last changed: v2.231.0 · 1 Dec 2025

## Example

```ts
declare const capacityProvider: lambda.CapacityProvider;
declare const fn: lambda.Function;

capacityProvider.addFunction(fn, {
  latestPublishedScalingConfig: {
    minExecutionEnvironments: 5,
    maxExecutionEnvironments: 25,
  },
});
```

## Properties

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

  **Default:** No maximum specified

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

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

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

  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.
