Commands icon
Docker icon
AwsCLI icon
If icon
Script icon
LoopUntil icon
Converse icon
Pause icon
Switch icon
Trigger icon

Lecture Videos to Accurate Course Content with Amazon Transcribe, Bedrock and Human Approval

Upload a lecture video and get course content (title, summary, chapters and quiz) generated with Amazon Transcribe and Bedrock, then sent for human approval.

Categories
AICloud

Without this, someone has to go through each lecture, understand the entire lecture, write a summary, chapters and a questionnaire themselves, which needs a lot of manual effort. This process does that automatically, and a person just has to review it after it's done.

What I'm proud of is the quotes from the speaker. The solution was not present in the transcript. It was shown on the screen, so the AI took a guess, since it was not available in the transcript (it said the 4th row adds up to 14, which is wrong). The change I made was that each answer must come with a quote from the speaker, and then the process searches for that quote in the transcript. If it doesn't find the quote, the AI is told to redo it, up to 3 tries. After 3 failed tries, the run is marked FAILED and an alert email is sent.

How it works

  1. This blueprint runs when a lecture video is uploaded to an S3 bucket. When Kestra notices it, it moves the video to the processing folder and marks it as PROCESSING in DynamoDB.
  2. A digital fingerprint of the lecture is generated and saved in DynamoDB, and even if it's uploaded again with a different name, it's skipped.
  3. It extracts the audio and Amazon Transcribe converts the speech to text.
  4. The transcript is given to the AI model to generate a title, summary, chapters and a quiz.
  5. Before the email, the draft is checked automatically for the format, a summary that's not too long or too short, chapters that start at 00:00, are in time order and aren't too close together, a quiz of 3–5 questions, each with 4 different options and one correct answer, and, for each answer, a speaker quote that is really in the transcript. If a check fails, the AI is told to redo it, up to 3 tries.
  6. The draft is then sent to the reviewer's email, and the reviewer approves it or sends it back with feedback for one more try. Approved content is published to S3.
  7. If anything fails, the run is marked FAILED and an alert email is sent.

What you get

  • A lesson draft as a JSON file (title, summary, chapters with times, quiz). Each review round is saved under drafts/, and the approved one under approved/.
  • One DynamoDB row per video with its status and timestamps.
  • Quiz answers with proof: each answer shows the speaker's quote, in the email too.
  • An alert email when something fails.

Who it's for

  • People who build or run a learning management platform.
  • Teachers or course teams who record lectures.
  • Anyone on AWS who wants an example of AI with human approval.

Why orchestrate this with Kestra

  • The review can take hours or days. Kestra's Pause just waits, without anything running, and the execution page becomes the review screen.
  • If a step fails because of a short AWS glitch, Kestra retries it by itself.
  • Every step, try and review round shows up in the Gantt view, so you can see exactly where a video is and what went wrong.

Prerequisites

  • Kestra 2.0 with a Docker task runner, and plugin-aws 2.10.3 or later (earlier versions reject the messages list of Converse).
  • An S3 bucket with an incoming/ prefix.
  • A DynamoDB table with partition key video_id (String). On-demand capacity is fine.
  • A standard SNS topic with a confirmed email subscription for reviewers.
  • Access to an Amazon Nova model in Bedrock. Set model_id to the inference profile for your region, for example us.amazon.nova-pro-v1:0, eu.amazon.nova-pro-v1:0 or apac.amazon.nova-pro-v1:0.
  • An IAM user or role allowed to call s3:GetObject, s3:PutObject, s3:DeleteObject, s3:ListBucket, s3:GetObjectTagging and s3:PutObjectTagging on the bucket; dynamodb:PutItem and dynamodb:UpdateItem on the table; sns:Publish on the topic; transcribe:StartTranscriptionJob and transcribe:GetTranscriptionJob; and bedrock:InvokeModel on both the inference profile and the underlying foundation-model/amazon.nova-* ARNs. There is no separate bedrock:Converse action.

Secrets

  • AWS_ACCESS_KEY_ID: access key of the IAM user that runs the pipeline.
  • AWS_SECRET_ACCESS_KEY: secret key for the same user.

Quick start

  1. Create the bucket, table and topic, and confirm the SNS email subscription.
  2. Add the two secrets to Kestra.
  3. Set the variables at the top of the flow: region, bucket, table, topic ARN, model ID and the URL of your Kestra UI (used in the review link).
  4. Save the flow and upload a short lecture video to incoming/.
  5. When the review email arrives, open the link, click Resume and choose APPROVE, or REJECT with feedback to get a second draft.
  6. Check approved/ in S3 and the video's row in DynamoDB.

How to extend

  • Send approved content to a learning platform, so the lesson page is created automatically.
  • Review in Slack instead of email.
  • Transcribe can also produce subtitles, which can be published with the video.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.