Teaser Image
atomic14

DATABASES

Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
  ·     ·     ·     ·     ·   Posts  ·   Videos  ·   Tags  ·   Support

Connecting PSQL and Rails Console to Elastic Beanstalk

In this post, we explore a solution to the challenge of running the Rails console against a PostgreSQL database housed in a private subnet for security reasons. While it's a good security practice, it can limit access for bootstrapping users or debugging issues. By tunnelling through a Bastion server, we can establish a connection to the database as if it was running locally. We walk through code examples of SSH tunneling, database connection, and how to run Rails console. A key point is to ensure the Bastion server is shut down after use.
21 May 2017
Subscribe!
All content copyright Chris Greening © 2023 • All rights reserved.
Made with Jekyll