Amazon Aurora machine learning (ML) enables you to add ML-based predictions to applications via the familiar SQL programming language, so you don't need to learn separate tools or have prior machine learning experience. It provides simple, optimized, and secure integration between Aurora and AWS ML services without having to build custom integrations or move data around. When you run a ML query, Aurora calls Amazon SageMaker or Amazon Bedrock for a wide variety of ML algorithms including generative AI or Amazon Comprehend for sentiment analysis, so your application doesn't need to call these services directly.  

This makes Aurora machine learning suitable for low-latency, real-time use cases such as fraud detection, ad targeting, text summarization, and product recommendations. For example, you can build product recommendation systems by writing SQL queries in Aurora that pass customer profile, shopping history, and product catalog data to a SageMaker model, and get product recommendations returned as query results. You can receive the recommendations in real-time from the model or you can store an always up to date predicted column in your database by making periodic calls to the model.

Aurora ML is also a convenient and secure method to pass knowledge stored in Aurora to a large language model (LLM) for generation of a model response as part of Retrieval Augmented Generation (RAG) without having to write custom code. For example, you can use Aurora ML to pass your business data as part of a prompt to Amazon Bedrock to augment the knowledge of a foundation model and provide natural language answers to users utilizing your data. This makes building a chatbot that can answer questions containing specific product or pricing data possible.


Familiar SQL programming language

Aurora exposes ML models as SQL functions, allowing you to use standard SQL to build applications that call ML models, pass data to them, and return predictions or text as query results. There is no learning curve, development complexity, or any need to learn new programming languages, or tools.

Wide selection of ML algorithms

Run predictions using any ML model, including models that you trained in SageMaker or elsewhere, models offered in Amazon Bedrock, and models offered by AWS partners on the AWS Marketplace. You can also use Amazon Comprehend for sentiment analysis, without any training.


Aurora integrates directly with SageMaker, Amazon Bedrock and Amazon Comprehend, reducing the network delay. ML training and inferencing happen in SageMaker, Amazon Bedrock, and Amazon Comprehend, so there is no performance impact on Aurora. The integration between Aurora and each AWS machine learning service is further optimized for latency and throughput, delivering up to 100X throughput improvements. Since the machine learning model is deployed separately from the database and the application, each can scale up or scale out independently of the others.

Security and governance

The integration between Aurora, SageMaker, Amazon Bedrock, and Amazon Comprehend ensures that data security and governance are maintained inside the database. Access to Aurora and each ML service can be controlled via AWS Identity and Access Management (IAM) and within your Aurora database. The integration uses end-to-end encryption between services, and no data is persisted outside the database.

Text, video, and image support

Amazon Aurora PostgreSQL-Compatible Edition supports the pgvector extension to store machine learning model embeddings from text, video, or images and to perform efficient semantic similarity search. Aurora ML can also call the SageMaker or Amazon Bedrock models that generate these embeddings allowing you to continuously update these embeddings in your database.

Use cases

Product recommendations

You can use Aurora ML integration to build product recommendation systems that make personalized product purchase recommendations based on a customer’s profile, shopping history, and clickstream data. You can write SQL queries in Aurora that call ML models like linear learner and XGBoost, pass customer profile, shopping history, and product catalog data to these models, and get the product recommendations as query results. The query results can then be used in your application to improve the customer’s shopping experience.

Sentiment analysis

Aurora ML integration can enhance your customer service applications like call center analytics and customer support ticket handling. You can write SQL queries in Aurora, pass customer interaction data like online feedback forms, support tickets, and product reviews to Comprehend, analyze this data to determine customer’s sentiment, and get the customer sentiments returned as query results. The query results can then be used in your applications to improve your customer relationships.

Fraud detection

Aurora can help with fraud detection and prevention in applications like credit card and insurance claims processing. You can write SQL queries in Aurora that call ML models like K-means clustering and random cut forest, pass customer profile, transactions, merchant information, policy details, and claims data to these models, and get the transactions that require further review and analysis as query results. The query results can then be used in your applications for fraud identification and mitigation.

Customer service

Sales and customer service can be enhanced by analyzing text transcripts of customer dialog to learn the patterns of success and predict next best actions. The pgvector extension allows you to store embeddings from text that can be used in similarity search queries to find the best action taken for selling or when resolving a support case in a specific situation. Using Aurora ML, you can call the model which generates these embeddings to keep them up-to-date for faster real-time querying for optimal customer service recommendations.




  • There is no additional charge for the integration between Aurora and AWS machine learning services. You only pay for the underlying Sagemaker, Amazon Bedrock, or Amazon Comprehend services.
  • Amazon Comprehend is priced based on the amount of text processed. To minimize charges, pay attention to the size of your database queries.

How to get started

The Aurora ML integration with SageMaker and Amazon Comprehend is available for Amazon Aurora MySQL-Compatible versions 5.7 and higher and Aurora PostgreSQL-Compatible versions 11 and higher. The Aurora ML integration with Amazon Bedrock is available for Aurora PostgreSQL version 14 and higher and Aurora MySQL 3.06 and higher. You can get started with just a few clicks by upgrading to the latest version of Aurora and giving your Aurora database access to the AWS machine learning services in the Amazon RDS Management Console. You can read the Amazon Aurora documentation to learn more.

Learn more about Amazon Aurora

Select a features page to learn more about the MySQL- or PostgreSQL-compatible edition.

Sign up for an AWS account

Instantly get access to the Amazon RDS Management Console. 

Sign up 
Learn with 10-minute tutorials

Start building with simple Amazon Aurora tutorials.

Get started