Create Build Project

Create a build project using CodeBuild.


  1. Go to the AWS Management Console, select services then select CodeBuild under Developer Tools
  2. Select create build project

In the Project Configuration panel:

  1. Enter DemoApp in the project name field

In the Source panel:

  1. Make sure source provider is AWS CodeCommit
  2. Select DemoApp in the repository field
  3. Make sure reference type is branch
  4. Select master in the branch field

Source Panel

In the Environment panel:

  1. Make sure environment image is managed image
  2. Select Ubuntu in the operating system field
  3. Select standard in the runtime(s) field
  4. Select aws/codebuild/standard:4.0 in the image field
  5. Make sure image version is always use the latest image for this runtime version
  6. Make sure environment type is Linux
  7. Do not select the checkbox beside the privileged label
  8. Select existing service role in the service role field
  9. Select the role created by your InfrastructureStack in the role ARN field. You will find the role ARN in the output of the CDK application deployment with the key InfrastructureStack.BuildRoleArn.
  10. Make sure allow AWS CodeBuild to modify this service role so it can be used with this build project is checked

Environment Panel

In the Buildspec panel:

  1. Make sure the build specifications is use a buildspec file

Build Spec Panel

In the Artifacts panel:

  1. Select Amazon S3 in the type field
  2. Select the S3 bucket created by your InfrastructureStack in the bucket name field. You will find the bucket name in the output of the CDK application deployment with the key InfrastructureStack.BucketName
  3. Enter in the name field
  4. Select zip in the artifacts packaging field

Artifacts Panel

Do not change the defaults in the Logs panel.

Select create build project