The https://aws.amazon.com/cdk/ is a popular open source toolkit that allows developers to create their cloud infrastructure using high level programming languages. The pipeline deploys a given CDK application as one or more https://aws.amazon.com/cloudformation/ stacks.

In this blog post you will see how CloudFormation drift detection can be integrated as a pre-deployment validation step in CDK Pipelines using an event driven approach.

The CDK Pipelines stack defines a pipeline with a CodeCommit source and drift detection step integrated into it.

A Lambda function that implements drift detection step A DynamoDB table that holds drift_detection_id and pipeline_job_id An Event bridge rule to capture “CloudFormation Drift Detection Status Change” event A callback lambda function that evaluates status of drift detection and sends status back to the pipeline by looking up the data captured in DynamoDB.

Related Articles