# CodeBuild: builds, phases, logs and retries

See every CodeBuild project and its builds, why a build failed and in which phase, read the log, and start, retry or stop builds.

Open **Services → CodeBuild**. Each project shows its latest build. A project's screen lists its recent builds with status, commit, duration and who started them (a pipeline, a webhook or a person), Builds, Failed builds and Duration charts with [Create alarm](https://cloudconsole.dev/help/create-alarm-from-chart), its settings and [tags](https://cloudconsole.dev/help/tags).

Screenshot: CodeBuild build infra-synth #57 failed in the Install phase on npm ci, with Retry build and Build log

## A build

- Every phase with its duration, and the phase that failed with CodeBuild's message (for example *COMMAND_EXECUTION_ERROR: Error while executing command: npm ci*).
- **Build log** opens the CloudWatch Logs stream in the app's [log viewer](https://cloudconsole.dev/help/logs); an S3 log opens in the browser.
- The source version and resolved commit, and a link to the pipeline that started it.

## Changes (Pro)

- **Start build**, optionally with another branch, tag or commit.
- **Retry build**: the same source version and settings. For a build a pipeline started, retrying the pipeline stage carries the release on; retrying the build alone doesn't.
- **Stop build** (typed confirm).

Home shows a card when a project's latest build failed in the last 24 hours, with **Retry**; builds a pipeline started show on that pipeline's card instead. Builds also appear in [What changed?](https://cloudconsole.dev/help/what-changed) on an alarm.

## Permissions

| What | IAM actions | In ReadOnlyAccess / ViewOnlyAccess |
|---|---|---|
| Projects | `codebuild:ListProjects`, `codebuild:BatchGetProjects` | Yes / List only (add `BatchGetProjects`) |
| Builds, Home and What changed? | `codebuild:ListBuildsForProject`, `codebuild:ListBuilds`, `codebuild:BatchGetBuilds` | Yes / List only (add `BatchGetBuilds`) |
| Build log | `logs:GetLogEvents` | Yes / No (add it) |
| Charts | `cloudwatch:GetMetricData` | Yes / No (add it) |
| Start, Retry, Stop | `codebuild:StartBuild`, `codebuild:RetryBuild`, `codebuild:StopBuild` | No / No |

**Still stuck?**

Email [support@cloudconsole.dev](mailto:support@cloudconsole.dev) with what you tried and any message the app showed. Don’t send access keys or secrets. We reply within two working days.

## Related

- ["What changed?": the changes before an alarm fired](https://cloudconsole.dev/help/what-changed) – Using the app
- [Home, all regions and all accounts](https://cloudconsole.dev/help/home-and-scope) – Using the app
- [Read and search CloudWatch Logs](https://cloudconsole.dev/help/logs) – Using the app
- [Permissions for changes (Pro actions)](https://cloudconsole.dev/help/permissions-for-changes) – Permissions & errors

[All help topics →](https://cloudconsole.dev/help/)

---

Source: https://cloudconsole.dev/help/codebuild

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
