This repository contains code that creates an S3 bucket that can be used to stream HLS as described in my post.
You need to install version 2 of the AWS CDK.
Clone this repository and run npm install
to install the required dependencies.
To create the bucket in your AWS account, run the following command with your own domain: cdk deploy -c domain=https://hlsbook.net
.
If you don't specify the domain
parameter, requests will be allowed from anywhere and the Referer
header check won't be added to the bucket policy.
To remove the bucket, run cdk destroy
.