AWS CodePipeline Governance

A solution for enforcing governance rules on AWS CodePipelines to ensure compliance and consistency across multiple CI/CD pipelines.

AWS Open Source Cloud Service Only
Category Compliance & Governance
Community Stars 10
Last Commit 2 years ago
Last page update 19 days ago
Pricing Details Free to use under Apache License 2.0
Target Audience DevOps teams and security professionals managing AWS CodePipelines.

The AWS CodePipeline Governance solution addresses the critical security and operational challenge of ensuring compliance and consistency across multiple CI/CD pipelines within an AWS environment. This solution leverages a Lambda Function to enforce governance rules on AWS CodePipelines, ensuring that mandatory actions and stages are executed in a specified order.

The technical architecture of this solution can be deployed in two primary methods. The first method utilizes AWS Organizations and a Centralized Shared Services account to manage the CodePipeline Governance Lambda Function. This approach allows the Lambda Function to be invoked by multiple AWS accounts within the organization, simplifying the management of governance rules across diverse accounts. The second method involves deploying the Lambda Function within the same account as the AWS CodePipeline, which is suitable for environments without a centralized shared services setup.

Operationally, the solution involves parsing the CodePipeline CloudFormation template to ensure all governance rules are met before updating the CloudFormation stack. This process is initiated through a pipeline action and enables security or governance teams to mandate specific stages and actions. Key considerations include the need to configure IAM roles for the Lambda Function to assume and respond with the CodePipeline status, and managing the deployment of the solution using AWS CloudFormation templates.

Technically, the solution relies on CloudFormation templates to define the governance rules and the Lambda Function's execution. For example, the ScanCodePipeline Lambda Function is deployed using CloudFormation, and parameters such as the target AWS account ID must be specified. The solution also supports updating governance rules by creating YAML files that define the specific stages or actions to be enforced, with features like rule numbering and future support for pattern types to associate rules with specific pipelines based on tags.

Improve this page