reference deployment

MongoDB on AWS

Scalable NoSQL database with document-oriented storage

This Partner Solution sets up a flexible, scalable AWS environment for MongoDB and deploys MongoDB into the configuration of your choice. To try a fully managed MongoDB cluster on AWS for free, refer to MongoDB Atlas on AWS.

MongoDB is a general-purpose, NoSQL database that provides support for JSON-styled, document-oriented storage systems. Its flexible data model enables you to store data of any structure, and it provides full index support, sharding, and replication.

This Partner Solution is for IT infrastructure architects, administrators, and DevOps professionals who want to set up a MongoDB cluster running Community Edition version 3.2 or 3.4. You can customize the number of replica sets (1–3), join replica sets to a sharded cluster, and configure the instance types and Amazon Elastic Block Store (Amazon EBS) storage attached to MongoDB nodes.

This Partner Solution was developed by MongoDB in collaboration with AWS. MongoDB is an AWS Partner.

To launch a fully managed MongoDB cluster on AWS, try it for free from AWS Marketplace.

AWS Service Catalog administrators can add this architecture to their own catalog.  

  •  What you'll build
  • Use this Partner Solution to automatically set up the following MongoDB environment on AWS:

    • A virtual private cloud (VPC) configured with public and private subnets across three Availability Zones. This provides the network infrastructure for your MongoDB deployment.*
    • In the public subnets, NAT gateways to allow outbound internet connectivity for resources (MongoDB instances) in the private subnets.*
    • In the public subnets, bastion hosts in an Auto Scaling group with Elastic IP addresses to allow inbound Secure Shell (SSH) access. One bastion host is deployed by default, but this number is configurable.*
    • An AWS Identity and Access Management (IAM) instance role with fine-grained permissions for access to AWS services necessary for the deployment process.
    • Security groups to enable communication within the VPC and to restrict access to only necessary protocols and ports.
    • In the private subnets, a customizable MongoDB cluster with the option of running standalone or in replica sets, along with customizable Amazon EBS storage. The Partner Solution launches each member of the replica set in a different Availability Zone. But, if you choose an AWS Region that doesn’t provide three or more Availability Zones, the Partner Solution reuses one of the zones to create the third subnet.

    *  The template that deploys the Partner Solution into an existing VPC skips the tasks marked by asterisks and prompts you for your existing VPC configuration.

  •  How to deploy
  • To deploy MongoDB, follow the instructions in the deployment guide. A standard deployment takes about 15 minutes and includes these steps:

    1. If you don't already have an AWS account, sign up at
    2. Launch the Partner Solution by choosing from the following options:
    3. Connect to MongoDB nodes on AWS.

    To customize your deployment, you can change your network configuration, choose different instance types for your resources, adjust Amazon EBS storage settings (volume type, volume size, and IOPS), and configure MongoDB options such as MongoDB version, number of replica sets, and shard index.

    To deploy a fully managed MongoDB cluster, refer to MongoDB Atlas on AWS.

    Amazon may share user-deployment information with the AWS Partner that collaborated with AWS on this solution.  

  •  Costs and licenses
  • You are responsible for the cost of the AWS services used while running this Partner Solution reference deployment. There is no additional cost for using the Partner Solution.

    The AWS CloudFormation template for this Partner Solution includes configuration parameters that you can customize. Some of these settings, such as instance type, number of replica sets, storage type, storage size, and IOPS, will affect the cost of deployment. See the pricing pages for each AWS service you will be using for cost estimates.

    The Partner Solution deploys MongoDB Community Edition version 3.2 or 3.4, which is open-source software distributed under the GNU Affero General Public License version 3.