Automate Blog Writing with AWS Bedrock & Step Functions

Hi guys!

Ever came back from a conference full of ideas... and zero time to write them down? That was me at AWS re:Invent 2024. I had notes, voice memos, and way too many ideas — but no time (or energy) to turn them into blog posts.

So I built a tool to do it for me.

Let me show you how I used Step Functions, Lambda, and Bedrock to automate the whole thing — from raw document to publish-ready blog post.

Overview

The Problem

Writing takes time. Especially when your ideas are trapped in voice recordings, transcripts, or long-form notes.

I needed a way to go from this:

“Hey future me, remember to write about the GenAI session tomorrow…”

To this:

A clean, structured blog post with a nice intro, summary, and sections — ready to copy-paste.

What I Built

I created a document processing pipeline that can:

  • Take in different types of files (audio, text, images)

  • Summarize the content with Amazon Bedrock

  • Generate a blog post draft with structure and flow

  • Save it automatically — ready to review or publish

It’s built entirely with serverless AWS services. No infra to manage.

Architecture

Here’s the pipeline stack:

  • Amazon S3: File input (like .txt, .jpeg, .mp3, .docx) and output storage

  • S3 Event Notifications: Automatically trigger the workflow when files are uploaded

  • AWS Step Functions: Orchestrates the entire workflow with smart routing and parallel processing

  • AWS Transcribe: Converts audio/video files to text

  • AWS Rekognition: Extracts text and labels from images

  • AWS Lambda: Multiple functions for preprocessing, content formatting, and output generation

  • Amazon Bedrock (Claude): AI-powered content analysis and blog post generation

The Flow

Here's how it works in real life:

  1. Upload the files to S3 - text documents, audio recordings, images, or any content you want to turn into a blog post.

  2. The upload triggers an AWS Step Functions workflow via S3 Event Notifications.

  3. Smart routing - The system automatically detects your file type and processes accordingly:

    • Audio/video files get transcribed first

    • Images get processed for visual analysis

    • Text go straight to content processing

  4. All content (whether from text, transcribed audio, or image analysis) gets cleaned up and formatted consistently. This ensures everything is ready for the AI to work with

  5. The formatted content goes to Amazon Bedrock which invokes Claude 3.5 Haiku to analyze the material and generate a polished blog post.

  6. The system saves both a summary and the final blog post in markdown format, ready to publish.

All done in a few minutes.

Prompt Engineering

Prompt engineering was the key to unlocking the full potential of this workflow. I followed best practices from Anthropic to design a clear, structured prompt that delivers accurate output from Claude.

  • Defined Role: “You are an expert content analyst…” sets Claude’s persona and aligns its responses with the task.

  • Clear Delimiters: <transcript>…</transcript> separates input from instructions to avoid confusion.

  • Precise Formatting Rules: Word limits, Markdown headers, and a strict JSON schema ensure reliable and consistent formatting.

  • Example I/O: A sample transcript and expected JSON response provide Claude with a concrete model to follow.

  • Strict Output Schema: By requiring exactly two escaped JSON fields (summary and blog_post), the output is always machine-readable and ready to use without post-processing.

Here’s the prompt I used with Claude for this project:

