Podcast Automation with AWS
I completely automated a sports statistics podcast using AWS: Jeff’s Soccer Match Previews & Results.
I wanted to listen to a podcast that simply read me the current days soccer game schedule (which teams are playing, what time does the match start, etc…). I also wanted to listen to a podcast that simply read me the previous days soccer game results (the final result, each goal scorer in chronologic order, etc…). What I wanted didn’t exist, so I created it myself!
Application Architecture Explanation
You can get a basic idea of how everything works together from the basic diagram below. Here is specifically what happens at each step:
- An AWS EventBridge rule triggers an AWS Lambda function.
- The AWS Lambda function calls out to a 3rd party API to fetch today’s soccer match fixtures and results. The lambda function then converts the raw data into text. The lambda function then sends the text to AWS Polly, which will convert the text to speech. Since AWS Polly does this asynchronously, the lambda function execution is finished at this point.
- AWS Polly generates an MP3 file and uploads it to S3. Once the upload is complete, an SNS topic triggers a second AWS Lambda function.
- The second AWS Lambda function downloads the MP3 file from S3 and generates some metadata about its content (like title, description, etc…). Then some browser automation is invoked that will login to our podcast distributor’s website, upload the MP3 file as a new episode, fill in the new episode details, and publish it. We have to use browser automation because the podcast distributor does not have a public API. The lambda function execution is finished at this point.
- The entire podcast automation flow is now complete for the custom code I wrote. The podcast distributor takes over and sends the new episode to all the major platforms (like Spotify, Apple Podcasts, Amazon Music, etc…).
Application Architecture Diagram
Pretty cool huh!? If you have comments or questions, feel free to email me at email@example.com.