Demo: Building and Validating Changes in Our Local Environment
Explore how to build and validate code changes in a local environment using AWS CodeBuild and Docker. Learn to download and run the CodeBuild Docker image, use build scripts, and compile sample projects locally to ensure changes work before pushing to AWS. This lesson helps developers gain confidence in their builds while preparing for automated CI/CD pipelines.
Developers might wish to test their modifications on their local device before allowing AWS CodeBuild to compile the source code and produce output artifacts.
Locally utilizing CodeBuild
AWS CodeBuild allows recreating the same environment in the developer’s local machine so that they can validate the changes before submitting them to AWS. The first step is downloading the Docker image from the GitHub repository, as shown below.
Downloading the AWS CodeBuild Docker image
Once the package is downloaded, it creates a new directory, aws-codebuild-docker-images. The image comes prepackaged with three versions of the image, and we chose to install the most recent one.