Featured resource
2026 Tech Forecast
2026 Tech Forecast

1,500+ tech insiders, business leaders, and Pluralsight Authors share their predictions on what’s shifting fastest and how to stay ahead.

Download the forecast
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Google Cloud Platform icon
Labs

Using Static Analysis to Detect CloudFormation Misconfigurations

In this lab, you will learn how to enforce governance in your infrastructure-as-code pipeline by integrating the `cfn-lint` tool to detect CloudFormation template issues. You will configure buildspec commands to run static analysis in a pre-existing governance stage within your pipeline. By implementing the tools in this lab, you will be able to identify and catch misconfigurations within your pipeline automatically and block the non-compliant templates from being deployed. **Important Information**: Please ensure that you read through the **Additional Information** section.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Intermediate
Last updated
May 25, 2026
Duration
15m

Contact sales

By clicking submit, you agree to our Privacy Policy and Terms of Use, and consent to receive marketing emails from Pluralsight.
Table of Contents
  1. Challenge

    Introduce a compliant template

    Download the repository files and edit the existing infra/template.yml file.

    • Clone the repository locally from the repo URL: https://github.com/pluralsight-cloud/Path-Proactive-Security-in-Your-AWS-CI-CD-Pipeline.git

    • Edit the infra/template.yml file within the lab-specific directory (4-lab-using-static-analysis-to-detect-cloudformation-misconfigurations)

    • Within the infra/template.yml file add a new IAM role below the existing VPC security group resource.

      • Role Name: governance-lab-test-role
      • There will be some other settings**: This is up to you. The supplied example within the repository files and lab guide will allow s3:GetObject, s3:ListBucket, and s3:PutObject permissions on the artifacts S3 bucket.
  2. Challenge

    Validate locally

    Install cfn-lint locally and validate your cfn template.

    • Install cfn-lint, boto3, and pyyaml using pip
    • Execute cfn-lint against your updated infra/template.yml file locally
    • Validate your infra/template.yml passes through cfn-lint without any warnings
  3. Challenge

    Update the CodeBuild configuration

    Now that your templates are validated, you need to update the buildspec.yml file.

    • Edit the configuration/buildspec.yml within the lab-specific directory (4-lab-using-static-analysis-to-detect-cloudformation-misconfigurations)
    • Within the install phase of the configuration/buildspec.yml file, install cfn-lint, boto3, and pyyaml using pip
    • Within the build phase of the configuration/buildspec.yml file, check the cfn-lint version, and run cfn-lint against all .yml files within the infra/ directory
    • Leave the artifacts portion of the configuration/buildspec.yml file as-is
  4. Challenge

    Verify the buildspec change reached CodeBuild

    Now that all of your artifact files are ready, you can update the pipeline by uploading the artifacts.zip file to your Amazon S3 bucket to trigger a build.

    • Zip up all of the required files into an artifacts.zip file
    • Upload the artifacts.zip file to the Amazon S3 artifacts bucket in your account
    • Validate the governance-pipeline pipeline executes successfully and deploys your new cfn template
    • Inspect the build logs for the GovernanceLint stage
    • Inspect the deploy logs for the Deploy stage
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight