CfnComputeNodeGroupProps Struct
Properties for defining a CfnComputeNodeGroup.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_pcs as pcs } from 'aws-cdk-lib';
const cfnComputeNodeGroupProps: pcs.CfnComputeNodeGroupProps = {
clusterId: 'clusterId',
iamInstanceProfileArn: 'iamInstanceProfileArn',
instanceConfigs: [{
instanceType: 'instanceType',
}],
scalingConfiguration: {
maxInstanceCount: 123,
minInstanceCount: 123,
},
subnetIds: ['subnetIds'],
// the properties below are optional
amiId: 'amiId',
customLaunchTemplate: {
version: 'version',
// the properties below are optional
templateId: 'templateId',
},
name: 'name',
nodeLifecycleActions: {
stages: {
nodeBootstrapped: [{
name: 'name',
scriptSource: {
scriptLocation: 'scriptLocation',
// the properties below are optional
checksum: 'checksum',
s3VersionId: 's3VersionId',
},
// the properties below are optional
arguments: ['arguments'],
executionPolicy: 'executionPolicy',
onError: 'onError',
}],
nodeReady: [{
name: 'name',
scriptSource: {
scriptLocation: 'scriptLocation',
// the properties below are optional
checksum: 'checksum',
s3VersionId: 's3VersionId',
},
// the properties below are optional
arguments: ['arguments'],
executionPolicy: 'executionPolicy',
onError: 'onError',
}],
},
// the properties below are optional
scriptCachingPolicy: 'scriptCachingPolicy',
},
purchaseOption: 'purchaseOption',
slurmConfiguration: {
gresCustomSettings: [{
gresCustomSettingsKey: 'gresCustomSettings',
}],
scaleDownIdleTimeInSeconds: 123,
slurmCustomSettings: [{
parameterName: 'parameterName',
parameterValue: 'parameterValue',
}],
},
spotOptions: {
allocationStrategy: 'allocationStrategy',
},
tags: {
tagsKey: 'tags',
},
};
Properties
If not provided, AWS PCS uses the AMI ID specified in the custom launch template.
customLaunchTemplateoptionalIResolvable | CfnComputeNodeGroup.CustomLaunchTemplatePropertycustom_launch_templateoptionaltyping.Union[IResolvable, CustomLaunchTemplateProperty]customLaunchTemplateoptionalIResolvableCustomLaunchTemplateoptionalIResolvableCustomLaunchTemplateoptionalinterface{}#iamInstanceProfileArnstringiam_instance_profile_arnstriamInstanceProfileArnStringIamInstanceProfileArnstringIamInstanceProfileArn*stringrequired#notes
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 in the AWS PCS User Guide .
instanceConfigsIResolvable | IResolvable | CfnComputeNodeGroup.InstanceConfigProperty[]instance_configstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, InstanceConfigProperty]]]instanceConfigsIResolvableInstanceConfigsIResolvableInstanceConfigsinterface{}required#nodeLifecycleActionsoptionalIResolvable | CfnComputeNodeGroup.NodeLifecycleActionsPropertynode_lifecycle_actionsoptionaltyping.Union[IResolvable, NodeLifecycleActionsProperty]nodeLifecycleActionsoptionalIResolvableNodeLifecycleActionsoptionalIResolvableNodeLifecycleActionsoptionalinterface{}#purchaseOptionoptionalstringpurchase_optionoptionalstrpurchaseOptionoptionalStringPurchaseOptionoptionalstringPurchaseOptionoptional*string#notes
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 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 in the AWS PCS User Guide . If you don't provide this option, it defaults to On-Demand.
scalingConfigurationIResolvable | CfnComputeNodeGroup.ScalingConfigurationPropertyscaling_configurationtyping.Union[IResolvable, ScalingConfigurationProperty]scalingConfigurationIResolvableScalingConfigurationIResolvableScalingConfigurationinterface{}required#slurmConfigurationoptionalIResolvable | CfnComputeNodeGroup.SlurmConfigurationPropertyslurm_configurationoptionaltyping.Union[IResolvable, SlurmConfigurationProperty]slurmConfigurationoptionalIResolvableSlurmConfigurationoptionalIResolvableSlurmConfigurationoptionalinterface{}#spotOptionsoptionalIResolvable | CfnComputeNodeGroup.SpotOptionsPropertyspot_optionsoptionaltyping.Union[IResolvable, SpotOptionsProperty]spotOptionsoptionalIResolvableSpotOptionsoptionalIResolvableSpotOptionsoptionalinterface{}#subnetIdsstring[]subnet_idstyping.List[str]subnetIdsList<String>SubnetIdsstring[]SubnetIds*[]*stringrequired#The subnets must be in the same VPC as the cluster.
tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string#Each tag consists of a tag key and tag value. The tag value is optional and can be an empty string.