

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# AWS PCS에 대한 최소 권한
<a name="security-min-permissions"></a>

이 섹션에서는 IAM 자격 증명(사용자, 그룹 또는 역할)이 서비스를 사용하는 데 필요한 최소 IAM 권한을 설명합니다.

**Contents**
+ [API 작업을 사용할 수 있는 최소 권한](#security-min-permissions_api)
+ [태그를 사용할 수 있는 최소 권한](#security-min-permissions_tagging)
+ [로그를 지원하는 최소 권한](#security-min-permissions_logging)
+ [용량 블록을 사용할 수 있는 최소 권한](#security-min-permissions_capacity-blocks)
+ [서비스 관리자의 최소 권한](#security-min-permissions_admin-policy)

## API 작업을 사용할 수 있는 최소 권한
<a name="security-min-permissions_api"></a>


| API 작업 | 최소 권한 | 콘솔에 대한 추가 권한 | 
| --- | --- | --- | 
|  CreateCluster  |  <pre>ec2:CreateNetworkInterface,<br />ec2:DescribeVpcs,<br />ec2:DescribeSubnets,<br />ec2:DescribeSecurityGroups, <br />ec2:GetSecurityGroupsForVpc, <br />iam:CreateServiceLinkedRole,<br />secretsmanager:CreateSecret,<br />secretsmanager:TagResource,<br />secretsmanager:RotateSecret,<br />pcs:CreateCluster</pre>  |    | 
|  ListClusters  |  <pre>pcs:ListClusters</pre>  |    | 
|  GetCluster  |  <pre>pcs:GetCluster</pre>  |  <pre>ec2:DescribeSubnets</pre>  | 
|  DeleteCluster  |  <pre>pcs:DeleteCluster</pre>  |    | 
|  CreateComputeNodeGroup  |  <pre>ec2:DescribeVpcs,<br />ec2:DescribeSubnets,<br />ec2:DescribeSecurityGroups,<br />ec2:DescribeLaunchTemplates,<br />ec2:DescribeLaunchTemplateVersions,<br />ec2:DescribeInstanceTypes,<br />ec2:DescribeInstanceTypeOfferings,<br />ec2:RunInstances,<br />ec2:CreateFleet,<br />ec2:CreateTags,<br />iam:PassRole,<br />iam:GetInstanceProfile,<br />pcs:CreateComputeNodeGroup</pre>  |  <pre>iam:ListInstanceProfiles,<br />ec2:DescribeImages,<br />pcs:GetCluster</pre>  | 
|  ListComputerNodeGroups  |  <pre>pcs:ListComputeNodeGroups</pre>  |  <pre>pcs:GetCluster</pre>  | 
|  GetComputeNodeGroup  |  <pre>pcs:GetComputeNodeGroup</pre>  |  <pre>ec2:DescribeSubnets</pre>  | 
|  UpdateComputeNodeGroup  |  <pre>ec2:DescribeVpcs,<br />ec2:DescribeSubnets,<br />ec2:DescribeSecurityGroups,<br />ec2:DescribeLaunchTemplates,<br />ec2:DescribeLaunchTemplateVersions,<br />ec2:DescribeInstanceTypes,<br />ec2:DescribeInstanceTypeOfferings,<br />ec2:RunInstances,<br />ec2:CreateFleet,<br />ec2:CreateTags,<br />iam:PassRole,<br />iam:GetInstanceProfile,<br />pcs:UpdateComputeNodeGroup</pre>  |  <pre>pcs:GetComputeNodeGroup,<br />iam:ListInstanceProfiles,<br />ec2:DescribeImages,<br />pcs:GetCluster</pre>  | 
|  DeleteComputeNodeGroup  |  <pre>pcs:DeleteComputeNodeGroup</pre>  |    | 
|  CreateQueue  |  <pre>pcs:CreateQueue</pre>  |  <pre>pcs:ListComputeNodeGroups,<br />pcs:GetCluster</pre>  | 
|  ListQueues  |  <pre>pcs:ListQueues</pre>  |  <pre>pcs:GetCluster</pre>  | 
|  GetQueue  |  <pre>pcs:GetQueue</pre>  |    | 
|  UpdateQueue  |  <pre>pcs:UpdateQueue</pre>  |  <pre>pcs:ListComputeNodeGroups,<br />pcs:GetQueue</pre>  | 
|  DeleteQueue  |  <pre>pcs:DeleteQueue</pre>  |    | 

## 태그를 사용할 수 있는 최소 권한
<a name="security-min-permissions_tagging"></a>

 AWS PCS의 리소스에 태그를 사용하려면 다음 권한이 필요합니다.

```
pcs:ListTagsForResource,
pcs:TagResource,
pcs:UntagResource
```

## 로그를 지원하는 최소 권한
<a name="security-min-permissions_logging"></a>

AWS PCS는 Amazon CloudWatch Logs(CloudWatch Logs)로 로그 데이터를 전송합니다. 자격 증명에 CloudWatch Logs를 사용할 수 있는 최소 권한이 있는지 확인해야 합니다. 자세한 내용은 Amazon [ CloudWatch Logs 사용 설명서의 CloudWatch Logs 리소스에 대한 액세스 권한 관리 개요를](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html) 참조하세요. *Amazon CloudWatch *

서비스가 CloudWatch Logs로 로그를 전송하는 데 필요한 권한에 대한 자세한 내용은 Amazon CloudWatch Logs 사용 설명서의 [AWS 서비스에서 로깅 활성화](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-vended-logs-permissions-V2)를 참조하세요. *Amazon CloudWatch *

## 용량 블록을 사용할 수 있는 최소 권한
<a name="security-min-permissions_capacity-blocks"></a>

ML용 Amazon EC2 용량 블록은 특정 날짜 및 시간 범위 내에 GPU 기반 가속 컴퓨팅 인스턴스를 미리 예약하여 단기 워크로드를 지원할 수 있는 Amazon EC2 구매 옵션입니다. 자세한 내용은 [AWS PCS에서 ML에 Amazon EC2 용량 블록 사용](capacity-blocks.md) 단원을 참조하십시오.

컴퓨팅 노드 그룹을 생성하거나 업데이트할 때 용량 블록을 사용하도록 선택합니다. 컴퓨팅 노드 그룹을 생성하거나 업데이트하는 데 사용하는 IAM 자격 증명에는 다음 권한이 있어야 합니다.

```
ec2:DescribeCapacityReservations
```

## 서비스 관리자의 최소 권한
<a name="security-min-permissions_admin-policy"></a>

다음 IAM 정책은 IAM 자격 증명(사용자, 그룹 또는 역할)이 AWS PCS 서비스를 구성하고 관리하는 데 필요한 최소 권한을 지정합니다.

**참고**  
서비스를 구성하고 관리하지 않는 사용자는 이러한 권한이 필요하지 않습니다. 작업을 실행하는 사용자는 SSL(SecureShell)을 사용하여 클러스터에 연결합니다. AWS Identity and Access Management (IAM)은 SSH에 대한 인증 또는 권한 부여를 처리하지 않습니다.

```
{
  "Version": "2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "PCSAccess",
      "Effect": "Allow",
      "Action": [
        "pcs:*"
      ],
      "Resource": "*"
    },
    {
      "Sid": "EC2Access",
      "Effect": "Allow",
      "Action": [
        "ec2:CreateNetworkInterface",
        "ec2:DescribeImages",
        "ec2:GetSecurityGroupsForVpc",
        "ec2:DescribeSubnets",
        "ec2:DescribeSecurityGroups",
        "ec2:DescribeVpcs",
        "ec2:DescribeLaunchTemplates",
        "ec2:DescribeLaunchTemplateVersions",
        "ec2:DescribeInstanceTypes",
        "ec2:DescribeInstanceTypeOfferings",
        "ec2:RunInstances",
        "ec2:CreateFleet",
        "ec2:CreateTags",
        "ec2:DescribeCapacityReservations"
      ],
      "Resource": "*"
    },
    {
      "Sid": "IamInstanceProfile",
      "Effect": "Allow",
      "Action": [
        "iam:GetInstanceProfile"
      ],
      "Resource": "*"
    },
    {
      "Sid": "IamPassRole",
      "Effect": "Allow",
      "Action": [
        "iam:PassRole"
      ],
      "Resource": [
        "arn:aws:iam::*:role/*/AWSPCS*",
        "arn:aws:iam::*:role/AWSPCS*",
        "arn:aws:iam::*:role/aws-pcs/*",
        "arn:aws:iam::*:role/*/aws-pcs/*"
      ],
      "Condition": {
        "StringEquals": {
           "iam:PassedToService": [
             "ec2.amazonaws.com"
           ]
        }
      }
    },
    {
      "Sid": "SLRAccess",
      "Effect": "Allow",
      "Action": [
        "iam:CreateServiceLinkedRole"
      ],
      "Resource": [
        "arn:aws:iam::*:role/aws-service-role/pcs.amazonaws.com/AWSServiceRoleFor*",
        "arn:aws:iam::*:role/aws-service-role/spot.amazonaws.com/AWSServiceRoleFor*"
      ],
      "Condition": {
        "StringLike": {
          "iam:AWSServiceName": [
            "pcs.amazonaws.com",
            "spot.amazonaws.com"
          ]
        }
      }
    },
    {
      "Sid": "AccessKMSKey",
      "Effect": "Allow",
      "Action": [
        "kms:Decrypt",
        "kms:Encrypt",
        "kms:GenerateDataKey",
        "kms:CreateGrant",
        "kms:DescribeKey"
      ],
      "Resource": "*"
    },
    {
      "Sid": "SecretManagementAccess",
      "Effect": "Allow",
      "Action": [
        "secretsmanager:CreateSecret",
        "secretsmanager:TagResource",
        "secretsmanager:UpdateSecret",
        "secretsmanager:RotateSecret"
      ],
      "Resource": "*"
    },
    { 
       "Sid": "ServiceLogsDelivery",
       "Effect": "Allow",
       "Action": [
         "pcs:AllowVendedLogDeliveryForResource",
         "logs:PutDeliverySource",
         "logs:PutDeliveryDestination",
         "logs:CreateDelivery"
       ],
       "Resource": "*"
    }
  ]
}
```