Building YouTube Upload APIs in a Full Stack App - Episode 204
In this video, I dive into implementing backend functionality for our full-stack application. We previously wrapped up the frontend development, so now it's time to focus on creating and refining API endpoints and backend logic for managing YouTube episode uploads. Specifically, I work with AWS Lambda, DynamoDB, and Step Functions within the AWS Cloud Development Kit (CDK) framework.
I start by handling application-level credentials, assessing cyclic dependencies, and refactoring shared state across constructs for better architecture. We also set up a Lambda function for uploading episodes to YouTube and integrate it with our API Gateway. As we proceed, I make decisions about handling API endpoints in a maintainable way and discuss the trade-offs of managing multiple Elastic Container Registry (ECR) repositories.
You'll see how we:
Design Lambda functions in TypeScript for tightly scoped purposes, such as triggering YouTube uploads.
Refactor constructs for better modularity and reusable components.
Use constants to manage upload statuses like "ready to upload" and "uploaded."
Validate inputs and manage errors like conflicts (409 status codes) when multiple uploads are attempted simultaneously.
Leverage the AWS CDK to hook up Lambda functions to API endpoints while handling permissions cleanly.
By the end of the stream, we deploy our changes, review IAM policy updates, and demonstrate practical debugging and testing techniques for backend AWS services. I'll also discuss plans for tasks like implementing user-facing features for background job monitoring in future sessions.
🔗 Check out my Twitch channel for more streams: https://www.twitch.tv/saebyn
GitHub: https://github.com/saebyn
Discord: https://discord.gg/N7xfy7PyHs