amazon-web-servicesgoogle-cloud-platformgoogle-cloud-mlamazon-sagemakergcp-ai-platform-notebook

How to remotely connect to GCP ML Engine/AWS Sagemaker managed notebooks?


GCP has finally released managed Jupyter notebooks. I would like to be able to interact with the notebook locally by connecting to it. Ie. i use PyCharm to connect to the externaly configured jupyter notebbok server by passing its URL & token param.

Question also applies to AWS Sagemaker notebooks.


Solution

  • On AWS, you can use AWS Glue to create a developer endpoint, and then you create the Sagemaker notebook from there. A developer endpoint gives you access to connect to your python or Scala spark REPL via ssh, and it also allows you to tunnel the connection and access from any other tool, including PyCharm.

    For PyCharm professional we have even tighter integration, allowing you to SFTP files and debug remotely.

    And if you need to install any dependencies on the notebook, apart from doing it directly on the notebook, you can always choose new>terminal and you will have a connection to that machine directly from your jupyter environment where you can install anything you want.