Skip to content
Menu
myCloud myCloud

Personal short notes about Cloud

  • XMPie
  • AWS
    • AWS Topics
    • AWS Architecture
    • AWS CLI
    • AWS Health
    • AWS Policies
    • AWS Cost
  • CHEAT SHEETS
myCloud myCloud

Personal short notes about Cloud

AWS Code Build

By mikado on October 23, 2022
  1. Get spurce code from Github, CodeCommit, CodePipeline, S3 …
  2. Build instructions are in buildspec.yml file
  3. Build logs to S3 and CloudWatch logs
  4. CloudWatch metrics for build statistics
  5. CloudWatch events to detect failed builds
  6. CloudWatch alarms and SNS notifications
  1. Create a Build Project
  2. Define Source for the code build, choose CodeCommit
  3. Choose a reference type (Branch, Git tag and Commit ID)
  4. Choose a Service Role (automatic)
  5. Can define additional configuration(timeout, queue timeout..)
  6. Can setup env var
  7. buildspec file
  8. Artifacts
  9. Logs –> CloudWatch or S3
  10. Click Create build project
  11. Click Start Build –> docker container will start…
  12. Check status and build duration in Build History

buildspec.yml

Check Build projects / Build project, you can see the phases and their durations

Artifacts

Environment variables and Parameter Store

–> printenv

Check AWS_REGION for eg

You can define env. Even secrets with SSM Paameter Store (SecureString with KMS key)

You must have IAM a read policy for codebuild to access SSM –> add AmazonSSMReadOnlyAccess policy to the user

Artifacts and S3

Generate output files

CodeBuild / Buid Project / Edit Artifacts

Category: AWS Topics

Categories

  • AWS (4)
  • AWS Architecture (8)
  • AWS CLI (5)
  • AWS Cost (3)
  • AWS Health (4)
  • AWS Policies (2)
  • AWS Topics (24)
  • CHEAT SHEETS (16)
  • Container (21)
  • Datadog (4)
  • Jenkins (2)
  • Linux (9)
  • Microsoft (7)
  • Python (1)
  • SCRIPTS (9)
  • Terraform (5)
  • XMPie (6)
©2025 myCloud
Click to Copy