Skip to content

ClusterLifeCycleConfig

Source code in docs_src/capo_sagemaker/types/cluster_life_cycle_config.py
class ClusterLifeCycleConfig(TypedDict, closed=True):
    source_s3_uri: NotRequired["capo_sagemaker.types.s3_uri.S3Uri"]
    """<p>An Amazon S3 bucket path where your lifecycle scripts are stored.</p> <important> <p>Make sure that the S3 bucket path starts with <code>s3://sagemaker-</code>. The <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-hyperpod-prerequisites.html#sagemaker-hyperpod-prerequisites-iam-role-for-hyperpod">IAM role for SageMaker HyperPod</a> has the managed <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/security-iam-awsmanpol-cluster.html"> <code>AmazonSageMakerClusterInstanceRolePolicy</code> </a> attached, which allows access to S3 buckets with the specific prefix <code>sagemaker-</code>.</p> </important>"""
    on_create: NotRequired[
        "capo_sagemaker.types.cluster_life_cycle_config_file_name.ClusterLifeCycleConfigFileName"
    ]
    """<p>The file name of the entrypoint script of lifecycle scripts under <code>SourceS3Uri</code>. This entrypoint script runs during cluster creation.</p>"""
    on_init_complete: NotRequired[
        "capo_sagemaker.types.cluster_life_cycle_config_file_name.ClusterLifeCycleConfigFileName"
    ]
    """<p>The file name of the entrypoint script of lifecycle scripts under <code>SourceS3Uri</code>. This script runs on the node after the AMI-based initialization is complete.</p>"""

on_create instance-attribute

on_create: NotRequired[ClusterLifeCycleConfigFileName]

The file name of the entrypoint script of lifecycle scripts under SourceS3Uri. This entrypoint script runs during cluster creation.

on_init_complete instance-attribute

on_init_complete: NotRequired[ClusterLifeCycleConfigFileName]

The file name of the entrypoint script of lifecycle scripts under SourceS3Uri. This script runs on the node after the AMI-based initialization is complete.

source_s3_uri instance-attribute

source_s3_uri: NotRequired[S3Uri]

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 has the managed AmazonSageMakerClusterInstanceRolePolicy attached, which allows access to S3 buckets with the specific prefix sagemaker-.