

# Amazon SageMaker Unified Studio Local IDE Support
Local IDE Support

## Overview


Amazon SageMaker Unified Studio now supports local IDE - Visual Studio Code (VS Code) and Kiro integrations, enabling you to use your preferred development environment. This integration allows you to maintain your familiar local development setup including custom extensions, debugging tools, and AI-assisted development features while accessing the Amazon SageMaker Unified Studio compute resources and data.

While Amazon SageMaker Unified Studio's web-based IDEs provide secure and efficient cloud development environments, many developers prefer local IDEs for several key advantages like extensive customization options through many available extensions, user customizations such as code snippet shortcuts, keyboard shortcuts, and theme customization.

# Prerequisites


Before connecting VS Code, Kiro, or Cursor remotely to a SageMaker Unified Studio Space, ensure that you have the following prerequisites:
+ Access to an existing domain in Amazon SageMaker Unified Studio.
+ A supported IDE and AWS Toolkit version, as listed in the following table.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/prerequisites.html)
+ The AWS Toolkit extension installed from the Extensions marketplace in your IDE.
+ One of the following supported operating systems:
  + macOS 13 or later
  + Windows 10 or Windows 11
  + Linux (requires the official Microsoft VS Code distribution for VS Code and Cursor)
+ A Space instance that meets the following requirements:
  + Memory: Minimum 8 GB RAM. We recommend instances with 8 GB or more memory for optimal performance.
  + Unsupported instance types: `ml.t3.medium`, `ml.c7i.large`, `ml.c6i.large`, `ml.c6id.large`, `ml.c5.large`
+ A compatible image:
  + SageMaker Distribution: Version 2.8 or later
  + Custom images: Must follow SageMaker custom image specifications
+ Extension compatibility: Not all VS Code extensions support remote development.

