I was trying to find out how AWS CodePipeline, CodeDeploy, CodeBuild etc. actually work together. Their website just tells me how awesome it is.
Here someone did a really comprehensive tutorial.
https://medium.com/swlh/intro-to-aws-codecommit-codepipeline-and-codebuild-with-terraform-179f4310fe07
TLDR: it's a mess and basically unusable.