First Posted: Thursday, 15 June 2023

Introduction

AWS Graviton processors offer a cost-effective alternative to traditional x86 processors, making them an attractive option for businesses aiming to reduce expenses. In addition to their affordability, Graviton processors consume less power, leading to significant cost savings for businesses operating large data centers. This blog post will guide you through the steps to leverage AWS ECS Graviton processors for multi-architecture builds, enabling efficient and cost-effective deployment via AWS Codebuild.

Pre-requisites

  1. A docker base image that is arm64 platform compatible.
  2. An AWS Codepipeline with AWS Codebuild.

Steps to Migrate

Configuring CodeBuild Environment

To facilitate multi-architecture builds, we’ll begin by changing the CodeBuild environment image to standard:5. This image enables the use of Docker BuildKit, which leverages the power of AWS Graviton processors for building both amd64 and arm64 architectures. Additionally, we’ll enable DOCKERBUILD_KIT, a crucial setting for utilizing Docker BuildKit efficiently.

Modifying CodeBuild Buildspec

The buildspec file needs to be updated to incorporate the changes required for multi-architecture builds. We’ll outline the necessary modifications to enable seamless integration with AWS Graviton processors.