From 9a31434fe766be634d8be9d2755268b3a09b7bba Mon Sep 17 00:00:00 2001
From: Viren Nadkarni <viren.nadkarni@gmail.com>
Date: Fri, 7 Mar 2025 15:37:04 +0530
Subject: [PATCH 01/14] Add placeholder

---
 .../coverage/coverage_codebuild/index.md         |  1 -
 content/en/user-guide/aws/codebuild/index.md     | 16 ++++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 content/en/user-guide/aws/codebuild/index.md

diff --git a/content/en/references/coverage/coverage_codebuild/index.md b/content/en/references/coverage/coverage_codebuild/index.md
index 0a7c685776..1d1bc0807a 100644
--- a/content/en/references/coverage/coverage_codebuild/index.md
+++ b/content/en/references/coverage/coverage_codebuild/index.md
@@ -4,7 +4,6 @@ linkTitle: "codebuild"
 description: >
   Implementation details for API codebuild
 hide_readingtime: true
-draft: true
 ---
 
 ## Coverage Overview
diff --git a/content/en/user-guide/aws/codebuild/index.md b/content/en/user-guide/aws/codebuild/index.md
new file mode 100644
index 0000000000..b467ae3276
--- /dev/null
+++ b/content/en/user-guide/aws/codebuild/index.md
@@ -0,0 +1,16 @@
+---
+title: CodeBuild
+linkTitle: CodeBuild
+description: >
+  Get started with CodeBuild on LocalStack
+tags: ["Pro image"]
+---
+
+## Introduction
+
+
+## Getting Started
+
+
+## Limitations
+

From e6bcec0cee03810c869914425255768ce24996c0 Mon Sep 17 00:00:00 2001
From: Giovanni Grano <me@giograno.com>
Date: Wed, 21 May 2025 09:40:59 +0200
Subject: [PATCH 02/14] wip

---
 content/en/user-guide/aws/codebuild/index.md | 152 +++++++++++++++++++
 1 file changed, 152 insertions(+)

diff --git a/content/en/user-guide/aws/codebuild/index.md b/content/en/user-guide/aws/codebuild/index.md
index b467ae3276..d14e9ce7db 100644
--- a/content/en/user-guide/aws/codebuild/index.md
+++ b/content/en/user-guide/aws/codebuild/index.md
@@ -8,9 +8,161 @@ tags: ["Pro image"]
 
 ## Introduction
 
