reference deployment

MongoDB on AWS

Scalable NoSQL database with document-oriented storage on the AWS Cloud

This Quick Start sets up a flexible, scalable AWS environment for MongoDB, and launches MongoDB into a configuration of your choice.

MongoDB is an open source, 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.

Use this Quick Start to set up a customizable MongoDB cluster on AWS. You can customize the number of replica sets (1-3), join the replica sets to a sharded cluster, and configure the instance types and Amazon EBS storage attached to the MongoDB nodes.

The Quick Start is for IT infrastructure architects, administrators, and DevOps professionals who want to administer their own MongoDB environment. If you want to set up a fully managed database service instead, you can use MongoDB Atlas. MongoDB Atlas creates a new virtual private cloud (VPC) for your managed databases and automates potentially time-consuming administration tasks such as managing, monitoring, and backing up your MongoDB deployments.

MongoDB-Logo

This Quick Start was developed by
AWS solutions architects.

  •  What you'll build
  •  How to deploy
  •  Cost and licenses
  •  What you'll build
  • Use this Quick Start 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 Quick Start launches each member of the replica set in a different Availability Zone. However, if you choose an AWS Region that doesn’t provide three or more Availability Zones, the Quick Start reuses one of the zones to create the third subnet.

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

  •  How to deploy
  • To build your MongoDB environment on AWS, follow the instructions in the deployment guide. The deployment process includes these steps:

    1. If you don't already have an AWS account, sign up at https://aws.amazon.com.
    2. Launch the Quick Start. Each deployment takes about 15 minutes. You can choose from two 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.

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

    The AWS CloudFormation template for this Quick Start 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 Quick Start 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.