AWS sagemaker high security documentation change
Summary
Replaced detailed custom IAM permission policy creation with AWS managed policies (AmazonSageMakerHyperPodInferenceAccess and AmazonSageMakerHyperPodGatedModelAccess), simplified role configuration, and removed broad permissions like SageMakerFullAccess
Security assessment
The change improves security by replacing error-prone custom IAM policies with AWS-managed policies that follow least privilege principles. Removes dangerous wildcard permissions (e.g., 'sagemaker:*' and 's3:*') and broad policy attachments like SageMakerFullAccess. Specific evidence includes replacement of custom policy JSON with managed policy ARNs and removal of overly permissive actions.
Diff
diff --git a/sagemaker/latest/dg/sagemaker-hyperpod-model-deployment-setup.md b/sagemaker/latest/dg/sagemaker-hyperpod-model-deployment-setup.md index 54b2db4a6..7f238071c 100644 --- a//sagemaker/latest/dg/sagemaker-hyperpod-model-deployment-setup.md +++ b//sagemaker/latest/dg/sagemaker-hyperpod-model-deployment-setup.md @@ -700 +700,3 @@ After the CloudFormation stack is created, continue with Installing the Inferenc -Use this method if you need more control over the installation configuration or if the EKS Add-on is not available in your region. +###### Note + +For the simplest installation experience, we recommend using Method 1: Install HyperPod Inference Add-on through SageMaker AI console (Recommended) or Method 2: Installing the Inference Operator using the AWS CLI. Helm chart installation may be deprecated in a future release. @@ -729,2 +730,0 @@ For Kubernetes administrative access to the Amazon EKS cluster, go to the Amazon - PRESIGNED_URL_ACCESS_POLICY_NAME="PresignedUrlAccessPolicy-$HYPERPOD_CLUSTER_NAME" - HYPERPOD_INFERENCE_ACCESS_POLICY_NAME="HyperpodInferenceAccessPolicy-$HYPERPOD_CLUSTER_NAME" @@ -765 +765,3 @@ For Kubernetes administrative access to the Amazon EKS cluster, go to the Amazon - 3. Create the trust policy and permission policy JSON documents required for the HyperPod inference operator IAM role. These policies enable secure cross-service communication between Amazon EKS, SageMaker AI, and other AWS services. + 3. Create the trust policy required for the HyperPod inference operator IAM role. This policy enables secure cross-service communication between Amazon EKS, SageMaker AI, and other AWS services. + + %%bash -x @@ -767 +768,0 @@ For Kubernetes administrative access to the Amazon EKS cluster, go to the Amazon - bash @@ -799,178 +800 @@ For Kubernetes administrative access to the Amazon EKS cluster, go to the Amazon - # Create permission policy JSON - cat << EOF > permission-policy.json - { - "Version": "2012-10-17", - "Statement": [ - { - "Sid": "S3Access", - "Effect": "Allow", - "Action": [ - "s3:Get*", - "s3:List*", - "s3:Describe*", - "s3:PutObject" - ], - "Resource": [ - "*" - ] - }, - { - "Sid": "ECRAccess", - "Effect": "Allow", - "Action": [ - "ecr:GetAuthorizationToken", - "ecr:BatchCheckLayerAvailability", - "ecr:GetDownloadUrlForLayer", - "ecr:GetRepositoryPolicy", - "ecr:DescribeRepositories", - "ecr:ListImages", - "ecr:DescribeImages", - "ecr:BatchGetImage", - "ecr:GetLifecyclePolicy", - "ecr:GetLifecyclePolicyPreview", - "ecr:ListTagsForResource", - "ecr:DescribeImageScanFindings" - ], - "Resource": [ - "*" - ] - }, - { - "Sid": "EC2Access", - "Effect": "Allow", - "Action": [ - "ec2:AssignPrivateIpAddresses", - "ec2:AttachNetworkInterface", - "ec2:CreateNetworkInterface", - "ec2:DeleteNetworkInterface", - "ec2:DescribeInstances", - "ec2:DescribeTags", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeInstanceTypes", - "ec2:DescribeSubnets", - "ec2:DetachNetworkInterface", - "ec2:ModifyNetworkInterfaceAttribute", - "ec2:UnassignPrivateIpAddresses", - "ec2:CreateTags", - "ec2:DescribeInstances", - "ec2:DescribeInstanceTypes", - "ec2:DescribeRouteTables", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVolumes", - "ec2:DescribeVolumesModifications", - "ec2:DescribeVpcs", - "ec2:CreateVpcEndpointServiceConfiguration", - "ec2:DeleteVpcEndpointServiceConfigurations", - "ec2:DescribeVpcEndpointServiceConfigurations", - "ec2:ModifyVpcEndpointServicePermissions" - ], - "Resource": [ - "*" - ] - }, - { - "Sid": "EKSAuthAccess", - "Effect": "Allow", - "Action": [ - "eks-auth:AssumeRoleForPodIdentity" - ], - "Resource": [ - "*" - ] - }, - { - "Sid": "EKSAccess", - "Effect": "Allow", - "Action": [ - "eks:AssociateAccessPolicy", - "eks:Describe*", - "eks:List*", - "eks:AccessKubernetesApi" - ], - "Resource": [ - "*" - ] - }, - { - "Sid": "ApiGatewayAccess", - "Effect": "Allow", - "Action": [ - "apigateway:POST", - "apigateway:GET", - "apigateway:PUT", - "apigateway:PATCH", - "apigateway:DELETE", - "apigateway:UpdateRestApiPolicy" - ], - "Resource": [ - "arn:aws:apigateway:*::/vpclinks", - "arn:aws:apigateway:*::/vpclinks/*", - "arn:aws:apigateway:*::/restapis", - "arn:aws:apigateway:*::/restapis/*" - ] - }, - { - "Sid": "ElasticLoadBalancingAccess", - "Effect": "Allow", - "Action": [ - "elasticloadbalancing:CreateLoadBalancer", - "elasticloadbalancing:DescribeLoadBalancers", - "elasticloadbalancing:DescribeLoadBalancerAttributes", - "elasticloadbalancing:DescribeListeners", - "elasticloadbalancing:DescribeListenerCertificates", - "elasticloadbalancing:DescribeSSLPolicies", - "elasticloadbalancing:DescribeRules", - "elasticloadbalancing:DescribeTargetGroups", - "elasticloadbalancing:DescribeTargetGroupAttributes", - "elasticloadbalancing:DescribeTargetHealth", - "elasticloadbalancing:DescribeTags", - "elasticloadbalancing:DescribeTrustStores", - "elasticloadbalancing:DescribeListenerAttributes" - ], - "Resource": [ - "*" - ] - }, - { - "Sid": "SageMakerAccess", - "Effect": "Allow", - "Action": [ - "sagemaker:*" - ], - "Resource": [ - "*" - ] - }, - { - "Sid": "AllowPassRoleToSageMaker", - "Effect": "Allow", - "Action": [ - "iam:PassRole" - ], - "Resource": "arn:aws:iam::*:role/*", - "Condition": { - "StringEquals": { - "iam:PassedToService": "sagemaker.amazonaws.com" - } - } - }, - { - "Sid": "AcmAccess", - "Effect": "Allow", - "Action": [ - "acm:ImportCertificate", - "acm:DeleteCertificate" - ], - "Resource": [ - "*" - ] - } - ] - } - EOF - - 4. Create execution Role for the inference operator. - - aws iam create-policy --policy-name $HYPERPOD_INFERENCE_ACCESS_POLICY_NAME --policy-document file://permission-policy.json - export policy_arn="arn:aws:iam::${ACCOUNT_ID}:policy/$HYPERPOD_INFERENCE_ACCESS_POLICY_NAME" + 4. Create execution Role for the inference operator and attach the managed policy. @@ -979,2 +803 @@ For Kubernetes administrative access to the Amazon EKS cluster, go to the Amazon