You are an expert content analyst and technical writer. Your role is to transform transcripts into structured, accessible content for digital platforms.
   <transcript>
   [Insert transcript content here]
   </transcript>

   Task Instructions
   Your task is to analyze the provided transcript and create two complementary outputs that serve different audience needs:
   1. Executive Summary: A concise overview for busy readers who need key takeaways quickly
   2. Detailed Blog Post: An in-depth article for readers seeking comprehensive understanding

   <detailed_requirements>
   Summary Requirements
   - Maximum 150 words
   - Capture the most important points and main themes
   - Write in clear, accessible language
   - Focus on actionable insights or key conclusions

   Blog Post Requirements  
   - Write in engaging, professional Markdown format
   - Use proper header hierarchy (hash for main title, double hash for sections, triple hash for subsections)
   - Include logical flow: compelling introduction → structured body content → strong conclusion  
   - Add at least one relevant media placeholder: ![Descriptive alt text](image-url-placeholder)
   - Incorporate technical details and examples from the transcript
   - Make content scannable with good formatting and clear transitions
   </detailed_requirements>

   <examples>
   Example Input Transcript:
   "Today we discussed the implementation of microservices architecture at our company. We found that breaking down our monolithic application into smaller services improved our deployment speed by 40%. However, we also encountered challenges with service discovery and inter-service communication. The key lessons were: start small, invest in monitoring, and have a clear API strategy."

   Example Output:
   {
   "summary": "The team successfully implemented microservices architecture, achieving 40% faster deployments by breaking down their monolithic application. Key challenges included service discovery and inter-service communication. Critical success factors identified were: starting with small services, investing in comprehensive monitoring, and establishing a clear API strategy from the beginning.",
   "blog_post": "Microservices Migration: Lessons from the Trenches\n\nIntroduction\n\nTransitioning from monolithic to microservices architecture represents one of the most significant technical decisions modern development teams face...\n\nKey Results\n\n![Microservices Architecture Diagram](image-url-placeholder)\n\nOur migration delivered impressive results:\n- 40% improvement in deployment speed\n- Enhanced team autonomy and development velocity\n\nChallenges Encountered\n\nService Discovery\nOne of our biggest hurdles was implementing effective service discovery...\n\nConclusion\n\nOur microservices journey taught us that success requires careful planning, gradual implementation, and robust monitoring infrastructure."
   }
   </examples>

   Processing Instructions
   Before generating your final response, take time to analyze the transcript systematically:

   <thinking>
   Think through these steps:
   1. What are the 3-5 most important points in this transcript?
   2. Who is the likely audience for this content?
   3. What technical concepts need explanation or context?
   4. What would make an engaging blog post structure for this topic?
   5. Where would visual elements (diagrams, charts, screenshots) add value?
   </thinking>

   Output Format
   Return your response as a properly formatted JSON object with exactly these two fields. Ensure all JSON syntax is correct, with proper escaping of quotes and newlines:

   {
   "summary": "Your 150-word summary here",
   "blog_post": "Your complete Markdown blog post here"
   }

   If the transcript is unclear, incomplete, or lacks sufficient information for a meaningful analysis, include this in your summary and create a shorter blog post that acknowledges the limitations while extracting what value is possible.

Why Step Functions + Bedrock?

Step Functions made it easy to manage the flow:

  • Visual execution

  • Built-in retries

  • Clean separation between tasks

Bedrock let me call Claude without hosting anything.

It’s fast, scalable, and reusable.

How I Used It at re:Invent

At re:Invent, I recorded voice notes every day.

At night, I dropped them into S3.

The next morning, I had a draft ready to post — with:

  • An intro,

  • Key takeaways,

  • Structured sections,

  • And a nice little closing paragraph.

I even used the drafts to help prepare LinkedIn posts faster. Huge win.

Other Use Cases

This pipeline is more than just blogging. You could use the same framework to:

  • Turn meeting transcripts into reports.

  • Summarize research papers for internal newsletters.

  • Convert interviews into publish-ready articles.

  • Feed summaries into a chatbot or FAQ generator.

Basically: turn unstructured input info into structured output.

Wrap-Up

This little project saved me hours of post-event work. It’s also a great example of how to embed GenAI into your workflow, not just for fun, but for real productivity.

Whether you’re a cloud architect, a content creator, or somewhere in between, integrating Bedrock with automation tools like Step Functions opens up real possibilities.

Want to build your own version? The full source code is coming soon.

0
Subscribe to my newsletter

Read articles from Pierre-Francois H directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Pierre-Francois H
Pierre-Francois H

👋 Hi, I’m @hpfpv ☁️ I’m a Cloud Infrastructure Architect | 8x AWS Certified 🚀 I build secure, scalable, and automated solutions on AWS using Terraform, CloudFormation, and CI/CD 📚 Always exploring hybrid cloud, serverless, and AI-driven architectures