How to Create & Configure CodeBuild on Amazon Web Service (AWS)

AWS CodeBuild is a fully managed continuous integration service that compiles source code, runs tests, and produces software packages that are ready to deploy.

With CodeBuild, you don’t need to provision, manage, and scale your own build servers.Build and test code with continuous scaling, with pay as you go pricing across platforms such as Java, Ruby, Python, Android and more.


  • Login to aws portal.
  • Click on Services.


Fig 1


  • Under Developer Tools select CodeBuild.


Fig 2


  • Click on Create Build Project.


Fig. 3


  • Provide Project name.


Fig. 4


  • Select Source provider like codecommit, github, Amazon S3 or BitBucket. Select codecommit
  • Provide Repository name.


Fig. 5


  • Select Operating System:Amazon linux 2 or ubuntu.
  • Provide Runtime:Standard.
  • Create or select existing service role.


Fig. 6


  • Click on Additional Configurations.


Fig. 7


  • Provide Hours & Minutes for timeout & Queued timeout.


Fig. 8


  • Select existing VPC.
  • Then select subnets & security groups.
  • We can also add file system.
  • Click on Add File System & provide all the required options.


Fig 9


  • Provide Build Specification. Click on Insert Build Commands.
  • Click on Switch to editor.


Fig 10


  • Edit the build commands.


Fig 11


  • If you want to add Artifact.
  • Provide artifact type.


Fig 12


  • Enable Cloudwatch for logs.
  • Provide Cloudwatch logs  log Group name & Stream name.
  • Click on Create Build project.


Fig 13


  • Build project has been created successfully.
  • Click on Start build.


Fig 14


  • New Build has been started.


Fig 15


  • After sometime build has been deployed successfully.


Fig 16


Create CodeBuild using Shell

aws codebuild create-project –name <value> –description <value> –source <value> –service-role <value> –environment –vpc-config <value>

Leave a Reply