MicroVM GitHub Runners

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

WhatWhere
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
Dashboardgha-microvm-platform: alarms, all repositories, the selected repository, broker and tagger (see Dashboard)
MetricsNamespace MicrovmGithubRunners, dimension Repository
API calls (who changed what)CloudTrail of the account / organisation trail

DLQ: jobs could not be dispatched

  1. Look up the reason: Logs Insights on the dispatcher, filter msg = "dispatch failed".
  2. Common causes: quota (ServiceQuotaExceededException), image version inactive, broker refusing (see below), GitHub API outage.
  3. 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

  1. Check ActiveRunners against max_runners. If saturated, raise max_runners or reduce parallel jobs.
  2. Check MicroVM memory quota usage in Service Quotas (running and suspended VMs count).
  3. Check the dispatcher for Throttled metrics and errors.

Lambda errors

  1. Open the function's log group and filter on level = "ERROR".
  2. 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.
  3. Webhook 401: secret mismatch. Webhook 403: delivery for another repository.

Broker errors

  1. broker.denied audit events show the reason: repository not onboarded, wrong caller role, or a foreign account.
  2. read app secret errors: the App key secret is empty or malformed. It must be {"app_id": 123, "private_key": "-----BEGIN ..."}.
  3. 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.

  1. tagger.denied audit 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, or tagger_github_owners has 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: update repository_id in bootstrap.repositories if that is intended), or replayed jti (a token sent twice: investigate).
  2. verifier unavailable: the function can't fetch the GitHub JWKS. Check the central egress path to token.actions.githubusercontent.com.
  3. assume failed: the trust policy of <prefix>-deploy or the SCP rejects the tagger. The SCP must exempt <prefix>-tagger (modules/org-guardrails does).
  4. 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

  1. Bump runner_version and both SHA-256 values in the justfile, and run just release-assets.
  2. Tag a release. Consumers bump RELEASE in their deploy workflow; the image builds a new version.
  3. Roll back by pinning image_version to the previous version.

Rotate secrets

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

  1. Disable the webhook in GitHub, or set reserved concurrency of the dispatcher to 0.
  2. Terminate running VMs: aws lambda-microvms list-microvms --image-identifier <image>, then terminate-microvm for each.
  3. 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.

SectionWidgets
AlarmsAlarm 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 repositoriesOne 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 repositoryThe 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 functionsBroker 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)

DrillHowExpected
Lost webhooksjust sandbox-realjob <repo> drill-lost-webhooks (removes the webhook, queues a job, restores it), or just drill-lost-webhooks <queue_url> while jobs are queuedJobs start within 5 minutes through the sweeper, Redispatched metric
VM failure mid-jobjust sandbox-realjob <repo> drill-vm-failure, or terminate a running VM by handJob ends in GitHub, Lost metric, re-run succeeds
Capacity exhaustionjust sandbox-realjob <repo> drill-capacity: 7 jobs against max_runners = 5Excess jobs wait, Throttled metric, all complete
Broker outageSet broker reserved concurrency to 0 for 10 minutesBroker and dispatch alarms fire; jobs start after recovery
FallbackSwitch one workflow to ubuntu-latestBuilds 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.