CodeBuild
Overview
Fully managed, customizable build environment
Continuous scaling, parallel build
How it work?
Create build environment
Download the src code to the build env
CodeBuild run the Build specs (
buildspec.yml
) to configure the buildOutput is uploaded to S3
(optional) integrate with SNS to send successful message.
Features
CodeBuild project
Source
Environment
IAM role
Logging
buildspec.yml
Build specification file for CodeBuild.
codebuild-breakpoint
: pause the build
phases
Install phase: contains commands to install libraries
Build phase: contains commands to build the src.
artifact
what we want to deliver to S3 bucket
Build caching
You can save time when your project builds by using a cache. A cache can store reusable pieces of your build environment and use them across multiple builds.
S3 caching
A good option for small to intermediate sized build artifacts that are more expensive to build than to download.
This is not the best option for large build artifacts because they can take a long time to transfer over your network.
Local caching
A good option for intermediate to large build artifacts because the cache is immediately available on the build host.
You can use a Docker layer cache in the Linux environment only.
Pricing
charge per minute of build
Trivia
A user can pause a build, use Session Manager to connect to the build container, and then resume the build.
Last updated