[Solved] CodeBuild "Internal Service Error" - Provisioning Failures Across an Entire Region

The error "Internal Service Error: CodeBuild is experiencing issues" can show up even when nothing in your own pipeline configuration has changed. This guide walks through how we diagnosed a region-wide CodeBuild failure and what actually fixed it.
Internal Service Error: CodeBuild is experiencing issues
What Causes This Error?
This error typically occurs when:
- A source credential (Bitbucket/GitHub/GitLab) connected to your account has become corrupted
- The credential was re-imported or re-authorized multiple times in a short window
- CodeBuild's provisioning step fails while validating account-level source connections
- The issue is regional rather than tied to any single project
Step 1 - Rule Out Your Own Configuration First
Before assuming an AWS-side fault, check the usual suspects:
# Check recent changes to compute fleets aws codebuild list-compute-fleets --region us-east-2 # Check recent changes to build images / VPC config on a project aws codebuild batch-get-projects --names <project-name> --region us-east-2
If none of these have changed and the failure is affecting multiple unrelated projects at the same time, the issue is likely outside your project configuration.
Step 2 - Isolate With a Minimal Test Project
Create a brand-new CodeBuild project with no custom VPC, no custom image, and no dependencies — just the defaults:
aws codebuild create-project \ --name test-region-diagnostic \ --source type=NO_SOURCE \ --artifacts type=NO_ARTIFACTS \ --environment type=LINUX_CONTAINER,image=aws/codebuild/standard:7.0,computeType=BUILD_GENERAL1_SMALL \ --service-role <role-arn> \ --region us-east-2
If this minimal project fails with the same error, run the identical test in a different region:
aws codebuild create-project \ --name test-region-diagnostic \ --source type=NO_SOURCE \ --artifacts type=NO_ARTIFACTS \ --environment type=LINUX_CONTAINER,image=aws/codebuild/standard:7.0,computeType=BUILD_GENERAL1_SMALL \ --service-role <role-arn> \ --region us-east-1
If the same project succeeds in one region and fails in another, the problem is scoped to the account in that specific region — not your pipeline.
Step 3 - Check Source Credential History
Region-wide CodeBuild provisioning failures are often traced back to a corrupted source credential. Check how many times it's been re-imported recently:
aws codebuild list-source-credentials --region us-east-2
If a credential has been re-imported several times in a short window (especially across different auth types — OAuth, access token, basic auth), that repeated re-import can corrupt its internal storage and break provisioning for every project in the region, even ones that don't use that credential.
Step 4 - Fix: Delete and Re-Save the Credential
- Open the CodeBuild console
- Go to Settings → Source credentials
- Delete the corrupted credential
- Re-save a freshly generated access token for the same source provider
No redeploys or infrastructure changes are needed — this is purely an account-level credential fix.
Step 5 - Confirm the Fix
Check the FailedBuilds metric after the fix to confirm builds are succeeding again:
aws cloudwatch get-metric-statistics \ --namespace AWS/CodeBuild \ --metric-name FailedBuilds \ --region us-east-2 \ --start-time 2026-07-10T00:00:00Z \ --end-time 2026-07-11T00:00:00Z \ --period 3600 \ --statistics Sum
A flat zero across the period confirms the region has recovered.
Quick Summary
| Step | Command / Action |
|---|---|
| Check project config | aws codebuild batch-get-projects --names <project> |
| Create minimal test | aws codebuild create-project --source type=NO_SOURCE ... |
| Compare across regions | Run the same test project in a second region |
| Check credential history | aws codebuild list-source-credentials |
| Fix | Console → Settings → Source credentials → delete & re-save token |
| Verify | aws cloudwatch get-metric-statistics --metric-name FailedBuilds |
If you're seeing this error and none of your own configuration has changed, check your account's source credential import history before assuming it's a broader AWS outage — a single corrupted credential can silently break every CodeBuild project in a region.
Comments
Post a Comment