Create CodeBuild build project and get the output in CloudWatch Logs

Lab Details

  1. This lab walks you through how to build a collection of sample source code input files into a deployable version of source code. You will instruct CodeBuild to use Apache Maven, which is a common build tool, to build a set of Java class files into a Java archive (JAR) file.

  2. Duration: 60 minutes

  3. AWS Region: US East (N. Virginia) us-east-1

Introduction

What is AWS CodeBuild?

  1. A fully managed build service that lets you compile your source code, run unit tests and produce artifacts that are ready to deploy.

  2. Since it is a managed service, it eliminates the need for provisioning, managing, and scaling your own build servers. Because it provides prepackaged build environments for programming languages and build tools such as Apache Maven, Gradle, and more.

  3. You can also customize the build environments for custom build in CodeBuild.

  4. There are 3 primary benefits of using CodeBuild: Fully managed, On-demand, and Build for all.

  5. Artifact is a resource that specifies output settings for artifacts generated by an AWS CodeBuild build. You can choose to store the artifacts in an S3 bucket.

Architecture Diagram

Task Details

  1. Launching Lab Environment.

  2. Understand the structure of the Zip file present in the S3 Bucket.

  3. Create an S3 bucket for storing the artifacts.

  4. Create a build project in CodeBuild.

  5. Run the build and check the output

  6. Delete the resources at the end.