A serverless AWS architecture was designed and deployed, delivering two distinct Generative AI solutions running in the customer's isolated AWS account.
Secure Application & API Layer
To demonstrate the solution, a functional demo application was built.
- Amazon API Gateway: Amazon API Gateway was used to create both an HTTP API (for predictions) and a WebSocket API (for the chatbot).
- AWS Fargate & CloudFront: A demo UI built with Streamlit was hosted using AWS Fargate and an Application Load Balancer, with Amazon CloudFront providing secure, low-latency access to the application for the customer's team.
The Logistics Prediction Engine
To solve the challenge of manual forecasting, Stormit built a machine learning pipeline to predict three key outcomes for a new trade: the logistics pattern, the nomination timing, and the parcel quantity.
- Amazon SageMaker was used to train an XGBoost model on the historical, anonymized data. The final model was deployed on a SageMaker Serverless Inference endpoint, providing a scalable, cost-effective way to get real-time predictions without managing servers.
- An AWS Lambda function was created to process incoming prediction requests. It takes data from a new trade, calls the SageMaker endpoint for a prediction (model inference), and returns the result.
The Conversational AI Chatbot
To make data insights accessible, Stormit built an AI-powered chatbot that allows users to ask questions in plain English. This solution respects the platform's data isolation rules by not training a central model on the data.
- Amazon Bedrock: The solution uses Amazon Bedrock to provide the Claude foundation model.
- Intelligent Querying (Text-to-SQL): When a user asks a question, a "Chatbot Lambda" function securely sends the question and the database schema to Amazon Bedrock. Bedrock translates the natural language question into a precise SQL query.
- Amazon Athena: The generated SQL query is then run against Amazon Athena, a serverless query engine. Athena queries the data directly in the Amazon S3 data lake, which contained the anonymized trade and logistics data in Parquet format
- AWS Glue: An AWS Glue Catalog was used to define the data schemas, making the S3 data easily queryable by Athena.
- The query results are sent back to Bedrock to be translated into a natural language answer for the user.