Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RDS-launchpad

Automated, dependency-free AWS RDS PostgreSQL real-time environment creation with DNS endpoint extraction.

Key Features

  • Zero Dynamic Dependencies: Compiled with CGO_ENABLED=0 into a single, isolated static binary capable of running on bare Linux or minimal Docker containers.
  • Synchronous Lifecycle Tracking: Intercepts asynchronous AWS API instantiation loops to block and monitor state changes in the foreground.
  • Real-time DNS Interception: Dynamically polls the target instance and prints the final live endpoint connection string the moment it changes from creating to available.

Why Use It?

  • No Pipeline Clutter: Replaces heavy Terraform configs or Ansible playbooks with a single tool for fast sandbox deployments.
  • Eliminates AWS Console Waiting: Stops you from manually refreshing the web console. It holds the foreground and prints the live DNS endpoint the second it goes live.
  • Reduces Cloud Costs: Allows developers to easily destroy infrastructure at night and rebuild a fresh lab in minutes, preventing idle resource billing.

Architecture Diagram

[Local CLI] -> (Invokes SDK) -> [AWS RDS API] (Status: creating)
     ^                                 |
     +--- [Polling Loop (Foreground)] -+ 
     v                                 |
[Terminal Output] <- (Returns Endpoint) <- [AWS RDS API] (Status: available)

Setup & Prerequisites

  1. AWS Credentials: Ensure your standard local AWS environment variables or config files are populated:

    export AWS_ACCESS_KEY_ID="your_access_key"
    export AWS_SECRET_ACCESS_KEY="your_secret_key"
    export AWS_REGION="us-east-1"
  2. Configuration file: Clone the sample template and add your specific database deployment metadata:

    cp config.json.example config.json

Installation & Compiling

To generate an optimized, fully self-contained static executable with all linked libraries assembled inside the binary, run:

CGO_ENABLED=0 go build -o provision-db createRDS.go

Usage

Execute the generated binary directly from your terminal workspace:

./provision-db

Expected Output

Initiating RDS PostgreSQL [lab-forensics-db] via Go...
Success. Initial Status: creating
Note: Staying in foreground to capture final DNS endpoint...

--- PROVISIONING COMPLETE ---
Endpoint: mylab-dbtname-db.csh2ci0webzp.us-east-1.rds.amazonaws.com:5432

You can check your RDS instance has been created with the following aws cli command:

$ aws rds describe-db-instances --db-instance-identifier lab-forensics-db --query "DBInstances[0].[DBInstanceStatus,Endpoint.Address]" --output table
---------------------------------------------------------------
|                     DescribeDBInstances                     |
+-------------------------------------------------------------+
|  available                                                  |
|  mylab-dbtname-db.csh2ci0webzp.us-east-1.rds.amazonaws.com  |
+-------------------------------------------------------------+

Built With

  • Official AWS SDK for Go v2 (https://github.com/aws/aws-sdk-go-v2)
  • Go 1.26+ Toolchain Standard Libraries

About

Automated, dependency-free AWS RDS PostgreSQL real-time environment creation with DNS endpoint extraction

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages