From a CloudFormation template, you can deploy CodeCommit and CodePipeline. From this announcement,
You can now choose AWS CloudFormation as a deployment action in your release workflows built using AWS CodePipeline.
I've worked out most of the Cloudformation Template, but I can't figure out the stages.
Resources:
PipelineRepo:
Type: AWS::CodeCommit::Repository
Properties:
RepositoryName: pipeline
RepositoryDescription: Pipeline setup repo
PipelineArtifacts:
Type: AWS::S3::Bucket
PipelineRole:
Type: AWS::IAM::Role
Pipeline:
Type: AWS::CodePipeline::Pipeline
Properties:
Name: pipeline-pipeline
ArtifactStore:
Type: S3
Location:
Ref: PipelineArtifacts
RoleArn:
Ref: PipelineRole
Stages:
... STAGES ...
How do you set up the stages to track CodeCommit and then deploy a CloudFormation template from a file in the repo?
Offical Documentation:
The IAM Role is broken too. Below is a functioning stack. For various types of CF deployments, see the CF Configuration Properties. A helpful sample CF stack is here.