AWS::PCS::ComputeNodeGroupCreates 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 { CfnComputeNodeGroup } from 'aws-cdk-lib/aws-pcs';Or use the module namespace:
import * as pcs from 'aws-cdk-lib/aws-pcs';
// pcs.CfnComputeNodeGroupConfiguration passed to the constructor as CfnComputeNodeGroupProps.
clusterIdRequiredstringThe ID of the cluster of the compute node group.
customLaunchTemplateRequiredIResolvable | CustomLaunchTemplatePropertyAn Amazon EC2 launch template AWS PCS uses to launch compute nodes.
iamInstanceProfileArnRequiredstringThe 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* .
instanceConfigsRequiredIResolvable | IResolvable | InstanceConfigProperty[]A list of EC2 instance configurations that AWS PCS can provision in the compute node group.
scalingConfigurationRequiredIResolvable | ScalingConfigurationPropertySpecifies the boundaries of the compute node group auto scaling.
subnetIdsRequiredstring[]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.
amiIdOptionalstringThe 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.
nameOptionalstringThe name that identifies the compute node group.
purchaseOptionOptionalstringSpecifies 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.
slurmConfigurationOptionalIResolvable | SlurmConfigurationPropertyAdditional options related to the Slurm scheduler.
spotOptionsOptionalIResolvable | SpotOptionsPropertyAdditional 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.
This L1 construct maps directly to the following CloudFormation resource type.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-pcsAWS::PCS::ComputeNodeGroup