---
title: "Discussion on \"Accessing AWS RDS from Private EC2: How to Install Database Clients on Private EC2 Instances Without an AWS NAT Gateway\" | Hashnode"
description: "Discussion on \"Accessing AWS RDS from Private EC2: How to Install Database Clients on Private EC2 Instances Without an AWS NAT Gateway\". Learn how to install database clients on a private EC2 instance and connect to AWS RDS without paying for an AWS NAT Gateway using a Bastion Host."
url: "https://hashnode.com/posts/accessing-aws-rds-from-private-ec2-how-to-install-database-clients-on-private-ec2-instances-without-an-aws-nat-gateway/6ae661c675d16366ba37b8b4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Accessing AWS RDS from Private EC2: How to Install Database Clients on Private EC2 Instances Without an AWS NAT Gateway](https://nanyaalbert.hashnode.dev/accessing-aws-rds-from-private-ec2-how-to-install-database-clients-on-private-ec2-instances-without-an-aws-nat-gateway?utm_source=hashnode&utm_medium=feed)

Learn how to install database clients on a private EC2 instance and connect to AWS RDS without paying for an AWS NAT Gateway using a Bastion Host.

Oct 31 · 13 min read · nanyaalbert.hashnode.dev  
Read the article

-   [#aws](https://hashnode.com/tag/aws)
-   [#aws-rds](https://hashnode.com/tag/aws-rds)
-   [#devops](https://hashnode.com/tag/devops)
-   [#cloud](https://hashnode.com/tag/cloud)
-   [#vpc](https://hashnode.com/tag/vpc)
-   [#subnet](https://hashnode.com/tag/subnet)

## Written by

[Albert Ifunanya Dominic](https://hashnode.com/@nanyaalbert)

@nanyaalbert

  
[View profile](https://hashnode.com/@nanyaalbert)

## Responses 3

Markdown supported · ⌘↵ to post

[Rishabh Mishra](https://hashnode.com/@rushdeploy)

[Nov 1](https://hashnode.com/posts/accessing-aws-rds-from-private-ec2-how-to-install-database-clients-on-private-ec2-instances-without-an-aws-nat-gateway/6ae661c675d16366ba37b8b4/comment/6ae6ab22aa02001ec1253696)

The temporary-route approach is the smart part, and the revert to strict isolation is what makes it safe to reuse. I would snapshot the private route table before adding the bastion route, so rolling back is a restore rather than a reconstruction from memory.

[Albert Ifunanya Dominic](https://hashnode.com/@nanyaalbert)

[Nov 1](https://hashnode.com/posts/accessing-aws-rds-from-private-ec2-how-to-install-database-clients-on-private-ec2-instances-without-an-aws-nat-gateway/6ae661c675d16366ba37b8b4/comment/6ae6ab22aa02001ec1253696#reply-6ae79e3eabc3cbc6d691e989)

Great Point Mishra. Thanks for reading.

[Rishabh Mishra](https://hashnode.com/@rushdeploy)

[Nov 2](https://hashnode.com/posts/accessing-aws-rds-from-private-ec2-how-to-install-database-clients-on-private-ec2-instances-without-an-aws-nat-gateway/6ae661c675d16366ba37b8b4/comment/6ae6ab22aa02001ec1253696#reply-6ae7fbb94e6d305c35d1222c)

Thanks, Albert. One check I would add after the revert is confirming no outbound route to the bastion remains, since that is easy to miss once access works again.
