Syncing stacks with source code stored in a Git repository with Git sync - AWS CloudFormation

Syncing stacks with source code stored in a Git repository with Git sync

With Git sync, you can manage your CloudFormation stacks with source control. You do this by configuring CloudFormation to monitor a Git repository. The repository is monitored for changes to two files:

  • A CloudFormation template file that defines a stack

  • A stack deployment file that contains parameters that configure the stack

When you commit changes to the template or the deployment file, CloudFormation creates a pull request in your Git repo before updating the stack. This way, you can use pull requests and version tracking to configure, deploy, and update your CloudFormation stacks from a centralized location.

Git sync provides a console interface that you can use to link to a repository, generate a stack deployment file, update a CloudFormation template, and submit a pull request to your repository. Git sync also provides a status dashboard that you can use to monitor, edit, and troubleshoot active Git sync stack deployments. Git sync is accessed through the CloudFormation console when you create a stack. You can also access Git sync using CodeConnections. For more information, see Working with sync configurations for linked repositories in the Developer Tools Console User Guide.

Git sync supports GitHub, GitHub Enterprise, GitLab, Bitbucket, and GitLab self-managed repositories.

Note

Git sync is available in the following regions: US East (N. Virginia), US East (Ohio), US West (N. California), US West (Oregon), Canada (Central), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Seoul), Asia Pacific (Singapore), Asia Pacific (Sydney), Europe (Ireland), Europe (London), Europe (Paris), Europe (Stockholm), Europe (Frankfurt), Europe (Milan), and South America (São Paulo).

For information about using Git sync with a multi-account strategy, see the following blog post Use AWS CloudFormation Git sync to configure resources in customer accounts.