AWS Builder Center
Weekend Creative Challenge: Muse

Weekend Creative Challenge: Muse

Muse is a tiny AI-powered muse for anyone staring at a blank page

Weekend Creative Challenge: Muse

Vision & what the app does

Muse is a tiny AI-powered muse for anyone staring at a blank page. You type a theme - anything from "a lighthouse keeper who talks to the sea" to "the last bus of the night" - pick either Story or Poem, and within seconds Amazon Bedrock's Nova Lite model writes a short, original piece built around that spark. The goal wasn't to build a general-purpose writing tool; it was to build the smallest possible thing that turns a single idea into a finished, shareable piece of creative writing, and to make the moment of generation feel a little magical.
The creative output is genuinely generative, not templated: each run sends the user's theme to Bedrock with a system prompt that asks for either a 150–250 word short story or an 8–16 line poem, complete with its own title. No two runs on the same theme come back the same way.

How I built it

I scaffolded the project with AWS SAM rather than clicking through the console, since infrastructure-as-code makes a weekend project reproducible and easy to tear down afterward. The backend is a single Python 3.12 Lambda function that calls Bedrock's  converse  API - a cleaner, model-agnostic interface than raw  invoke_model  - with a system prompt tuned per mode (story vs. poem). The frontend is deliberately plain: one HTML page, one small JS file, and a CSS-only "AI energy" gradient theme, hosted directly on S3 as a static website. No build step, no framework, no bundler - just fetch() calling the API.
Two real obstacles came up during the build. First, the S3 bucket create failed on first deploy: modern AWS accounts default new buckets to  BucketOwnerEnforced  object ownership, which disables ACLs entirely, so my initial  AccessControl: PublicRead  setting broke the stack. The fix was to drop the ACL and rely purely on a bucket policy for public  GetObject  access. Second, my IAM user turned out to have a narrowly scoped CloudFormation policy that allowed  CreateChangeSet  and  DescribeStacks  but denied  DescribeStackEvents  and  ListChangeSets  - which is exactly what  sam deploy  polls to show progress. Rather than widen IAM permissions, I worked around it: captured the changeset ARN from the  CreateChangeSet  output, called  execute-change-set  directly, and polled  describe-stacks  in a loop instead. It's a good reminder that least-privilege IAM setups sometimes need a slightly different deployment workflow, not just wider permissions.

AWS services used / architecture overview

  • Amazon S3 - hosts the static frontend (HTML/CSS/JS) as a public website.
  • Amazon API Gateway - REST API exposing a single  POST /generate  endpoint with CORS enabled.
  • AWS Lambda - Python function that builds the prompt and calls Bedrock.
  • Amazon Bedrock (Nova Lite) - generates the story or poem text via the  converse  API.
  • AWS IAM - a Lambda execution role scoped to exactly one permission:  bedrock:InvokeModel  on the Nova Lite model ARN.
  • AWS CloudFormation / SAM - defines and deploys every resource above as one stack.
Browser (S3 static site)
→ POST /generate → API Gateway
→ Lambda (Python, boto3 Bedrock client)
→ Bedrock Nova Lite (converse API)
← { title, text } JSON
← rendered story/poem

What I learned

I already knew Bedrock's basics, but this was my first time using the  converse  API instead of raw  invoke_model  calls, and it's a noticeably nicer surface for multi-turn or system-prompted generation. I also relearned a very current AWS default - S3's  BucketOwnerEnforced  ownership setting - the hard way, which is a useful thing to remember for any future static-site project. Finally, debugging a CloudFormation deploy with deliberately restricted IAM visibility (no  DescribeStackEvents ) was a good exercise in working with least privilege instead of reflexively escalating permissions.

Link to app

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