logo
Menu

Amazon CodeCatalyst workflow for Amazon CloudFormation

Example CodeCatalyst workflow to deploy CloudFormation infrastructure changes.

Rohini Gaonkar
Amazon Employee
Published May 5, 2023
Last Modified Mar 28, 2024
This snippet shows a CodeCatalyst workflow that will deploy any changes in the CloudFormation template. It is intended to be used on the main branch, and run after merging a PR that has been validated - see this example of the PR branch workflow.
Used in:

Snippet

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Name: Main_Branch_Workflow
SchemaVersion: "1.0"

# Optional - Set automatic triggers.
Triggers:
- Type: Push
Branches:
- main

# Required - Define action configurations.
Actions:
DeployAWSCloudFormationstack_7c:
Identifier: aws/cfn-deploy@v1
Configuration:
parameter-overrides: SSHLocation=54.10.10.2/32,WebServerInstanceType=t2.micro
capabilities: CAPABILITY_IAM,CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND
template: VPC_AutoScaling_With_Public_IPs.json
region: us-west-2
name: PreProdEnvStack
Timeout: 10
Environment:
Connections:
- Role: main_branch_IAM_role
Name: "123456789012"
Name: PreProdEnv
Inputs:
Sources:
- WorkflowSource
 

Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.