Академический Документы
Профессиональный Документы
Культура Документы
_________________________________________________________
SSH Tunneling (Port Forwarding) through EC2 Instance
This method involves creating an SSH tunnel from your local machine to the RDS
instance through an EC2 instance that's in the public subnet.
Prerequisites:
An EC2 instance in the public subnet that can access the RDS instance.
SSH access to the EC2 instance from your local machine.
Steps:
Replace /path/to/your/key.pem with the path to your PEM key, localPort with a local
port on your machine, rds-instance-endpoint with your RDS endpoint, rdsPort with
your RDS port (default PostgreSQL port is 5432), and ec2-public-ip with the public
IP of your EC2 instance.
Connect to your PostgreSQL database using a local client (like pgAdmin or psql) by
connecting to localhost:localPort.