Skip to content

Use AWS Gen AI Services to Build and Host Video Apps in Minutes

4 minute read
Content level: Intermediate
0

AWS provides useful generative AI resources to help you with your productivity. In this example, you will see how a video player application was built and hosted on AWS in minutes - and with little prior coding experience.

Using AWS Bedrock to Create a Video Player Application

In this article, I'll demonstrate how AWS generative AI services can increase your productivity and efficiency by helping you rapidly prototype projects where you have a great idea but may lack specific technical expertise. Gen AI tools help bridge knowledge gaps, enabling you to combine your domain expertise (like streaming video) with AI-assisted development capabilities to accomplish what typically requires multiple teams.

Understanding Amazon Bedrock

Amazon Bedrock is a fully managed service that provides access to high-performing foundation models (FMs) and large language models (LLMs) from leading AI companies through a single API. These models come from providers including AI21 Labs, Anthropic, Cohere, DeepSeek, Luma, Meta, Mistral AI, poolside (coming soon), Stability AI, and Amazon. Bedrock lets you experiment with and evaluate these models, customize them with your data, and build agents that execute tasks using your enterprise systems.

Getting Started

Prior to this project, I created a live streaming video source using AWS Elemental MediaLive, with content delivery through an Amazon CloudFront URL. Next, I accessed the AWS Console and navigated to Amazon Bedrock. From the Amazon Bedrock Overview page, I selected the Model Catalogue to review the available models.

AWS Bedrock Model Catalogue showing available models

I selected the Anthropic Claude model for its code generation capabilities, as it's known for being particularly effective at understanding and generating code.

Anthropic Claude model description highlighting its features

After requesting access to Claude, I opened it in the Amazon Bedrock playground. (Note: Usage of Claude within the Bedrock playground incurs charges.)

Amazon Bedrock playground interface

Generating the Video Player Code

In the playground's chat interface, I provided this prompt: "Create code for a single-pane video.js player for AWS Amplify hosting. Include HTML, JavaScript, and CSS for a dark-themed player centered on the page with a 'CCTV Demo' banner. The code should be ready for zip file upload to AWS Amplify."

Claude generated comprehensive code that served as an excellent starting point:

Generated code sample from Bedrock

Important: The generated code is suitable for prototyping but requires additional testing and security measures before production deployment.

Implementation and Results

Using VS Code, I modified the generated code to include my HLS video stream URL. The deployment process involved:

  1. Making adjustments to the code
  2. Inserting the stream URL
  3. Zipping the HTML, CSS, and JavaScript files
  4. Uploading to AWS Amplify

What is AWS Amplify? AWS Amplify is a set of tools and services that helps you build and deploy full-stack applications on AWS. It includes features for hosting static web applications (like our video player) with continuous deployment, making it an ideal choice for quickly publishing web applications. Amplify automatically handles the complexity of hosting, scaling, and securing your application.

Most of my time was spent fine-tuning the visual elements like spacing, color gradients, and font sizes rather than building the core functionality. The result was a successful HD-quality HLS video player:

Finished video player application showing the dark theme and centered layout

Future Enhancements

The project's next phase will include:

  • Adding multiple player window capability
  • Implementing URL input functionality
  • Enhancing security with Amazon Cognito user authentication
  • Improving the user interface

Conclusion

This project demonstrates how AWS generative AI resources can significantly boost productivity by:

  • Enabling rapid prototyping of ideas
  • Bridging technical knowledge gaps
  • Reducing development time
  • Providing immediate, customizable solutions

Compared to traditional development methods of searching repositories, downloading code, and extensive trial-and-error testing, generative AI offers a more streamlined path from concept to implementation.

What's Next?

I plan to update this article when I implement the improvements to the video player hosted in AWS Amplify. If you found this content useful, please let me know in the comments. Also, I'd be happy to create a detailed walk-through showing how to set up a live-streaming channel in AWS Elemental MediaLive – let me know if this would be helpful for your projects.

Additional Resources

To learn more about the services discussed in this article, visit: