Attach your custom image to your domain - Amazon SageMaker AI
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Attach your custom image to your domain

This page provides instructions on how to attach your custom image to your domain. Use the following procedure to use the Amazon SageMaker AI console to navigate to your domain and start the Attach image process.

The following instructions assume that you have pushed an image to a Amazon ECR repository in the same Amazon Web Services Region as your domain. If you have not already done so, see Create a custom image and push to Amazon ECR.

When you choose to attach an image, you will have two options:

  • Attach a New image: This option will create an image and image version in your SageMaker AI image store and then attach it to your domain.

    Note

    If you are continuing the BYOI process, from Create a custom image and push to Amazon ECR, use the New image option.

  • Attach an Existing image: If you have already created your intended custom image in the SageMaker AI image store, use this option. This option attaches an existing custom image to your domain. To view your custom images in the SageMaker AI image store, see View custom image details (console).

New image
To attach a new image to your domain
  1. Open the SageMaker AI console.

  2. Expand the Admin configurations section, if not already done so.

  3. Under Admin configurations, choose Domains.

  4. From the list of Domains, select the domain you want to attach the image to.

    Note

    If you are attaching the image to a SageMaker Unified Studio project, see View the SageMaker AI domain details associated with your project.

  5. Open the Environment tab.

  6. In the Custom images for personal Studio apps section, choose Attach image.

  7. For the Image source, choose New image.

  8. Include your Amazon ECR image URI. The format is as follows.

    account-id.dkr.ecr.aws-region.amazonaws.com/repository-name:tag
    1. To obtain your Amazon ECR image URI, navigate to your Amazon ECR private repositories page.

    2. Choose your repository name link.

    3. Choose the Copy URI icon that corresponds to your image version (Image tag).

  9. Follow the rest of the instructions to attach your custom image.

    Note

    Ensure that you are using the application type consistent with your Dockerfile. For more information, see Dockerfile samples.

Once the image has been successfully attached to your domain, you will be able to view it in the Environment tab.

Existing image
To attach an existing image to your domain
  1. Open the SageMaker AI console.

  2. Expand the Admin configurations section, if not already done so.

  3. Under Admin configurations, choose Domains.

  4. From the list of Domains, select the domain you want to attach the image to.

    Note

    If you are attaching the image to a SageMaker Unified Studio project, see View the SageMaker AI domain details associated with your project.

  5. Open the Environment tab.

  6. In the Custom images for personal Studio apps section, choose Attach image.

  7. For the Image source, choose Existing image.

  8. Choose an existing image and image version from the SageMaker AI image store.

    If you are unable to view your image version, you may need to create an image version. For more information, see View custom image details (console).

  9. Follow the rest of the instructions to attach your custom image.

    Note

    Ensure that you are using the application type consistent with your Dockerfile. For more information, see Dockerfile samples.

Once the image has been successfully attached to your domain, you will be able to view it in the Environment tab.

Once your image has been successfully attached to your domain, the domain users can choose the image for their application. For more information, see Launch a custom image in Studio.

Note

If you have attached a custom image to your SageMaker Unified Studio project, you will need to launch the application from within SageMaker Unified Studio. For more information, see Launch your custom image in the Amazon SageMaker Unified Studio User Guide.