Imagine walking into a local kirana (grocery) store or a home-based boutique in India. The owner is busy managing inventory, talking to customers, and packing orders. They want to showcase their daily deals on WhatsApp, but writing slick, bilingual promotional posts is a time-consuming chore. They don't have a dedicated design team, and writing formatted English and Devanagari copy feels out of reach.
For the AI for Bharat Hackathon (organized by Hack2Skill and supported by AWS), my teammate Bi Bi Sufiya Shariff and I set out to solve this exact problem.
We built BizBoost AI — बोल के बेचो (Speak it. Sell it.) 🎙️
While Sufiya engineered the mobile-first frontend experience, I focused on designing a highly robust, low-latency serverless backend on AWS. In this post, I will walk you through the architectural design, Python integration, and why the new Amazon Nova Lite model is an absolute game-changer for regional Indian languages.
🏗️ The Serverless Architecture
When building for a fast-paced hackathon, infrastructure scaling, zero cold-starts, and cost efficiency are crucial. I designed a 100% serverless pipeline that handles everything from the API gateway routing to storage and model invocation.
| Architecture Layer | Service / Component | Description |
|---|---|---|
| 📱 Frontend Interface | React App Hosted on AWS Amplify | Captures user audio inputs via native Web Speech API and establishes mobile-responsive layouts. |
| 🌐 API Gateway Integration | Amazon API Gateway | Manages rate limiting, handles CORS configurations, and maps secure HTTPS endpoints. |
| ⚡ Serverless Compute Layer | AWS Lambda (Python) | Parses string inputs, builds dynamic system prompts, handles errors, and calls Bedrock runtimes. |
| 🗄️ Database Management | Amazon DynamoDB | Acts as an ultra-fast historical log registry to store and fetch user session histories. |
| 🧠 Generative AI Core Engine | Amazon Bedrock (Amazon Nova Lite) | Understands multi-dialect Hinglish phrases and structures raw logic payloads into clean, dual-language outputs. |
Architectural Flow:
- Frontend Hosting (AWS Amplify): Hosts our React single-page application. It captures the user's voice, runs local browser translation, and sends the transcript to the API.
- API Gateway: Manages CORS, rate-limits, and securely routes incoming requests to our compute layer.
- AWS Lambda (Compute): A Python function orchestrates the prompt construction, invokes Amazon Bedrock, formats the JSON payload, and updates our storage.
- Amazon Bedrock (LLM Core): Leverages Amazon Nova Lite, a lightweight model optimized for low latency and high accuracy in multilingual contexts.
- Amazon DynamoDB: Stores history metadata so small businesses can instantly view or re-share previous entries.
🛠️ The Backend Implementation: Lambda & Amazon Bedrock Nova
One of the standout features of the new Amazon Nova model series is its native understanding of structural instruction sets. Instead of relying on fragile prompt hacks to get clean JSON output, we can explicitly specify response rules.
Here is the exact AWS Lambda code I deployed to handle the transcription analysis and model invocation:
import json
import os
import boto3
# Initialize the Bedrock Runtime client in the target region
bedrock = boto3.client(service_name='bedrock-runtime', region_name='us-east-1')
def lambda_handler(event, context):
try:
# 1. Parse request body
body = json.loads(event.get('body', '{}'))
raw_transcript = body.get('transcript', '')
if not raw_transcript:
return {
'statusCode': 400,
'headers': {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json'
},
'body': json.dumps({'error': 'Audio transcript is empty or missing.'})
}
# 2. Structure System Instructions for Regional Nuances
system_prompt = (
"You are an expert copywriter for small businesses and local merchants in India. "
"Take the user's spoken product description (which will be in Hindi, English, or Hinglish) "
"and generate two highly engaging, promotional WhatsApp catalog posts:\n"
"1. One written in beautiful Hindi script (Devanagari) filled with positive marketing hooks and relevant emojis.\n"
"2. One written in fluent English, capturing the same exciting tone, pricing, and details with emojis.\n\n"
"Respond strictly in valid JSON format with keys 'hindi_post' and 'english_post'. "
"Do not return any conversational text, markdown wrappers, or explanations outside the JSON object."
)
# 3. Assemble the payload optimized for Amazon Nova Lite
payload = {
"messages": [
{"role": "system", "content": [{"text": system_prompt}]},
{"role": "user", "content": [{"text": raw_transcript}]}
],
"inferenceConfig": {
"temperature": 0.7,
"maxTokens": 1500
}
}
# 4. Invoke the Model on Bedrock
response = bedrock.invoke_model(
modelId='amazon.nova-lite-v1:0',
contentType='application/json',
accept='application/json',
body=json.dumps(payload)
)
# 5. Extract and parse the model response
response_body = json.loads(response['body'].read().decode('utf-8'))
model_output = response_body['output']['message']['content'][0]['text']
# Parse the JSON string from the model output
post_data = json.loads(model_output)
return {
'statusCode': 200,
'headers': {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json'
},
'body': json.dumps(post_data)
}
except Exception as e:
print(f"Server-side exception: {str(e)}")
return {
'statusCode': 500,
'headers': {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json'
},
'body': json.dumps({'error': 'Failed to process prompt. Check system logs.'})
}
💡 Why Amazon Nova Lite Shines for This Use Case
As developers, we often run into trade-offs between accuracy, latency, and cost. During our testing phase, Amazon Nova Lite proved to be the ultimate sweet spot:
- Multilingual and Regional Dialect Mastery: Merchants rarely speak pure book Hindi; they speak a vibrant blend of Hindi, English, and regional slang (Hinglish). Nova Lite successfully parsed contextual nuances (like "bhaiya discount de dena" or "best quality kapda") and converted them into polished sales hooks.
- Deterministic JSON Outputs: By passing strict JSON output system directives, Nova Lite didn't require complex extraction logic. It returned reliable, clean JSON structures every single time.
- Extremely Low Latency: For voice-activated apps, response speed defines the user experience. Nova Lite delivered output payloads in under 2.2 seconds, ensuring the merchant doesn't face an awkward wait.
🚀 Takeaways from the Hackathon
Working on BizBoost AI with Sufiya reinforced a key product design truth: AI is only as good as its accessibility. You can build the most powerful backend in the world, but if a merchant in a noisy market can't use it easily, it won't gain traction. By combining serverless speed, AWS regional reliability, and Bedrock's state-of-the-art models, we built a highly scalable tool that can make a real difference in the lives of local businesses.
- Check out our live web app: BizBoost AI Live
- Connect with me on LinkedIn: Mohammed Ayaan Adil Ahmed
What are your thoughts on Amazon Bedrock's Nova models? Have you integrated serverless AI workflows into your projects? Let’s discuss in the comments! 👇

Top comments (0)