

# Stop batch builds in Amazon CodeBuild
<a name="stop-batch-build"></a>

You can use the Amazon CodeBuild console, Amazon CLI,or Amazon SDKs to stop a batch build in Amazon CodeBuild.

**Note**  
If you use Lambda compute in your batch build, the in-progress Lambda build cannot be stopped.

**Topics**
+ [Stop a batch build (console)](#stop-batch-build-console)
+ [Stop a batch build (Amazon CLI)](#stop-batch-build-cli)
+ [Stop a batch build (Amazon SDKs)](#stop-batch-build-sdks)

## Stop a batch build (console)
<a name="stop-batch-build-console"></a>

1. Open the Amazon CodeBuild console at [https://console.amazonaws.cn/codesuite/codebuild/home](https://console.amazonaws.cn/codesuite/codebuild/home).

1. Do one of the following:
   + If the ***build-project-name*:*build-ID*** page is displayed, choose **Stop build**.
   + In the navigation pane, choose **Build history**. In the list of builds, select the box for the build, and then choose **Stop build**.
   + In the navigation pane, choose **Build projects**. In the list of build projects, in the **Name** column, choose the link for the build project's name. In the list of builds, select the box for the build, and then choose **Stop build**.

**Note**  
By default, only the most recent 100 builds or build projects are displayed. To view more builds or build projects, choose the gear icon, and then choose a different value for **Builds per page** or **Projects per page** or use the back and forward arrows.

## Stop a batch build (Amazon CLI)
<a name="stop-batch-build-cli"></a>
+ Run the [https://docs.amazonaws.cn/cli/latest/reference/codebuild/stop-build-batch.html](https://docs.amazonaws.cn/cli/latest/reference/codebuild/stop-build-batch.html) command:

  ```
  aws codebuild stop-build-batch --id <batch-build-id>
  ```

  In the preceding command, replace the following placeholder:
  + *<batch-build-id>*: Required string. The identifier of the batch build to stop. To get a list of batch build identifiers, see the following topics:
    + [View a list of batch build IDs (Amazon CLI)](view-build-list.md#view-batch-build-list-cli)
    + [View a list of batch build IDs for a build project (Amazon CLI)](view-builds-for-project.md#view-batch-builds-for-project-cli)

## Stop a batch build (Amazon SDKs)
<a name="stop-batch-build-sdks"></a>

For more information about using Amazon CodeBuild with the Amazon SDKs, see the [Amazon SDKs and tools reference](sdk-ref.md).