AWS Builder Center
Weekend Creative Challenge: ComicNova - AI Comic & Visual Story Generator

Weekend Creative Challenge: ComicNova - AI Comic & Visual Story Generator

A serverless web application that turns any creative story idea into a custom 3-panel visual comic strip! Built for the AWS Build a Creative App Weekend Challenge, this project demonstrates how to combine AWS serverless features—including AWS Lambda, Amazon Bedrock, Amazon S3, and Amazon DynamoDB—to build high-performance creative applications.

Series: AWS Weekly Challanges (3 articles)

  1. 1
    Weekend Creative Challenge: ComicNova - AI Comic & Visual Story Generator This article
Software Engineer

🎨 Vision & What the App Does

Visual storytelling is one of the most powerful forms of creative expression, but turning a story idea into an illustrated comic book usually requires specialized drawing skills, graphic layout design, and narrative scripting experience.
ComicNova is a serverless web application that empowers anyone to turn a single text idea into a custom 3-panel visual comic strip in seconds.
By entering a premise (such as "A tiny brave mouse finds a glowing magical golden cheese in a dark castle basement"), ComicNova generates:
  • Custom Comic Title: A catchy, thematic title for the comic strip.
  • 3-Panel Script: Concise narrative context for each panel along with character dialogues.
  • Custom Illustrations: Visual art generated in the user's selected style (e.g., Superhero Comic, Chibi Anime, Neon Cyberpunk, Watercolor, Retro Pixel Art, or 3D Claymation).
  • Interactive Comic Reader: Renders the complete story inside a retro-paper comic page complete with thick panel borders, vintage cream narration blocks, and speech bubbles.
  • Public Gallery: Enables users to save their creations to a shared community showcase powered by Amazon DynamoDB and Amazon S3.



🛠️ How You Built It

We built ComicNova using a modern serverless stack designed for responsiveness, high visual fidelity, and seamless operation within the AWS Free Tier.

Development Process & Key Decisions

  1. Frontend Architecture: Built a Single Page Application (SPA) using Vite + React with a modern dark theme, glassmorphic control panels, and interactive step-by-step progress tracking loaders.
  1. Serverless API Layer: Utilized AWS Lambda with Python 3.13 and Lambda Function URLs. Using a Function URL provided a direct, low-latency HTTPS endpoint with built-in CORS handling without the added complexity of API Gateway.
  1. Generative AI Engine: Integrated Amazon Bedrock:
  • Amazon Nova Lite ( amazon.nova-lite-v1:0 ) via the Bedrock Converse API to convert user premises into clean, structured JSON comic scripts.
  • Amazon Nova Canvas ( amazon.nova-canvas-v1:0 ) via  invoke_model  to generate high-resolution panel illustrations.



🌩️ AWS Services Used & Architecture Overview

+---------------------------------------+ | React / Vite Single Page Application | | ( http://localhost:5173 ) | +---------------------------------------+ | | (HTTPS POST / Fetch) v +---------------------------------------+ | AWS Lambda Function URL | | (CORS Enabled) | +---------------------------------------+ | +-------------------------+-------------------------+ | | | v v v +--------------------+ +--------------------+ +--------------------+ | Amazon Bedrock | | Amazon S3 | | Amazon DynamoDB | | (Nova Lite & | | (Image Asset | | (Public Gallery | | Nova Canvas) | | Hosting Bucket) | | NoSQL Table) | +--------------------+ +--------------------+ +--------------------+

AWS Services Breakdown:

  • AWS Lambda: Executes core backend API actions ( generate_story ,  generate_image ,  save_comic ,  list_comics ).
  • Lambda Function URL: Provides a secure public HTTPS endpoint configured with cross-origin resource sharing (CORS).
  • Amazon Bedrock: Powering narrative creation with Amazon Nova Lite and visual artwork with Amazon Nova Canvas.
  • Amazon S3: Hosts generated PNG panel illustrations with pre-signed URL capabilities for secure browser rendering.
  • Amazon DynamoDB: A  SimpleTable  storing comic metadata, prompt details, panel structure, and creation timestamps for the public gallery.
  • AWS SAM (Serverless Application Model): Infrastructure-as-code tool used to define, build, and deploy the entire backend stack non-interactively.



🔧 Engineering Challenges Encountered & Overcome

Building an end-to-end serverless AI application involved solving four major technical hurdles:

1. CloudFormation Early Validation CORS Enum Error

  • Challenge: When deploying our  template.yaml , CloudFormation rejected  Cors.AllowMethods  because  OPTIONS  was included in the array. CloudFormation property validation strictly limits values to  [GET, PUT, HEAD, POST, PATCH, DELETE, *] .
  • Solution: We updated  template.yaml  to specify the wildcard  *  under  AllowMethods , satisfying CloudFormation validation while permitting preflight  OPTIONS  requests.

2. Duplicate CORS Headers Collision

  • Challenge: Browser requests failed with  TypeError: Failed to fetch  during initial testing.
  • Solution: We discovered that both the AWS Lambda Function URL gateway layer AND our Python code were returning  Access-Control-Allow-Origin: * . Browsers block requests when duplicate CORS headers exist. We stripped manual CORS headers from Python response helpers and allowed the Lambda Function URL gateway to handle header injection automatically.

3. Boto3 DynamoDB Decimal JSON Serialization

  • Challenge: When querying  list_comics , the API threw  TypeError: Object of type Decimal is not JSON serializable . Boto3 automatically parses DynamoDB numeric fields (like  panel_number ) into  decimal.Decimal  objects, which standard Python  json.dumps()  cannot serialize.
  • Solution: We created a custom  DecimalEncoder  class in Python:```python class DecimalEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, decimal.Decimal): return int(o) if o % 1 == 0 else float(o) return super(DecimalEncoder, self).default(o)
  • https://github.com/Hashim-Virk/Comic-Nova

Series: AWS Weekly Challanges (3 articles)

  1. 1
    Weekend Creative Challenge: ComicNova - AI Comic & Visual Story Generator This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article