reference deployment

MongoDB Atlas Analytics with Amazon SageMaker

Connect MongoDB data with SageMaker machine learning

This Partner Solution deploys MongoDB Atlas with Amazon SageMaker analytics to the Amazon Web Services (AWS) Cloud. It helps you integrate a MongoDB Atlas database cluster with AWS managed machine learning (ML). The solution ingests data from a MongoDB Atlas cluster using a MongoDB Realm trigger and Amazon EventBridge. AWS Lambda functions push database changes to SageMaker and write predictions back to the MongoDB cluster.

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

  •  What you'll build
  • This Partner Solution sets up the following:

    • In the MongoDB SaaS account:
      • A MongoDB cluster.
      • A MongoDB Atlas Realm trigger to send database change events to EventBridge in the customer account.
    • In the customer account:
      • EventBridge to ingest MongoDB change events from the Realm trigger and send SageMaker result events back to the MongoDB database. EventBridge uses the following event buses and rules:
        • A Partner SaaS event bus to receive MongoDB change events from the Realm trigger.
        • A rule to route events to the pull events Lambda function.
        • A custom event bus to receive SageMaker result events from the pull events Lambda function.
        • A rule to route results to the push results Lambda function.
      • Two Lambda functions:
        • A pull events function to read events from the Partner SaaS event bus and get results from SageMaker.
        • A push results function to write results from SageMaker to the MongoDB database in the MongoDB SaaS account.
      • An Amazon Simple Storage Service (Amazon S3) bucket for model-training artifacts.
      • SageMaker to provide an endpoint to a pretrained ML model.
  •  How to deploy
  • To deploy this Partner Solution, follow the 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
    2. Complete predeployment steps in the deployment guide.
    3. 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.
    4. Insert data into the deployed MongoDB collection to test the solution.

    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?