In this tutorial, we are creating a new _ Amazon EC2_ instance and installing AnacondaPythonPostgreSQL, and Jupyter notebook to run our python scripts from our local machine(windows 10) on _EC2 _ instance throw SSH.

1- Lunch EC2 Instance:

  • From AWS Management Console we chose EC2 service then we start by launching our new EC2 instance with an Ubuntu Server AMI.
  • For the sake of this tutorial, we will stay at the free tier of _AWS _ by selecting instance type t2.micro which is free tier eligible.
  • We will leave the configuration details as it is, raise the volume size(optional step max 30GiB), we will proceed with no tags and finally, we will open our instance to SSH on _port 22, PostgreSQL _ on _ port 5432, Jupiter notebook _ on _ port 8888, HTTP _ on _ port 80, _ and _ HTTPS _ on _ port 443 _ to our local machine IP only.

Image for post

  • After verifying our configurations we attach a new key-pair to the instance or chose an existing one.

2- Configure SSH on Your Local Machine:

  • Since our local machine’s OS is probably windows 10🙏 SSH is provided with the **_CMD _**by default otherwise we will be needing to use **_puTTY _**to connect to the instance using throw SSH.
  • On our local machine, we navigate to **_C:\Users\our-local-user **then .\ssh we add a new text file named **‘config’ _**then we fill it as shown in the picturebelow.

(note: to save the file with no extension we File → Save as → Write the file name inside double quotes, everything after the ## sympol is only for domenstrations )

Image for post

#aws #jupyter-notebook #python #ec2 #postgres #postgresql

Configure Amazon EC2 to Run PostgreSQL, Anaconda and Jupyter Notebook
1.55 GEEK