[ aws . pcs ]

update-compute-node-group

Description

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

Synopsis

  update-compute-node-group
[--ami-id <value>]
[--security-group-ids <value>]
[--ssh-key-name <value>]
--cluster-identifier <value>
--compute-node-group-identifier <value>
[--subnet-ids <value>]
[--launch-template-mode <value>]
[--custom-launch-template <value>]
[--purchase-option <value>]
[--spot-options <value>]
[--scaling-configuration <value>]
[--iam-instance-profile-arn <value>]
[--slurm-configuration <value>]
[--node-lifecycle-actions <value>]
[--instance-health-checks <value>]
[--client-token <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
[--cli-error-format <value>]
[--help]

Options

--ami-id (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.

Constraints:

  • pattern: (ami-[a-z0-9]+)?

--security-group-ids (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)

Constraints:

  • pattern: sg-\w{8,17}

Syntax:

"string" "string" ...

--ssh-key-name (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.

Constraints:

  • min: 0
  • max: 255

--cluster-identifier (string) [required]

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

Constraints:

  • pattern: (pcs_[a-zA-Z0-9]+|[A-Za-z][A-Za-z0-9-]{2,40})

--compute-node-group-identifier (string) [required]

The name or ID of the compute node group.

Constraints:

  • pattern: (pcs_[a-zA-Z0-9]+|[A-Za-z][A-Za-z0-9-]{2,25})

--subnet-ids (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)

Syntax:

"string" "string" ...

--launch-template-mode (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.

Possible values:

  • CUSTOM
  • MANAGED

--custom-launch-template (structure)

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 .

Shorthand Syntax:

id=string,version=string

JSON Syntax:

{
  "id": "string",
  "version": "string"
}

--purchase-option (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.

Possible values:

  • ONDEMAND
  • SPOT
  • CAPACITY_BLOCK
  • INTERRUPTIBLE_CAPACITY_RESERVATION

--spot-options (structure)

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

allocationStrategy -> (string)

The Amazon EC2 allocation strategy PCS uses to provision EC2 instances. PCS supports lowest price , capacity optimized , and price capacity optimized . For more information, see Use allocation strategies to determine how EC2 Fleet or Spot Fleet fulfills Spot and On-Demand capacity in the Amazon Elastic Compute Cloud User Guide . If you don’t provide this option, it defaults to price capacity optimized .

Possible values:

  • lowest-price
  • capacity-optimized
  • price-capacity-optimized

Shorthand Syntax:

allocationStrategy=string

JSON Syntax:

{
  "allocationStrategy": "lowest-price"|"capacity-optimized"|"price-capacity-optimized"
}

--scaling-configuration (structure)

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.

Constraints:

  • min: 0

maxInstanceCount -> (integer) [required]

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

Constraints:

  • min: 0

Shorthand Syntax:

minInstanceCount=integer,maxInstanceCount=integer

JSON Syntax:

{
  "minInstanceCount": integer,
  "maxInstanceCount": integer
}

--iam-instance-profile-arn (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 .

Constraints:

  • pattern: arn:aws([a-zA-Z-]{0,10})?:iam::[0-9]{12}:instance-profile/([!-~]{1,510}/)?([\w+=,.@-]{1,128})

--slurm-configuration (structure)

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.

Constraints:

  • min: -1
  • max: 10000000

slurmCustomSettings -> (list)

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

(structure)

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.

(map)

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 .

key -> (string)

value -> (string)

Shorthand Syntax:

scaleDownIdleTimeInSeconds=integer,slurmCustomSettings=[{parameterName=string,parameterValue=string},{parameterName=string,parameterValue=string}],gresCustomSettings=[{KeyName1=string,KeyName2=string},{KeyName1=string,KeyName2=string}]

JSON Syntax:

{
  "scaleDownIdleTimeInSeconds": integer,
  "slurmCustomSettings": [
    {
      "parameterName": "string",
      "parameterValue": "string"
    }
    ...
  ],
  "gresCustomSettings": [
    {"string": "string"
      ...}
    ...
  ]
}

--node-lifecycle-actions (structure)

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 -> (structure) [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.

Constraints:

  • min: 1
  • max: 20

(structure)

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.

Constraints:

  • min: 1
  • max: 64
  • pattern: [A-Za-z0-9][A-Za-z0-9 _-]*

scriptSource -> (structure) [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.

Constraints:

  • min: 1
  • max: 1024
  • pattern: (s3://[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]/.+|https://([a-zA-Z0-9](?:[a-zA-Z0-9_-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}(?::[0-9]{1,5})?(?:[/?#][^\s]*)?)

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.

Constraints:

  • min: 0
  • max: 1024

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.

Constraints:

  • min: 64
  • max: 64
  • pattern: [a-fA-F0-9]{64}

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.

Constraints:

  • min: 0
  • max: 20

(string)

Constraints:

  • min: 0
  • max: 256

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.

Possible values:

  • TERMINATE
  • STOP_SEQUENCE
  • CONTINUE

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.

Possible values:

  • FIRST_BOOT_ONLY
  • EVERY_BOOT

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.

Constraints:

  • min: 1
  • max: 20

(structure)

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.

Constraints:

  • min: 1
  • max: 64
  • pattern: [A-Za-z0-9][A-Za-z0-9 _-]*

scriptSource -> (structure) [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.

Constraints:

  • min: 1
  • max: 1024
  • pattern: (s3://[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]/.+|https://([a-zA-Z0-9](?:[a-zA-Z0-9_-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}(?::[0-9]{1,5})?(?:[/?#][^\s]*)?)

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.

Constraints:

  • min: 0
  • max: 1024

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.

Constraints:

  • min: 64
  • max: 64
  • pattern: [a-fA-F0-9]{64}

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.

Constraints:

  • min: 0
  • max: 20

(string)

Constraints:

  • min: 0
  • max: 256

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.

Possible values:

  • TERMINATE
  • STOP_SEQUENCE
  • CONTINUE

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.

Possible values:

  • FIRST_BOOT_ONLY
  • EVERY_BOOT

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.

Possible values:

  • CACHE_ONCE
  • REFRESH_ON_REBOOT

JSON Syntax:

{
  "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"
}

--instance-health-checks (structure)

The instance health check settings for the compute node group. Instance health checks detect faults on instances in the compute node group and respond with the repair action that you choose. You can configure health monitoring, deep health checks, or both. You can’t specify an empty object ({} ). Instance health checks require Slurm version 26.05 or later.

The settings that you specify replace all of the current instance health check settings of the compute node group. Include every setting that you want to keep. If you omit this member, the current settings don’t change. If you omit healthMonitoring or deepHealthChecks , that check is turned off. You can also turn off a check: set healthMonitoring.mode or deepHealthChecks.onStart.profile to NONE and omit its repairAction . When you change these settings, PCS drains and replaces the instances in the compute node group.

healthMonitoring -> (structure)

The health monitoring settings. Health monitoring continuously checks running instances for hardware and software faults. If you specify this object, it can’t be empty. If you omit this object, health monitoring is turned off.

mode -> (string)

The health monitoring mode. This value is required when you specify healthMonitoring . There is no default value. Valid values:

  • NONE – Turns off health monitoring. You can’t specify repairAction with this mode.
  • STANDARD – Continuously checks running instances for hardware and software faults.

Possible values:

  • NONE
  • STANDARD

repairAction -> (string)

The action that PCS takes when health monitoring finds a fault on an instance. You can’t specify this value when mode is NONE . If you don’t specify this value and mode isn’t NONE , PCS uses AUTO . GetComputeNodeGroup doesn’t return a repairAction that you didn’t specify. Valid values:

  • AUTO – PCS chooses the repair action based on the fault.
  • REPLACE – Replaces the instance after running jobs finish.
  • ISOLATE – Stops new jobs on the instance and keeps the instance running until you investigate.
  • NONE – Records the fault in Slurm and leaves the instance available for jobs.

Possible values:

  • AUTO
  • REPLACE
  • ISOLATE
  • NONE

deepHealthChecks -> (structure)

The deep health check settings. Deep health checks test the graphics processing units (GPUs) of an instance each time it starts, including after a reboot, before it accepts jobs. If you specify this object, it can’t be empty. If you omit this object, deep health checks are turned off.

onStart -> (structure)

The deep health check to run each time an instance starts, including after a reboot, before the compute node accepts jobs. If the check fails after a reboot, PCS takes the same repairAction as at launch. For example, with REPLACE , PCS replaces the instance instead of returning it to service. If the compute node group has scripts in the nodeBootstrapped stage of nodeLifecycleActions , the deep health check runs after those scripts. If a script fails and its onError setting terminates the compute node, the deep health check doesn’t run. This value is required when you specify deepHealthChecks .

profile -> (string)

The deep health check profile to run. Each profile other than NONE runs NVIDIA Data Center GPU Manager (DCGM) diagnostics. More thorough profiles run more tests and add more time to instance launch. A profile other than NONE requires instance types with NVIDIA GPUs. This value is required when you specify onStart . There is no default value. Valid values:

  • NONE – Turns off the deep health check. You can’t specify repairAction with this profile.
  • QUICK – Runs basic GPU tests (DCGM diagnostics level 1). This profile adds the least time to instance launch.
  • MEDIUM – Runs extended GPU tests (DCGM diagnostics level 2).
  • LONG – Runs GPU stress and diagnostic tests (DCGM diagnostics level 3). This profile adds the most time to instance launch.

Possible values:

  • NONE
  • QUICK
  • MEDIUM
  • LONG

repairAction -> (string)

The action that PCS takes when an instance fails the deep health check. You can’t specify this value when profile is NONE . If you don’t specify this value and profile isn’t NONE , PCS uses AUTO . GetComputeNodeGroup doesn’t return a repairAction that you didn’t specify. Valid values:

  • AUTO – PCS chooses the repair action based on the fault.
  • REPLACE – Replaces the instance before it accepts jobs.
  • ISOLATE – Stops new jobs on the instance and keeps the instance running until you investigate.
  • NONE – Records the fault in Slurm and leaves the instance available for jobs.

Possible values:

  • AUTO
  • REPLACE
  • ISOLATE
  • NONE

Shorthand Syntax:

healthMonitoring={mode=string,repairAction=string},deepHealthChecks={onStart={profile=string,repairAction=string}}

JSON Syntax:

{
  "healthMonitoring": {
    "mode": "NONE"|"STANDARD",
    "repairAction": "AUTO"|"REPLACE"|"ISOLATE"|"NONE"
  },
  "deepHealthChecks": {
    "onStart": {
      "profile": "NONE"|"QUICK"|"MEDIUM"|"LONG",
      "repairAction": "AUTO"|"REPLACE"|"ISOLATE"|"NONE"
    }
  }
}

--client-token (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.

Constraints:

  • min: 8
  • max: 100

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.

Global Options

--debug (boolean)

Turn on debug logging.

--endpoint-url (string)

Override command’s default URL with the given URL.

--no-verify-ssl (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

--no-paginate (boolean)

Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.

--output (string)

The formatting style for command output.

  • json
  • text
  • table
  • yaml
  • yaml-stream
  • off

--query (string)

A JMESPath query to use in filtering the response data.

--profile (string)

Use a specific profile from your credential file.

--region (string)

The region to use. Overrides config/env settings.

--version (string)

Display the version of this tool.

--color (string)

Turn on/off color output.

  • on
  • off
  • auto

--no-sign-request (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

--ca-bundle (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

--cli-read-timeout (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

--cli-connect-timeout (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

--cli-binary-format (string)

The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb:// will always be treated as binary and use the file contents directly regardless of the cli-binary-format setting. When using file:// the file contents will need to properly formatted for the configured cli-binary-format.

  • base64
  • raw-in-base64-out

--no-cli-pager (boolean)

Disable cli pager for output.

--cli-auto-prompt (boolean)

Automatically prompt for CLI input parameters.

--no-cli-auto-prompt (boolean)

Disable automatically prompt for CLI input parameters.

--cli-error-format (string)

The formatting style for error output. By default, errors are displayed in enhanced format.

  • legacy
  • json
  • yaml
  • text
  • table
  • enhanced

--help (boolean)

Display help for the command/subcommand.

Output

computeNodeGroup -> (structure)

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.

Constraints:

  • pattern: ami-[a-z0-9]+

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)

Constraints:

  • pattern: sg-\w{8,17}

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.

Constraints:

  • min: 1
  • max: 255

name -> (string) [required]

The name that identifies the compute node group.

Constraints:

  • min: 3
  • max: 25
  • pattern: (?!pcs_)^[A-Za-z][A-Za-z0-9-]+

id -> (string) [required]

The generated unique ID of the compute node group.

arn -> (string) [required]

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

clusterId -> (string) [required]

The ID of the cluster of the compute node group.

createdAt -> (timestamp) [required]

The date and time the resource was created.

modifiedAt -> (timestamp) [required]

The date and time the resource was modified.

status -> (string) [required]

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 .

Possible values:

  • CREATING
  • ACTIVE
  • UPDATING
  • DELETING
  • CREATE_FAILED
  • DELETE_FAILED
  • UPDATE_FAILED
  • DELETED
  • SUSPENDING
  • SUSPENDED
  • RESUMING

subnetIds -> (list) [required]

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.

Constraints:

  • min: 1

(string)

Constraints:

  • pattern: subnet-\w{8,17}

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.

Possible values:

  • ONDEMAND
  • SPOT
  • CAPACITY_BLOCK
  • INTERRUPTIBLE_CAPACITY_RESERVATION

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.

Possible values:

  • CUSTOM
  • MANAGED

customLaunchTemplate -> (structure)

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) [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 .

iamInstanceProfileArn -> (string) [required]

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 .

Constraints:

  • pattern: arn:aws([a-zA-Z-]{0,10})?:iam::[0-9]{12}:instance-profile/([!-~]{1,510}/)?([\w+=,.@-]{1,128})

scalingConfiguration -> (structure) [required]

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.

Constraints:

  • min: 0

maxInstanceCount -> (integer) [required]

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

Constraints:

  • min: 0

instanceConfigs -> (list) [required]

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

(structure)

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 -> (structure)

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

allocationStrategy -> (string)

The Amazon EC2 allocation strategy PCS uses to provision EC2 instances. PCS supports lowest price , capacity optimized , and price capacity optimized . For more information, see Use allocation strategies to determine how EC2 Fleet or Spot Fleet fulfills Spot and On-Demand capacity in the Amazon Elastic Compute Cloud User Guide . If you don’t provide this option, it defaults to price capacity optimized .

Possible values:

  • lowest-price
  • capacity-optimized
  • price-capacity-optimized

slurmConfiguration -> (structure)

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.

Constraints:

  • min: -1
  • max: 10000000

slurmCustomSettings -> (list)

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

(structure)

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.

(map)

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 .

key -> (string)

value -> (string)

nodeLifecycleActions -> (structure)

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 -> (structure) [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.

Constraints:

  • min: 1
  • max: 20

(structure)

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.

Constraints:

  • min: 1
  • max: 64
  • pattern: [A-Za-z0-9][A-Za-z0-9 _-]*

scriptSource -> (structure) [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.

Constraints:

  • min: 1
  • max: 1024
  • pattern: (s3://[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]/.+|https://([a-zA-Z0-9](?:[a-zA-Z0-9_-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}(?::[0-9]{1,5})?(?:[/?#][^\s]*)?)

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.

Constraints:

  • min: 0
  • max: 1024

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.

Constraints:

  • min: 64
  • max: 64
  • pattern: [a-fA-F0-9]{64}

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.

Constraints:

  • min: 0
  • max: 20

(string)

Constraints:

  • min: 0
  • max: 256

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.

Possible values:

  • TERMINATE
  • STOP_SEQUENCE
  • CONTINUE

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.

Possible values:

  • FIRST_BOOT_ONLY
  • EVERY_BOOT

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.

Constraints:

  • min: 1
  • max: 20

(structure)

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.

Constraints:

  • min: 1
  • max: 64
  • pattern: [A-Za-z0-9][A-Za-z0-9 _-]*

scriptSource -> (structure) [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.

Constraints:

  • min: 1
  • max: 1024
  • pattern: (s3://[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]/.+|https://([a-zA-Z0-9](?:[a-zA-Z0-9_-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}(?::[0-9]{1,5})?(?:[/?#][^\s]*)?)

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.

Constraints:

  • min: 0
  • max: 1024

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.

Constraints:

  • min: 64
  • max: 64
  • pattern: [a-fA-F0-9]{64}

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.

Constraints:

  • min: 0
  • max: 20

(string)

Constraints:

  • min: 0
  • max: 256

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.

Possible values:

  • TERMINATE
  • STOP_SEQUENCE
  • CONTINUE

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.

Possible values:

  • FIRST_BOOT_ONLY
  • EVERY_BOOT

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.

Possible values:

  • CACHE_ONCE
  • REFRESH_ON_REBOOT

instanceHealthChecks -> (structure)

The instance health check settings of the compute node group. Instance health checks detect faults on instances in the compute node group and respond with the repair action that you choose.

healthMonitoring -> (structure)

The health monitoring settings. Health monitoring continuously checks running instances for hardware and software faults.

mode -> (string)

The health monitoring mode. This value is required when you specify healthMonitoring . There is no default value. Valid values:

  • NONE – Turns off health monitoring. You can’t specify repairAction with this mode.
  • STANDARD – Continuously checks running instances for hardware and software faults.

Possible values:

  • NONE
  • STANDARD

repairAction -> (string)

The action that PCS takes when health monitoring finds a fault on an instance. You can’t specify this value when mode is NONE . If you don’t specify this value and mode isn’t NONE , PCS uses AUTO . GetComputeNodeGroup doesn’t return a repairAction that you didn’t specify. Valid values:

  • AUTO – PCS chooses the repair action based on the fault.
  • REPLACE – Replaces the instance after running jobs finish.
  • ISOLATE – Stops new jobs on the instance and keeps the instance running until you investigate.
  • NONE – Records the fault in Slurm and leaves the instance available for jobs.

Possible values:

  • AUTO
  • REPLACE
  • ISOLATE
  • NONE

deepHealthChecks -> (structure)

The deep health check settings. Deep health checks test the graphics processing units (GPUs) of an instance each time it starts, including after a reboot, before it accepts jobs.

onStart -> (structure)

The deep health check to run each time an instance starts, including after a reboot, before the compute node accepts jobs. If the check fails after a reboot, PCS takes the same repairAction as at launch. For example, with REPLACE , PCS replaces the instance instead of returning it to service. If the compute node group has scripts in the nodeBootstrapped stage of nodeLifecycleActions , the deep health check runs after those scripts. If a script fails and its onError setting terminates the compute node, the deep health check doesn’t run. This value is required when you specify deepHealthChecks .

profile -> (string)

The deep health check profile to run. Each profile other than NONE runs NVIDIA Data Center GPU Manager (DCGM) diagnostics. More thorough profiles run more tests and add more time to instance launch. A profile other than NONE requires instance types with NVIDIA GPUs. This value is required when you specify onStart . There is no default value. Valid values:

  • NONE – Turns off the deep health check. You can’t specify repairAction with this profile.
  • QUICK – Runs basic GPU tests (DCGM diagnostics level 1). This profile adds the least time to instance launch.
  • MEDIUM – Runs extended GPU tests (DCGM diagnostics level 2).
  • LONG – Runs GPU stress and diagnostic tests (DCGM diagnostics level 3). This profile adds the most time to instance launch.

Possible values:

  • NONE
  • QUICK
  • MEDIUM
  • LONG

repairAction -> (string)

The action that PCS takes when an instance fails the deep health check. You can’t specify this value when profile is NONE . If you don’t specify this value and profile isn’t NONE , PCS uses AUTO . GetComputeNodeGroup doesn’t return a repairAction that you didn’t specify. Valid values:

  • AUTO – PCS chooses the repair action based on the fault.
  • REPLACE – Replaces the instance before it accepts jobs.
  • ISOLATE – Stops new jobs on the instance and keeps the instance running until you investigate.
  • NONE – Records the fault in Slurm and leaves the instance available for jobs.

Possible values:

  • AUTO
  • REPLACE
  • ISOLATE
  • NONE

errorInfo -> (list)

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

(structure)

An error that occurred during resource creation.

code -> (string)

The short-form error code.

message -> (string)

The detailed error information.