Setting up cross-account sharing for SageMaker training plans
Amazon SageMaker AI integrates with AWS Resource Access Manager (AWS RAM) so that you can share a training plan that you own with other AWS accounts in your organization in AWS Organizations. Workloads in those accounts can then run on the plan's reserved capacity. With AWS RAM, you share resources that you own by creating a resource share. In a resource share, you specify the resources to share and the consumers with whom to share them. For training plans, consumers can be AWS accounts in your organization, organizational units (OUs), or your entire organization.
For more information about AWS RAM, see the AWS RAM User Guide.
This topic explains how to share training plans that you own, and how to use training plans that are shared with you.
Contents
Prerequisites for sharing a training plan
Before you share a training plan, make sure that you meet the following prerequisites:
-
You own the training plan in your AWS account. You can't share a training plan that has been shared with you.
-
If you want to share with your organization or an OU, sharing with AWS Organizations is turned on. For more information about turning on sharing, see Enable Sharing with AWS Organizations in the AWS RAM User Guide.
Sharing a training plan
To share a training plan, you add it to a resource share. In the resource share, you also choose the consumers and the managed permission that defines what they can do with the plan.
You can share a training plan that you own using the AWS RAM console or the AWS CLI. Training
plans are shared in the AWS Region where you created them, so set the console or the
--region option to that AWS Region.
For more information, see Creating a Resource Share in the AWS RAM User Guide.
Accepting resource share invitations
Depending on how the owner shares a training plan, each consumer AWS account might receive an invitation to join the resource share. A consumer that receives an invitation must accept it before it can use the training plan.
For more information on accepting a resource share invitation through AWS RAM, see Using shared AWS resources in the AWS Resource Access Manager User Guide.
Unsharing a training plan
As the owner, you can stop sharing a training plan at any time by removing it from the resource share. Stopping sharing doesn't cancel the workloads that consumers are already running on the plan.
After you stop sharing a training plan, the following applies to each consumer that you removed access from:
-
The consumer can't use the plan for new workloads.
-
Workloads that are already running on the plan keep running until they finish, until the plan ends, or until the consumer stops them.
-
The consumer can't add capacity to a workload that is already running on the plan. A request that would increase the number of instances the workload uses is denied.
-
The consumer can still reduce the number of instances that a running workload uses, or stop the workload, which returns the capacity to you.
Identifying a shared training plan
Consumers can identify training plans that are shared with them, and the AWS account that owns each plan, using the SageMaker AI console, the AWS RAM console, or the AWS CLI.
Permissions for using a shared training plan
Principals in the consumer account need IAM permission for each action that they call,
on the shared training plan's ARN. A policy that allows the action on all resources
("*") already does this. A policy that limits the action to resources in the
consumer account doesn't, so add the training plan's ARN to it. The following example policy
allows a principal in the consumer account to create training jobs that use a shared training
plan:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "sagemaker:CreateTrainingJob", "Resource": [ "arn:aws:sagemaker:us-west-2:444455556666:training-job/*", "arn:aws:sagemaker:us-west-2:111122223333:training-plan/my-training-plan" ] } ] }
For SageMaker Studio apps, the space's execution role also needs
sagemaker:DescribeTrainingPlan on the training plan's ARN.
Principals don't need permissions on the owner's reserved-capacity ARNs. For
more information about the other permissions that training plan users need, see IAM for SageMaker training plans.
Billing for a shared training plan
The owner pays for a plan's reserved capacity when the plan is purchased, and sharing the plan doesn't change that. Consumers are never charged for the capacity in a training plan that is shared with them, and aren't charged separately for the compute time that their workloads use on that capacity.
Standard charges for storage and other resources still apply to each account.