Skip to content
Skills Library
DevOps & cloud · Tool integration

setup-ec2-runners

/setup-ec2-runners

Deploys the ec2-runners stack to an AWS account and connects it to a GitHub organization, ending with a test workflow that runs on the new runners. Use when installing ec2-runners, deploying it to a new account, region, or organization, or replacing the stack's GitHub App.

Repository
ec2-runners ↗
Licence
MIT
Last repository change
12.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 12.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Deploys the ec2-runners stack to an AWS account and connects it to a GitHub organization, ending with a test workflow that runs on the new runners. Use when installing ec2-runners, deploying it to a new account, region, or organization, or replacing the stack's GitHub App.

Original author description

Deploys the ec2-runners stack to an AWS account and connects it to a GitHub organization, ending with a test workflow that runs on the new runners. Use when installing ec2-runners, deploying it to a new account, region, or organization, or replacing the stack's GitHub App.

How it works

  1. 1. Inputs
  2. 2. Preflight
  3. 3. Deploy
  4. 4. GitHub App
  5. 5. Alerts
  6. 6. Test
Original SKILL.md headings · 97 lines, 998 words
SKILL.md preview
---
name: setup-ec2-runners
description: Deploys the ec2-runners stack to an AWS account and connects it to a GitHub organization, ending with a test workflow that runs on the new runners. Use when installing ec2-runners, deploying it to a new account, region, or organization, or replacing the stack's GitHub App.
---

# Set up ec2-runners

Work from an **ec2-runners checkout**: a clone of https://github.com/Fountain-Bio/ec2-runners that the person keeps, because later updates are deployed from it with the same stack name. If the current project is such a checkout, use it. Otherwise, as when this skill came from the Claude Code plugin, ask where to clone it, run `git clone https://github.com/Fountain-Bio/ec2-runners <directory>`, and work in that directory. Every path below is relative to the checkout. `docs/setup.md` is the reference for every step; this skill adds the checks that prove each step worked. Ask the person before any step that spends money or changes their GitHub organization, and say which account and organization it touches.

Throughout, `$STACK`, `$REGION`, and `$ORG` are the stack name, AWS region, and GitHub organization from step 1, and every AWS command runs with the person's chosen `AWS_PROFILE`.

## 1. Inputs

Collect:

- GitHub organization (`$ORG`).
- AWS credentials: the `AWS_PROFILE` to use, or the environment's current credentials.
- Region (`$REGION`), default `us-west-2`. Stack name (`$STACK`), default `ec2-runners`.
- An email address for alerts, or none.

Run `aws sts get-caller-identity` and `gh api user --jq .login`. Check that `gh api user/memberships/orgs/$ORG --jq .role` prints `admin`, which step 4 and the runner group check need. The runner group API also needs the `admin:org` scope: when `gh auth status` does not list it, ask the person to run `gh auth refresh -h github.com -s admin:org`, which opens a browser. Check `node --version` is 24 or later and `bun --version` succeeds.

**Done when** you are in an ec2-runners checkout, every input has a value, the tools run, and the person has confirmed the AWS account ID and the organization by name.

## 2. Preflight

Run each check and record its result:

- **Existing stack.** `aws cloudformation describe-stacks --region $REGION --stack-name $STACK`. If the stack exists, this run is an update: keep its parameters, and step 4 applies only when the person wants a new GitHub App.
- **Availability zones.** `aws ec2 describe-availability-zones --region $REGION --query 'length(AvailabilityZones[?State==`available`])'` must be at least 3.
- **Runner images.** `aws ec2 describe-images --region $REGION --owners 135269210855 --filters 'Name=name,Values=runs-on-v2.2-ubuntu24-full-x64-*' --query 'length(Images)'` must be above 0. At 0, the region has no RunsOn images, and the person needs their own AMIs (`AmiOwner`, `AmiNamePrefix`) or another region.
- **Quotas.** List the vCPU quotas:
  ```bash
  aws service-quotas list-service-quotas --region $REGION --service-code ec2 \
    --query "Quotas[?contains(QuotaName, 'Standard (A, C, D, H, I, M, R, T, Z)')].[QuotaName,Value]" --output table
  ```
  Compare the Spot quota with the peak vCPUs the person's CI runs at once (the sum of `cpu=` across parallel jobs). A quota below that peak makes launches fail; tell the person, and point them to the quota list in `docs/setup.md`.
- **Runner group.** `gh api orgs/$ORG/actions/runner-groups/1 --jq .allows_public_repositories` must print `false`, or the reconciler launches nothing. If it prints `true`, ask the person whether to turn the setting off (the safe default) or deploy with `AllowPublicRepos=true` (see `SECURITY.md` for the cache risk).

**Done when** each check has a recorded result, and each failing check is fixed or the person has accepted it.

## 3. Deploy

```bash
AWS_REGION=$REGION STACK=$STACK ./deploy.sh GitHubOrg=$ORG AlertEmail=<email>
```

