

# Bringing existing resources into Amazon SageMaker Unified Studio
<a name="bring-resources-scripts"></a>

You can bring in existing resources to your Amazon SageMaker Unified Studio project by using the **Data** and **Compute** pages in your project, or by using scripts provided in GitHub.

Examples of resources you can bring into Amazon SageMaker Unified Studio are listed below.

## AWS Glue Data Catalogs
<a name="resource-scripts-gdc"></a>
+ A GitHub script for bringing this resource into Amazon SageMaker Unified Studio can be found [here](https://github.com/aws/Unified-Studio-for-Amazon-Sagemaker/tree/main/migration/bring-your-own-gdc-assets).

## Amazon S3 data
<a name="resource-scripts-s3"></a>

To bring your existing Amazon S3 data and use it in Amazon SageMaker Unified Studio, follow the guide in the link below. This guide explains how you can configure permissions and customize role assignments for Amazon SageMaker Unified Studio to access your Amazon S3 data from a project.
+ A GitHub script for bringing this resource into Amazon SageMaker Unified Studio can be found [here](https://github.com/aws/Unified-Studio-for-Amazon-Sagemaker/tree/main/migration/bring-your-own-role).
+ To add Amazon S3 connections using the Amazon SageMaker Unified Studio interface, see the Data storage section.

## Amazon Athena workgroups and saved queries
<a name="resource-scripts-athena"></a>
+ A GitHub script for bringing this resource into Amazon SageMaker Unified Studio can be found [here](https://github.com/aws/Unified-Studio-for-Amazon-Sagemaker/tree/main/migration/athena).

## Amazon EMR on EC2 clusters
<a name="resource-scripts-emr"></a>
+ A GitHub script for bringing this resource into Amazon SageMaker Unified Studio can be found [here](https://github.com/aws/Unified-Studio-for-Amazon-Sagemaker/tree/main/migration/emr).
+ To bring in existing clusters using the Amazon SageMaker Unified Studio interface, see [Adding an existing Amazon EMR on EC2 cluster in Amazon SageMaker Unified Studio](adding-existing-emr-on-ec2-clusters.md).

## Amazon EMR Serverless with Trusted Identity Propagation
<a name="resource-scripts-emr-serverless-tip"></a>

If you have an existing Amazon EMR Serverless application and want to connect it to your Amazon SageMaker Unified Studio project with Trusted Identity Propagation (TIP) enabled, you must use the AWS CLI. TIP propagates user identity context to Amazon EMR Serverless, enabling fine-grained data access control based on the authenticated user rather than a shared IAM role.

The Amazon SageMaker Unified Studio UI supports connecting existing Amazon EMR Serverless applications, but does not expose the TIP configuration. To create a TIP-enabled connection, use the following procedure.

Before you begin, make sure that you have the following:
+ **Amazon EMR Serverless application** – You have a running Amazon EMR Serverless application with Interactive Sessions and TIP enabled. For setup instructions, see [Trusted Identity Propagation in Amazon EMR Serverless](https://docs.aws.amazon.com/emr/latest/EMR-Serverless-UserGuide/security-iam-service-trusted-prop.html).
+ **Domain TIP support** – Your Amazon SageMaker Unified Studio domain supports Trusted Identity Propagation. For setup instructions, see [Trusted Identity Propagation in Amazon SageMaker Unified Studio](https://docs.aws.amazon.com/sagemaker-unified-studio/latest/adminguide/trusted-identity-propagation.html).
+ **AWS CLI v2** – Installed and configured with permissions to call `datazone:CreateConnection`.

**To create a TIP-enabled Amazon EMR Serverless connection**

1. 

**Gather your identifiers**

   Collect the following values from your environment:
   + **Domain ID** – In the Amazon SageMaker Unified Studio console, choose **Domains**, then choose your domain to view the domain details.
   + **Project ID** – In the Amazon SageMaker Unified Studio console, navigate to your project. The project ID is displayed in the project details.
   + **Environment ID** – Run the following command:

     ```
     aws datazone list-environments \
       --domain-identifier "{{domain-id}}" \
       --project-identifier "{{project-id}}" \
       --region {{region}}
     ```
   + **Application ARN** – In the Amazon EMR console, choose **Serverless**, then **Applications**. Alternatively, run:

     ```
     aws emr-serverless list-applications
     ```

1. 

**Create the TIP-enabled connection**

   Run the following command to create the connection with Trusted Identity Propagation enabled:

   ```
   aws datazone create-connection \
     --domain-identifier "{{domain-id}}" \
     --environment-identifier "{{environment-id}}" \
     --name "{{connection-name}}" \
     --enable-trusted-identity-propagation \
     --props '{ "sparkEmrProperties": { "computeArn": "{{serverless-application-arn}}"} }' \
     --region {{region}}
   ```

1. 

**Verify the connection**

   Confirm the connection appears in the Amazon SageMaker Unified Studio UI:

   1. Navigate to your project in Amazon SageMaker Unified Studio.

   1. Choose **Compute**, then **Data processing**.

   1. Verify that the new Amazon EMR Serverless connection shows status **Active**.

   Alternatively, verify through the CLI:

   ```
   aws datazone get-connection \
     --domain-identifier "{{domain-id}}" \
     --identifier "{{connection-id}}" \
     --region {{region}}
   ```

   Confirm that `"enableTrustedIdentityPropagation": true` appears in the response.

## Amazon Redshift clusters and Amazon Redshift Serverless workgroups
<a name="resource-scripts-redshift"></a>
+ To bring in existing Amazon Redshift clusters and workgroups using the Amazon SageMaker Unified Studio interface, see [Connecting to an existing Amazon Redshift resource](adding-a-existing-compute-connection.md).

## Amazon SageMaker AI resources
<a name="resource-scripts-sagemaker-ai"></a>


+ Amazon SageMaker Studio users can bring their existing SageMaker AI domains, user profiles, and spaces into Amazon SageMaker Unified Studio. This integration also supports additional SageMaker AI resources such as training jobs, machine learning pipelines, models, inference endpoints, and more. A package of GitHub scripts for bringing Amazon SageMaker AI resources into Amazon SageMaker Unified Studio can be found [here](https://github.com/aws/Unified-Studio-for-Amazon-Sagemaker/tree/main/migration/sagemaker-ai).

## AWS IAM roles
<a name="resource-scripts-iam"></a>

Use the utility script in GitHub to configure permissions and customize role assignments for Amazon SageMaker Unified Studio.
+ A GitHub script for bringing this resource into Amazon SageMaker Unified Studio can be found [here](https://github.com/aws/Unified-Studio-for-Amazon-Sagemaker/tree/main/migration/bring-your-own-role).

**Note**  
Review the prerequisites carefully before proceeding to execute the script. Make sure that you save your work and that you do not have any running tasks or processes such as reconfiguring a JupyterLab space or creating a new compute resource. These processes might get interrupted or cause the script to fail.