Amazon Web Services (AWS) provides a robust and scalable platform for deploying R2R (RAG to Riches). This guide will walk you through the process of setting up R2R on an Amazon EC2 instance, making it accessible both locally and publicly.
# Set required remote providersexport OPENAI_API_KEY=sk-...# Optional - pass in a custom configuration herer2r serve --docker --full
Double check the health of the system:
Copy
Ask AI
r2r health
Test ingesting and searching a sample document from a remote environment:
Copy
Ask AI
# From your local machiner2r --base-url=http://<your-instance-public-ip>:7272 ingest-sample-filesleep 10r2r --base-url=http://<your-instance-public-ip>:7272 search --query='Who was aristotle?'
Replace <your-instance-public-ip> with your EC2 instance’s public IP address.
You have now successfully deployed R2R on Amazon Web Services. The application should be accessible locally through SSH tunneling and optionally publicly through direct access to the EC2 instance. Remember to configure authentication and implement proper security measures before exposing your R2R instance to the public internet.For more information on configuring and using R2R, refer to the configuration documentation.