AWS EC2 Instance Security Group - All traffic - security

I am trying to launch an EC2 instance with security as 'all traffic' to create the jupyter notebook for personal practice. However I notice that the UI changed in AWS and where is this selection now? Should choose all the selections as in the attached file?
I followed the set-up instruction (a bit out-dated): https://www.udemy.com/course/spark-and-python-for-big-data-with-pyspark/learn/lecture/7005606#questions, but cannot launch the jupyter notebook (error showing page cannot be loaded)
Anyone can suggest? Thanks!!!
My setting in the ./jupyter/jupyter_notebook_config.py is as below:

Related

Using pyautogui.screenshot in AWS Workspaces

I'm running a python script in the AWS Workspaces to take a screensot of my entire desktop (inside AWS).
The script is working fine but when I "ended" the AWS Workspace, the screenshot being taken is the login page. Please find attached.
Inside the AWS Workspace, I already did any possible ways to prevent "my computer" from sleeping. Likewise, its Running Mode is AlwaysOn.
What I want to achieve is even though my AWS Workspace is not "active" I want my python script to capture the active desktop not the login page.

google cloud AI notebook save does not work

I created a deep learning instance inside the AI platform of google cloud . I use the built in jupyterlab notebooks running on the browser (I use chrome). Recently I have a problem with saving the code. autosave as well as saving the notebook files does not work. I keep see the message "saving started" when I try to save, but nothing other than that happens, and the code is not saved. I tried restart the kernel as well as restart the instance but the problem keeps returning. Anyone here encountered the same thing? have a solution?
thanks
What worked for me eventually was instead of using https connection I connected to the instance via ssh and then to accessed jupyterlab in local host. I followed this link:
https://cloud.google.com/ai-platform/deep-learning-vm/docs/jupyter
export PROJECT_ID="my-project-id"
export ZONE="my-zone"
export INSTANCE_NAME="my-instance"
gcloud compute ssh --project $PROJECT_ID --zone $ZONE \
$INSTANCE_NAME -- -L 8080:localhost:8080
I had a similar problem, I opened a notebook and GCP did not save it,
but after I started the notebook from a folder inside Jupyterlab - it saved it.

Error rendering dynamic content from Jupyter Notebook Dashboard

I'm trying to run a dashboard which is actually a Jupyter notebook. I've created the dashboard using the panel library. My dashboard contains some dynamic content. All this worked well on my local machine. Now, I'm trying to do the same on an AWS server. The static content loads fine. But I get this error somehow for the dynamic content:-
bokeh.min.js?v=57d29d5936e494351385d736f792154c:550 [bokeh] Failed to load Bokeh session HxjcYn9BmVgnOJsBicuXlx8fEuUQkxViUb7ROVIVGNel:
Error: Could not open websocket
Can someone help me with this?
Thanks
I resolved this issue by passing the --allow-websocket-origin=myserver_ip:app_port argument while starting it.

Deep Learning Virtual Machine can't run jupyter "No such notebook dir: ''/dsvm/Notebooks''"

I've set up a vm with Deep Learning Virtual Machine (Microsoft Azure).
Normally, I connect to the vm thanks to ssh etc
Then I run jupyter by writing jupyter notebook --no-browser.
But this time I have can't run jupyter notebook because there is this message Bad config encountered during initialization: "No such notebook dir: ''/dsvm/Notebooks''"
How can I fix that ?
Thanks for your help !
I presume you are trying to run Jupyter Notebook and with that goal in mind, I suggest you follow the following steps:
Move your notebook to ~/notebooks/
Find your Pubic IP Address of your VM from Azure Dashboard
Access https://your_public_ip_address:8000 in your web browser and log in using your vm login credentials
You should be able to see all the files you have in ~/notebooks/
I presume this method is defined by Azure for security reasons, to prevent people from having an open port without authentication. Hope this helps!
It worked for me :
jupyter notebook --notebook-dir=/home/$USER/notebooks --no-browser

Global access password for ipython notebook

In ipython notebook I found two (more or less) ways to secure my remote server which is running as my notebook host.
The c.NotebookApp.password option in the config secures the notebook from write access.
The --read-only flag allows not authenticated useres only to view my notebook.
But with point 2. I am not getting warm.
The problem is that it allows anybody to view my notebook. Actually I only want some privileged users to view my notebook. Until now I havn't found any way to do so.
Is there the possibility to secure my notebook globaly with, e.g. a .htaccess file or anything else?
In that case I can give all users the website password and I can change the notebook with my 1.option.
There is no built-in mechanisme for auth and read-only notebook in IPython. And security is complex enough to start adding option for Auth+Read-only at the moment.
You can also install a local copy of nbviewer and/or use nbconvert to export your notebook as static html, and serve using a classical appache/.htaccess scheme.

Resources