Using DocumentDB
Connecting to DocumentDB running in the private subnet of AWS VPC from your DevBox.
Architecture Diagram
Existing Database
Step 1: Accessing DocumentDB from a DevBox
Follow the Connecting to AWS guide.
Go to Amazon DocumentDB > Clusters > Your Cluster.
Select Connectivity & Security. You will see the commands and DocumentDB hostname for accessing it.
In your DevBox, import the MongoDB public GPG key:
Add MongoDB package repository source:
Reload local package database:
Install MongoDB:
Download the certificate:
Connect to the database:
where the cluster endpoint will be available in Connectivity & Security section.
New Database
Step 1: Creating a DocumentDB Instance
Follow the Connecting to AWS guide.
Go to Amazon DocumentDB > Create Cluster.
Select Instance Based Cluster.
In the Configuration section choose Instance Class, number of instances for your cluster.
Set Username and Password.
Turn on Show advanced settings.
In the Network settings , choose the VPC where your bastion host is running, subnet group and assign a security group which has inbound access to only VPC.
Click Create cluster.
Step 2: Accessing DocumentDB from a DevBox
In your DevBox, import the MongoDB public GPG key:
Add MongoDB package repository source:
Reload local package database:
Install MongoDB:
Download the certificate:
Connect to the database:
where the cluster endpoint will be available in Connectivity & Security section.
Last updated