# ClusterLifeCycleConfigProperty

The lifecycle configuration for a SageMaker HyperPod cluster.

- Source: Generated at build time
- Type last changed: v2.251.0 · 24 Apr 2026

## 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 clusterLifeCycleConfigProperty: sagemaker.CfnCluster.ClusterLifeCycleConfigProperty = {
  onCreate: 'onCreate',
  onInitComplete: 'onInitComplete',
  sourceS3Uri: 'sourceS3Uri',
};
```

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

cluster_life_cycle_config_property = sagemaker.CfnCluster.ClusterLifeCycleConfigProperty(
    on_create="onCreate",
    on_init_complete="onInitComplete",
    source_s3_uri="sourceS3Uri"
)
```

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.*;

ClusterLifeCycleConfigProperty clusterLifeCycleConfigProperty = ClusterLifeCycleConfigProperty.builder()
        .onCreate("onCreate")
        .onInitComplete("onInitComplete")
        .sourceS3Uri("sourceS3Uri")
        .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 clusterLifeCycleConfigProperty = new ClusterLifeCycleConfigProperty {
    OnCreate = "onCreate",
    OnInitComplete = "onInitComplete",
    SourceS3Uri = "sourceS3Uri"
};
```

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"

clusterLifeCycleConfigProperty := &ClusterLifeCycleConfigProperty{
	OnCreate: jsii.String("onCreate"),
	OnInitComplete: jsii.String("onInitComplete"),
	SourceS3Uri: jsii.String("sourceS3Uri"),
}
```

## Properties

- `onCreate`: string — The file name of the entrypoint script of lifecycle scripts under `SourceS3Uri` .

  This entrypoint script runs during cluster creation.

- `onInitComplete`: string — The file name of the extension script under SourceS3Uri.

  This script runs after HyperPod configures the default software on the instance. Mutually exclusive with OnCreate.

- `sourceS3Uri`: string — An Amazon S3 bucket path where your lifecycle scripts are stored.

  > Make sure that the S3 bucket path starts with `s3://sagemaker-` . The [IAM role for SageMaker HyperPod](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-hyperpod-prerequisites.html#sagemaker-hyperpod-prerequisites-iam-role-for-hyperpod) has the managed [`AmazonSageMakerClusterInstanceRolePolicy`](https://docs.aws.amazon.com/sagemaker/latest/dg/security-iam-awsmanpol-cluster.html) attached, which allows access to S3 buckets with the specific prefix `sagemaker-` .
