The official AWS CDK Construct Library for provisioning MongoDB Atlas resources via AWS CloudFormation. Current stable version 4.0.0 (released 2025) supporting aws-cdk-lib ^2.200.1 and constructs ^10.0.5. Provides L1, L2, and L3 CDK constructs for defining Atlas clusters, database users, network peering, and more in TypeScript, Python, .NET, Java, and Go. Unlike community alternatives, this is maintained by MongoDB, ensuring compatibility with Atlas API and CDK evolution. Regular monthly releases with semantic versioning. Ships full TypeScript declarations and adheres to AWS CDK best practices.
npm install awscdk-resources-mongodbatlasNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a MongoDB Atlas project, an M10 replica set cluster, and a database user with admin roles.
Update your project to use ESM ('type': 'module' in package.json) or use dynamic import: const { CfnCluster } = await import('awscdk-resources-mongodbatlas');Replace imports: import { Cluster } from 'awscdk-resources-mongodbatlas' → import { CfnCluster } from 'awscdk-resources-mongodbatlas'Use 'secretProfile' with AWS Secrets Manager or pass 'apiKeys.apiKeyId' and 'apiKeys.apiKey'.
Use the region constants from the Atlas API: 'US_EAST_1', 'EU_WEST_1', etc.
Explicitly set clusterType: 'REPLICASET' for standard replica sets.
Always provide 'orgId' from environment or Secret Manager.
Run npm install awscdk-resources-mongodbatlas@4.0.0. Ensure your project is ESM (type: module) or use dynamic require.
Check your providerSettings object includes all required fields: providerName, instanceSizeName, regionName.
Use a unique project name or import an existing project using 'CfnProject.fromProjectId()'.
Set MONGODB_ATLAS_PUBLIC_KEY and MONGODB_ATLAS_PRIVATE_KEY environment variables, or create a profile using mongocli.
Add clusterType: 'REPLICASET' (or 'GEOSHARDED') to the CfnCluster props.