aws-amplify / aws-amplify/amplify-hosting

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

Open
#4,070 0 comments 0 reactions 0 assignees View on GitHub
pending-triage
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

### Environment information

```plain text
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.

Contributor guide

Open the contributing guide

Research direction

Start with the amplify.yml configuration and AWS Amplify Hosting documentation for supported build-time environment variables and timeout settings. Reproduce the deployment with _BUILD_TIMEOUT=90 in both app and branch environment variables, then confirm whether the build still stops at 30 minutes. Done means identifying a supported configuration or documenting that the variable is not supported and explaining the available alternative.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, node.js
Domain
ci-cd, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.