Skip to content

Instantly share code, notes, and snippets.

View irazakharchenko's full-sized avatar
🎯
Focusing

Iryna Borkivska (Zakharchenko) irazakharchenko

🎯
Focusing
View GitHub Profile
@gerardev
gerardev / database.py
Created November 15, 2019 21:41
Connect to AWS Document DB using SSH Tunnel in python
from sshtunnel import SSHTunnelForwarder
from pymongo import MongoClient
ssh_tunnel_host = 'our-ec2-hostname.compute-1.amazonaws.com'
ssh_tunnel_port = 22
ssh_tunnel_user = 'ubuntu'
ssh_tunnel_pkey = 'ec2-hostname.pem'
db_user = 'database-user'
db_pass = 'database-pass'