Menu
MongoDB on AWS
Quick Start Reference Deployment Guide

Step 2. Launch the Quick Start

Note

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 this Quick Start. For full details, see the pricing pages for each AWS service you will be using in this Quick Start.

  1. Choose one of the following options to launch the AWS CloudFormation template into your AWS account. For help choosing an option, see Deployment Options earlier in this guide.

    Option 1

    Deploy MongoDB into a new VPC on AWS

    
                                                Quick Start launch button for MongoDB in new
                                                  VPC

    Option 2

    Deploy MongoDB into an existing VPC on AWS

    
                                                Quick Start launch button for MongoDB in
                                                  existing VPC

    Important

    If you’re deploying MongoDB into an existing VPC, make sure that your VPC is set up with two public subnets and three private subnets in different Availability Zones. You’ll also need the domain name option configured in the DHCP options as explained in the Amazon VPC documentation. You’ll be prompted for your VPC settings when you launch the Quick Start.

    The private subnets require NAT gateways or NAT instances in their route tables for outbound Internet connectivity, and you must create bastion hosts and their associated security group for inbound SSH access. (To set up your VPC, you can use the Amazon VPC Quick Start. To set up bastion hosts, see the Linux bastion host Quick Start. If you deploy into a new VPC, the Quick Start will set these up for you automatically.)

    Each deployment takes about 15 minutes to complete.

  2. Check the region that’s displayed in the upper-right corner of the navigation bar, and change it if necessary. The template is launched in the US East (N. Virginia) Region by default.

  3. On the Select Template page, keep the default setting for the template URL, and then choose Next.

  4. On the Specify Details page, change the stack name if needed. Review the parameters for the template. Provide values for the parameters that require your input. For all other parameters, review the default settings and customize them as necessary. When you finish reviewing and customizing the parameters, choose Next.

    In the following tables, parameters are listed by category and described separately for the two deployment options:

    Option 1: Parameters for deploying MongoDB into a new VPC

    View template

    Network Configuration:

    Parameter label Parameter name Default Description
    Availability Zones AvailabilityZones Requires input The list of Availability Zones to use for the subnets in the VPC. The Quick Start preserves the logical order you specify. This deployment uses 2 or 3 Availability Zones. After you make your selections, make sure that the Number of Availability Zones parameter matches your selections.
    Number of Availability Zones NumberOfAZs Requires input The number of Availability Zones (2 or 3) to use in the VPC. This must match your selections in the Availability Zones parameter; otherwise, deployment will fail with an AWS CloudFormation template validation error. (Note that some regions provide only one or two Availability Zones.)
    VPC CIDR VPCCIDR 10.0.0.0/16 CIDR block for the VPC to create.
    Private Subnet 1 CIDR PrivateSubnet1CIDR 10.0.0.0/19 CIDR block for the private subnet located in Availability Zone 1.
    Private Subnet 2 CIDR PrivateSubnet2CIDR 10.0.32.0/19 CIDR block for the private subnet located in Availability Zone 2.
    Private Subnet 3 CIDR PrivateSubnet3CIDR 10.0.64.0/19 CIDR block for the private subnet located in Availability Zone 3.
    Public Subnet 1 CIDR PublicSubnet1CIDR 10.0.128.0/20 CIDR block for the public subnet located in Availability Zone 1.
    Public Subnet 2 CIDR PublicSubnet2CIDR 10.0.144.0/20 CIDR block for the public subnet located in Availability Zone 2.
    Public Subnet 3 CIDR PublicSubnet3CIDR 10.0.160.0/20 CIDR block for the public subnet located in Availability Zone 3.
    Allowed Bastion External Access CIDR RemoteAccessCIDR Requires input The CIDR IP range that is permitted external SSH access to the bastion hosts. We recommend that you set this value to a trusted IP range. For example, you might want to grant only your corporate network access to the software.

    Security Configuration:

    Parameter label Parameter name Default Description
    Key Name KeyPairName Requires input Public/private key pair, which allows you to connect securely to your instance after it launches. When you created an AWS account, this is the key pair you created in your preferred region.

    Linux Bastion Configuration:

    Parameter label Parameter name Default Description
    Bastion AMI Operating System BastionAMIOS Amazon-Linux-HVM The Linux distribution for the AMI to be used for the bastion host instances. You can choose Amazon Linux, CentOS, or Ubuntu Server. If you choose CentOS, make sure that you have a subscription to the CentOS AMI in AWS Marketplace.
    Bastion Instance Type BastionInstanceType t2.micro EC2 instance type for the bastion host instances.
    Number of Bastion Hosts NumBastionHosts 1 The number of bastion hosts to create (1-4). Auto Scaling will ensure that you always have this number of bastion hosts running.

    MongoDB Database Configuration:

    Parameter label Parameter name Default Description
    Cluster Replica Set Count ClusterReplicaSetCount 1 Number of replica set members. Choose 1 or 3.
    IOPS Iops 100 IOPS of the EBS volume when the io1 volume type is chosen. Otherwise, this setting is ignored.
    MongoDB Version MongoDBVersion 3.4 The version of MongoDB that will be deployed. You can choose version 3.2 or 3.4.
    MongoDB Admin Username MongoDBAdminUsername admin The user name for the MongoDB administrative account.
    MongoDB Admin Password MongoDBAdminPassword Requires input Your MongoDB database password. You can enter an 8-32 character string consisting of the characters: [A-Za-z0-9_@-].
    Node Instance Type NodeInstanceType m4.large EC2 instance type for the MongoDB nodes.
    Replica Shard Index ReplicaShardIndex 0 Shard index of this replica set. For information about shard indexes, see the MongoDB documentation.
    Volume Size VolumeSize 400 Size of the Amazon EBS (data) volume to be attached to the MongoDB node, in GiBs.
    Volume Type VolumeType gp2 Volume type of the Amazon EBS (data) volume to be attached to the MongoDB node (gp2 or io1).

    AWS Quick Start Configuration:

    Parameter label Parameter name Default Description
    Quick Start S3 Bucket Name QSS3BucketName quickstart-reference S3 bucket where the Quick Start templates and scripts are installed. Use this parameter to specify the S3 bucket name you’ve created for your copy of Quick Start assets, if you decide to customize or extend the Quick Start for your own use. The bucket name can include numbers, lowercase letters, uppercase letters, and hyphens, but should not start or end with a hyphen.
    Quick Start S3 Key Prefix QSS3KeyPrefix mongodb/latest/ The S3 key name prefix used to simulate a folder for your copy of Quick Start assets, if you decide to customize or extend the Quick Start for your own use. This prefix can include numbers, lowercase letters, uppercase letters, hyphens, and forward slashes. It should not start or end with a hyphen (-).

    Option 2: Parameters for deploying MongoDB into an existing VPC

    View template

    Network Configuration:

    Parameter label Parameter name Default Description
    VPC VPC Requires input ID of your existing VPC (e.g., vpc-0343606e) where you want to deploy the MongoDB cluster.
    Primary Node Subnet PrimaryNodeSubnet Requires input ID of the existing subnet (e.g., subnet-a0246dcd) in your VPC where you want to deploy the primary MongoDB node(s).
    Secondary0 Node Subnet Secondary0NodeSubnet Requires input ID of the existing subnet in your VPC where you want to deploy the first secondary MongoDB node(s) in the replica set. For more information on expected placement, see the Architecture section.
    Secondary1 Node Subnet Secondary1NodeSubnet Requires input ID of the existing subnet in your VPC where you want to deploy the second secondary MongoDB node(s) in the replica set. For more information on expected placement, see the Architecture section.
    Bastion Security Group ID BastionSecurityGroupID Requires input ID of the bastion security group in your existing VPC (e.g., sg-7f16e910).

    Security Configuration:

    Parameter label Parameter name Default Description
    Key Name KeyPairName Requires input Public/private key pair, which allows you to connect securely to your instance after it launches. When you created an AWS account, this is the key pair you created in your preferred region.

    MongoDB Database Configuration:

    Parameter label Parameter name Default Description
    Cluster Replica Set Count ClusterReplicaSetCount 1 Number of replica set members. Choose 1 or 3.
    Iops Iops 100 IOPS of the EBS volume when the io1 volume type is chosen. Otherwise, this setting is ignored.
    MongoDB Version MongoDBVersion 3.4 The version of MongoDB that will be deployed. You can choose version 3.2 or 3.4.
    MongoDB Admin Username MongoDBAdminUsername admin The user name for the MongoDB administrative account.
    MongoDB Admin Password MongoDBAdminPassword Requires input Your MongoDB database password. You can enter an 8-32 character string consisting of the characters: [A-Za-z0-9_@-].
    Node Instance Type NodeInstanceType m4.large EC2 instance type for the MongoDB nodes.
    Replica Shard Index ReplicaShardIndex 0 Shard index of this replica set. For information about shard indexes, see the MongoDB documentation
    Volume Size VolumeSize 400 Size of the Amazon EBS (data) volume to be attached to the MongoDB node, in GiBs.
    Volume Type VolumeType gp2 Volume type of the Amazon EBS (data) volume to be attached to the MongoDB node (gp2 or io1).

    AWS Quick Start Configuration:

    Parameter label Parameter name Default Description
    Quick Start S3 Bucket Name QSS3BucketName quickstart-reference S3 bucket where the Quick Start templates and scripts are installed. Use this parameter to specify the S3 bucket name you’ve created for your copy of Quick Start assets, if you decide to customize or extend the Quick Start for your own use. The bucket name can include numbers, lowercase letters, uppercase letters, and hyphens, but should not start or end with a hyphen.
    Quick Start S3 Key Prefix QSS3KeyPrefix mongodb/latest/ The S3 key name prefix used to simulate a folder for your copy of Quick Start assets, if you decide to customize or extend the Quick Start for your own use. This prefix can include numbers, lowercase letters, uppercase letters, hyphens, and forward slashes. It should not start or end with a hyphen (-).
  5. On the Options page, you can specify tags (key-value pairs) for resources in your stack and set advanced options. When you're done, choose Next.

  6. On the Review page, review and confirm the template settings. Under Capabilities, select the check box to acknowledge that the template will create IAM resources.

  7. Choose Create to deploy the stack.

  8. Monitor the status of the stack. When the status is CREATE_COMPLETE, as shown in Figure 6, the MongoDB cluster is ready.

    
                        Successful creation of the MongoDB cluster

    Figure 6: Successful creation of the MongoDB cluster