# ServerlessProductionVariantProps

Construction properties for a serverless production variant.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/endpoint-config.ts`](https://github.com/aws/aws-cdk/blob/v2.273.0-alpha.0/packages/@aws-cdk/aws-sagemaker-alpha/lib/endpoint-config.ts#L89)

## Example

```ts
import * as sagemaker from '@aws-cdk/aws-sagemaker-alpha';

declare const model: sagemaker.Model;

const endpointConfig = new sagemaker.EndpointConfig(this, 'ServerlessEndpointConfig', {
  serverlessProductionVariant: {
    model: model,
    variantName: 'serverlessVariant',
    maxConcurrency: 10,
    memorySizeInMB: 2048,
    provisionedConcurrency: 5, // optional
  },
});
```

## Properties

- `initialVariantWeight`: number = 1.0 — Determines initial traffic distribution among all of the models that you specify in the endpoint configuration.

  The traffic to a production variant is determined by the ratio of the
  variant weight to the sum of all variant weight values across all production variants.

- `maxConcurrency`: number (required) — The maximum number of concurrent invocations your serverless endpoint can process.

  Valid range: 1-200

- `memorySizeInMB`: number (required) — The memory size of your serverless endpoint.

  Valid values are in 1 GB increments:
  1024 MB, 2048 MB, 3072 MB, 4096 MB, 5120 MB, or 6144 MB.

- `model`: [IModel](/cdk/api/v2/docs/@aws-cdk_aws-sagemaker-alpha.IModel.html) (required) — The model to host.

- `provisionedConcurrency`: number = none — The number of concurrent invocations that are provisioned and ready to respond to your endpoint.

  Valid range: 1-200, must be less than or equal to maxConcurrency.

- `variantName`: string (required) — Name of the production variant.
