Skip to content

About

two aws solutions for remote access to private database

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Secure RDS PostgreSQL Access Solutions

This repository contains two approaches for securely accessing RDS PostgreSQL databases in AWS:

📂 Repository Structure

Branch: main (Overview)

  • Repository overview and navigation
  • Architecture comparison guides

Branch: cdk-infrastructure

  • AWS CDK Infrastructure as Code
  • Automated deployment of secure RDS access patterns
  • Two solutions: SSH Bastion and AWS Session Manager
  • Full documentation and how-to guides
  • 📁 See: cdk/ directory

Branch: clickops-guides

  • Manual AWS Console (ClickOps) Guides
  • Step-by-step console instructions
  • IAM Session Manager setup
  • RDS configuration guides
  • 📁 See: click ops/ directory

🚀 Quick Start

For Infrastructure as Code (CDK)

git checkout cdk-infrastructure
cd cdk
npm install
cdk deploy --all -c adminCidr=YOUR_IP/32

📖 Full CDK Documentation

For Manual Setup (ClickOps)

git checkout clickops-guides
cd "click ops"
# Follow the guides in markdown files

📖 ClickOps Guides


🔐 Security Features

Both approaches provide:

  • ✅ Private RDS in private subnets
  • ✅ IAM authentication for database access
  • ✅ SSL/TLS encryption enforced
  • ✅ No public database endpoints
  • ✅ Audit logging via CloudWatch
  • ✅ Least privilege access controls

📊 Approach Comparison

Aspect CDK (IaC) ClickOps (Manual)
Setup Time 10-15 minutes 30-45 minutes
Repeatability Fully automated Manual steps
Version Control Yes Documentation only
Learning Curve Medium (requires CDK knowledge) Low (AWS Console)
Maintenance Easy (code updates) Manual tracking
Best For Production, teams, automation Learning, POC, one-off setups

🏗️ Architecture

Both approaches implement:

Developer → Access Method → VPC → RDS PostgreSQL
                ↓
        [SSH Bastion OR SSM Instance]

Access Methods:

  • Solution A: SSH Bastion with port forwarding
  • Solution B: AWS Session Manager (keyless)

📚 Documentation

CDK Branch

ClickOps Branch

Main Branch


🛠️ Prerequisites

For CDK Approach

  • AWS CLI v2
  • Node.js 18+
  • AWS CDK CLI (npm install -g aws-cdk)
  • AWS account with admin access

For ClickOps Approach

  • AWS account with console access
  • AWS CLI v2 (for testing)
  • PostgreSQL client (psql)

🤝 Contributing

This is a reference implementation. Feel free to adapt for your needs:

  1. Fork the repository
  2. Check out the appropriate branch
  3. Make your changes
  4. Submit a pull request

📝 License

This project is provided as-is for educational and reference purposes.


🔗 Related Resources


Last Updated: January 2026
AWS Region: us-east-1 (examples)
PostgreSQL Version: 15.x on RDS

About

two aws solutions for remote access to private database

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors