# ServerlessConfigProperty

Specifies the serverless configuration for an endpoint variant.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const serverlessConfigProperty: sagemaker.CfnEndpointConfig.ServerlessConfigProperty = {
  maxConcurrency: 123,
  memorySizeInMb: 123,

  // the properties below are optional
  provisionedConcurrency: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker

serverless_config_property = sagemaker.CfnEndpointConfig.ServerlessConfigProperty(
    max_concurrency=123,
    memory_size_in_mb=123,

    # the properties below are optional
    provisioned_concurrency=123
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sagemaker.*;

ServerlessConfigProperty serverlessConfigProperty = ServerlessConfigProperty.builder()
        .maxConcurrency(123)
        .memorySizeInMb(123)

        // the properties below are optional
        .provisionedConcurrency(123)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;

var serverlessConfigProperty = new ServerlessConfigProperty {
    MaxConcurrency = 123,
    MemorySizeInMb = 123,

    // the properties below are optional
    ProvisionedConcurrency = 123
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

serverlessConfigProperty := &ServerlessConfigProperty{
	MaxConcurrency: jsii.Number(123),
	MemorySizeInMb: jsii.Number(123),

	// the properties below are optional
	ProvisionedConcurrency: jsii.Number(123),
}
```

## Properties

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

- `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.

- `provisionedConcurrency`: number — The amount of provisioned concurrency to allocate for the serverless endpoint.

  Should be less than or equal to `MaxConcurrency` .

  > This field is not supported for serverless endpoint recommendations for Inference Recommender jobs. For more information about creating an Inference Recommender job, see [CreateInferenceRecommendationsJobs](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateInferenceRecommendationsJob.html) .
