Skip to content

_BUILD_TIMEOUT not respected in AWS Amplify — build still cancels after 30 minutes #4070

@brightversion1

Description

@brightversion1

Environment information

Service: AWS Amplify Hosting

Build system: Amplify Console (CodeBuild backend)

Build configuration: Using amplify.yml

Runtime: Node.js 20

Region: (add your region, e.g. eu-west-2)

Branch setup: Multiple branch environments, each with _BUILD_TIMEOUT defined in Amplify environment variables

Describe the bug

Even after defining _BUILD_TIMEOUT as an environment variable (both in Amplify App Environment Variables and Branch-specific Environment Variables), Amplify deployments are still being cancelled automatically after ~30 minutes, which matches the default build timeout.

It appears that the _BUILD_TIMEOUT environment variable is ignored by Amplify’s underlying CodeBuild configuration.

Reproduction steps

🔁 Reproduction Steps

  1. Go to Amplify Console → App → App Settings → Environment Variables.

  2. Add the variable:

    _BUILD_TIMEOUT=90
    
  3. Also add the same variable under Branch settings → Environment variables.

  4. Trigger a new deployment (build takes >30 min).

  5. Observe that Amplify terminates the build after 30 minutes despite _BUILD_TIMEOUT being set.


⚙️ Expected Behavior

Amplify should extend the build duration based on _BUILD_TIMEOUT — or provide a documented, working method to configure build timeout per branch/environment.

Image Image

---

### 💬 **Additional Context**

There is no clear documentation on whether `_BUILD_TIMEOUT` is a supported environment variable in Amplify Hosting or only in Amplify CI/CD pipelines.
If not supported, there should be a documented way to increase build time beyond 30 minutes without switching to manual CodeBuild project control.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions