CLI로 CreatePlacementGroup 사용 - AWS SDK 코드 예제

AWS SDK 예제 GitHub 리포지토리에 더 많은 AWS문서 SDK 예제가 있습니다.

CLI로 CreatePlacementGroup 사용

다음 코드 예시는 CreatePlacementGroup의 사용 방법을 보여 줍니다.

CLI
AWS CLI

배치 그룹 생성

이 예시에서는 지정된 이름으로 배치 그룹을 생성합니다.

명령:

aws ec2 create-placement-group --group-name my-cluster --strategy cluster

파티션 배치 그룹 생성

이 예시에서는 5개의 파티션이 있는 HDFS-Group-A 파티션 배치 그룹을 만듭니다.

명령:

aws ec2 create-placement-group --group-name HDFS-Group-A --strategy partition --partition-count 5
PowerShell
Tools for PowerShell V4

예제 1: 이 예제에서는 지정된 이름으로 배치 그룹을 생성합니다.

New-EC2PlacementGroup -GroupName my-placement-group -Strategy cluster
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V4)CreatePlacementGroup을 참조하세요.

Tools for PowerShell V5

예제 1: 이 예제에서는 지정된 이름으로 배치 그룹을 생성합니다.

New-EC2PlacementGroup -GroupName my-placement-group -Strategy cluster
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V5)CreatePlacementGroup을 참조하세요.