I am connecting from my MEAN Stack application (on AWS EC2) to jupyter lab hosted on another EC2 instance .
On my Jupyter lab EC2 instance I start Jupyter lab as
nohup jupyter lab --allow-root --ip 0.0.0.0 --port XXXX --no-browser &
In The Jupyter lab server EC2’s security group, I have added the IP of my MEAN (nodejs/angular) application.
Custom TCP TCP XXXX x.xx.xx.xxx/xx
But trying to connect from my EC2 (application) instance to EC2 (Jupyter instance) fails as connection timeout.
But if I give
Custom TCP TCP XXXX 0.0.0.0/0
I am able to connect.
I have disabled token and password to jupyterlab as I am expecting authentication to be happening from the application before re-directing it to Jupyter . But giving open access defeats the purpose.
Is there some config parameter that needs to be set it or something I am missing. I can access RStudio , Flask etc from my frontend app using the same logic of authentication from Angular app before re-direct. But Jupyterlab seems to have an issue.
I have set the following in jupyter_notebook_config.py:
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.token = ''
Any pointers would be grateful.
Front end call is a simple :
<iframe width="100%" id="lab" height="750px" style="border: none;overflow: hidden;" src="http://x.xx.xx.xxx:XXXX/lab" ></iframe>