You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wilson Jusuf edited this page Jan 22, 2021
·
4 revisions
Here are the steps to ssh into our RDS instance.
The RDS instance is publicly inaccessible but is under the same VPC & security group as the beanstalk instance.
What we have to do is to ssh into the beanstalk instance (the 'jumphost'), and access the database from there.
Steps:
ssh into the elastic beanstalk instance by using eb ssh ENVIRONMENT where ENVIRONMENT here is our prod environment (stonks-env). You need an IAM access key & secret here ,contact @willyspinner if you need one.
Install the postgresql client on the beanstalk AMI machine - sudo yum install -y postgresql
Get the PG_CONNSTR connection string (you can see this in beanstalk - I'm not going to post it here for security reasons) and simply run psql "$PG_CONNSTR" to access the database.
This isn't the most optimal way to do it for sure, so any suggestions to improve it, let us know!