+AWS CodeBuild is a fully managed continuous integration service that compiles source code, runs tests, and produces software packages that are ready to deploy.
+It's part of the AWS Developer Tools suite and integrates with other AWS services to provide an end-to-end development pipeline.
+
+LocalStack supports the emulation of most of the CodeBuild operations.
+The supported operations are listed on the [API coverage page]({{< ref "coverage_codebuild" >}}).
+
+AWS CodeBuild emulation is powered by the [AWS CodeBuild agent](https://docs.aws.amazon.com/codebuild/latest/userguide/use-codebuild-agent.html).
 
 ## Getting Started
 
+This tutorial will show you how to use AWS CodeBuild to test and build a deployable version of a Java executable.
+
+It assumes basic knowledge of the [`awslocal`](https://github.com/localstack/awscli-local) wrapper, Apache Maven, and Java.
+
+### Create the source code
+
+In the first step, we have to create the project that we want to build with AWS CodeBuild.
+
+In an empty directory, we need to re-create the following structure:
+
+```bash
+root-directory-name
+├── pom.xml
+└── src
+    ├── main
+    │   └── java
+    │       └── MessageUtil.java
+    └── test
+        └── java
+            └── TestMessageUtil.java
+```
+
+Let us walk through these files.
+`MessageUtil.java` is the file implementing the logic of this small application.
+It does nothing more than print a salutation message.
+Copy the following content into the `src/main/java` directory.
+
+```java
+public class MessageUtil {
+  private String message;
+
+  public MessageUtil(String message) {
+    this.message = message;
+  }
+
+  public String printMessage() {
+    System.out.println(message);
+    return message;
+  }
+
+  public String salutationMessage() {
+    message = "Hi!" + message;
+    System.out.println(message);
+    return message;
+  }
+}
+```
+
+Every build needs some testing!
+Therefore, create the `TestMessageUtil.java` file in the `src/test/java` directory.
+
+```java
+import org.junit.Test;
+import org.junit.Ignore;
+import static org.junit.Assert.assertEquals;
+
+public class TestMessageUtil {
+
+  String message = "Robert";    
+  MessageUtil messageUtil = new MessageUtil(message);
+
+  @Test
+  public void testPrintMessage() {      
+    System.out.println("Inside testPrintMessage()");
+    assertEquals(message,messageUtil.printMessage());
+  }
+
+  @Test
+  public void testSalutationMessage() {
+    System.out.println("Inside testSalutationMessage()");
+    message = "Hi!" + "Robert";
+    assertEquals(message,messageUtil.salutationMessage());
+  }
+}
+```
+
+This small suite simply verifies that the greeting message is built correctly.
+
+Finally, we need a `pom.xml` file to instruct Maven about what to build and which artifact needs to be produced.
+Create this file at the root of your directory.
+
+```xml
+<project xmlns="http://maven.apache.org/POM/4.0.0" 
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.example</groupId>
+  <artifactId>messageUtil</artifactId>
+  <version>1.0</version>
+  <packaging>jar</packaging>
+  <name>Message Utility Java Sample App</name>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.11</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.8.0</version>
+      </plugin>
+    </plugins>
+  </build>
+</project>
+```
+
+With the following configuration, Maven will compile the `java` files into a executable jar and run the specified tests.
+
+### Create the buildspec file
+
+Now that we have our project set up, we need to create a `buildspec` file.
+A `buildspec` file is a collection of settings and commands, specified in YAML format, that tells AWS CodeBuild how to run a build.
+
+Create this `buildspec.yml` file in the root directory.
+
+```yaml
+version: 0.2
+
+phases:
+  install:
+    runtime-versions:
+      java: corretto11
+  pre_build:
+    commands:
+      - echo Nothing to do in the pre_build phase...
+  build:
+    commands:
+      - echo Build started on `date`
+      - mvn install
+  post_build:
+    commands:
+      - echo Build completed on `date`
+artifacts:
+  files:
+    - target/messageUtil-1.0.jar
+```
 
 ## Limitations
 
+- CodeBuild currently only supports S3 as a code source.
+You can use AWS CodePipeline to integrate CodeBuild with a source code repository provider via CodeStarSourceConnection.
+- We only use one build
+- Talk to the host (pass via the host network)

From c9fdfbe41cc9819e5ebd88a9581174951c1239be Mon Sep 17 00:00:00 2001
From: Giovanni Grano <me@giograno.com>
Date: Wed, 21 May 2025 11:26:46 +0200
Subject: [PATCH 03/14] create buckets

---
 content/en/user-guide/aws/codebuild/index.md | 32 ++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/content/en/user-guide/aws/codebuild/index.md b/content/en/user-guide/aws/codebuild/index.md
index d14e9ce7db..dc6e0985f5 100644
--- a/content/en/user-guide/aws/codebuild/index.md
+++ b/content/en/user-guide/aws/codebuild/index.md
@@ -160,6 +160,38 @@ artifacts:
     - target/messageUtil-1.0.jar
 ```
 
+### Create input and output buckets
+
+Now we have to create two S3 buckets:
+- one bucket that stores the source we just created, that will be the source of the AWS CodeBuild build;
+- one bucket where the output of the build, i.e., the JAR file, will be stored.
+
+Create the buckets with the following commands:
+
+{{< command >}}
+$ awslocal s3 mb s3://codebuild-demo-input
+<disable-copy>
+make_bucket: codebuild-demo-input
+{{< /command >}}
+
+{{< command >}}
+$ awslocal s3 mb s3://codebuild-demo-output
+<disable-copy>
+make_bucket: codebuild-demo-output
+{{< /command >}}
+
+Finally, zip the content of the source code directory and upload it to the created source bucket.
+With a UNIX system, you can use the `zip` utility:
+{{< command >}}
+$ zip -r MessageUtil.zip <source-directory>
+{{< /command >}}
+
+Then, upload `MessageUtil.zip` to the `codebuild-demo-input` bucket with the following command:
+
+{{< command >}}
+$ awslocal s3 cp MessageUtil.zip s3://codebuild-demo-input
+{{< /command >}}
+
 ## Limitations
 
 - CodeBuild currently only supports S3 as a code source.

From 49f30f4ec3e82aafc2f23b4ca7454dbf0bab5a54 Mon Sep 17 00:00:00 2001
From: Giovanni Grano <me@giograno.com>
Date: Wed, 21 May 2025 13:57:44 +0200
Subject: [PATCH 04/14] iam role

---
 content/en/user-guide/aws/codebuild/index.md | 89 ++++++++++++++++++++
 1 file changed, 89 insertions(+)

diff --git a/content/en/user-guide/aws/codebuild/index.md b/content/en/user-guide/aws/codebuild/index.md
index dc6e0985f5..baec9c91a7 100644
--- a/content/en/user-guide/aws/codebuild/index.md
+++ b/content/en/user-guide/aws/codebuild/index.md
@@ -192,6 +192,95 @@ Then, upload `MessageUtil.zip` to the `codebuild-demo-input` bucket with the fol
 $ awslocal s3 cp MessageUtil.zip s3://codebuild-demo-input
 {{< /command >}}
 
+### Configuring IAM
+
+To properly work, AWS CodeBuild needs access to other AWS services, e.g., to retrieve the source code from a S3 bucket.
+Create a `create-role.json` file with following content:
+
+```json
+{
+  "Version": "2012-10-17",
+  "Statement": [
+    {
+      "Effect": "Allow",
+      "Principal": {
+        "Service": "codebuild.amazonaws.com"
+      },
+      "Action": "sts:AssumeRole"
+    }
+  ]
+}
+```
+
+Then, run the following command to create the IAM role:
+{{< command >}}
+$ awslocal iam create-role --role-name CodeBuildServiceRole --assume-role-policy-document file://create-role.json
+{{< /command >}}
+
+From the command's response, keep note of the role ARN:
+it will be needed by CodeBuild later on.
+
+Let us now define the policy for the created role.
+Create a `put-role-policy.json` file with the following content:
+
+```json
+{
+  "Version": "2012-10-17",
+  "Statement": [
+    {
+      "Sid": "CloudWatchLogsPolicy",
+      "Effect": "Allow",
+      "Action": [
+        "logs:CreateLogGroup",
+        "logs:CreateLogStream",
+        "logs:PutLogEvents"
+      ],
+      "Resource": "*"
+    },
+    {
+      "Sid": "CodeCommitPolicy",
+      "Effect": "Allow",
+      "Action": [
+        "codecommit:GitPull"
+      ],
+      "Resource": "*"
+    },
+    {
+      "Sid": "S3GetObjectPolicy",
+      "Effect": "Allow",
+      "Action": [
+        "s3:GetObject",
+        "s3:GetObjectVersion"
+      ],
+      "Resource": "*"
+    },
+    {
+      "Sid": "S3PutObjectPolicy",
+      "Effect": "Allow",
+      "Action": [
+        "s3:PutObject"
+      ],
+      "Resource": "*"
+    },
+    {
+      "Sid": "S3BucketIdentity",
+      "Effect": "Allow",
+      "Action": [
+        "s3:GetBucketAcl",
+        "s3:GetBucketLocation"
+      ],
+      "Resource": "*"
+    }
+  ]
+}
+```
+
+Finally, assign the policy to the role with the following command:
+
+{{< command >}}
+$ awslocal put-role-policy --role-name CodeBuildServiceRole --policy-name CodeBuildServiceRolePolicy --policy-document file://put-role-policy.json
+{{< /command >}}
+
 ## Limitations
 
 - CodeBuild currently only supports S3 as a code source.

From 70c638882b8d41dd3ea128c6a2f09ebe70a7e9b9 Mon Sep 17 00:00:00 2001
From: Giovanni Grano <me@giograno.com>
Date: Wed, 21 May 2025 15:44:34 +0200
Subject: [PATCH 05/14] wrap

---
 content/en/user-guide/aws/codebuild/index.md | 83 +++++++++++++++++++-
 1 file changed, 79 insertions(+), 4 deletions(-)

diff --git a/content/en/user-guide/aws/codebuild/index.md b/content/en/user-guide/aws/codebuild/index.md
index baec9c91a7..11e9d2a87e 100644
--- a/content/en/user-guide/aws/codebuild/index.md
+++ b/content/en/user-guide/aws/codebuild/index.md
@@ -281,9 +281,84 @@ Finally, assign the policy to the role with the following command:
 $ awslocal put-role-policy --role-name CodeBuildServiceRole --policy-name CodeBuildServiceRolePolicy --policy-document file://put-role-policy.json
 {{< /command >}}
 
+### Create the build project
+
+We now need to create a build project, containing all the information about how to run a build, where to get the
+source code, and where to place the output.
+
+You can use the CLI to generate the skeleton of the create build request, which you can later adapt.
+Save the output of the following command to a file named `create-project.json`.
+
+{{< command >}}
+$ awslocal codebuild create-project --generate-cli-skeleton
+{{< /command >}}
+
+From the generated file, change the source and the artifact location to match the S3 bucket names you just created.
+Similarly, fill in the ARN of the CodeBuild service role.
+
+```json {hl_lines=[5,9,16]}
+{
+  "name": "codebuild-demo-project",
+  "source": {
+    "type": "S3",
+    "location": "codebuild-demo-input"
+  },
+  "artifacts": {
+    "type": "S3",
+    "location": "codebuild-demo-output"
+  },
+  "environment": {
+    "type": "LINUX_CONTAINER",
+    "image": "aws/codebuild/standard:5.0",
+    "computeType": "BUILD_GENERAL1_SMALL"
+  },
+  "serviceRole": "service-role-arn"
+}
+```
+
+Create now the project with the following command:
+
+{{< command >}}
+$ awslocal codebuild create-project --cli-input-json file://create-project.json
+{{< /command >}}
+
+You have now created a CodeBuild project called `codebuild-demo-project` that uses the S3 buckets you just created as source and artifact.
+
+{{< callout >}}
+LocalStack does not allow to customize the build environment.
+Depending on the host architecture, the build will be executed an Amazon Linux container, 3.0. and 5.0., respectively for Arch and x86.
+{{< /callout >}}
+
+
+### Run the build
+
+In this final step, you can now execute your build with the following command:
+
+{{< command >}}
+$ awslocal codebuild start-build --project-name codebuild-demo-project
+{{< /command >}}
+
+Make note of the `id` information given in output, since it can be used to query the status of the build.
+If you inspect the running containers (e.g., with the `docker ps -a` command), you will notice a container with the `localstack-codebuild` prefix (followed by the ID of the build), which CodeBuild started to execute the build.
+This container will be responsible to start a Docker compose stack that executes the actual build.
+
+As said, you can inspect the status of the build with the following command:
+
+{{< command >}}
+$ awslocal codebuild batch-get-builds --ids <build-id>
+{{< /command >}}
+
+The command returns a list of builds.
+A build has a `buildStatus` attribute that will be set to `SUCCEEDED` if the build correctly terminates.
+
+{{< callout >}}
+Each build goes through different phases, each of them having a start and end time, as well as a status.
+LocalStack does not provided such a granular information.
+Currently, it reports only the final status of the build.
+{{< /callout >}}
+
 ## Limitations
 
-- CodeBuild currently only supports S3 as a code source.
-You can use AWS CodePipeline to integrate CodeBuild with a source code repository provider via CodeStarSourceConnection.
-- We only use one build
-- Talk to the host (pass via the host network)
+- CodeBuild currently only supports S3, NO_SOURCE, and CODEPIPELINE as [project source](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ProjectSource.html).
+- CodeBuild only uses Amazon Linux as the build environment for a build project.
+- Communication with the LocalStack container within the build environment is possible only via the host network, by using the Gateway IP address (typically 172.17.0.1) or `host.docker.internal` if running on MacOS.

From d5e0ae288fc095727156377ae4031da6c427ae7b Mon Sep 17 00:00:00 2001
From: Giovanni Grano <me@giograno.com>
Date: Wed, 21 May 2025 15:49:03 +0200
Subject: [PATCH 06/14] lint

---
 content/en/user-guide/aws/codebuild/index.md | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/content/en/user-guide/aws/codebuild/index.md b/content/en/user-guide/aws/codebuild/index.md
index 11e9d2a87e..72e0303d71 100644
--- a/content/en/user-guide/aws/codebuild/index.md
+++ b/content/en/user-guide/aws/codebuild/index.md
@@ -326,10 +326,9 @@ You have now created a CodeBuild project called `codebuild-demo-project` that us
 
 {{< callout >}}
 LocalStack does not allow to customize the build environment.
-Depending on the host architecture, the build will be executed an Amazon Linux container, 3.0. and 5.0., respectively for Arch and x86.
+Depending on the host architecture, the build will be executed an Amazon Linux container, version `3.0.` and `5.0.`, respectively for Arch and x86.
 {{< /callout >}}
 
-
 ### Run the build
 
 In this final step, you can now execute your build with the following command:

From f0acbe107b6741daa30054a1f94dc7891bd54f1d Mon Sep 17 00:00:00 2001
From: Giovanni Grano <me@giograno.com>
Date: Wed, 21 May 2025 15:59:54 +0200
Subject: [PATCH 07/14] some changes

---
 content/en/user-guide/aws/codebuild/index.md | 32 ++++++++++++++------
 1 file changed, 22 insertions(+), 10 deletions(-)

diff --git a/content/en/user-guide/aws/codebuild/index.md b/content/en/user-guide/aws/codebuild/index.md
index 72e0303d71..8ec14c36e4 100644
--- a/content/en/user-guide/aws/codebuild/index.md
+++ b/content/en/user-guide/aws/codebuild/index.md
@@ -9,7 +9,7 @@ tags: ["Pro image"]
 ## Introduction
 
 AWS CodeBuild is a fully managed continuous integration service that compiles source code, runs tests, and produces software packages that are ready to deploy.
-It's part of the AWS Developer Tools suite and integrates with other AWS services to provide an end-to-end development pipeline.
+It's part of the [AWS Developer Tools suite](https://aws.amazon.com/products/developer-tools/) and integrates with other AWS services to provide an end-to-end development pipeline.
 
 LocalStack supports the emulation of most of the CodeBuild operations.
 The supported operations are listed on the [API coverage page]({{< ref "coverage_codebuild" >}}).
@@ -41,9 +41,9 @@ root-directory-name
 ```
 
 Let us walk through these files.
-`MessageUtil.java` is the file implementing the logic of this small application.
+`MessageUtil.java` contains the entire logic of this small application.
 It does nothing more than print a salutation message.
-Copy the following content into the `src/main/java` directory.
+Create a `MessageUtil.java` file and save it into the `src/main/java` directory.
 
 ```java
 public class MessageUtil {
@@ -160,6 +160,13 @@ artifacts:
     - target/messageUtil-1.0.jar
 ```
 
+In this file we can observe how actually the build will be executed.
+First, we define a runtime version.
+Then, we mostly run a `mvn install` command in the build phase, doing both the compilation and the testing.
+The pre and post build phases do not do much in this example, but can be used for various things, like install some software needed for the build itself.
+
+A full specification of a `buildspec` file can be found in the [docs](https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html).
+
 ### Create input and output buckets
 
 Now we have to create two S3 buckets:
@@ -181,7 +188,7 @@ make_bucket: codebuild-demo-output
 {{< /command >}}
 
 Finally, zip the content of the source code directory and upload it to the created source bucket.
-With a UNIX system, you can use the `zip` utility:
+With a UNIX system, you can simply use the `zip` utility:
 {{< command >}}
 $ zip -r MessageUtil.zip <source-directory>
 {{< /command >}}
@@ -212,15 +219,15 @@ Create a `create-role.json` file with following content:
 }
 ```
 
-Then, run the following command to create the IAM role:
+Then, run the following command to create the necessary IAM role:
 {{< command >}}
 $ awslocal iam create-role --role-name CodeBuildServiceRole --assume-role-policy-document file://create-role.json
 {{< /command >}}
 
 From the command's response, keep note of the role ARN:
-it will be needed by CodeBuild later on.
+it will be needed to create the CodeBuild project later on.
 
-Let us now define the policy for the created role.
+Let us now define a policy for the created role.
 Create a `put-role-policy.json` file with the following content:
 
 ```json
@@ -283,10 +290,9 @@ $ awslocal put-role-policy --role-name CodeBuildServiceRole --policy-name CodeBu
 
 ### Create the build project
 
-We now need to create a build project, containing all the information about how to run a build, where to get the
-source code, and where to place the output.
+We now need to create a build project, containing all the information about how to run a build, where to get the source code, and where to place the output.
 
-You can use the CLI to generate the skeleton of the create build request, which you can later adapt.
+You can use the CLI to generate the skeleton of the `CreateBuild` request, which you can later modify.
 Save the output of the following command to a file named `create-project.json`.
 
 {{< command >}}
@@ -356,6 +362,12 @@ LocalStack does not provided such a granular information.
 Currently, it reports only the final status of the build.
 {{< /callout >}}
 
+Once the build is completed, you can verify that the JAR artifact has been uploaded to the correct S3 bucket with the following command:
+
+{{< command >}}
+$ awslocal s3 ls://codebuild-demo-output
+{{< /command >}}
+
 ## Limitations
 
 - CodeBuild currently only supports S3, NO_SOURCE, and CODEPIPELINE as [project source](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ProjectSource.html).

From 7c9c0a393888c00921a2e6a0508053b827e08412 Mon Sep 17 00:00:00 2001
From: Giovanni Grano <me@giograno.com>
Date: Thu, 22 May 2025 17:29:06 +0200
Subject: [PATCH 08/14] Update content/en/user-guide/aws/codebuild/index.md

Co-authored-by: Viren Nadkarni <viren.nadkarni@localstack.cloud>
---
 content/en/user-guide/aws/codebuild/index.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/content/en/user-guide/aws/codebuild/index.md b/content/en/user-guide/aws/codebuild/index.md
index 8ec14c36e4..41861e3944 100644
--- a/content/en/user-guide/aws/codebuild/index.md
+++ b/content/en/user-guide/aws/codebuild/index.md
@@ -179,6 +179,7 @@ Create the buckets with the following commands:
 $ awslocal s3 mb s3://codebuild-demo-input
 <disable-copy>
 make_bucket: codebuild-demo-input
+</disable-copy>
 {{< /command >}}
 
 {{< command >}}

From 9cb5b66fc269de272c727273115f3994a2b6c517 Mon Sep 17 00:00:00 2001
From: Giovanni Grano <me@giograno.com>
Date: Thu, 22 May 2025 17:29:17 +0200
Subject: [PATCH 09/14] Update content/en/user-guide/aws/codebuild/index.md

Co-authored-by: Viren Nadkarni <viren.nadkarni@localstack.cloud>
---
 content/en/user-guide/aws/codebuild/index.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/content/en/user-guide/aws/codebuild/index.md b/content/en/user-guide/aws/codebuild/index.md
index 41861e3944..bb04925cdd 100644
--- a/content/en/user-guide/aws/codebuild/index.md
+++ b/content/en/user-guide/aws/codebuild/index.md
@@ -9,7 +9,7 @@ tags: ["Pro image"]
 ## Introduction
 
 AWS CodeBuild is a fully managed continuous integration service that compiles source code, runs tests, and produces software packages that are ready to deploy.
-It's part of the [AWS Developer Tools suite](https://aws.amazon.com/products/developer-tools/) and integrates with other AWS services to provide an end-to-end development pipeline.
+It is part of the [AWS Developer Tools suite](https://aws.amazon.com/products/developer-tools/) and integrates with other AWS services to provide an end-to-end development pipeline.
 
 LocalStack supports the emulation of most of the CodeBuild operations.
 The supported operations are listed on the [API coverage page]({{< ref "coverage_codebuild" >}}).

From 556050820abc5ae66b36347a6ad11fae1b002646 Mon Sep 17 00:00:00 2001
From: Giovanni Grano <me@giograno.com>
Date: Thu, 22 May 2025 17:29:47 +0200
Subject: [PATCH 10/14] Update content/en/user-guide/aws/codebuild/index.md

Co-authored-by: Viren Nadkarni <viren.nadkarni@localstack.cloud>
---
 content/en/user-guide/aws/codebuild/index.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/content/en/user-guide/aws/codebuild/index.md b/content/en/user-guide/aws/codebuild/index.md
index bb04925cdd..dce361ba7c 100644
--- a/content/en/user-guide/aws/codebuild/index.md
+++ b/content/en/user-guide/aws/codebuild/index.md
@@ -333,7 +333,7 @@ You have now created a CodeBuild project called `codebuild-demo-project` that us
 
 {{< callout >}}
 LocalStack does not allow to customize the build environment.
-Depending on the host architecture, the build will be executed an Amazon Linux container, version `3.0.` and `5.0.`, respectively for Arch and x86.
+Depending on the host architecture, the build will be executed an Amazon Linux container, version `3.0.x` and `5.0.x`, respectively for Arch and x86.
 {{< /callout >}}
 
 ### Run the build

From 55d43e7828a55d09d6b653d224ad6f10724def45 Mon Sep 17 00:00:00 2001
From: Giovanni Grano <me@giograno.com>
Date: Thu, 22 May 2025 17:31:13 +0200
Subject: [PATCH 11/14] fix arch with arm

---
 content/en/user-guide/aws/codebuild/index.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/content/en/user-guide/aws/codebuild/index.md b/content/en/user-guide/aws/codebuild/index.md
index dce361ba7c..feaf39f845 100644
--- a/content/en/user-guide/aws/codebuild/index.md
+++ b/content/en/user-guide/aws/codebuild/index.md
@@ -333,7 +333,7 @@ You have now created a CodeBuild project called `codebuild-demo-project` that us
 
 {{< callout >}}
 LocalStack does not allow to customize the build environment.
-Depending on the host architecture, the build will be executed an Amazon Linux container, version `3.0.x` and `5.0.x`, respectively for Arch and x86.
+Depending on the host architecture, the build will be executed an Amazon Linux container, version `3.0.x` and `5.0.x`, respectively for the ARM and the x86 architecture.
 {{< /callout >}}
 
 ### Run the build

From 1d3abdface4cf6a71580348c208975d6b354d5c5 Mon Sep 17 00:00:00 2001
From: Giovanni Grano <me@giograno.com>
Date: Thu, 29 May 2025 09:10:57 +0200
Subject: [PATCH 12/14] add CODEBUILD_REMOVE_CONTAINERS variable

---
 content/en/references/configuration.md | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/content/en/references/configuration.md b/content/en/references/configuration.md
index 2e568c824f..7011b830d7 100644
--- a/content/en/references/configuration.md
+++ b/content/en/references/configuration.md
@@ -125,6 +125,12 @@ This section covers configuration options that are specific to certain AWS servi
 | - | - | - |
 | `PROVIDER_OVERRIDE_CLOUDWATCH` | `v1` | Use the old CloudWatch provider. |
 
+### CodeBuild
+
+| Variable | Example Values | Description |
+| - | - | - |
+| `CODEBUILD_REMOVE_CONTAINERS` | `0`\|`1` (default) | Remove Docker containers associated with a CodeBuild build tasks after execution. Disabling this and dumping container logs might help with troubleshooting failing builds. |
+
 ### DMS
 
 | Variable | Example Values | Description |

From 472917aaa2756278d9929a8f4b8da71a832cdf6a Mon Sep 17 00:00:00 2001
From: Viren Nadkarni <viren.nadkarni@gmail.com>
Date: Fri, 30 May 2025 15:58:44 +0530
Subject: [PATCH 13/14] Fix title for coverage page

---
 content/en/references/coverage/coverage_codebuild/index.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/content/en/references/coverage/coverage_codebuild/index.md b/content/en/references/coverage/coverage_codebuild/index.md
index 1d1bc0807a..34b2765f61 100644
--- a/content/en/references/coverage/coverage_codebuild/index.md
+++ b/content/en/references/coverage/coverage_codebuild/index.md
@@ -1,6 +1,6 @@
 ---
-title: "codebuild"
-linkTitle: "codebuild"
+title: "CodeBuild"
+linkTitle: "CodeBuild"
 description: >
   Implementation details for API codebuild
 hide_readingtime: true

From 7b7dc070c9344a324a72d964056f5094eb8b071d Mon Sep 17 00:00:00 2001
From: Quetzalli <alejandra.olvera.novack@gmail.com>
Date: Wed, 4 Jun 2025 19:50:47 -0700
Subject: [PATCH 14/14] grammar fixes

---
 content/en/user-guide/aws/codebuild/index.md | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/content/en/user-guide/aws/codebuild/index.md b/content/en/user-guide/aws/codebuild/index.md
index feaf39f845..485a19a020 100644
--- a/content/en/user-guide/aws/codebuild/index.md
+++ b/content/en/user-guide/aws/codebuild/index.md
@@ -66,7 +66,7 @@ public class MessageUtil {
 }
 ```
 
-Every build needs some testing!
+Every build needs to be tested.
 Therefore, create the `TestMessageUtil.java` file in the `src/test/java` directory.
 
 ```java
@@ -160,17 +160,17 @@ artifacts:
     - target/messageUtil-1.0.jar
 ```
 
-In this file we can observe how actually the build will be executed.
+In this file we can observe how the build will be executed.
 First, we define a runtime version.
-Then, we mostly run a `mvn install` command in the build phase, doing both the compilation and the testing.
+Then, we run a `mvn install` command in the build phase which does both the compilation and the testing.
 The pre and post build phases do not do much in this example, but can be used for various things, like install some software needed for the build itself.
 
-A full specification of a `buildspec` file can be found in the [docs](https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html).
+A full specification of a `buildspec` file can be found in the [AWS CodeBuild docs](https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html).
 
 ### Create input and output buckets
 
 Now we have to create two S3 buckets:
-- one bucket that stores the source we just created, that will be the source of the AWS CodeBuild build;
+- one bucket that stores the source we just created, that will be the source of the AWS CodeBuild build
 - one bucket where the output of the build, i.e., the JAR file, will be stored.
 
 Create the buckets with the following commands:
@@ -323,7 +323,7 @@ Similarly, fill in the ARN of the CodeBuild service role.
 }
 ```
 
-Create now the project with the following command:
+Now create the project with the following command:
 
 {{< command >}}
 $ awslocal codebuild create-project --cli-input-json file://create-project.json
@@ -345,7 +345,7 @@ $ awslocal codebuild start-build --project-name codebuild-demo-project
 {{< /command >}}
 
 Make note of the `id` information given in output, since it can be used to query the status of the build.
-If you inspect the running containers (e.g., with the `docker ps -a` command), you will notice a container with the `localstack-codebuild` prefix (followed by the ID of the build), which CodeBuild started to execute the build.
+If you inspect the running containers (e.g., with the `docker ps -a` command), you will notice a container with the `localstack-codebuild` prefix (followed by the build ID), which CodeBuild started to execute the build.
 This container will be responsible to start a Docker compose stack that executes the actual build.
 
 As said, you can inspect the status of the build with the following command:
@@ -359,7 +359,7 @@ A build has a `buildStatus` attribute that will be set to `SUCCEEDED` if the bui
 
 {{< callout >}}
 Each build goes through different phases, each of them having a start and end time, as well as a status.
-LocalStack does not provided such a granular information.
+LocalStack does not provided such granular information.
 Currently, it reports only the final status of the build.
 {{< /callout >}}