Revolutionizing Generative AI Applications with Amazon FSx for NetApp ONTAP and Amazon Bedrock
The post is co-written with Michael Shaul and Sasha Korman from NetApp.
Generative artificial intelligence (AI) applications are commonly built using a technique called Retrieval Augmented Generation (RAG) that provides foundation models (FMs) access to additional data they didn’t have during training. This data enriches the generative AI prompt to deliver more context-specific and accurate responses without continuously retraining the FM, while also improving transparency and minimizing hallucinations.
In this post, we introduce a cutting-edge solution that leverages Amazon FSx for NetApp ONTAP in conjunction with Amazon Bedrock to provide a RAG experience for generative AI applications on AWS. This innovative approach brings company-specific, unstructured user file data to Amazon Bedrock in a straightforward, fast, and secure manner.
Solution Overview
The solution provisions an FSx for ONTAP Multi-AZ file system with a storage virtual machine (SVM) joined to an AWS Managed Microsoft AD domain. An OpenSearch Serverless vector search collection provides a scalable and high-performance similarity search capability. The solution also implements a RAG Retrieval Lambda function that enriches the generative AI prompt using Amazon Bedrock APIs with company-specific data retrieved from OpenSearch Serverless.
With the use of AWS serverless services, such as AWS Lambda and Amazon API Gateway, the solution enables automatic scaling, event-driven compute, and API interfaces for seamless integration with generative AI applications. The diagram below illustrates the end-to-end flow of our innovative solution:
Prerequisites
Before deploying the solution, ensure you have the following prerequisites:
- Access to Amazon Bedrock using Anthropic Claude v3 Sonnet
- Installation of AWS Command Line Interface (CLI)
- Installation of Docker
- Installation of Terraform
Deploy the Solution
The solution code is available on the GitHub repository. Simply clone the repository and deploy the solution using the provided Terraform template.
- Clone the repository and navigate to the Terraform folder:
- Deploy the solution using Terraform:
sudo yum install -y unzip
git clone https://github.com/aws-samples/genai-bedrock-fsxontap.git
cd genai-bedrock-fsxontap/terraform
terraform init
terraform apply -auto-approve