reference deployment

MEAN Stack with AWS Fargate on AWS

A MEAN-stack serverless application architected to scale for production

This Partner Solution deploys MongoDB Atlas on the Amazon Web Services (AWS) Cloud. It's for developers and DevOps professionals who want to deploy a database application built on a MEAN stack (MongoDB, Express, Angular, Node) using containers with AWS Fargate. You can use it to build and deploy scalable, manageable JavaScript-based web applications.

Extend your data to support any workload that uses MongoDB’s developer data platform, including full-text search and real-time analytics. For a fully managed MongoDB cluster, try MongoDB Atlas for free on AWS Marketplace.

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

  •  What you'll build
  • Use this Partner Solution to set up the following:

    • A virtual private cloud (VPC) for the MongoDB Atlas project that spans at least three Availability Zones. This includes a fully managed MongoDB Atlas cluster and a database user.
    • An AWS PrivateLink connection between your VPC and the MongoDB Atlas VPC.
    • A VPC that spans two Availability Zones. The VPC is configured with public subnets, according to AWS best practices, to provide you with your own virtual network on AWS.
    • In the public subnets, managed NAT gateways to allow outbound internet access.
      • An Amazon Elastic Container Service (Amazon ECS) task and service with the AWS Fargate launch type for the containerized Angular client application using the user-provided Amazon Elastic Container Registry (Amazon ECR) image URI. 
      • An AWS Cloud Map entry for the service discovery.
      • An Amazon ECS task and service with the Fargate launch type for the containerized server application using the user-provided Amazon ECR image URI.
      • An Application Load Balancer to distribute incoming traffic to client applications.
    • An AWS Cloud Map to create a private namespace based on DNS, which will be visible only inside the specified Amazon VPC.
    • Amazon ECR for storing images for client and server applications.
    • Fargate to run your containerized applications without the need to provision and manage the underlying infrastructure.
  •  How to deploy
  • To deploy this Partner Solution, follow instructions in the deployment guide, which includes these steps.

    1. Sign in to your AWS account. If you don't have an account, sign up at https://aws.amazon.com.
    2. If you don't already have a MongoDB account, sign up at https://www.mongodb.com/cloud/atlas/register.
    3. Create container images.
    4. Launch the Partner Solution. The stack takes 10–20 minutes to deploy. Before you create the stack, choose the AWS Region from the top toolbar.
    5. Test the deployment.

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

  •  Costs and licenses
  • For MongoDB cost estimates, refer to MongoDB Pricing. This Partner Solution deploys MongoDB Atlas with the latest stable MongoDB enterprise version, which is licensed and distributed under the Server Side Public License.

    You are responsible for the cost of the AWS services and any third-party licenses used while running this solution. There is no additional cost for using the solution.

    This solution includes configuration parameters that you can customize. Some of these settings, such as instance type, affect the cost of deployment. For cost estimates, refer to the pricing pages for each AWS service you use. Prices are subject to change.

    Tip: After you deploy a solution, create AWS Cost and Usage Reports to track associated costs. These reports deliver billing metrics to an Amazon Simple Storage Service (Amazon S3) bucket in your account. They provide cost estimates based on usage throughout each month and aggregate the data at the end of the month. For more information, refer to What are AWS Cost and Usage Reports?