CodeBuild projects that have run no builds in 30 days
What does ZopNight detect here?
A CodeBuild project with zero builds in 30 days costs nothing to keep, but it usually points at a pipeline that was replaced or a repository that moved. ZopNight flags it at low severity: the value is cleanup and clarity rather than a recoverable bill.
Signal and threshold
| Field | Value |
|---|---|
| Rule IDs | RC-184 |
| Category | idle |
| Severity | low |
| Metric | none — pure configuration read |
| Source | codebuild_idle.go |
Where it applies
Low severity, and honestly so
CodeBuild bills per build minute. A project that runs no builds bills nothing, so there is no
meaningful recoverable cost, which is why this is rated low rather than dressed up as a
saving.
What it is genuinely useful for is finding abandoned CI. A project with no builds in a month is usually one of: a pipeline replaced by GitHub Actions, a repository that moved, or a service that was decommissioned while its build project survived.
What it can still be costing you
Nothing directly, but three things are worth checking while you are there:
- The service role. An unused CodeBuild project keeps an IAM role with whatever permissions it was granted, often broad ones for deployment. That is standing access with no owner.
- The S3 artifact bucket. Build artifacts frequently outlive the project and do bill for storage.
- The CloudWatch log group. Log groups with no retention policy keep everything forever, and storage is charged by the GB-month.
Listing projects with no builds recorded
aws codebuild list-projects --query 'projects[]' --output text | tr '\t' '\n' | while read -r p; do n=$(aws codebuild list-builds-for-project --project-name "$p" --max-items 1 --query 'length(ids)' --output text 2>/dev/null) [ "$n" = "0" ] && echo "no builds: $p" doneBefore deleting
Check whether the project is triggered by a webhook that still exists. Deleting the project leaves the webhook firing at nothing, which shows up as failing hooks in the repository rather than as anything visible in AWS. Remove the webhook first, then the project, then the role and the log group.
Compute type is worth checking on the ones you keep
For projects that are genuinely still in use, the build environment size is the cost lever. CodeBuild bills per minute at a rate set by the compute type, and projects are routinely provisioned at a larger size than their builds need because it was the default at creation. A build that finishes in the same wall-clock time on a smaller instance costs proportionally less every time it runs.