
Weekend Annoying Task Challenge: YouTube Video Summary
A serverless application that uses Amazon Bedrock and Amazon Nova Micro to transform public YouTube transcripts into structured summaries.
Have you ever opened a YouTube video, noticed that it was more than 30 minutes long, and wondered whether it was really worth watching?
- This happens to me frequently.
When I choose a movie, I can watch its trailer before deciding whether I want to invest two hours in the complete story. The trailer does not replace the movie, but it gives me enough information to make a better decision.
- I wanted to apply the same idea to YouTube videos.
Instead of immediately watching a long video, what if I could first read a structured summary, understand its main points, and then decide whether the complete content deserved my time?
That idea became YouTube Video Summary.
Vision & What the App Does
YouTube Video Summary is a serverless application that receives the URL of a public YouTube video, retrieves its available transcript, identifies the transcript language, and uses generative AI to create a structured summary.
The purpose is not to replace the original video.
The application works as a decision tool. It helps the user understand what the video discusses before investing the time required to watch it completely.
The user only needs to:
- Paste a public YouTube URL.
- Select Summarize.
- Wait for the transcript and summary to be processed.

The result includes:
- a concise summary;
- the main points;
- a conclusion;
- the detected transcript language;
- the transcript character count;
- the complete transcript.
The interface is available in English and Brazilian Portuguese. However, changing the interface language does not force the summary into that language.
The summary follows the language detected in the original transcript.
For an English transcript, the application generates:
## Summary## Key points## ConclusionFor a Portuguese transcript, it generates:
## Resumo## Principais pontos## Conclusão
How I Built It
I started by defining the smallest architecture capable of solving the problem.
Because this was a weekend challenge, I wanted to avoid unnecessary infrastructure, fixed costs, and services that would make the application harder to deploy or remove later.
The frontend was developed with React 19 and Vite 8.
I used AWS Amplify Hosting to connect the GitHub repository, build the frontend, and deploy every update sent to the
main branch.
The backend was developed with Python 3.13 and deployed using AWS Serverless Application Model, or AWS SAM.
Instead of adding Amazon API Gateway, the frontend communicates with the backend through an AWS Lambda Function URL.
When the user selects Summarize, the browser sends an HTTPS
POST request to that Function URL. This request directly invokes the Lambda function.The Lambda function then:
- Validates the HTTP method.
- Validates the JSON request body.
- Confirms that the submitted URL belongs to YouTube.
- Retrieves the Supadata API key from AWS Systems Manager Parameter Store.
- Requests the public transcript from Supadata.
- Identifies the transcript language.
- Sends the transcript to Amazon Nova Micro through Amazon Bedrock.
- Returns the generated summary and transcript to the frontend.
Retrieving YouTube Transcripts
One of the first challenges was retrieving public YouTube transcripts reliably from a backend running in the cloud.
Some direct transcript approaches can be blocked or restricted. The official YouTube captions workflow is also focused on authorized access and does not directly solve this public transcript scenario.
To overcome this limitation, I integrated Supadata as the transcript provider.
Supadata retrieves the available transcript and returns information about its language. The Lambda function then validates and prepares the content before invoking Amazon Bedrock.
Preserving the Transcript Language
Another challenge was making the model consistently generate the summary in the same language as the transcript.
The first prompt versions did not always preserve the expected language or headings.
I improved the instructions sent to the model by explicitly defining:
- the required output language;
- the mandatory section headings;
- the expected response structure;
- the maximum output length;
- rules preventing the transcript from changing the original instructions.
I also configured the model temperature as
0.1 to produce more consistent and predictable summaries.The application accepts transcripts containing up to 80,000 characters and limits the model response to 1,500 output tokens.
These limits help control processing time, request size, and generative AI usage.
Connecting the Frontend to the Backend
The Lambda Function URL is not written directly into the React source code.
It is configured in AWS Amplify through the following environment variable:
VITE_API_URLVite reads this variable during the frontend build process.

The Lambda Function URL uses public access for this minimum viable product, but its CORS configuration accepts browser requests only from the production Amplify domain.
Only the
POST method and the content-type header are allowed.
AWS Services Used / Architecture Overview
The application uses the following AWS services:
AWS Amplify Hosting
Hosts the React and Vite frontend and automatically deploys changes from the GitHub repository.
AWS Lambda
Validates requests, retrieves the transcript, invokes Amazon Bedrock, and returns the result to the frontend.
AWS Lambda Function URL
Provides the public HTTPS endpoint that directly triggers the Lambda function.
Amazon Bedrock
Provides access to the generative AI model through the Converse API.
Amazon Nova Micro
Analyzes the transcript and generates the structured summary.
AWS Systems Manager Parameter Store
Stores the Supadata API key as a
SecureString .Amazon CloudWatch Logs
Stores the Lambda execution logs used for monitoring and troubleshooting.
AWS Identity and Access Management
Provides the permissions required by the Lambda execution role.
AWS CloudFormation and AWS SAM
Define and deploy the backend infrastructure as code.
The architecture also uses Supadata as an external service to retrieve the public YouTube transcript.
How the Workflow Is Triggered
The workflow begins when the user selects Summarize in the React application hosted on AWS Amplify.
The browser sends an HTTPS request to the Lambda Function URL, which invokes the Lambda function.
Lambda retrieves the Supadata API key from Parameter Store, requests the video transcript, and sends the transcript to Amazon Nova Micro through Amazon Bedrock.
After the model generates the summary, Lambda returns the result to the frontend.

Cost and Security Decisions
Cost was one of the main architectural requirements.
For this reason, the application does not use:
- Amazon EC2;
- containers;
- Elastic Load Balancing;
- Amazon API Gateway;
- a database;
- persistent transcript storage;
- provisioned concurrency;
- active AWS X-Ray tracing.
The Lambda function runs only when a request is received, and Amazon Nova Micro was selected for this text summarization workload.
The Supadata API key is stored as a
SecureString in Parameter Store. It is not included in the frontend or committed to the GitHub repository.
The Lambda execution role follows the principle of least privilege. It can retrieve only the required Parameter Store value and invoke only the Amazon Nova Micro model used by the application.
The backend also validates:
- the HTTP method;
- the JSON payload;
- the URL scheme;
- the YouTube domain;
- the transcript size;
- external request timeouts;
- the maximum model output.
CORS restricts browser access to the Amplify production domain, but CORS is not an authentication mechanism.
For a production application with more traffic, I would add authentication, request throttling, alarms, budget monitoring, and additional protection against direct calls to the public endpoint.
The AWS environment will be removed after the challenge publication to avoid unnecessary ongoing costs.
What I Learned
This challenge reinforced the importance of beginning with the smallest architecture required to solve a problem.
I learned how to connect an AWS Amplify frontend directly to a Lambda Function URL, configure production CORS, securely retrieve an external API key from Parameter Store, and invoke Amazon Nova Micro through the Amazon Bedrock Converse API.
I also improved my understanding of how prompt instructions, detected language, fixed headings, token limits, temperature, and backend validation work together to produce more predictable generative AI responses.
Another important lesson was that the simplest final architecture is not always the first architecture considered.
During development, I evaluated additional services and features. However, I removed everything that was not necessary for the MVP.
This made the application easier to explain, less expensive to operate, and easier to remove after the challenge.
The final result solves one specific annoying task: deciding whether a YouTube video is worth watching before investing the time required to watch it completely.
Link to Repo
The complete source code, AWS SAM template, frontend, backend, screenshots, and documentation are available on my GitHub:
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article