RDS (Relational Database Service)
Connecting an RDS instance to a DevZero workspace.
If you're more of a visual learner, check out the video tutorial!
Architecture Diagram
Existing Database
Step 1: Accessing RDS from a DevBox
- Follow the Connecting to AWS guide.
- Go to RDS > DB Instances > DB Name.
- Select Connectivity and Security.
- Copy Endpoint.
- Go to DevBox.
- Connecting to the Database.
Run the following commands as per the RDS Database Engine:
To install the mysql client cli:
To access the database:
New Database
Step 1: Creating an RDS Instance
- Follow the Connecting to AWS guide.
- Go to RDS > DB Instances.
- Select Standard Create.
- Use one of the DB Engine in the Configuration.
- Choose the Available Versions of the Database.
- Choose the Templates based on your use-case. It could be Production or Dev/Test.
- Scroll Down to the Settings and specify your Database Name.
- Choose Cluster Storage Configuration and DB Instance Class.
- Go to Connectivity > VPC.
- Choose your VPC , DB Subnet Group and Security Group. Make sure the specified Security Group allows inbound db connections.
- Click on Create Database.
Step 2: Accessing RDS from DevBox
- You will see two endpoints. Copy Writer Type Endpoint.
- Go to the Secrets Manager.
- Click on Retrieve Secret Value. This secret is storing your Database Username and Password.
- Go to DevBox.
- Connecting to the Database:
psql -h <RDS Endpoint> --username <Username> -d <Database Name> --password