CodeBuild

Icon

CodeBuild Icon

About

  • Code Build is responsible to build the application once the code changes are committed to VCS.

  • Build instructions are present in buildspec.yml file.

  • The file should be present in the root of the code or can manually upload in to the Management Console.

  • Can use CloudWatch Metrics to monitor build statistics.

  • EventBridge to detect failed builds and trigger notifications.

  • CloudWatch Alarms to notify if you need thresholds for failures.

  • Build Project can be defined within CodePipeline or CodeBuild.

  • CodeBuild has supported environments for many languages. However, if a particular runtime is not supported Docker Image can be used.

Working

  • CodeBuild uses a CodeBuild container to run the instructions written in buildspec.yml file.

  • The container will spin up the supported runtime to build the code.

  • CodeBuild uses a docker image to prepare the container.

  • CodeBuild can cache to S3 the seldom changing reusable files required in builds.

  • Output logs generated are stored in S3 and CloudWatch logs.

  • Artifacts generated as a result of CodeBuild execution is saved to S3 bucket.

BuildSpec File

Last updated