AWS CodeBuild

We will use the AWS First Cloud Journey repository for this demo. You can upload it to your own GitHub repository for use in the following steps when connecting with GitHub is required.

AWS CodeBuild Setup

  1. Access AWS CodeBuild

    • Click on Create project

CodeBuild

  1. In the Create build project interface
  • For Project name, enter AWS-FCJ-APP

CodeBuild

  1. Configure the Source

This demo code is simplified to help you understand the essentials of the build and deploy process.

- Select **Source provider** as **GitHub**
- Choose **Repository** as **PIPELINE**
- Choose **Branch**
- Select **main**

CodeBuild

  1. For the Environment

    • Select Managed image
    • Choose Operating system as Amazon Linux 2
    • Select Run time as Standard
    • Choose Image
    • Set the environment type to Linux
    • Check Enable Privileged mode.

CodeBuild

  1. Create a Service role or select an existing Service role that you have already created.

CodeBuild

  1. Next, we will configure the Buildspec path.

CodeBuild

  1. For the Artifact

    • We will store it in S3
    • Select the bucket that you have created.

CodeBuild

  1. For the Logs

    • We will use CloudWatch logs
    • Group name: aws-cicd-ec2-group
    • Stream name: aws-cicd-ec2-stream

CodeBuild

  1. We have successfully created the AWS CodeBuild project. To verify that the configuration is correct, try Start build.

CodeBuild

  1. Wait for about 5 minutes, then select Phase details to view the project build process.

CodeBuild