**Important**  
Remote Space connections are not supported for TIP (Trusted Identity Propagation) enabled projects. For instructions on how to set the `enableTrustedIdentityPropagationPermissions` parameter to false to use remote connection for Spaces, see [Trusted identity propagation](https://docs.aws.amazon.com/sagemaker-unified-studio/latest/adminguide/trusted-identity-propagation.html).

# VS Code Setting in Amazon SageMaker Unified Studio


Follow the steps described in these sections to integrate Amazon SageMaker Unified Studio in VS code:

**Topics**
+ [

## Authenticating directly in Local IDE
](#local-ide)
+ [

# Link to VS Code from Amazon SageMaker Unified Studio
](link-to-vs-code.md)

## Authenticating directly in Local IDE


**In Identity Center based domains**

1. Open the AWS Toolkit panel in VS Code and navigate to the Amazon SageMaker Unified Studio section.

1. Choose Sign in to get started. You will see 2 options to sign in with IAM Credentials and IAM Identity Center. Choose IAM Identity Center and enter your domain URL (format: `https://domain-id.sagemaker.region.on.aws`).

1. You will see a prompt asking you to open a link in the browser for IAM Identity Center authentication, choose Open on the Do you want Code to open the external website? prompt. You will be directed to the browser AWS IAM Identity Center authentication. Complete the authentication flow in your browser, choose Allow access on the next prompt, and return to VS Code.

1. You should now be prompted to select a project. If not, under the domain, choose Select a project to choose from the list of available projects in your domain.

1. Once connected, you'll see a hierarchical view of your resources. Under the selected Project, you have Data and Compute resources associated with the project.

**In IAM-based domains**

1. Open the AWS Toolkit panel in VS Code and navigate to the Amazon SageMaker Unified Studio section.

1. Choose Sign in to get started. You will see 2 options to sign in with IAM Credentials and IAM Identity Center. Choose IAM Credentials.

1. You can either choose an existing credential profile and edit it or create a new one.
   + To edit an existing credential profile, follow the process in [AWS IAM credentials](https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/setup-credentials.html).
   + To create a new credential profile, follow the prompts and provide the credential of the Login Role you use to access your project in Amazon SageMaker Unified Studio IAM-based domain.
     + Select the region where your IAM-based domain is in. After the profile is created, sign in by selecting the created profile.

1. You will then see your Amazon SageMaker Unified Studio resources including Data and Compute resources listed in a sub-panel within AWS Toolkit.

The resources under Data show all your project's data sources: S3 buckets, Redshift, and Lakehouse in one place, with easy browsing through databases, tables, and schema. You can access the data schema directly without switching between different tools or screens, making it easy for code authoring in VS Code.

The Compute resource has Data warehouse, Data processing, and Spaces within each project. Data Warehouse and Data Processing list the compute connections in the project and hovering over them displays the connection metadata. Spaces are remote IDE environments you have access to in the project that you can connect to remotely to author code from your local VS Code IDE.

# Link to VS Code from Amazon SageMaker Unified Studio


You can use Open in VS Code link provided in Amazon SageMaker Unified Studio to access your SageMaker Space in VS Code. When you choose this option, Amazon SageMaker Unified Studio will open VS Code on your system and open your SageMaker space in VS Code. 

**Note**  
You must be using AWS Toolkit version 3.87 or higher for Open in VS Code to function. 

**In Identity Center based domains:**

1. Navigate to Amazon SageMaker Unified Studio using the URL from your admin and log in using your SSO credentials.

1. Expand the Build menu in the top navigation, then choose JupyterLab.

1. Once your JupyterLab Notebook opens, choose Open in VS Code in the top right corner of the page.

**In IAM-based domains:**

1. Navigate to Amazon SageMaker Unified Studio using the URL from your admin and log in using your IAM credentials.

1. In the left navigating, choose JupyterLab

1. Once your JupyterLab Notebook opens, choose Open in VS Code in the top right corner of the page. This will establish a remote connection and open your SageMaker space in VS Code.

**Note**  
The sessions initiated through Open in VS Code link do not automatically reconnect if the remote session is interrupted. You will need create a new remote connection using the Open in VS Code link in Amazon SageMaker Unified Studio. The sessions established through this link can last for 12 hours if not interrupted. 

# Kiro in Amazon SageMaker Unified Studio
Kiro in Amazon SageMaker Unified Studio

Kiro is Amazon's AI-powered agentic IDE that you can use as a local IDE to connect to your Amazon SageMaker Unified Studio Spaces and resources.

These instructions assume you already have an Amazon SageMaker Unified Studio domain, project, and Space set up.

**To set up Kiro**

1. Download and install Kiro from [kiro.dev](https://kiro.dev) (minimum version 0.8.0 or later).

1. Open the AWS Toolkit panel in Kiro and navigate to the Amazon SageMaker Unified Studio section.

1. Choose **Sign in to get started**, and then choose **IAM Credentials**. You can also use IAM Identity Center.

1. Create or choose a credential profile using the same IAM role you use to access your project in the AWS Management Console. Choose the Region your project is in, and then sign in. Your Amazon SageMaker Unified Studio resources (Data, Compute, Spaces) appear in the panel.

1. Under your project, choose **Compute**, and then choose **Spaces**. Hover over the Space you want to connect to and choose the **Connect** button.

1. When prompted to install the Amazon SageMaker SSH Plugin for Kiro, choose **Install**. This enables remote access, starts the Space, and connects to it.

1. Sign in to Kiro on the Space when prompted. After you connect, all project files are available in your remote workspace.

**Note**  
Instances must have a minimum of 8 GB RAM. The following instance types are not supported: `ml.t3.medium`, `ml.c7i.large`, `ml.c6i.large`, `ml.c6id.large`, `ml.c5.large`.

You can provide your AI assistant with more context about Amazon SageMaker Unified Studio workspaces by linking a service-provided context file, smus-context.md, to the your existing AGENTS.md file or by creating a new one if it doesn't already exist. It is strongly recommended to use the Amazon SageMaker Unified Studio context file for a better user experience. As this is a service-provided context file and subject to change, you can edit other context files linked to AGENTS.md or to AGENTS.md directly.

# Link to Kiro from Amazon SageMaker Unified Studio


You can use Open in Kiro link provided in Amazon SageMaker Unified Studio to access your SageMaker Space in Kiro. When you choose this option, Amazon SageMaker Unified Studio will open Kiro on your system and open your SageMaker space in Kiro. 

**Note**  
You must be using AWS Toolkit version 3.97 or higher for Open in Kiro to function. 

**In Identity Center based domains:**

1. Navigate to Amazon SageMaker Unified Studio using the URL from your admin and log in using your SSO credentials.

1. Expand the Build menu in the top navigation, then choose JupyterLab.

1. Once your JupyterLab Notebook opens, choose Open in Kiro in the top right corner of the page.

**In IAM-based domains:**

1. Navigate to Amazon SageMaker Unified Studio using the URL from your admin and log in using your IAM credentials.

1. In the left navigating, choose JupyterLab

1. Once your JupyterLab Notebook opens, choose Open in Kiro in the top right corner of the page. This will establish a remote connection and open your SageMaker space in Kiro.

**Note**  
The sessions initiated through Open in Kiro link do not automatically reconnect if the remote session is interrupted. You will need create a new remote connection using the Open in Kiro link in Amazon SageMaker Unified Studio. The sessions established through this link can last for 12 hours if not interrupted. 

# Cursor in Amazon SageMaker Unified Studio
Cursor in Amazon SageMaker Unified Studio

Cursor is a VS Code-based AI-powered IDE that you can use as a local IDE to connect to your Amazon SageMaker Unified Studio Spaces and resources.

**Important**  
Cursor is currently verified only for Spaces with public internet access.

These instructions assume you already have an Amazon SageMaker Unified Studio domain, project, and Space set up.

**To set up Cursor**

1. Download and install Cursor from [cursor.com/download](https://cursor.com/download) (minimum version v2.6.18 or later).

1. Open the AWS Toolkit panel in Cursor and navigate to the Amazon SageMaker Unified Studio section.

1. Choose **Sign in to get started**, and then choose **IAM Credentials**. You can also use IAM Identity Center.

1. Create or choose a credential profile using the same IAM role you use to access your project in the AWS Management Console. Choose the Region your project is in, and then sign in. Your Amazon SageMaker Unified Studio resources (Data, Compute, Spaces) appear in the panel.

1. Under your project, choose **Compute**, and then choose **Spaces**. Hover over the Space you want to connect to and choose the **Connect** button.

1. When prompted to install the Remote SSH Plugin for Cursor, choose **Install**. This enables remote access, starts the Space, and connects to it.

1. Sign in to Cursor on the Space when prompted. After you connect, all project files are available in your remote workspace.

**Note**  
Instances must have a minimum of 8 GB RAM. The following instance types are not supported: `ml.t3.medium`, `ml.c7i.large`, `ml.c6i.large`, `ml.c6id.large`, `ml.c5.large`.

# Link to Cursor from Amazon SageMaker Unified Studio


You can use the Open in Cursor link provided in Amazon SageMaker Unified Studio to access your SageMaker Space in Cursor. When you choose this option, Amazon SageMaker Unified Studio will open Cursor on your system and open your SageMaker Space in Cursor.

**Note**  
You must be using AWS Toolkit version 3.100 or higher for Open in Cursor to function.

**In Identity Center based domains:**

1. Navigate to Amazon SageMaker Unified Studio using the URL from your admin and log in using your SSO credentials.

1. Expand the Build menu in the top navigation, then choose JupyterLab.

1. Once your JupyterLab Notebook opens, choose Open in Cursor in the top right corner of the page.

**In IAM-based domains:**

1. Navigate to Amazon SageMaker Unified Studio using the URL from your admin and log in using your IAM credentials.

1. In the left navigation, choose JupyterLab.

1. Once your JupyterLab Notebook opens, choose Open in Cursor in the top right corner of the page. This will establish a remote connection and open your SageMaker Space in Cursor.

**Note**  
The sessions initiated through Open in Cursor link do not automatically reconnect if the remote session is interrupted. You will need to create a new remote connection using the Open in Cursor link in Amazon SageMaker Unified Studio. The sessions established through this link can last for 12 hours if not interrupted.

# Connecting to Amazon SageMaker Unified Studio Spaces


Amazon SageMaker Unified Studio's remote connectivity establishes a secure tunnel between your local VS Code or Kiro and SageMaker Spaces, enabling interactive development and code execution using cloud compute resources while maintaining your familiar local environment.

**Note**  
Ensure network configuration is setup to allow the SSH traffic. For domains set up in virtual private cloud (VPC)-only mode (default), your domain should have a route out to the internet through a proxy or a NAT gateway. For more details, see [Integrated Gateways](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html). If your domain is completely isolated from the internet, refer to connecting to a Space from the AWS Toolkit in this page for setting up the remote connection.

You must enable remote access for the Space to connect to the Space.
+ For an existing Space, if the Space is in Stopped state, hover over the Space and choose the connect button. This should enable remote access, start the Space and connect to it.
+ For an existing Space, if the Space is in Running state, the Space must be restarted with remote access enabled. You can do this by clicking Connect and following the prompts to restart with remote access enabled. 
+ To enable remote access, while [creating a Space](https://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/create-space.html) in the portal, under Remote Access, toggle the switch to Enabled.

To connect to a Space in Amazon SageMaker Unified Studio from the AWS Toolkit:

1. Under **Project**, choose **Compute** and then choose **Spaces**.

1. In the row of the Space you want to connect to, choose the icon that says **Connect to SageMaker Space** when you hover over it.
   + If your `instanceType` is less than 8 GB, a prompt appears asking you to start your Space with a larger `instanceType`. Choose yes to connect to your SageMaker Space. The state of the Space changes to **Running**.

1. After the connection is successful, a new window opens. This window shows all the files that you have access to in the selected project. All the changes made here are reflected in the Amazon SageMaker Unified Studio Space.

# Domain and Project Switching


AWS Toolkit allows connecting to only one Amazon SageMaker Unified Studio Domain and Project at any point.
+ To switch to a different domain, in the Amazon SageMaker Unified Studio panel in AWS Toolkit, click on the ellipsis at the top right corner. Choose **Sign out**, then sign back in and choose the required domain.

Within a domain, you can switch between multiple Amazon SageMaker Unified Studio projects which you have access to.
+ To switch to a different project in a domain, in the Amazon SageMaker Unified Studio panel in AWS Toolkit, click on the ellipsis at the top right corner. Choose **Switch Project** and choose the required project from the list.

# Refresh Project Metadata


The metadata in AWS Toolkit can become stale over time if you have not interacted with it or are creating/deleting resources in the Unified Studio portal. To get the latest metadata, you can refresh project resources.
+ To refresh a project, in the Amazon SageMaker Unified Studio panel in AWS Toolkit, click on the ellipsis at the top right corner. Choose **Refresh Project**. All the project resources will be refreshed and updated with the latest metadata. Alternatively, hover over the project node and click on the refresh button to refresh the resource metadata.

# AWS Toolkit Experience in Remote Session


AWS Toolkit is also available in the remote IDE session. In the remote session, since you are already authenticated and are in a specific project, you are directly presented with the project resources. Currently the remote session offers:
+ The ability to use Data Explorer to browse your project data sources within the IDE (S3 buckets, Redshift, Lakehouse)
+ The ability for notebook users to pick Language and Compute Connections for each cell. This allows you to author polyglot notebooks where each cell can use its own language (Python, SQL, Markdown etc) and compute connection (Local Python, Athena, Redshift etc). This enables you to run code against your Spark and SQL connections from your local IDE through Amazon SageMaker Unified Studio Spaces.

# Troubleshooting


For common local IDE issues and resolutions, see [Local IDE troubleshooting](troubleshooting-issues.md#local-ide-troubleshooting-table) in the [Troubleshooting in Amazon SageMaker Unified Studio](troubleshooting-issues.md) chapter.