AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::PCS::ComputeNodeGroup

CfnComputeNodeGroup

Creates an AWS PCS compute node group resource. For more information, see [Creating a compute node group in AWS PCS](https://docs.aws.amazon.com/pcs/latest/userguide/working-with_cng_create.html) in the *AWS PCS User Guide* .

Import

import { CfnComputeNodeGroup } from 'aws-cdk-lib/aws-pcs';

Or use the module namespace:

import * as pcs from 'aws-cdk-lib/aws-pcs';
// pcs.CfnComputeNodeGroup

Properties

Configuration passed to the constructor as CfnComputeNodeGroupProps.

clusterIdRequired
string

The ID of the cluster of the compute node group.

customLaunchTemplateRequired
IResolvable | CustomLaunchTemplateProperty

An Amazon EC2 launch template AWS PCS uses to launch compute nodes.

iamInstanceProfileArnRequired
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 AWS PCS](https://docs.aws.amazon.com//pcs/latest/userguide/security-instance-profiles.html) in the *AWS PCS User Guide* .

instanceConfigsRequired
IResolvable | IResolvable | InstanceConfigProperty[]

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

scalingConfigurationRequired
IResolvable | ScalingConfigurationProperty

Specifies the boundaries of the compute node group auto scaling.

subnetIdsRequired
string[]

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.

amiIdOptional
string

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

nameOptional
string

The name that identifies the compute node group.

purchaseOptionOptional
string

Specifies how EC2 instances are purchased on your behalf. AWS PCS supports On-Demand Instances, Spot Instances, and Amazon EC2 Capacity Blocks for ML. For more information, see [Amazon EC2 billing and purchasing options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html) in the *Amazon Elastic Compute Cloud User Guide* . For more information about AWS PCS support for Capacity Blocks, see [Using Amazon EC2 Capacity Blocks for ML with AWS PCS](https://docs.aws.amazon.com/pcs/latest/userguide/capacity-blocks.html) in the *AWS PCS User Guide* . If you don't provide this option, it defaults to On-Demand.

slurmConfigurationOptional
IResolvable | SlurmConfigurationProperty

Additional options related to the Slurm scheduler.

spotOptionsOptional
IResolvable | SpotOptionsProperty

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

tagsOptional
{ [key: string]: string }

1 or more tags added to the resource. Each tag consists of a tag key and tag value. The tag value is optional and can be an empty string.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

LevelL1 (CloudFormation)
Moduleaws-pcs
CFN TypeAWS::PCS::ComputeNodeGroup
Properties12

Related Constructs

External Links