Leave out `AlertEmail` when the person gave none, and leave out `GitHubOrg` on an update unless it changes. Pass any other parameters the person asked for (`docs/setup.md`, Parameters). A first deploy takes several minutes. The janitor and reconciler alarms fire until step 4 installs the GitHub App; tell the person to expect those alerts.

**Done when** `aws cloudformation describe-stacks --region $REGION --stack-name $STACK --query 'Stacks[0].StackStatus'` prints `CREATE_COMPLETE` or `UPDATE_COMPLETE`, and the outputs include `WebhookUrl` and `GitHubAppSecretArn`.

## 4. GitHub App

Run the app script in the background and keep its output:

```bash
AWS_REGION=$REGION node scripts/create-github-app.ts --org $ORG --stack $STACK
```

It serves a page on `127.0.0.1` and opens it in the browser. The person must click **Create GitHub App** on GitHub while signed in as an organization owner, then install the app on the organization for the repositories that should use the runners. If the browser is on a different machine from the script, the `127.0.0.1` address cannot reach it; follow the manual steps in `docs/setup.md`, steps 2 and 3, instead. Pass `--no-open` when this machine has no browser and print the address for the person.

If the script says the secret already holds credentials, the stack already has an app: stop and ask whether to keep it or replace it with `--force`.

**Done when** the script printed `Created GitHub App` and exited 0, and the installation exists:

```bash
gh api orgs/$ORG/installations --jq '.installations[] | select(.app_slug == "<slug from the script>") | .repository_selection'
```

## 5. Alerts

If `AlertEmail` was set, ask the person to confirm the subscription from the email SNS sent. For Slack or Microsoft Teams, follow `docs/setup.md`, step 5, with the person's existing Amazon Q Developer channel configuration.

**Done when** `aws sns list-subscriptions-by-topic --region $REGION --topic-arn <AlertTopicArn>` shows no `PendingConfirmation` subscription, or the person chose to skip alerts.

## 6. Test

Ask the person for a private repository where the app is installed, and get their approval to push a test branch to it. Push a branch named `ec2-runners-smoke-test` with this workflow at `.github/workflows/ec2-runners-smoke-test.yml`:

```yaml
name: ec2-runners smoke test
on:
  push:
    branches: [ec2-runners-smoke-test]
jobs:
  ec2:
    runs-on: [ec2, cpu=2]
    steps:
      - run: echo "ran on $(hostname) with $(nproc) vCPUs"
  microvm:
    runs-on: microvm
    steps:
      - run: echo "ran on $(uname -m)"
```

Watch it with `gh run watch --repo <owner>/<repo> <run id>`. The EC2 job should start within about a minute. The MicroVM image builds on the janitor's first run after the deploy, which takes up to about 8 minutes, and until then the `microvm` job runs on an EC2 runner, which still counts as a pass.

If a job is still queued after 5 minutes, follow the `debug-ec2-runners` skill, then return here.

**Done when** both jobs succeeded. Then delete the test branch (`git push origin --delete ec2-runners-smoke-test`) and tell the person the stack's outputs, where alerts go, and that `docs/usage.md` lists the labels workflows can use.

Versions

The database has no other skills named setup-ec2-runners.

Database snapshot: 13.11.2026 · package version 1fc9ecebe51b (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100adopt-ec2-runners
    Moves a repository's GitHub Actions jobs onto ec2-runners by choosing ec2 or microvm labels and sizes for each job. Use when migrating workflows from GitHub-hosted or other self-hosted runners to ec2-runners, or sizing a job's runs-on labels.
  • 100debug-ec2-runners
    Diagnoses a deployed ec2-runners stack. Use when a job waits for an ec2 or microvm runner, a runner failed or never started, or an ec2-runners alert or CloudWatch alarm fired.
  • 100depot-github-runners
    Configures Depot-managed GitHub Actions runners as a drop-in replacement for GitHub-hosted runners. Use when setting up or migrating GitHub Actions workflows to use Depot runners, choosing runner sizes (CPU/RAM), configuring runs-on labels, setting up ARM or Windows or macOS…
  • 100github-actions
    Build, test, and deploy applications using GitHub Actions workflows. Create CI/CD pipelines, configure runners, manage secrets, and automate software delivery. Use when working with GitHub repositories, automating builds, running tests, or deploying applications.
  • 100incus-gha-runners
    Set up, extend and troubleshoot GitHub Actions self-hosted runners on one Linux host, each runner in its own long-lived unprivileged Incus system container with its own Docker. Use when someone wants several self-hosted runners on one machine without them interfering, wants to…
  • 90ci-drift
    Use for the whole-estate CI audit, "audit the CI", "are the runners clean", "check the release pipeline", "ci drift", "stale workflows / secrets / runners", or a scheduled CI-audit cadence run. NOT for one failing run (/kit:debug), NOT for doc prose (doc-drift).

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.