
Deploying AWS Infrastructure with GitOps and CloudFormation
A look at Git-based options for deploying AWS infrastructure in a controlled way
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Stages:
# Stage 1: Get the source from CodeCommit
- Name: Source
Actions:
- Name: Source
RunOrder: 1
ActionTypeId:
Category: Source
Owner: AWS
Provider: CodeCommit
Version: '1'
Configuration:
RepositoryName:
Fn::ImportValue: !Sub "${RemoteApp}-${Environment}-RepoName"
BranchName: !Ref Branch
PollForSourceChanges: false #The EventBus rule will trigger the pipeline
InputArtifacts: []
OutputArtifacts:
- Name: CfnTemplates
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Stages:
# Stage 1: Get the source from GitHub
- Name: Source
Actions:
- Name: Source
RunOrder: 1
ActionTypeId:
Category: Source
Owner: AWS
Provider: CodeStarSourceConnection
Version: '1'
Configuration:
ConnectionArn: !Ref ConnectionString
FullRepositoryId: !Ref RepoName
BranchName: !Ref Branch
OutputArtifactFormat: "CODE_ZIP"
InputArtifacts: []
OutputArtifacts:
- Name: CfnTemplates
Service | Git Integration | Key Benefits | Use Case |
---|---|---|---|
CodeCommit & CodePipeline | AWS-native Git and CI/CD | Simple, native AWS integration | AWS-only environments with existing CodeCommit |
CodeConnections | GitHub, GitLab, BitBucket | Easy Git integration, AWS-native security | AWS-focused teams using third-party Git |
Azure DevOps | Azure Repos^ | Multi-cloud capabilities, flexible pipelines | Teams managing both Azure and AWS |
BuildKite | Any Git provider | Fully customisable pipelines, self-hosting | Enterprises needing full control of CI/CD |