Terraform module for provisioning infrastructure to host a podcast on AWS.
This is the basics you need to get a podcast up and running. There is no UI or web application.
Episode creation, and updating media is done through the aws console or aws cli commands.
make test
-
Register a domain through aws Instructions
-
After creation, you will have a hosted zone.
-
Using 'Certificate Manager' get a certificate for
<domainyouchoose>.com
with a*.<domainyouchoose.com>
as alternative. -
Prior to step 5, you can also create a variables file and name it whateveryouwant.tfvars
-
Inside the versions.tf update the profile value to the aws profile you wish to apply changes to
-
Run
terraform apply
from the root of this directory and set variables using prompts.or
using the example .tfvars file,udpate .tfvars.example file to whateveryouwant.tfvars and fill in the variable values
terraform plan -var-file="whateveryouwant.tfvars" terraform apply -var-file="whateveryouwant.tfvars"
- Record/Edit podcast episode using your choice of a media editing tool
- Export audio in a supported audio (mp3 or m4a) format and upload to your 'content_bucket_name' in the aws web console
-
alternative - using aws-cli
sync contents of directory you are in with s3 content bucket
aws s3 sync . s3://<MEDIA BUCKET NAME> --exclude "*.DS_Store*"
-
Invalidate the cloudfront cache ID = media distribution id
aws cloudfront create-invalidation --distribution-id <ID> --paths "/podcast.xml"
Podcast episodes are configured using the structure below in the media bucket. Environment variables in the lambda function are used to configure the podcast.
. examples
+-- single_podcast_aws
+-- main.tf
+-- media
+-- image.jpeg
+-- episode1
+-- episode1.mp3
+-- image.jpeg
+-- title.txt
+-- description.txt
+-- pubdate.txt
+-- duration.txt
+-- explicit.txt
+-- episodetype.txt
+-- rss
+-- podcast.xml
+-- vars
+-- example.tfvars
Terraform outputs:
- podcast_url = domain rss feed hosted at
- podcast_feed_cdn_url = cloudfront url of rss feed
- content_bucket_url = s3
- log_bucket_url
- content_cdn_url
- lambda_name
- region
your rss feed subdomain - podcast.example.com
This can be shared with the major podcast directories like Spotify, Apple, Google, etc.
make destroy
Useful links to podcast xml guidelines: