How to create a new database within the same cluster using aws cdk

How to create a new database within the same cluster using aws cdk

Hey @Raj_Alamuri,

From what I know theoretically, it is possible, as it’s basically making use of MongoDB admin APIs via the AWS CDK framework. However, there is a caveat to consider. If you are within an M0 (free) cluster, you cannot create an additional M0 cluster since only one free cluster is permitted.

Furthermore, you can add more info about your use case, so other community members can chime in and share their ideas.

Regards,
Kushagra

hi @Raj_Alamuri, think of our AWS CDK integration as managing the control plane / admin layer for MongoDB Atlas. Therefore while you can create cluster or project or database user resources, you can’t create MongoDB Databases or Collections or insert Documents via AWS CDK. For these data plane operations you can use the mongo shell, MongoDB Compass, or perform via the Atlas UI.

also @Kushagra_Kesav, good news. recently on both AWS CloudFormation and AWS CDK integration we now support M0 deployments as well! Feel free to give it a try and let us know if you have any feedback as well. https://github.com/mongodb/mongodbatlas-cloudformation-resources/blob/69df5e229d619d28eb095984ad41341723dc68d7/examples/cluster/free-tier-M0-cluster.json#L41

Thank you both and hope this helps!