ParallelComputingService / Client / update_compute_node_group

update_compute_node_group

ParallelComputingService.Client.update_compute_node_group(**kwargs)

Updates a compute node group. You can update many of the fields related to your compute node group including the configurations for networking, compute nodes, and settings specific to your scheduler (such as Slurm).

See also: AWS API Documentation

Request Syntax

response = client.update_compute_node_group(
    amiId='string',
    securityGroupIds=[
        'string',
    ],
    sshKeyName='string',
    clusterIdentifier='string',
    computeNodeGroupIdentifier='string',
    subnetIds=[
        'string',
    ],
    launchTemplateMode='CUSTOM'|'MANAGED',
    customLaunchTemplate={
        'id': 'string',
        'version': 'string'
    },
    purchaseOption='ONDEMAND'|'SPOT'|'CAPACITY_BLOCK'|'INTERRUPTIBLE_CAPACITY_RESERVATION',
    spotOptions={
        'allocationStrategy': 'lowest-price'|'capacity-optimized'|'price-capacity-optimized'
    },
    scalingConfiguration={
        'minInstanceCount': 123,
        'maxInstanceCount': 123
    },
    iamInstanceProfileArn='string',
    slurmConfiguration={
        'scaleDownIdleTimeInSeconds': 123,
        'slurmCustomSettings': [
            {
                'parameterName': 'string',
                'parameterValue': 'string'
            },
        ],
        'gresCustomSettings': [
            {
                'string': 'string'
            },
        ]
    },
    nodeLifecycleActions={
        'stages': {
            'nodeBootstrapped': [
                {
                    'name': 'string',
                    'scriptSource': {
                        'scriptLocation': 'string',
                        's3VersionId': 'string',
                        'checksum': 'string'
                    },
                    'arguments': [
                        'string',
                    ],
                    'onError': 'TERMINATE'|'STOP_SEQUENCE'|'CONTINUE',
                    'executionPolicy': 'FIRST_BOOT_ONLY'|'EVERY_BOOT'
                },
            ],
            'nodeReady': [
                {
                    'name': 'string',
                    'scriptSource': {
                        'scriptLocation': 'string',
                        's3VersionId': 'string',
                        'checksum': 'string'
                    },
                    'arguments': [
                        'string',
                    ],
                    'onError': 'TERMINATE'|'STOP_SEQUENCE'|'CONTINUE',
                    'executionPolicy': 'FIRST_BOOT_ONLY'|'EVERY_BOOT'
                },
            ]
        },
        'scriptCachingPolicy': 'CACHE_ONCE'|'REFRESH_ON_REBOOT'
    },
    clientToken='string'
)
Parameters:
  • amiId (string) – The ID of the Amazon Machine Image (AMI) that PCS uses to launch instances. This value overrides the AMI ID in the custom launch template. Specify an empty string ( "") to remove the AMI ID from the compute node group and use the AMI ID specified in the custom launch template. Omit this value to leave the current setting unchanged.

  • securityGroupIds (list) –

    The IDs of the EC2 security groups to configure directly on the compute node group. The security groups must be in the same VPC as the cluster. PCS uses these security groups instead of the security groups in the custom launch template. You can’t specify this value if the custom launch template defines network interfaces. Specify an empty list ( []) to remove the security groups from the compute node group and use the security groups in the custom launch template. Omit this value to leave the current setting unchanged.

    • (string) –

  • sshKeyName (string) – The name of the EC2 key pair to configure directly on the compute node group. The key pair must exist in your account and Amazon Web Services Region. PCS uses this key pair instead of the key pair in the custom launch template. Specify an empty string ( "") to remove the key pair from the compute node group and use the key pair in the custom launch template. Omit this value to leave the current setting unchanged. You must have permission for ec2:DescribeKeyPairs to specify a key pair. If you delete the key pair later, future instance launches can fail.

  • clusterIdentifier (string) –

    [REQUIRED]

    The name or ID of the cluster of the compute node group.

  • computeNodeGroupIdentifier (string) –

    [REQUIRED]

    The name or ID of the compute node group.

  • subnetIds (list) –

    The list of subnet IDs where the compute node group provisions instances. The subnets must be in the same VPC as the cluster.

    • (string) –

  • launchTemplateMode (string) –

    Specifies whether the compute node group uses a custom launch template or a launch template that PCS manages. Omit this value to keep the current mode.

    Valid values:

    • CUSTOM – Use a custom launch template. To switch from MANAGED, also provide customLaunchTemplate. If the compute node group already uses CUSTOM and you omit customLaunchTemplate, the existing launch template is unchanged.

    • MANAGED – Use a launch template created and managed by PCS. Omit customLaunchTemplate. Switching to this mode removes the custom launch template association but doesn’t delete the launch template.

    When switching to MANAGED, the compute node group must have amiId and securityGroupIds configured. You can set these values in the same request.

  • customLaunchTemplate (dict) –

    The custom Amazon EC2 launch template to associate with the compute node group. To set or change the custom launch template, specify id and version. If you provide this value and omit launchTemplateMode, the compute node group must already use CUSTOM mode. To switch from MANAGED to CUSTOM, specify launchTemplateMode as CUSTOM and provide this value. If the compute node group already uses CUSTOM, omit this value while also omitting launchTemplateMode, or while specifying CUSTOM, to keep the existing custom launch template. For more information, see Migrating a compute node group from a custom launch template in the PCS User Guide.

    • id (string) – [REQUIRED]

      The ID of the EC2 launch template to use to provision instances. Specify this value together with version.

      Example: lt-xxxx

    • version (string) – [REQUIRED]

      The version of the EC2 launch template to use to provision instances. Specify this value together with id.

  • purchaseOption (string) – Specifies how EC2 instances are purchased on your behalf. PCS supports On-Demand Instances, Spot Instances, Interruptible Capacity Reservations, On-Demand Capacity Reservations, and Amazon EC2 Capacity Blocks for ML. For more information, see Amazon EC2 billing and purchasing options in the Amazon Elastic Compute Cloud User Guide. For more information about PCS support for Capacity Blocks, see Using Amazon EC2 Capacity Blocks for ML with PCS in the PCS User Guide. For more information about PCS support for interruptible capacity reservations, see Using I-ODCRs with PCS in the PCS User Guide. Choose On-Demand if you plan to use an On-Demand Capacity Reservation (ODCR). For more information, see Using ODCRs with PCS. If you don’t provide this option, it defaults to On-Demand.

  • spotOptions (dict) –

    Additional configuration when you specify SPOT as the purchaseOption for the CreateComputeNodeGroup API action.

  • scalingConfiguration (dict) –

    Specifies the boundaries of the compute node group auto scaling.

    • minInstanceCount (integer) – [REQUIRED]

      The lower bound of the number of instances allowed in the compute fleet.

    • maxInstanceCount (integer) – [REQUIRED]

      The upper bound of the number of instances allowed in the compute fleet.

  • iamInstanceProfileArn (string) – The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances. The role contained in your instance profile must have the pcs:RegisterComputeNodeGroupInstance permission and the role name must start with AWSPCS or must have the path /aws-pcs/. For more information, see IAM instance profiles for PCS in the PCS User Guide.

  • slurmConfiguration (dict) –

    Additional options related to the Slurm scheduler.

    • scaleDownIdleTimeInSeconds (integer) –

      The time (in seconds) before an idle node is scaled down. If not specified, the cluster-level setting applies. This overrides the cluster-level scaleDownIdleTimeInSeconds setting. A value of -1 removes the override and applies the cluster-level setting to this compute node group. Requires Slurm version 25.11 or later.

    • slurmCustomSettings (list) –

      Additional Slurm-specific configuration that directly maps to Slurm settings.

      • (dict) –

        Additional settings that directly map to Slurm settings.

        Warning

        PCS supports a subset of Slurm settings. For more information, see Configuring custom Slurm settings in PCS in the PCS User Guide.

        • parameterName (string) – [REQUIRED]

          PCS supports custom Slurm settings for clusters, compute node groups, and queues. For more information, see Configuring custom Slurm settings in PCS in the PCS User Guide.

        • parameterValue (string) – [REQUIRED]

          The values for the configured Slurm settings.

    • gresCustomSettings (list) –

      The additional Slurm gres.conf records for the compute node group. Each item is a map of gres.conf attribute names to values that describes one gres.conf record, such as a GPU topology, MIG, MPS, or custom GRES entry. PCS adds the NodeName= prefix and merges these records with the GPU record it derives from the instance type.

      • (dict) –

        A single Slurm gres.conf record, expressed as a map of gres.conf attribute names to their values. For example, {"Name": "gpu", "Type": "a100", "File": "/dev/nvidia[0-7]"} or {"AutoDetect": "nvml"}. PCS adds the NodeName= prefix for the compute node group.

        Warning

        PCS supports a subset of gres.conf settings. For more information, see Configuring custom GRES settings in PCS in the PCS User Guide.

        • (string) –

          • (string) –

  • nodeLifecycleActions (dict) –

    The lifecycle actions to run on compute nodes in the compute node group. Use lifecycle actions to run custom scripts at defined stages of a compute node’s lifecycle, such as when a compute node finishes bootstrapping or becomes ready to accept jobs.

    • stages (dict) – [REQUIRED]

      The lifecycle stages where you configure scripts to run.

      • nodeBootstrapped (list) –

        The scripts to run after PCS finishes setting up the compute node and before the Slurm daemon ( slurmd) starts. Use this stage for tasks that must complete before the node accepts jobs, such as mounting shared storage, configuring networking, or installing software packages.

        • (dict) –

          A script to run during a compute node lifecycle stage.

          • name (string) – [REQUIRED]

            A unique name for the script. The name can be up to 64 characters long. Valid characters are letters, numbers, spaces, underscores ( _), and hyphens ( -). The first character must be a letter or a number.

          • scriptSource (dict) – [REQUIRED]

            The source location and integrity information for the script.

            • scriptLocation (string) – [REQUIRED]

              The location of the script. Specify either an Amazon S3 URI in the format s3://bucket-name/key or an HTTPS URL.

            • s3VersionId (string) –

              The Amazon S3 version ID of the script. Use this value to pin the script to a specific version in a versioned Amazon S3 bucket. This value is only valid when scriptLocation is an Amazon S3 URI.

            • checksum (string) –

              The SHA-256 checksum of the script content, as a 64-character hexadecimal string. This value is optional. When specified, PCS uses this value to verify the integrity of the downloaded script.

          • arguments (list) –

            The command-line arguments to pass to the script. You can specify up to 20 arguments, and each argument can be up to 256 characters long.

            • (string) –

          • onError (string) –

            The behavior when the script fails. The default value is TERMINATE. Valid values:

            • TERMINATE – Terminates the compute node.

            • STOP_SEQUENCE – Stops running subsequent scripts in the sequence but doesn’t terminate the compute node.

            • CONTINUE – Ignores the error and continues running the next script.

          • executionPolicy (string) –

            The policy that determines when the script runs. The default value is FIRST_BOOT_ONLY. Valid values:

            • FIRST_BOOT_ONLY – Runs the script only the first time the compute node boots.

            • EVERY_BOOT – Runs the script every time the compute node boots, including reboots.

      • nodeReady (list) –

        The scripts to run after the Slurm daemon ( slurmd) starts and the compute node registers with the Slurm controller. Use this stage for tasks that require Slurm to be running, such as running Slurm commands.

        • (dict) –

          A script to run during a compute node lifecycle stage.

          • name (string) – [REQUIRED]

            A unique name for the script. The name can be up to 64 characters long. Valid characters are letters, numbers, spaces, underscores ( _), and hyphens ( -). The first character must be a letter or a number.

          • scriptSource (dict) – [REQUIRED]

            The source location and integrity information for the script.

            • scriptLocation (string) – [REQUIRED]

              The location of the script. Specify either an Amazon S3 URI in the format s3://bucket-name/key or an HTTPS URL.

            • s3VersionId (string) –

              The Amazon S3 version ID of the script. Use this value to pin the script to a specific version in a versioned Amazon S3 bucket. This value is only valid when scriptLocation is an Amazon S3 URI.

            • checksum (string) –

              The SHA-256 checksum of the script content, as a 64-character hexadecimal string. This value is optional. When specified, PCS uses this value to verify the integrity of the downloaded script.

          • arguments (list) –

            The command-line arguments to pass to the script. You can specify up to 20 arguments, and each argument can be up to 256 characters long.

            • (string) –

          • onError (string) –

            The behavior when the script fails. The default value is TERMINATE. Valid values:

            • TERMINATE – Terminates the compute node.

            • STOP_SEQUENCE – Stops running subsequent scripts in the sequence but doesn’t terminate the compute node.

            • CONTINUE – Ignores the error and continues running the next script.

          • executionPolicy (string) –

            The policy that determines when the script runs. The default value is FIRST_BOOT_ONLY. Valid values:

            • FIRST_BOOT_ONLY – Runs the script only the first time the compute node boots.

            • EVERY_BOOT – Runs the script every time the compute node boots, including reboots.

    • scriptCachingPolicy (string) –

      The caching policy for node lifecycle scripts. The default value is CACHE_ONCE. Valid values:

      • CACHE_ONCE – Downloads each script once and reuses it on subsequent boots.

      • REFRESH_ON_REBOOT – Downloads each script on every boot.

  • clientToken (string) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don’t specify a client token, the CLI and SDK automatically generate one for you.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'computeNodeGroup': {
        'amiId': 'string',
        'securityGroupIds': [
            'string',
        ],
        'sshKeyName': 'string',
        'name': 'string',
        'id': 'string',
        'arn': 'string',
        'clusterId': 'string',
        'createdAt': datetime(2015, 1, 1),
        'modifiedAt': datetime(2015, 1, 1),
        'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATE_FAILED'|'DELETE_FAILED'|'UPDATE_FAILED'|'DELETED'|'SUSPENDING'|'SUSPENDED'|'RESUMING',
        'subnetIds': [
            'string',
        ],
        'purchaseOption': 'ONDEMAND'|'SPOT'|'CAPACITY_BLOCK'|'INTERRUPTIBLE_CAPACITY_RESERVATION',
        'launchTemplateMode': 'CUSTOM'|'MANAGED',
        'customLaunchTemplate': {
            'id': 'string',
            'version': 'string'
        },
        'iamInstanceProfileArn': 'string',
        'scalingConfiguration': {
            'minInstanceCount': 123,
            'maxInstanceCount': 123
        },
        'instanceConfigs': [
            {
                'instanceType': 'string'
            },
        ],
        'spotOptions': {
            'allocationStrategy': 'lowest-price'|'capacity-optimized'|'price-capacity-optimized'
        },
        'slurmConfiguration': {
            'scaleDownIdleTimeInSeconds': 123,
            'slurmCustomSettings': [
                {
                    'parameterName': 'string',
                    'parameterValue': 'string'
                },
            ],
            'gresCustomSettings': [
                {
                    'string': 'string'
                },
            ]
        },
        'nodeLifecycleActions': {
            'stages': {
                'nodeBootstrapped': [
                    {
                        'name': 'string',
                        'scriptSource': {
                            'scriptLocation': 'string',
                            's3VersionId': 'string',
                            'checksum': 'string'
                        },
                        'arguments': [
                            'string',
                        ],
                        'onError': 'TERMINATE'|'STOP_SEQUENCE'|'CONTINUE',
                        'executionPolicy': 'FIRST_BOOT_ONLY'|'EVERY_BOOT'
                    },
                ],
                'nodeReady': [
                    {
                        'name': 'string',
                        'scriptSource': {
                            'scriptLocation': 'string',
                            's3VersionId': 'string',
                            'checksum': 'string'
                        },
                        'arguments': [
                            'string',
                        ],
                        'onError': 'TERMINATE'|'STOP_SEQUENCE'|'CONTINUE',
                        'executionPolicy': 'FIRST_BOOT_ONLY'|'EVERY_BOOT'
                    },
                ]
            },
            'scriptCachingPolicy': 'CACHE_ONCE'|'REFRESH_ON_REBOOT'
        },
        'errorInfo': [
            {
                'code': 'string',
                'message': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) –

    • computeNodeGroup (dict) –

      A compute node group associated with a cluster.

      • amiId (string) –

        The ID of the Amazon Machine Image (AMI) that PCS uses to launch instances. If not present, PCS uses the AMI ID specified in the custom launch template.

      • securityGroupIds (list) –

        The IDs of the EC2 security groups configured directly on the compute node group. PCS uses these security groups instead of the security groups in the custom launch template. This value isn’t present if security groups aren’t configured directly on the compute node group. In that case, PCS uses the security groups in the custom launch template.

        • (string) –

      • sshKeyName (string) –

        The name of the EC2 key pair configured directly on the compute node group. PCS uses this key pair instead of the key pair in the custom launch template. This value isn’t present if a key pair isn’t configured directly on the compute node group. In that case, PCS uses the key pair in the custom launch template, if one is specified.

      • name (string) –

        The name that identifies the compute node group.

      • id (string) –

        The generated unique ID of the compute node group.

      • arn (string) –

        The unique Amazon Resource Name (ARN) of the compute node group.

      • clusterId (string) –

        The ID of the cluster of the compute node group.

      • createdAt (datetime) –

        The date and time the resource was created.

      • modifiedAt (datetime) –

        The date and time the resource was modified.

      • status (string) –

        The provisioning status of the compute node group.

        Note

        The provisioning status doesn’t indicate the overall health of the compute node group.

        Warning

        The resource enters the SUSPENDING and SUSPENDED states when the scheduler is beyond end of life and we have suspended the cluster. When in these states, you can’t use the cluster. The cluster controller is down and all compute instances are terminated. The resources still count toward your service quotas. You can delete a resource if its status is SUSPENDED. For more information, see Frequently asked questions about Slurm versions in PCS in the PCS User Guide.

      • subnetIds (list) –

        The list of subnet IDs where instances are provisioned by the compute node group. The subnets must be in the same VPC as the cluster.

        • (string) –

      • purchaseOption (string) –

        Specifies how EC2 instances are purchased on your behalf. PCS supports On-Demand Instances, Spot Instances, Interruptible Capacity Reservations, On-Demand Capacity Reservations, and Amazon EC2 Capacity Blocks for ML. For more information, see Amazon EC2 billing and purchasing options in the Amazon Elastic Compute Cloud User Guide. For more information about PCS support for Capacity Blocks, see Using Amazon EC2 Capacity Blocks for ML with PCS in the PCS User Guide. For more information about PCS support for interruptible capacity reservations, see Using I-ODCRs with PCS in the PCS User Guide. Choose On-Demand if you plan to use an On-Demand Capacity Reservation (ODCR). For more information, see Using ODCRs with PCS. If you don’t provide this option, it defaults to On-Demand.

      • launchTemplateMode (string) –

        Indicates whether the compute node group uses a custom launch template or a launch template that PCS manages. The default value is CUSTOM.

        Valid values:

        • CUSTOM – The compute node group uses the launch template in customLaunchTemplate.

        • MANAGED – PCS creates and manages the launch template.

      • customLaunchTemplate (dict) –

        The custom Amazon EC2 launch template associated with the compute node group. This value is present when launchTemplateMode is CUSTOM and isn’t present when launchTemplateMode is MANAGED.

        • id (string) –

          The ID of the EC2 launch template to use to provision instances. Specify this value together with version.

          Example: lt-xxxx

        • version (string) –

          The version of the EC2 launch template to use to provision instances. Specify this value together with id.

      • iamInstanceProfileArn (string) –

        The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances. The role contained in your instance profile must have the pcs:RegisterComputeNodeGroupInstance permission and the role name must start with AWSPCS or must have the path /aws-pcs/. For more information, see IAM instance profiles for PCS in the PCS User Guide.

      • scalingConfiguration (dict) –

        Specifies the boundaries of the compute node group auto scaling.

        • minInstanceCount (integer) –

          The lower bound of the number of instances allowed in the compute fleet.

        • maxInstanceCount (integer) –

          The upper bound of the number of instances allowed in the compute fleet.

      • instanceConfigs (list) –

        A list of EC2 instance configurations that PCS can provision in the compute node group.

        • (dict) –

          An EC2 instance configuration PCS uses to launch compute nodes.

          • instanceType (string) –

            The EC2 instance type that PCS can provision in the compute node group.

            Example: t2.xlarge

      • spotOptions (dict) –

        Additional configuration when you specify SPOT as the purchaseOption for the CreateComputeNodeGroup API action.

      • slurmConfiguration (dict) –

        Additional options related to the Slurm scheduler.

        • scaleDownIdleTimeInSeconds (integer) –

          The time (in seconds) before an idle node is scaled down. If not specified, the cluster-level setting applies. This overrides the cluster-level scaleDownIdleTimeInSeconds setting. A value of -1 removes the override and applies the cluster-level setting to this compute node group. Requires Slurm version 25.11 or later.

        • slurmCustomSettings (list) –

          Additional Slurm-specific configuration that directly maps to Slurm settings.

          • (dict) –

            Additional settings that directly map to Slurm settings.

            Warning

            PCS supports a subset of Slurm settings. For more information, see Configuring custom Slurm settings in PCS in the PCS User Guide.

            • parameterName (string) –

              PCS supports custom Slurm settings for clusters, compute node groups, and queues. For more information, see Configuring custom Slurm settings in PCS in the PCS User Guide.

            • parameterValue (string) –

              The values for the configured Slurm settings.

        • gresCustomSettings (list) –

          The additional Slurm gres.conf records for the compute node group. Each item is a map of gres.conf attribute names to values that describes one gres.conf record, such as a GPU topology, MIG, MPS, or custom GRES entry. PCS adds the NodeName= prefix and merges these records with the GPU record it derives from the instance type.

          • (dict) –

            A single Slurm gres.conf record, expressed as a map of gres.conf attribute names to their values. For example, {"Name": "gpu", "Type": "a100", "File": "/dev/nvidia[0-7]"} or {"AutoDetect": "nvml"}. PCS adds the NodeName= prefix for the compute node group.

            Warning

            PCS supports a subset of gres.conf settings. For more information, see Configuring custom GRES settings in PCS in the PCS User Guide.

            • (string) –

              • (string) –

      • nodeLifecycleActions (dict) –

        The lifecycle actions to run on compute nodes in the compute node group. Use lifecycle actions to run custom scripts at defined stages of a compute node’s lifecycle, such as when a compute node finishes bootstrapping or becomes ready to accept jobs.

        • stages (dict) –

          The lifecycle stages where you configure scripts to run.

          • nodeBootstrapped (list) –

            The scripts to run after PCS finishes setting up the compute node and before the Slurm daemon ( slurmd) starts. Use this stage for tasks that must complete before the node accepts jobs, such as mounting shared storage, configuring networking, or installing software packages.

            • (dict) –

              A script to run during a compute node lifecycle stage.

              • name (string) –

                A unique name for the script. The name can be up to 64 characters long. Valid characters are letters, numbers, spaces, underscores ( _), and hyphens ( -). The first character must be a letter or a number.

              • scriptSource (dict) –

                The source location and integrity information for the script.

                • scriptLocation (string) –

                  The location of the script. Specify either an Amazon S3 URI in the format s3://bucket-name/key or an HTTPS URL.

                • s3VersionId (string) –

                  The Amazon S3 version ID of the script. Use this value to pin the script to a specific version in a versioned Amazon S3 bucket. This value is only valid when scriptLocation is an Amazon S3 URI.

                • checksum (string) –

                  The SHA-256 checksum of the script content, as a 64-character hexadecimal string. This value is optional. When specified, PCS uses this value to verify the integrity of the downloaded script.

              • arguments (list) –

                The command-line arguments to pass to the script. You can specify up to 20 arguments, and each argument can be up to 256 characters long.

                • (string) –

              • onError (string) –

                The behavior when the script fails. The default value is TERMINATE. Valid values:

                • TERMINATE – Terminates the compute node.

                • STOP_SEQUENCE – Stops running subsequent scripts in the sequence but doesn’t terminate the compute node.

                • CONTINUE – Ignores the error and continues running the next script.

              • executionPolicy (string) –

                The policy that determines when the script runs. The default value is FIRST_BOOT_ONLY. Valid values:

                • FIRST_BOOT_ONLY – Runs the script only the first time the compute node boots.

                • EVERY_BOOT – Runs the script every time the compute node boots, including reboots.

          • nodeReady (list) –

            The scripts to run after the Slurm daemon ( slurmd) starts and the compute node registers with the Slurm controller. Use this stage for tasks that require Slurm to be running, such as running Slurm commands.

            • (dict) –

              A script to run during a compute node lifecycle stage.

              • name (string) –

                A unique name for the script. The name can be up to 64 characters long. Valid characters are letters, numbers, spaces, underscores ( _), and hyphens ( -). The first character must be a letter or a number.

              • scriptSource (dict) –

                The source location and integrity information for the script.

                • scriptLocation (string) –

                  The location of the script. Specify either an Amazon S3 URI in the format s3://bucket-name/key or an HTTPS URL.

                • s3VersionId (string) –

                  The Amazon S3 version ID of the script. Use this value to pin the script to a specific version in a versioned Amazon S3 bucket. This value is only valid when scriptLocation is an Amazon S3 URI.

                • checksum (string) –

                  The SHA-256 checksum of the script content, as a 64-character hexadecimal string. This value is optional. When specified, PCS uses this value to verify the integrity of the downloaded script.

              • arguments (list) –

                The command-line arguments to pass to the script. You can specify up to 20 arguments, and each argument can be up to 256 characters long.

                • (string) –

              • onError (string) –

                The behavior when the script fails. The default value is TERMINATE. Valid values:

                • TERMINATE – Terminates the compute node.

                • STOP_SEQUENCE – Stops running subsequent scripts in the sequence but doesn’t terminate the compute node.

                • CONTINUE – Ignores the error and continues running the next script.

              • executionPolicy (string) –

                The policy that determines when the script runs. The default value is FIRST_BOOT_ONLY. Valid values:

                • FIRST_BOOT_ONLY – Runs the script only the first time the compute node boots.

                • EVERY_BOOT – Runs the script every time the compute node boots, including reboots.

        • scriptCachingPolicy (string) –

          The caching policy for node lifecycle scripts. The default value is CACHE_ONCE. Valid values:

          • CACHE_ONCE – Downloads each script once and reuses it on subsequent boots.

          • REFRESH_ON_REBOOT – Downloads each script on every boot.

      • errorInfo (list) –

        The list of errors that occurred during compute node group provisioning.

        • (dict) –

          An error that occurred during resource creation.

          • code (string) –

            The short-form error code.

          • message (string) –

            The detailed error information.

Exceptions