

# How to BYOI
<a name="byoi-how-to"></a>

When you bring your own image (BYOI) to Amazon SageMaker Unified Studio, you attach a custom image to an Amazon SageMaker Unified Studio project. The following page provides instructions on how to bring your custom image to your Amazon SageMaker Unified Studio project.

**Topics**
+ [Prerequisites](#byoi-how-to-prerequisites)
+ [Step 1: Create your custom image](#byoi-how-to-step-1-create-custom-image)
+ [Step 2: Get the SageMaker AI domain name associated with your Amazon SageMaker Unified Studio project](#byoi-how-to-step-2-get-domain-name)
+ [Step 3: Attach your custom image using the SageMaker AI domain](#byoi-how-to-step-3-attach-custom-image)
+ [Step 4: Access your custom image in Amazon SageMaker Unified Studio](#byoi-how-to-step-4-access-custom-image)

## Prerequisites
<a name="byoi-how-to-prerequisites"></a>

You will need to complete the following prerequisites to bring your own image to Amazon SageMaker Unified Studio.
+ Create an Amazon SageMaker Unified Studio project. For more information, see [Create a new project](create-new-project.md).
+ Set up the Docker application. For more information, see [Get started](https://docs.docker.com/get-started/) in the *Docker documentation*.
+ Install the latest AWS CLI by following the steps in [Getting started with the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) in the *AWS Command Line Interface User Guide for Version 2*.
+ Permissions to access the Amazon Elastic Container Registry (Amazon ECR) service. For more information, see [Amazon ECR Managed Policies](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) in the *Amazon ECR User Guide*.
+ An AWS Identity and Access Management role that has the [AmazonSageMakerFullAccess](https://docs.aws.amazon.com/sagemaker/latest/dg/security-iam-awsmanpol.html#security-iam-awsmanpol-AmazonSageMakerFullAccess) policy attached.

## Step 1: Create your custom image
<a name="byoi-how-to-step-1-create-custom-image"></a>

**Important**  
Ensure that you are using the [Dockerfile specifications](byoi-specifications.md) in the following instructions.

Follow the steps in [Create a custom image and push to Amazon ECR](https://docs.aws.amazon.com/sagemaker/latest/dg/studio-updated-byoi-how-to-prepare-image.html) in the *SageMaker AI Developer Guide*.

## Step 2: Get the SageMaker AI domain name associated with your Amazon SageMaker Unified Studio project
<a name="byoi-how-to-step-2-get-domain-name"></a>

An associated SageMaker AI domain is created when you create a Amazon SageMaker Unified Studio project. You will need the SageMaker AI domain name before proceeding to the next step. For instructions, see [View the SageMaker AI domain details associated with your project](view-project-details.md#view-project-details-smai-domain).

## Step 3: Attach your custom image using the SageMaker AI domain
<a name="byoi-how-to-step-3-attach-custom-image"></a>

To attach your custom image to your Amazon SageMaker Unified Studio project, you must attach your custom image to your SageMaker AI domain. Follow the steps in [Attach your custom image to your domain](https://docs.aws.amazon.com/sagemaker/latest/dg/studio-updated-byoi-how-to-attach-to-domain.html) in the *SageMaker AI Developer Guide*, using the SageMaker AI domain obtained from above.

## Step 4: Access your custom image in Amazon SageMaker Unified Studio
<a name="byoi-how-to-step-4-access-custom-image"></a>

Once your custom image is attached to your Amazon SageMaker Unified Studio project, the users with access to your project can access it. For instructions on how users can access the custom images, see [Launch your custom image in Amazon SageMaker Unified Studio](byoi-launch-custom-image.md).