- Newest
- Most votes
- Most comments
To create a JupyterLab 4 Notebook for a Neptune instance, you'll need to take a slightly different approach than what you've been doing previously. Here's how you can achieve this:
-
Create the notebook instance directly in Amazon SageMaker:
- Open the Amazon SageMaker console.
- Navigate to "Notebook" and then "Notebook instances".
- Choose "Create notebook instance".
- Give your notebook a name, preferably prefixed with "aws-neptune-" (e.g., "aws-neptune-my-jupyterlab4-notebook").
- Under "Platform identifier", select "notebook-al2-v3" which corresponds to JupyterLab 4.
- Configure other settings as needed.
-
Set up the notebook for Neptune:
- In the "Additional configuration" section, create a new lifecycle configuration.
- Name the configuration (you can use the same name as your notebook instance).
- In the lifecycle configuration script, add the necessary export commands for Neptune ML, such as:
echo "export NEPTUNE_ML_ROLE_ARN=<your Neptune ML IAM role ARN>" >> ~/.bashrc echo "export NEPTUNE_EXPORT_API_URI=<your export service URI>" >> ~/.bashrc - Replace the placeholders with your actual Neptune ML IAM role ARN and export service URI.
-
Configure IAM permissions:
- Ensure that the IAM role associated with your notebook instance has the necessary permissions for Neptune.
- You may need to add an inline policy to the role, granting permissions for CloudWatch, S3, and SageMaker actions required for Neptune operations.
-
After creating the notebook instance, you can install the Neptune-specific libraries and configure the connection to your Neptune database within your notebooks.
By following these steps, you'll have a JupyterLab 4 notebook instance that can work with your Neptune databases. While it's not created directly from the Neptune console, this approach allows you to use the latest JupyterLab version while still maintaining the necessary configurations for Neptune integration.
Remember to update any existing scripts or configurations that might be affected by the upgrade to JupyterLab 4, as there have been some package version changes that could impact certain functionalities.
Sources
JupyterLab versioning - Amazon SageMaker AI
Creating a new Neptune Analytics notebook using the AWS Management Console - Neptune Analytics
Manually configuring a Neptune notebook for Neptune ML - Amazon Neptune
Relevant content
asked 2 years ago

Taking the above AI-generated protocol and trying to make it work was in vain. ChatGPT and myself have reached the following conclusions after several hours of work:
Where We Stand
Unfortunately there is no way I can raise the attention of the relevant AWS teams to this issue, as I'm not on a support plan. I'm hoping the deadline for upgrading to JupyterLab 4 in June will not leave us Neptune customers without any workable solution!
We are aware of the deprecation date and this is a known issue. The underlying library that we use to support integration with Neptune, called Graph-Notebook, has an open Issue where we are tracking this issue. I would suggest following that issue to track when we have a release that supports JupyterLab 4 - https://github.com/aws/graph-notebook/issues/689