{
  "doc": {
    "id": "app/run-tests/continuous-integration/aws-codebuild",
    "title": "Run Cypress tests in AWS CodeBuild: step-by-step guide",
    "description": "Learn how to set up and run Cypress tests in AWS CodeBuild, cache dependencies and build artifacts, run tests in parallel, and use Cypress Cloud with AWS CodeBuild.",
    "section": "app",
    "source_path": "/llm/markdown/app/run-tests/continuous-integration/aws-codebuild.md",
    "version": "066c46e056f0f322a0670d2d3aa4e6adaebfe717",
    "updated_at": "2026-09-10T13:30:12.426Z",
    "headings": [
      {
        "id": "app/run-tests/continuous-integration/aws-codebuild#run-cypress-in-aws-codebuild",
        "text": "Run Cypress in AWS CodeBuild",
        "level": 1
      },
      {
        "id": "app/run-tests/continuous-integration/aws-codebuild#testing-with-cypress-docker-images",
        "text": "Testing with Cypress Docker Images",
        "level": 2
      },
      {
        "id": "app/run-tests/continuous-integration/aws-codebuild#enabling-batch-builds",
        "text": "Enabling batch builds",
        "level": 3
      },
      {
        "id": "app/run-tests/continuous-integration/aws-codebuild#cypress-amazon-public-ecr",
        "text": "Cypress Amazon Public ECR",
        "level": 3
      },
      {
        "id": "app/run-tests/continuous-integration/aws-codebuild#caching-dependencies-and-build-artifacts",
        "text": "Caching Dependencies and Build Artifacts",
        "level": 2
      },
      {
        "id": "app/run-tests/continuous-integration/aws-codebuild#parallelization",
        "text": "Parallelization",
        "level": 2
      },
      {
        "id": "app/run-tests/continuous-integration/aws-codebuild#parallelizing-the-build",
        "text": "Parallelizing the build",
        "level": 3
      },
      {
        "id": "app/run-tests/continuous-integration/aws-codebuild#using-cypress-cloud-with-aws-codebuild",
        "text": "Using Cypress Cloud with AWS CodeBuild",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "app/run-tests/continuous-integration/aws-codebuild#testing-with-cypress-docker-images",
      "doc_id": "app/run-tests/continuous-integration/aws-codebuild",
      "heading": "Testing with Cypress Docker Images",
      "heading_level": 2,
      "content_markdown": "## Testing with Cypress Docker Images\n\nAs of version 0.2, CodeBuild does not provide a way to specify a custom image for single build configurations. One way to solve this is using an [AWS CodeBuild batch build-list strategy](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html#build-spec.batch.build-list).\n\n### Enabling batch builds\n\nPer the [AWS CodeBuild batch build documentation](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html), AWS CodeBuild creates a separate build for each possible configuration combination for a [batch build-list strategy](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html#build-spec.batch.build-list). Therefore, AWS CodeBuild projects must be created or updated to run batch configuration.\n\nFollow these steps to enable batch configuration for existing AWS CodeBuild projects:\n\n*   Navigate to the AWS CodeBuild Console\n*   Select the project\n*   Click \"Edit\" **\\-->** \"Batch Configuration\"\n*   Create \"New service Role\" and enter the name of the role\n*   Leave all other options as optional\n*   Click \"Update batch configuration\"\n*   Start the Build\n\n### Cypress Amazon Public ECR\n\nAWS CodeBuild offers a [build-list strategy](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html#build-spec.batch.build-list) of different job configurations for a single job definition.\n\nThe [build-list strategy](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html#build-spec.batch.build-list) offers a way to specify an image hosted on [Docker Hub](https://hub.docker.com/) or the [Amazon Elastic Container Registry (ECR)](https://aws.amazon.com/ecr/).\n\n[Docker Images](https://github.com/cypress-io/cypress-docker-images) for running Cypress locally and in CI are published to the [Amazon ECR Public Gallery](https://gallery.ecr.aws).:\n\n*   [Cypress 'base' Amazon ECR Public Gallery](https://gallery.ecr.aws/cypress-io/cypress/base)\n*   [Cypress 'browsers' Amazon ECR Public Gallery](https://gallery.ecr.aws/cypress-io/cypress/browsers)\n*   [Cypress 'included' Amazon ECR Public Gallery](https://gallery.ecr.aws/cypress-io/cypress/included)\n*   [Cypress 'factory' Amazon ECR Public Gallery](https://gallery.ecr.aws/cypress-io/cypress/factory)\n\nRead about [Cypress docker variants](/llm/markdown/app/continuous-integration/overview.md#Cypress-Docker-variants) to decide which image is best for your project.\n\nbuildspec.yml\n\n```\nversion: 0.2\n\n## AWS CodeBuild Batch configuration\n## https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html\n\n## Define build to run using the\n## \"cypress/browsers:22.15.0\" image\n## from the Cypress Amazon ECR Public Gallery\nbatch:\n  fast-fail: false\n  build-list:\n    - identifier: cypress-e2e-tests\n      env:\n        image: public.ecr.aws/cypress-io/cypress/browsers:22.15.0\n\nphases:\n  install:\n    runtime-versions:\n      nodejs: latest\n    commands:\n      # Set COMMIT_INFO variables to send Git specifics to Cypress Cloud when recording\n      # https://docs.cypress.io/app/continuous-integration/overview#Git-information\n      - export COMMIT_INFO_BRANCH=\"$(git rev-parse HEAD | xargs git name-rev |\n        cut -d' ' -f2 | sed 's/remotes\\/origin\\///g')\"\n      - export COMMIT_INFO_MESSAGE=\"$(git log -1 --pretty=%B)\"\n      - export COMMIT_INFO_EMAIL=\"$(git log -1 --pretty=%ae)\"\n      - export COMMIT_INFO_AUTHOR=\"$(git log -1 --pretty=%an)\"\n      - export COMMIT_INFO_SHA=\"$(git log -1 --pretty=%H)\"\n      - export COMMIT_INFO_REMOTE=\"$(git config --get remote.origin.url)\"\n      - npm ci\n  pre_build:\n    commands:\n      - npm run cy:verify\n      - npm run cy:info\n  build:\n    commands:\n      - npm run start:ci &\n      - npx cypress run --record --browser firefox\n```\n",
      "section": "app",
      "anchors": [
        "testing-with-cypress-docker-images"
      ],
      "path": "/llm/json/chunked/app/run-tests/continuous-integration/aws-codebuild.json",
      "token_estimate": 493
    },
    {
      "id": "app/run-tests/continuous-integration/aws-codebuild#enabling-batch-builds",
      "doc_id": "app/run-tests/continuous-integration/aws-codebuild",
      "heading": "Enabling batch builds",
      "heading_level": 3,
      "content_markdown": "### Enabling batch builds\n\nPer the [AWS CodeBuild batch build documentation](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html), AWS CodeBuild creates a separate build for each possible configuration combination for a [batch build-list strategy](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html#build-spec.batch.build-list). Therefore, AWS CodeBuild projects must be created or updated to run batch configuration.\n\nFollow these steps to enable batch configuration for existing AWS CodeBuild projects:\n\n*   Navigate to the AWS CodeBuild Console\n*   Select the project\n*   Click \"Edit\" **\\-->** \"Batch Configuration\"\n*   Create \"New service Role\" and enter the name of the role\n*   Leave all other options as optional\n*   Click \"Update batch configuration\"\n*   Start the Build\n",
      "section": "app",
      "anchors": [
        "enabling-batch-builds"
      ],
      "path": "/llm/json/chunked/app/run-tests/continuous-integration/aws-codebuild.json",
      "token_estimate": 129
    },
    {
      "id": "app/run-tests/continuous-integration/aws-codebuild#cypress-amazon-public-ecr",
      "doc_id": "app/run-tests/continuous-integration/aws-codebuild",
      "heading": "Cypress Amazon Public ECR",
      "heading_level": 3,
      "content_markdown": "### Cypress Amazon Public ECR\n\nAWS CodeBuild offers a [build-list strategy](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html#build-spec.batch.build-list) of different job configurations for a single job definition.\n\nThe [build-list strategy](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html#build-spec.batch.build-list) offers a way to specify an image hosted on [Docker Hub](https://hub.docker.com/) or the [Amazon Elastic Container Registry (ECR)](https://aws.amazon.com/ecr/).\n\n[Docker Images](https://github.com/cypress-io/cypress-docker-images) for running Cypress locally and in CI are published to the [Amazon ECR Public Gallery](https://gallery.ecr.aws).:\n\n*   [Cypress 'base' Amazon ECR Public Gallery](https://gallery.ecr.aws/cypress-io/cypress/base)\n*   [Cypress 'browsers' Amazon ECR Public Gallery](https://gallery.ecr.aws/cypress-io/cypress/browsers)\n*   [Cypress 'included' Amazon ECR Public Gallery](https://gallery.ecr.aws/cypress-io/cypress/included)\n*   [Cypress 'factory' Amazon ECR Public Gallery](https://gallery.ecr.aws/cypress-io/cypress/factory)\n\nRead about [Cypress docker variants](/llm/markdown/app/continuous-integration/overview.md#Cypress-Docker-variants) to decide which image is best for your project.\n\nbuildspec.yml\n\n```\nversion: 0.2\n\n## AWS CodeBuild Batch configuration\n## https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html\n\n## Define build to run using the\n## \"cypress/browsers:22.15.0\" image\n## from the Cypress Amazon ECR Public Gallery\nbatch:\n  fast-fail: false\n  build-list:\n    - identifier: cypress-e2e-tests\n      env:\n        image: public.ecr.aws/cypress-io/cypress/browsers:22.15.0\n\nphases:\n  install:\n    runtime-versions:\n      nodejs: latest\n    commands:\n      # Set COMMIT_INFO variables to send Git specifics to Cypress Cloud when recording\n      # https://docs.cypress.io/app/continuous-integration/overview#Git-information\n      - export COMMIT_INFO_BRANCH=\"$(git rev-parse HEAD | xargs git name-rev |\n        cut -d' ' -f2 | sed 's/remotes\\/origin\\///g')\"\n      - export COMMIT_INFO_MESSAGE=\"$(git log -1 --pretty=%B)\"\n      - export COMMIT_INFO_EMAIL=\"$(git log -1 --pretty=%ae)\"\n      - export COMMIT_INFO_AUTHOR=\"$(git log -1 --pretty=%an)\"\n      - export COMMIT_INFO_SHA=\"$(git log -1 --pretty=%H)\"\n      - export COMMIT_INFO_REMOTE=\"$(git config --get remote.origin.url)\"\n      - npm ci\n  pre_build:\n    commands:\n      - npm run cy:verify\n      - npm run cy:info\n  build:\n    commands:\n      - npm run start:ci &\n      - npx cypress run --record --browser firefox\n```\n",
      "section": "app",
      "anchors": [
        "cypress-amazon-public-ecr"
      ],
      "path": "/llm/json/chunked/app/run-tests/continuous-integration/aws-codebuild.json",
      "token_estimate": 313
    },
    {
      "id": "app/run-tests/continuous-integration/aws-codebuild#caching-dependencies-and-build-artifacts",
      "doc_id": "app/run-tests/continuous-integration/aws-codebuild",
      "heading": "Caching Dependencies and Build Artifacts",
      "heading_level": 2,
      "content_markdown": "## Caching Dependencies and Build Artifacts\n\nCaching with [AWS CodeBuild](https://aws.amazon.com/codebuild/) directly can be challenging. The [Build caching in AWS CodeBuild](https://docs.aws.amazon.com/codebuild/latest/userguide/build-caching.html) document offers details on local or Amazon S3 caching.\n\nPer the documentation, \"Local caching stores a cache locally on a build host that is available to that build host only\". This will not be useful during parallel test runs.\n\nThe \"Amazon S3 caching stores the cache in an Amazon S3 bucket that is available across multiple build hosts\". While this may sound useful, in practice the upload of cached dependencies can take some time. Furthermore, each worker will attempt to save it's dependency cache to Amazon S3, which increases build time significantly.\n\nBeyond the scope of this guide, but [AWS CodePipeline](https://aws.amazon.com/codepipeline) may be of use to cache the initial source, dependencies and build output for use in AWS CodeBuild jobs using [AWS CodePipeline Input and Output Artifacts](https://docs.aws.amazon.com/codepipeline/latest/userguide/welcome-introducing-artifacts.html).\n\nReference the [AWS CodePipeline integration with CodeBuild and multiple input sources and output artifacts sample](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-pipeline-multi-input-output.html) example for details on how to configure a CodePipeline with an output artifact.\n",
      "section": "app",
      "anchors": [
        "caching-dependencies-and-build-artifacts"
      ],
      "path": "/llm/json/chunked/app/run-tests/continuous-integration/aws-codebuild.json",
      "token_estimate": 233
    },
    {
      "id": "app/run-tests/continuous-integration/aws-codebuild#parallelization",
      "doc_id": "app/run-tests/continuous-integration/aws-codebuild",
      "heading": "Parallelization",
      "heading_level": 2,
      "content_markdown": "## Parallelization\n\n[Cypress Cloud](/llm/markdown/cloud/get-started/introduction.md) offers the ability to [parallelize and group test runs](/llm/markdown/cloud/features/smart-orchestration/parallelization.md) along with additional insights and [analytics](/llm/markdown/cloud/features/analytics/overview.md) for Cypress tests.\n\nAWS CodeBuild offers a [batch build-matrix strategy](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html#build-spec.batch.build-matrix) for declaring different job configurations for a single job definition. The [batch build-matrix strategy](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html#build-spec.batch.build-matrix) provides an option to specify a container image for the job. Jobs declared within a build-matrix strategy can run in parallel which enables us run multiples instances of Cypress at same time as we will see later in this section.\n\nSee [Enabling batch builds](#Enabling-batch-builds) for instructions on how to enable batch builds.\n\nThe following configuration using the `--parallel` and `--record` flags to [cypress run](/llm/markdown//app//app/command-line.md#cypress-run) requires setting up recording test results to [Cypress Cloud](/llm/markdown/cloud/get-started/introduction.md).\n\n### Parallelizing the build\n\nTo setup multiple containers to run in parallel, the `build-matrix` configuration uses a set of variables (`CY_GROUP_SPEC` and `WORKERS`) with a list of items specific to each group for the build.\n\nThe fields are delimited by a pipe (`|`) character as follows:\n\n```\n## Group Name | Browser | Specs | Cypress Configuration options (optional)\n\n'UI-Chrome-Mobile|chrome|cypress/tests/ui/*|viewportWidth=375,viewportHeight=667'\n```\n\nThe `build-matrix` will run all permutations delimited items.\n\nbuildspec.yml\n\n```\nbatch:\n  fast-fail: false\n  build-matrix:\n    # ...\n    dynamic:\n      env:\n        # ...\n        variables:\n          CY_GROUP_SPEC:\n            - 'UI-Chrome|chrome|cypress/tests/ui/*'\n            - 'UI-Chrome-Mobile|chrome|cypress/tests/ui/*|viewportWidth=375,viewportHeight=667'\n            - 'API|chrome|cypress/tests/api/*'\n            - 'UI-Firefox|firefox|cypress/tests/ui/*'\n            - 'UI-Firefox-Mobile|firefox|cypress/tests/ui/*|viewportWidth=375,viewportHeight=667'\n```\n\nDuring the install phase, we utilize shell scripting with the [cut command](https://en.wikipedia.org/wiki/Cut_\\(Unix\\)) to assign values from the delimited `CY_GROUP_SPEC` passed to the worker into shell variables that will be used in the `build` phase when running `cypress run`.\n\nbuildspec.yml\n\n```\nbatch:\n  # ...\n\nphases:\n  install:\n    commands:\n      # Set COMMIT_INFO variables to send Git specifics to Cypress Cloud when recording\n      # https://docs.cypress.io//app/continuous-integration/overview#Git-information\n      - export COMMIT_INFO_BRANCH=\"$(git rev-parse HEAD | xargs git name-rev |\n        cut -d' ' -f2 | sed 's/remotes\\/origin\\///g')\"\n      - export COMMIT_INFO_MESSAGE=\"$(git log -1 --pretty=%B)\"\n      - export COMMIT_INFO_EMAIL=\"$(git log -1 --pretty=%ae)\"\n      - export COMMIT_INFO_AUTHOR=\"$(git log -1 --pretty=%an)\"\n      - export COMMIT_INFO_SHA=\"$(git log -1 --pretty=%H)\"\n      - export COMMIT_INFO_REMOTE=\"$(git config --get remote.origin.url)\"\n      - CY_GROUP=$(echo $CY_GROUP_SPEC | cut -d'|' -f1)\n      - CY_BROWSER=$(echo $CY_GROUP_SPEC | cut -d'|' -f2)\n      - CY_SPEC=$(echo $CY_GROUP_SPEC | cut -d'|' -f3)\n      - CY_CONFIG=$(echo $CY_GROUP_SPEC | cut -d'|' -f4)\n      - npm ci\n## ...\n```\n\nTo parallelize the runs, we need to add an additional variable to the [build-matrix strategy](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html#build-spec.batch.build-matrix), `WORKERS`.\n\nbuildspec.yml\n\n```\nbatch:\n  fast-fail: false\n  build-matrix:\n    # ...\n    dynamic:\n      env:\n        # ...\n        variables:\n          CY_GROUP_SPEC:\n            # ...\n          WORKERS:\n            - 1\n            - 2\n            - 3\n            - 4\n            - 5\n```\n\n**Note**\n\nThe `WORKERS` array is filled with filler (or _dummy_) items to provision the desired number of CI machine instances within the [batch build-matrix strategy](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html#build-spec.batch.build-matrix) and will provide 5 workers to each group defined in the `CY_GROUP_SPEC`.\n\nFinally, the script variables are passed to the call to `cypress run`.\n\nbuildspec.yml\n\n```\nphases:\n  install:\n    # ...\n  build:\n    commands:\n      - npm start:ci &\n      - npx cypress run --record --parallel --browser $CY_BROWSER --ci-build-id\n        $CODEBUILD_INITIATOR --group \"$CY_GROUP\" --spec \"$CY_SPEC\" --config\n        \"$CY_CONFIG\"\n```\n",
      "section": "app",
      "anchors": [
        "parallelization"
      ],
      "path": "/llm/json/chunked/app/run-tests/continuous-integration/aws-codebuild.json",
      "token_estimate": 632
    },
    {
      "id": "app/run-tests/continuous-integration/aws-codebuild#parallelizing-the-build",
      "doc_id": "app/run-tests/continuous-integration/aws-codebuild",
      "heading": "Parallelizing the build",
      "heading_level": 3,
      "content_markdown": "### Parallelizing the build\n\nTo setup multiple containers to run in parallel, the `build-matrix` configuration uses a set of variables (`CY_GROUP_SPEC` and `WORKERS`) with a list of items specific to each group for the build.\n\nThe fields are delimited by a pipe (`|`) character as follows:\n\n```\n## Group Name | Browser | Specs | Cypress Configuration options (optional)\n\n'UI-Chrome-Mobile|chrome|cypress/tests/ui/*|viewportWidth=375,viewportHeight=667'\n```\n\nThe `build-matrix` will run all permutations delimited items.\n\nbuildspec.yml\n\n```\nbatch:\n  fast-fail: false\n  build-matrix:\n    # ...\n    dynamic:\n      env:\n        # ...\n        variables:\n          CY_GROUP_SPEC:\n            - 'UI-Chrome|chrome|cypress/tests/ui/*'\n            - 'UI-Chrome-Mobile|chrome|cypress/tests/ui/*|viewportWidth=375,viewportHeight=667'\n            - 'API|chrome|cypress/tests/api/*'\n            - 'UI-Firefox|firefox|cypress/tests/ui/*'\n            - 'UI-Firefox-Mobile|firefox|cypress/tests/ui/*|viewportWidth=375,viewportHeight=667'\n```\n\nDuring the install phase, we utilize shell scripting with the [cut command](https://en.wikipedia.org/wiki/Cut_\\(Unix\\)) to assign values from the delimited `CY_GROUP_SPEC` passed to the worker into shell variables that will be used in the `build` phase when running `cypress run`.\n\nbuildspec.yml\n\n```\nbatch:\n  # ...\n\nphases:\n  install:\n    commands:\n      # Set COMMIT_INFO variables to send Git specifics to Cypress Cloud when recording\n      # https://docs.cypress.io//app/continuous-integration/overview#Git-information\n      - export COMMIT_INFO_BRANCH=\"$(git rev-parse HEAD | xargs git name-rev |\n        cut -d' ' -f2 | sed 's/remotes\\/origin\\///g')\"\n      - export COMMIT_INFO_MESSAGE=\"$(git log -1 --pretty=%B)\"\n      - export COMMIT_INFO_EMAIL=\"$(git log -1 --pretty=%ae)\"\n      - export COMMIT_INFO_AUTHOR=\"$(git log -1 --pretty=%an)\"\n      - export COMMIT_INFO_SHA=\"$(git log -1 --pretty=%H)\"\n      - export COMMIT_INFO_REMOTE=\"$(git config --get remote.origin.url)\"\n      - CY_GROUP=$(echo $CY_GROUP_SPEC | cut -d'|' -f1)\n      - CY_BROWSER=$(echo $CY_GROUP_SPEC | cut -d'|' -f2)\n      - CY_SPEC=$(echo $CY_GROUP_SPEC | cut -d'|' -f3)\n      - CY_CONFIG=$(echo $CY_GROUP_SPEC | cut -d'|' -f4)\n      - npm ci\n## ...\n```\n\nTo parallelize the runs, we need to add an additional variable to the [build-matrix strategy](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html#build-spec.batch.build-matrix), `WORKERS`.\n\nbuildspec.yml\n\n```\nbatch:\n  fast-fail: false\n  build-matrix:\n    # ...\n    dynamic:\n      env:\n        # ...\n        variables:\n          CY_GROUP_SPEC:\n            # ...\n          WORKERS:\n            - 1\n            - 2\n            - 3\n            - 4\n            - 5\n```\n\n**Note**\n\nThe `WORKERS` array is filled with filler (or _dummy_) items to provision the desired number of CI machine instances within the [batch build-matrix strategy](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html#build-spec.batch.build-matrix) and will provide 5 workers to each group defined in the `CY_GROUP_SPEC`.\n\nFinally, the script variables are passed to the call to `cypress run`.\n\nbuildspec.yml\n\n```\nphases:\n  install:\n    # ...\n  build:\n    commands:\n      - npm start:ci &\n      - npx cypress run --record --parallel --browser $CY_BROWSER --ci-build-id\n        $CODEBUILD_INITIATOR --group \"$CY_GROUP\" --spec \"$CY_SPEC\" --config\n        \"$CY_CONFIG\"\n```\n",
      "section": "app",
      "anchors": [
        "parallelizing-the-build"
      ],
      "path": "/llm/json/chunked/app/run-tests/continuous-integration/aws-codebuild.json",
      "token_estimate": 477
    },
    {
      "id": "app/run-tests/continuous-integration/aws-codebuild#using-cypress-cloud-with-aws-codebuild",
      "doc_id": "app/run-tests/continuous-integration/aws-codebuild",
      "heading": "Using Cypress Cloud with AWS CodeBuild",
      "heading_level": 2,
      "content_markdown": "## Using Cypress Cloud with AWS CodeBuild\n\nDashboard analytics depend on Cypress receiving [git commit information](/llm/markdown/app/continuous-integration/overview.md#Git-information). The `buildspec.yml` examples above export this via `git` CLI commands, which require a `.git` directory. If CodeBuild downloads your source as a zip archive instead of performing a `git clone`, those commands will fail with `fatal: not a git repository`.\n\nTo fix this, configure your CodeBuild project to clone the repository using the [Git clone depth setting](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html) in the AWS Console. If git clone is not an option, CodeBuild always populates `CODEBUILD_RESOLVED_SOURCE_VERSION` with the commit SHA, which you can use to retrieve commit metadata from your source provider's API instead.\n\nIf you are still facing issues, please [contact us](mailto:hello@cypress.io).\n\nIn the AWS CodeBuild configuration we have defined in the previous section, we are leveraging three useful features of [Cypress Cloud](/llm/markdown/cloud/get-started/introduction.md):\n\n1.  [Recording test results with the `--record` flag](/llm/markdown/cloud/get-started/setup.md) to Cypress Cloud.\n    \n    *   In-depth and shareable [test reports](/llm/markdown/cloud/features/recorded-runs.md#Latest-Runs).\n    *   Visibility into test failures via quick access to [Test Replay](/llm/markdown/cloud/features/test-replay.md), error messages, stack traces, screenshots, videos, and contextual details.\n    *   [Integrating testing with the pull-request (PR) process](/llm/markdown/cloud/integrations/github.md) via [commit status check guards](/llm/markdown/cloud/integrations/github.md#Status-checks) and convenient [test report comments](/llm/markdown/cloud/integrations/github.md#Pull-request-comments).\n    *   [Detecting flaky tests](/llm/markdown/cloud/features/flaky-test-management.md) and surfacing them via [Slack alerts](/llm/markdown/cloud/features/flaky-test-management.md#Slack) or [GitHub PR status checks](/llm/markdown/cloud/features/flaky-test-management.md#GitHub).\n2.  [Parallelizing test runs](/llm/markdown/cloud/features/smart-orchestration/parallelization.md) and optimizing their execution via [intelligent load-balancing](/llm/markdown/cloud/features/smart-orchestration/load-balancing.md#Balance-strategy) of test specs across CI machines with the `--parallel` flag.\n    \n3.  Organizing and consolidating multiple `cypress run` calls by labeled groups into a single report within [Cypress Cloud](https://on.cypress.io/cloud). In the example above we use the `--group UI-Chrome` flag to organize all UI tests for the Chrome browser into a group labeled \"UI-Chrome\" inside the Cypress Cloud report.\n",
      "section": "app",
      "anchors": [
        "using-cypress-cloud-with-aws-codebuild"
      ],
      "path": "/llm/json/chunked/app/run-tests/continuous-integration/aws-codebuild.json",
      "token_estimate": 365
    }
  ]
}