Minimum permissions for AWS PCS
This section describes the minimum IAM permissions required for an IAM identity (user, group, or role) to use the service.
Contents
Minimum permissions to use API actions
| API action | Minimum permissions | Additional permissions for the console |
|---|---|---|
|
CreateCluster |
|
|
|
ListClusters |
|
|
|
GetCluster |
|
|
|
DeleteCluster |
|
|
|
CreateComputeNodeGroup |
|
|
|
ListComputerNodeGroups |
|
|
|
GetComputeNodeGroup |
|
|
|
UpdateComputeNodeGroup |
|
|
|
DeleteComputeNodeGroup |
|
|
|
CreateQueue |
|
|
|
ListQueues |
|
|
|
GetQueue |
|
|
|
UpdateQueue |
|
|
|
DeleteQueue |
|
Minimum permissions to use tags
The following permissions are required to use tags with your resources in AWS PCS.
pcs:ListTagsForResource, pcs:TagResource, pcs:UntagResource
Minimum permissions to support logs
AWS PCS sends log data to Amazon CloudWatch Logs (CloudWatch Logs). You must make sure that your identity has the minimum permissions to use CloudWatch Logs. For more information, see Overview of managing access permissions to your CloudWatch Logs resources in the Amazon CloudWatch Logs User Guide.
For information about permissions required for a service to send logs to CloudWatch Logs, see Enabling logging from AWS services in the Amazon CloudWatch Logs User Guide.
Minimum permissions to use Capacity Blocks
Amazon EC2 Capacity Blocks for ML is an Amazon EC2 purchasing option that enables you to pay in advance to reserve GPU-based accelerated computing instances within a specific date and time range to support short duration workloads. For more information, see Using Amazon EC2 Capacity Blocks for ML with AWS PCS.
You choose to use Capacity Blocks when you create or update a compute node group. The IAM identity you use to create or update the compute node group must have the following permission:
ec2:DescribeCapacityReservations
Minimum permissions for a service administrator
The following IAM policy specifies the minimum permissions required for an IAM identity (user, group, or role) to configure and manage the AWS PCS service.
Note
Users who don't configure and manage the service don't require these permissions. Users who only run jobs use secure shell (SSH) to connect to the cluster. AWS Identity and Access Management (IAM) doesn't handle authentication or authorization for 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": "*" } ] }