OperationsRunbooks
Every alarm links here. Alarms go to the platform SNS topic (or your incident tool's topic). Fallback for any outage: switch affected workflows to GitHub-hosted runners by changing runs-on.
Where to look
| What | Where |
|---|---|
| Audit trail (every launch, termination, rejection, token) | CloudWatch Logs Insights on /aws/lambda/gha-microvm-*: filter audit = 1 | fields @timestamp, event, job_id, runner_name, microvm_id, actor |
| Job output inside the VM | /aws/lambda-microvms/gha-microvm-<id>-runtime, one stream per runner |
| Image builds | /aws/lambda-microvms/gha-microvm-<id>-build |
| Dashboard | gha-microvm-platform: alarms, all repositories, the selected repository, broker and tagger (see Dashboard) |
| Metrics | Namespace MicrovmGithubRunners, dimension Repository |
| API calls (who changed what) | CloudTrail of the account / organisation trail |
DLQ: jobs could not be dispatched
- Look up the reason: Logs Insights on the dispatcher,
filter msg = "dispatch failed". - Common causes: quota (
ServiceQuotaExceededException), image version inactive, broker refusing (see below), GitHub API outage. - Fix the cause, then redrive:
aws sqs start-message-move-task --source-arn <dlq_arn>. Jobs still queued at GitHub are also picked up by the sweeper.
Queue age: jobs wait more than 10 minutes
- Check
ActiveRunnersagainstmax_runners. If saturated, raisemax_runnersor reduce parallel jobs. - Check MicroVM memory quota usage in Service Quotas (running and suspended VMs count).
- Check the dispatcher for
Throttledmetrics and errors.
Lambda errors
- Open the function's log group and filter on
level = "ERROR". - VPC issues (timeouts to AWS APIs or GitHub) point to endpoint DNS or the central egress path. Test from the VPC with a Reachability Analyzer path to the TGW.
- Webhook
401: secret mismatch. Webhook403: delivery for another repository.
Broker errors
broker.deniedaudit events show the reason: repository not onboarded, wrong caller role, or a foreign account.read app secreterrors: the App key secret is empty or malformed. It must be{"app_id": 123, "private_key": "-----BEGIN ..."}.- GitHub
401: the App key was rotated or revoked; update the secret.
Tagger errors
The alarm counts denials too: every rejected token is a function error.
tagger.deniedaudit events give the reason:token(signature, issuer, audience or expiry; check the workflow asks for audience<prefix>-tagger),owner not allowed,owner id mismatch(the owner name now belongs to another account, ortagger_github_ownershas a wrong id),not onboarded(no registry entry),environment mismatch(the job's Environment differs from the registry entry),repository id mismatch(the repository was deleted and recreated: updaterepository_idinbootstrap.repositoriesif that is intended), orreplayed jti(a token sent twice: investigate).verifier unavailable: the function can't fetch the GitHub JWKS. Check the central egress path totoken.actions.githubusercontent.com.assume failed: the trust policy of<prefix>-deployor the SCP rejects the tagger. The SCP must exempt<prefix>-tagger(modules/org-guardrails does).- CloudTrail: every deploy session carries
SourceIdentity=<owner>+<repo>@<run_id>, which stays on all calls made with it.
Dispatch errors
As for the DLQ. Each failure cleans up its JIT parameter and runner registration before retrying, so repeated errors do not leak runners.
Sweep errors
The sweeper needs the broker and GitHub. Check broker errors and GitHub status. While the sweeper fails, lost webhooks are not repaired, but normal dispatch still works.
Sweeper silent
The EventBridge Scheduler schedule gha-microvm-<id>-sweeper is disabled or its role cannot invoke the function. Re-apply the stack.
Reaped: a VM hit its hard lifetime
A job ran past max_job_minutes + 5. Make sure workflows set timeout-minutes to at most max_job_minutes. Check the job's runtime log for a hang.
Lost: VMs disappear before their job ends
Check StateReason with aws lambda-microvms get-microvm. Typical causes: out-of-memory (raise memory_mib), disk full (32 GB max at 8 GB baseline), or an AWS event. Jobs are re-dispatched.
ProceduresRoutine changes
Upgrade the runner
- Bump
runner_versionand both SHA-256 values in thejustfile, and runjust release-assets. - Tag a release. Consumers bump
RELEASEin their deploy workflow; the image builds a new version. - Roll back by pinning
image_versionto the previous version.
Rotate secrets
- Webhook: bump
webhook_secret_version, apply, read the new value from Secrets Manager, update the GitHub webhook. The sweeper covers deliveries rejected in between. - GitHub App key: generate a new key in GitHub, put it in the App secret, delete the old key in GitHub.
Base image deprecation
AWS deprecates base image versions with 60 + 30 days notice. Bump base_image_version in runner-image and re-apply.
Emergency stop
- Disable the webhook in GitHub, or set reserved concurrency of the dispatcher to 0.
- Terminate running VMs:
aws lambda-microvms list-microvms --image-identifier <image>, thenterminate-microvmfor each. - Switch workflows to GitHub-hosted runners.
MonitoringDashboard
One CloudWatch dashboard per account, <prefix>-platform, from bootstrap. Adding a repository needs no dashboard change: the graphs use SEARCH, and the alarm list follows the onboarded repositories.
| Section | Widgets |
|---|---|
| Alarms | Alarm status of the platform (broker, tagger) and of every onboarded repository: dead letters, queue age, sweeper silent, function errors, dispatch and sweep errors, reaped, lost. Built from the alarm-naming convention, 100 alarms per widget. |
| All repositories | One line per repository: active runners, jobs dispatched, jobs waiting for capacity (Throttled), problems (Lost, Reaped, DispatchErrors, SweepErrors), oldest queued job against the queue-age alarm, function errors. |
| Selected repository | The Repository selector at the top of the dashboard (a dashboard variable on the Repository dimension) picks one repository for two graphs. The first shows active runners and jobs dispatched and completed. The second shows Throttled, Redispatched, IdleTerminated, EndedBySweeper, Lost, Reaped, DispatchErrors and SweepErrors, with the alarm thresholds in its title. |
| Platform functions | Broker and tagger invocations and errors (tagger errors include refused tokens), their p95 latency, and the account's Lambda concurrency. |
Resilience testsDrills (DORA Art. 24–25)
| Drill | How | Expected |
|---|---|---|
| Lost webhooks | just sandbox-realjob <repo> drill-lost-webhooks (removes the webhook, queues a job, restores it), or just drill-lost-webhooks <queue_url> while jobs are queued | Jobs start within 5 minutes through the sweeper, Redispatched metric |
| VM failure mid-job | just sandbox-realjob <repo> drill-vm-failure, or terminate a running VM by hand | Job ends in GitHub, Lost metric, re-run succeeds |
| Capacity exhaustion | just sandbox-realjob <repo> drill-capacity: 7 jobs against max_runners = 5 | Excess jobs wait, Throttled metric, all complete |
| Broker outage | Set broker reserved concurrency to 0 for 10 minutes | Broker and dispatch alarms fire; jobs start after recovery |
| Fallback | Switch one workflow to ubuntu-latest | Builds continue without the platform |
Record date, outcome and follow-ups for each drill in your ICT testing register. Last sandbox run (2026-11-22): capacity, VM failure and lost webhooks passed; see Tests & samples.