Deploy on AWS into a new VPC

View guide — HTML | PDF

To get started with MongoDB on AWS, follow the step-by-step instructions in the Quick Start deployment guide.

To see a full list of Quick Start reference deployments, view the catalog.

MongoDB-Logo

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 offers two deployment options: you can build a new AWS infrastructure for your MongoDB, or deploy the software into your existing AWS infrastructure. Each deployment takes about 15 minutes.

  • What you'll build

    Use this Quick Start to 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.*
    • 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.
    • Your choice to create a new VPC or to deploy MongoDB into your existing VPC. The template that deploys the Quick Start into an existing VPC skips the tasks marked by asterisks above, and prompts you for your network configuration.


    For details, see the Quick Start deployment guide.

  • Deployment details

    Build your MongoDB environment in about 15 minutes:

    1. Sign up for an AWS account.
    2. Launch the Quick Start into a new or existing VPC.
      Choose the new VPC option if you want to build a new AWS infrastructure for the deployment. Choose the existing VPC option if you already have your AWS environment set up.
    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 (MongoDB version, number of replica sets, shard index).

    For complete details, see the Quick Start deployment guide.

  • 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.