AWS Deployment – Work and Observations
1. Brainstorming and Planning
We had to go through a lot of brainstorming and proper planning on how to transition from the phase “Build it” → “Ship it.”
Deploying a real-time voice system to AWS for the first time seemed daunting to us because voice applications require persistent, low-latency streaming (WebSockets and WebRTC), which differs from traditional static websites.
2. Cloning the Local Repository
Cloning the local repo to a new one so that the new repo is successfully deployed/shipped online through the AWS platform.
So, we created a new GitHub repo and changed the remote repository to the new one so that the new changes are reflected in the newly created repo.
3. Why We Had to Discard AWS Lambda or Serverless Functionality
Real-time voice agents maintain and require continuous WebSocket and WebRTC connections. AWS Lambda functions sleep and disconnect after request completion.
4. Enabling HTTPS for Microphone Access
We also became aware that web browsers block microphone access over HTTP (unless it is on localhost).
In order to use microphone audio over the internet, we had to enable HTTPS while setting up the EC2 instance in AWS.
5. Storage Problem with the EC2 Instance
The storage problem for the EC2 instance was that, by default, it was set to 8 GiB.
While setting up the files in the EC2 terminal on the Mac, the disk quota was reached, and the process terminated without completion.
So, we decided to modify the volume to 40 GiB.
6. Hugging Face and Nginx Configuration Issues
First, our system could not reach Hugging Face to download the required embedding model (likely all-MiniLM-L6-v2) for our RAG ingestion step.
Second, Nginx was failing to start because of a syntax error in the configuration file generated by the deployment script.
git clone https://github.com/chitrakverma5342/Voice_Agentic_RAG_AWS.git
We ran the Nginx syntax test to see exactly which line and file was broken.
We looked for any missing semicolons, unescaped variables, or mismatched braces.
After validating the configuration, we tested and restarted it to make it work.
Conclusion
Overall, the deployment process gave us practical experience in moving a real-time voice-based RAG system from the development phase to a working AWS environment. The challenges we encountered, including repository configuration, continuous connection requirements, HTTPS, EC2 storage limitations, Hugging Face connectivity, and Nginx configuration errors, helped us understand the practical aspects of deploying and troubleshooting such systems in a cloud environment.
Loading article