Connect your local Visual Studio Code to SageMaker spaces
You can remotely connect from Visual Studio Code to Amazon SageMaker Studio spaces. You can use your customized local VS Code setup, including AI-assisted development tools and custom extensions, with the scalable compute resources in Amazon SageMaker AI. This guide provides concepts and setup instructions for administrators and users.
A remote VS Code connection establishes a secure connection between your local VS Code and SageMaker spaces. This connection lets you:
-
Access SageMaker AI compute resources — Run code on scalable SageMaker AI infrastructure from your local environment
-
Maintain security boundaries — Work within the same security framework as SageMaker AI
-
Keep your familiar Visual Studio Code experience — Use compatible local extensions, themes, and configurations that support Microsoft Remote Development
Note
Not all VS Code extensions are compatible with remote development. Extensions that require local GUI components, have architecture dependencies, or need specific client-server interactions may not work properly in the remote environment. Verify that your required extensions support Microsoft Remote Development before use.
Topics
Key concepts
-
Remote connection — A secure tunnel between your local VS Code and a SageMaker space. This connection enables interactive development and code execution in VS Code using SageMaker AI compute resources.
-
Amazon SageMaker Studio space — A dedicated environment within Amazon SageMaker Studio where you can manage your storage and resources for your Studio applications.
-
Deep link — A button (direct URL) from the SageMaker UI that initiates a remote connection to your local IDE.
Connection methods
There are three main ways to connect your local VS Code to SageMaker spaces:
-
Deep link access — You can connect directly to a specific space by using the Open in VS Code button available in SageMaker AI. This uses URL patterns to establish a remote connection and open your SageMaker space in VS Code.
-
AWS Toolkit for Visual Studio Code — You can authenticate with AWS Toolkit for Visual Studio Code. This allows you to connect to spaces and open a remotely connected window from VS Code.
-
SSH terminal connection — You can connect via command line using SSH configuration.
Supported IDEs
Remote connection to Studio spaces supports:
VS Code version requirement
VS Code version v1.90
Operating system requirements
You need one of the following operating systems to remotely connect to Studio spaces:
-
macOS 13+
-
Windows 10
-
Windows 11
-
Linux
-
Install the official Microsoft VS Code for Linux
, not an open-source version
-
Image requirements
SageMaker Distribution images — When using SageMaker Distribution with remote access, use SageMaker Distribution version 2.7 or later.
Custom images — When you bring your own image with remote access, ensure that you follow the custom image specifications.
Instance requirements
-
Memory — 8GB or more
-
Instance types — Use instances with at least 8GB of memory. The following instance types are not supported due to insufficient memory (less than 8GB):
ml.t3.medium
,ml.c7i.large
,ml.c6i.large
,ml.c6id.large
, andml.c5.large
. For a more complete list of instance types, see the Amazon EC2 On-Demand Pricing page.