3
$\begingroup$

Is it possible to work with AWS Sagemaker Studio Notebooks using an IDE such as VSCode or PyCharm/IntelliJ running on my local machine? And if yes, how?

Ideally I'd like to want to connect to the Sagemaker-managed Jupyter kernel from my local IDE, so I can see and edit the notebook in my IDE while execution happens in the kernel on AWS Sagemaker.

I know how to connect to a self-managed Jupyter installation on a remote server like EC2. This is not want I want. I'm looking to connect to a kernel managed by Sagemaker Studio.

$\endgroup$

2 Answers 2

1
$\begingroup$

VSCode supports a client-server architecture where the server is remote and the client is local. The process is to set up a Visual Studio Code Server on AWS and then connect that remote instance to your local VSCode client, step-by-step directions are here.

$\endgroup$
1
  • $\begingroup$ Thanks, this sounds like a great approach, but (as of July 2023) has a severe limitation: You can only install it code server on the "system" instance of Sagemager Studio, not on the (poentially bigger) instances that run the Jupyter notebook kernels. Option B only seems to work on non-Studio instances. (see sofian's comment below the post you linked to and github.com/aws-samples/amazon-sagemaker-codeserver/issues/10 ) So that doesn't really solve the question, unfortunately. $\endgroup$
    – florian
    Commented Jul 24, 2023 at 11:32
1
$\begingroup$

The only approach that I have found to work is to use the sagemaker-ssh-helper. This uses AWS SSM + SSH along with VSCode's remote development extension.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.