Skip to content

/AWS1/CL_SGM=>CREATECLUSTER()

About CreateCluster

Creates a SageMaker HyperPod cluster. SageMaker HyperPod is a capability of SageMaker for creating and managing persistent clusters for developing large machine learning models, such as large language models (LLMs) and diffusion models. To learn more, see Amazon SageMaker HyperPod in the Amazon SageMaker Developer Guide.

Method Signature

IMPORTING

Required arguments:

iv_clustername TYPE /AWS1/SGMCLUSTERNAME /AWS1/SGMCLUSTERNAME

The name for the new SageMaker HyperPod cluster.

it_instancegroups TYPE /AWS1/CL_SGMCLUSTINSTGROUPSPEC=>TT_CLUSTERINSTANCEGROUPSPECS TT_CLUSTERINSTANCEGROUPSPECS

The instance groups to be created in the SageMaker HyperPod cluster.

Optional arguments:

io_vpcconfig TYPE REF TO /AWS1/CL_SGMVPCCONFIG /AWS1/CL_SGMVPCCONFIG

Specifies the Amazon Virtual Private Cloud (VPC) that is associated with the Amazon SageMaker HyperPod cluster. You can control access to and from your resources by configuring your VPC. For more information, see Give SageMaker access to resources in your Amazon VPC.

When your Amazon VPC and subnets support IPv6, network communications differ based on the cluster orchestration platform:

  • Slurm-orchestrated clusters automatically configure nodes with dual IPv6 and IPv4 addresses, allowing immediate IPv6 network communications.

  • In Amazon EKS-orchestrated clusters, nodes receive dual-stack addressing, but pods can only use IPv6 when the Amazon EKS cluster is explicitly IPv6-enabled. For information about deploying an IPv6 Amazon EKS cluster, see Amazon EKS IPv6 Cluster Deployment.

Additional resources for IPv6 configuration:

it_tags TYPE /AWS1/CL_SGMTAG=>TT_TAGLIST TT_TAGLIST

Custom tags for managing the SageMaker HyperPod cluster as an Amazon Web Services resource. You can add tags to your cluster in the same way you add them in other Amazon Web Services services that support tagging. To learn more about tagging Amazon Web Services resources in general, see Tagging Amazon Web Services Resources User Guide.

io_orchestrator TYPE REF TO /AWS1/CL_SGMCLUSTORCHESTRATOR /AWS1/CL_SGMCLUSTORCHESTRATOR

The type of orchestrator to use for the SageMaker HyperPod cluster. Currently, the only supported value is "eks", which is to use an Amazon Elastic Kubernetes Service (EKS) cluster as the orchestrator.

iv_noderecovery TYPE /AWS1/SGMCLUSTERNODERECOVERY /AWS1/SGMCLUSTERNODERECOVERY

The node recovery mode for the SageMaker HyperPod cluster. When set to Automatic, SageMaker HyperPod will automatically reboot or replace faulty nodes when issues are detected. When set to None, cluster administrators will need to manually manage any faulty cluster instances.

RETURNING

oo_output TYPE REF TO /aws1/cl_sgmcreateclusterrsp /AWS1/CL_SGMCREATECLUSTERRSP

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->/aws1/if_sgm~createcluster(
  io_orchestrator = new /aws1/cl_sgmclustorchestrator( new /aws1/cl_sgmclstorchestrator00( |string| ) )
  io_vpcconfig = new /aws1/cl_sgmvpcconfig(
    it_securitygroupids = VALUE /aws1/cl_sgmvpcsecgroupids_w=>tt_vpcsecuritygroupids(
      ( new /aws1/cl_sgmvpcsecgroupids_w( |string| ) )
    )
    it_subnets = VALUE /aws1/cl_sgmsubnets_w=>tt_subnets(
      ( new /aws1/cl_sgmsubnets_w( |string| ) )
    )
  )
  it_instancegroups = VALUE /aws1/cl_sgmclustinstgroupspec=>tt_clusterinstancegroupspecs(
    (
      new /aws1/cl_sgmclustinstgroupspec(
        io_lifecycleconfig = new /aws1/cl_sgmclusterlcconfig(
          iv_oncreate = |string|
          iv_sources3uri = |string|
        )
        io_overridevpcconfig = new /aws1/cl_sgmvpcconfig(
          it_securitygroupids = VALUE /aws1/cl_sgmvpcsecgroupids_w=>tt_vpcsecuritygroupids(
            ( new /aws1/cl_sgmvpcsecgroupids_w( |string| ) )
          )
          it_subnets = VALUE /aws1/cl_sgmsubnets_w=>tt_subnets(
            ( new /aws1/cl_sgmsubnets_w( |string| ) )
          )
        )
        io_scheduledupdateconfig = new /aws1/cl_sgmschddupdateconfig(
          io_deploymentconfig = new /aws1/cl_sgmdeploymentconf(
            io_rollingupdatepolicy = new /aws1/cl_sgmrollingdeploymen00(
              io_maximumbatchsize = new /aws1/cl_sgmcapacitysizeconfig(
                iv_type = |string|
                iv_value = 123
              )
              io_rollbackmaximumbatchsize = new /aws1/cl_sgmcapacitysizeconfig(
                iv_type = |string|
                iv_value = 123
              )
            )
            it_autorollbackconfiguration = VALUE /aws1/cl_sgmalarmdetails=>tt_autorollbackalarms(
              ( new /aws1/cl_sgmalarmdetails( |string| ) )
            )
            iv_waitintervalinseconds = 123
          )
          iv_scheduleexpression = |string|
        )
        it_instancestorageconfigs = VALUE /aws1/cl_sgmclustinststrgcfg=>tt_clusterinststorageconfigs(
          ( new /aws1/cl_sgmclustinststrgcfg( new /aws1/cl_sgmclustebsvolumecfg( 123 ) ) )
        )
        it_onstartdeephealthchecks = VALUE /aws1/cl_sgmonstrtdeephealth00=>tt_onstartdeephealthchecks(
          ( new /aws1/cl_sgmonstrtdeephealth00( |string| ) )
        )
        iv_executionrole = |string|
        iv_instancecount = 123
        iv_instancegroupname = |string|
        iv_instancetype = |string|
        iv_threadspercore = 123
        iv_trainingplanarn = |string|
      )
    )
  )
  it_tags = VALUE /aws1/cl_sgmtag=>tt_taglist(
    (
      new /aws1/cl_sgmtag(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  iv_clustername = |string|
  iv_noderecovery = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_clusterarn = lo_result->get_clusterarn( ).
ENDIF.