Ojje creates interactive storybooks to help children build reading skills. While AI had already reduced story creation from 70 days to 2, the final publishing process still required manual selection and took up to a full day. Ojje aimed to compress this further, to just a few hours. However, its legacy infrastructure on GCP posed performance and scalability limitations. To accelerate operations, reduce costs, and meet growth goals, Ojje partnered with GoML to implement an end-to-end AI for story generation pipeline using AWS-native services.
The problem: Infrastructure limitations slowing AI for story generation
Ojje’s platform combined AI-generated narratives with high-quality illustrations to create personalized interactive books. Although generative models had reduced the initial creation time, the full publishing process still took 1–2 days due to manual refinement and infrastructure bottlenecks.
GCP’s setup was insufficient to support the scalability and low-latency needs of mass content production. Delays in image rendering, story generation, and task coordination were hindering Ojje’s goal of global scale. Ojje needed a robust and scalable AI for story generation solution that could streamline the pipeline, reduce publishing time, and handle increasing user demand, all while maintaining high-quality storytelling and visuals.
The solution: End-to-end storybook creation pipeline with AI for story generation
GoML applied its AI Content Generation blueprint to build an end-to-end AI for story generation pipeline for Ojje. The solution automated the complete journey from story prompt to published interactive storybook while combining AI-powered story generation, illustration creation, prompt engineering, and AWS-native orchestration into a single scalable workflow.
The platform generates age-appropriate stories using Amazon Bedrock, creates corresponding illustrations with MidJourney, orchestrates content creation through AWS Lambda and Amazon SQS, stores prompts and metadata in MongoDB, manages illustrations in Amazon S3, and monitors the entire pipeline with Amazon CloudWatch. This architecture reduced manual publishing effort, accelerated storybook creation, and enabled Ojje to produce personalized interactive books at scale.
Story generation with Amazon Bedrock
GoML integrated a large language model on Amazon Bedrock to generate compelling children’s stories. Stories were automatically structured and adapted to different age groups, drastically reducing human input.
Illustration generation with MidJourney
To accompany the stories, GoML used MidJourney to create unique, stylized illustrations aligned with the story theme. This made each storybook visually engaging and cut down illustration wait times.
Event-driven architecture with Lambda and SQL
GoML set up an AWS SQS queue to manage task workflows for story and image creation. AWS Lambda functions handled processing events serverlessly, ensuring low-latency responses and seamless scaling.
Scalable compute with EC2
The core application was containerized and deployed on EC2, allowing Ojje to manage variable workloads and launch updates quickly across environments.
Metadata management with MongoDB
Each story’s prompts, metadata, and decision paths were stored in MongoDB for flexible access, editing, and auditing.
Durable image storage with S3
Illustrations were stored in Amazon S3 for high durability and fast retrieval during publishing.
Monitoring with CloudWatch
Real-time visibility into function performance, errors, and usage was enabled via CloudWatch, ensuring operational reliability.

Impact
Ojje achieved massive improvements in both content creation speed and operational efficiency:
- 98% reduction in interactive storybook creation time from 2 days to under 1 hour
- 40% gain in efficiency through automated prompt engineering
- 50% scalability boost with AWS-native infrastructure supporting growing demand
About
Before Gen AI and after Gen AI
"With the right AI content generation pipeline, story creation becomes a production system, not a creative bottleneck. For Ojje, we engineered an end-to-end workflow that automated story generation, illustration, and publishing, reducing turnaround time from days to under an hour."
Prashanna Rao, Head of Engineering, GoML
DevOps and security built into delivery
GoML handled operations and security as part of the pipeline design from the start. Every stage of story and illustration generation was built to scale, recover from failures and protect content automatically.
DevOps practices
- Decoupled, event-driven delivery: Client requests enter through Amazon API Gateway HTTP APIs and are queued in Amazon SQS. This separates user-facing ingestion from heavy generation work, so traffic spikes never slow down the client experience.
- Automatic scaling with demand: Lambda workers, built on arm64 Graviton for better cost-performance, scale horizontally with queue depth from zero to more than 1,000 concurrent executions. Capacity matches demand with no manual provisioning.
- Built-in failure isolation: Dead-letter queues hold events which are not processable for up to 14 days and use redrive policies to retry them, so one failed story or illustration never blocks the rest of the pipeline.
- Observability and fast root-cause analysis: Amazon CloudWatch alarms flag rising error rates in real time. AWS X-Ray traces asynchronous calls across Amazon Bedrock and external illustration APIs, so the team can pinpoint bottlenecks quickly.
- High availability by default: API Gateway and Lambda run across multiple Availability Zones. Book assets in Amazon S3 Standard are designed for 99.99% durability and are protected with KMS encryption and cross-region versioning.
Security practices
- Encryption in transit everywhere: Client API endpoints enforce HTTPS with TLS 1.3. Outbound Lambda calls to MidJourney also use TLS 1.3, and SQS queues enforce secure transport for every connection.
- Encryption at rest with dedicated keys: Manuscripts, layouts, and illustration assets in Amazon S3 are encrypted with a dedicated customer-managed AWS KMS key. The key policy limits its use to the specific CloudTrail and Lambda roles that need it.
- Tamper-evident audit trail: A multi-region AWS CloudTrail log archive is encrypted with KMS and has log file integrity validation turned on, which gives Ojje a verifiable record of activity across the environment.
Key takeaways for other publishers
Common pitfalls to avoid
- Relying on manual review even when LLMs are integrated
- Delaying infrastructure transition despite scaling needs
- Treating illustrations as a static design task instead of a pipeline element
Advice for teams building AI-powered content solutions
- Automate story and image generation with structured workflows
- Use prompt engineering as a first-class optimization layer
- Adopt AWS-native services to reduce latency and maximize scale
Want to reduce story creation time by 98%?
Partner with GoML to build production-ready AI content generation platforms that automate story creation and publishing with AI Matic.




