Hi All, this document deals with how to setup documentdb in aws.
A document database is a type of nonrelational database that is designed to store semistructured data as documents.

AWS DocumentDB is compatible with MongoDB, where it is very fast, scalable, highly available and managed by AWS. Right now DocumentDB has started with limited regions such as Virginia, Oregon, etc later getting to all the regions. Setting up of documentDb is very easy and quick. AWS provides the setting up of Cluster for documentDb where the users can define how many numbers of instances to be part of the cluster.

So let’s see how to setup DocumentDB in AWS

Prerequisites

* AWS console permission with relevant access.

Setup

Step 1: Login to AWS console
Step 2: select the DocumentDB from the AWS services
Step 3: Select the region where you want to host your DocumentDB.
Step 4: Now go to Cluster, select create the cluster
Step 5: Now you can see create cluster wizard has opened up.
Step 6: Under configuration enter the following details
Enter a unique name for your cluster
Select the type of instances you want to launch in the cluster, this is as per your configuration
Enter the number of instances required to be part of the cluster


Step 7: Enter the following details under authentication section
Username:
Password:


Step 8: Under network settings choose the VPC, Subnet and security groups


Step 9: In cluster option, enter the port to connect your cluster. By default, it takes 27017 as the port number and instances will be launched under default parameter groups.


Step 10: Encryption At rest( this is optional, do you need the instance to be encrypted using KMS(AWS Key management system), if yes, either you can create a KMS key or use the default one. These keys are stored in AWS and required whenever the cases like restoring the snapshot, copying AMI etc.)

Step 11: You can enable backup for your DocumentDB cluster. Select the time to take the backup.


Step 12: In the maintenance tab, you select the time when the instance can go for the maintenance like patch update.

Step 13: Once you are done with all the configuration above mentioned, click on create the cluster.
Step 14: Wait for while to set up your cluster. Once your cluster creation is done

Get the endpoint URL and connect using mongodb client from your machine or application

mongo -h test.ap-southeast.aws.amazon.com -u XXXXX -p XXXX

© 2019, Techrunnr. All rights reserved.

#1
#2
#3
Questions Answered
Articles Written
Overall Points
Categories: AWSdatabase

Prabhin Prabharkaran

He is Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!!

0 Comments

Leave a Reply

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.