Created
November 18, 2019 20:04
-
-
Save Saka7/87c353c43b92eeaa5f79eb002a20376e to your computer and use it in GitHub Desktop.
Connect to aurora serverless from local machine using ssh tunnel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh_user=ubuntu | |
ec2_host=ec2-xxx | |
path_to_keypair="~/keypair.pem" | |
local_port=5432 | |
aurora_port=5432 | |
aurora_endpoint=aurora-serverless-database-x.cluster-x | |
ssh $ssh_user@$ec2_host -i $path_to_keypair -L $local_port:$aurora_endpoint:$aurora_port -fN | |
# psql -U postgres -d postgres -h 0.0.0.0 -W |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment