Docs · Reference
Reference
Facts to look up, for the free edition's static-site path: what you need, the steps only you can take, the inputs you decide, what's shared across an account, what it costs, the errors you may meet first, and what has run.
Not released yet. hyperstack's free edition isn't public yet. This page describes its 0.1.6.
Where the facts live
Each stack's INTERFACE.md, in the release, is the authority for its inputs and outputs, and each unit's README.md, "Cost", for its prices. This page gathers what spans them. The tasks are in the how-to, and the first site, step by step, in the tutorial.
What you need
- One AWS account, and an administrator's sign-in for it in one AWS CLI profile (the docs call it
example-site) that isn't the root user.aws sts get-caller-identity --profile example-siteprints the account's ID. No organization, no single sign-on and no second account. With no account yet, the release'sstacks/static-account/NEW-TO-AWS.mdmakes one, locks its root user, sets its spending alert first, and makes the everyday sign-in. An account already in use is fine: the base adopts what it finds (how-to). - A public hosted zone, in that same account, for your domain or a parent of it (
www.example.comgoes inexample.com's zone), that answers for the domain: no NS record in it hands the domain to another zone, and a CAA record, if one applies to the domain, allows Amazon ("Errors"). Public matters: a private zone answers only inside a network of yours, so the certificate couldn't be checked and nobody could reach the site. The zone is yours, not a stack's. With no zone yet, or for a name under a domain already in use: how-to, "Bring your domain's zone", where a name under a domain in use gets a zone of the site's own, made by the site's stack. - A domain on no other CloudFront distribution, anywhere in AWS; each domain once in the account.
- A GitHub repository per site, only to publish from CI, with Actions on. A site published from your own machine (
local_publish = trueanddeploy_subject = null: how-to) needs none. (The site walkthrough asks for a repository's name even to publish by hand; the stack's inputs don't need one withlocal_publish.)
The tools
- Terraform 1.17.1, exactly: the release's
.terraform-versionand each stack'srequired_version. Another version stops atterraform init. - The AWS provider, hashicorp/aws 6.71.0 in the stacks' lock files, which
terraform initfetches (the network, once). - The AWS CLI, version 2; 2.32.0 or later for
aws login. git,dig,curl,unzipandsha256sum(on a Mac,shasum -a 256), andopensslfor the site's certificate check.- GitHub's CLI,
gh, only for a site that publishes from a repository. - Python 3, its standard library alone, for the quality guard (
scripts/check-site.sh --builtand--quality, orscripts/site_quality.py), the static-site scripts (new-site.sh,new-root.sh,deploy-vars.sh), and the optionaltools/journey.py. - For the do-the-thing kit (
stacks/static-site/kit/) only: Python 3 too,claude(Claude Code), and, optional,qrencodefor the QR code it shows.
The release's stacks/static-account/NEW-TO-AWS.md, section 6, installs Terraform, the AWS CLI, gh and the small tools (git, dig, curl, unzip, openssl), and checks all but gh in one go. terraform init fetches the provider. The exact releases of the AWS CLI, gh and Python that a run used aren't on record yet.
Human steps
The steps of a deployment that only a person takes, in the route's order. Everything else is a command the pages give.
Before all of them, a spending alert, made by hand in AWS's console before anything is installed or built: a cost budget, alerting at 100% of actual spend and 80% of forecast, its address confirmed. Where: NEW-TO-AWS.md, section 4. Step 7 is the other way: one or the other, never both.
- Sign in to the one account. Do: one AWS CLI profile with an administrator's sign-in for the account, and nothing in the environment: every
awscommand names--profile example-site, and Terraform readsprofilefromterraform.tfvars. Check:aws sts get-caller-identity --profile example-siteprints the account's ID, which you write asaccount_id: every provider then refuses any other account. If the sign-in expires partway, stop, sign in again and plan again: a plan saved before the stop is stale. - Bring the zone, and wait for it. Do: for a registered domain that's new or unused, make its public zone in this account and set the registrar's name servers to the zone's four. For a name under a domain already in use, never change the registrar's name servers (they answer for the whole domain, its mail included): the site's stack makes a zone of its own (
parent_dns = null), and you add one NS record for the site's name at the DNS host that serves the domain. That zone comes from step 3's name and domain, in the site's first plan afterterraform init, so on this route step 2 finishes after step 3. Check: for the first,dig NS <the zone's name> +shortprints the four and the zone's lookup ends infalse(public), before you plan the site; for the second,dig NS <the site's name> +shortprints the site's zone's four, before the rest of the site's apply. Where: how-to, "Bring your domain's zone". - Choose the region, the site's name and its domain. Do: decide the three. The repository's subject and the zone's ID are lookups, not choices:
scripts/site-inputs.shprints both for a zone already in the account. Check:namehas the shape below and differs from every other site's; "Check your inputs offline" passes. - Read every plan before its apply. Do:
terraform plan -out=x.tfplan, read every line, thenterraform apply x.tfplan; never-auto-approve. Check: the counts: the base4 to add(5 with an alias, one more with a budget), a site18 to add(28 with the replica; with a zone of the site's own, the zone first by itself,1 to add, then the 18), a site's destroy18(19 with a zone of the site's own, 28 with the replica: neither yet run). A destroy or a replace you didn't ask for: stop, and find out why. - Wait out the certificate and the distribution. Do: nothing: don't retry, interrupt or re-run the apply. Check: the apply ends on its own. In the 2026-11-19 run the distributions took 2 min 33 s and 3 min 4 s, and the certificate was checked in seconds once its record answered. An apply that waits at the certificate for much longer means the zone doesn't answer yet (step 2).
- Set the repository's variables, publish the first page, then merge the workflow. Do: read, then run, the three
gh variable setcommands thatterraform output -raw repository_variable_commandsprints; publish a first page by hand; then a pull request that adds the publish workflow, merged by you once its run is green. Check:scripts/check-site.sh <domain>passes; the pull request's run is refused the deploy role, and green for it (the tripwire); the merge's run publishes. No run of the workflow is on record yet. - The base's budget, or none. Do: nothing, if you made the spending alert by hand. Otherwise, an amount in US dollars and an address to mail, as
monthly_budget_usdandbudget_emailsin the base'sterraform.tfvars. Check: the base's plan shows1 to add; thenaws budgets describe-budgets --account-id <account id> --profile example-sitelists it. It's free. - Take it down, and decide about the zone. Do: only when you mean to delete the site and its content: empty the bucket, every version, then destroy from a saved plan you've read. If ACM refuses the certificate's delete (
ResourceInUseException), wait about 15 minutes and plan the destroy again: it's expected. A zone you made by hand is yours: it stays, and bills, until you delete it, which is safe only once nothing else uses it and only its NS and SOA records are left. A zone the site's stack made goes with the site, once its NS record at the parent is removed. The base comes down only after the last site. Check:scripts/sweep.sh <name> <domain> <zone id>finds nothing of the site left. Where: how-to, "Take it down".
Inputs and outputs
Each stack's terraform.tfvars.example, in the release, is the file its walkthrough starts from, with a comment on every value. Its INTERFACE.md lists every input with its type and default, and every output: stacks/static-account/INTERFACE.md for the base, once per account, and stacks/static-site/INTERFACE.md for each site.
The ones you must decide
account_id(both)- The account's 12-digit ID; every provider acts only there.
profile(both)- The CLI profile; unset, it takes
AWS_PROFILE. region(both)- The base's Region, and the site's bucket's: best the same, so the base's analyzer sees the buckets. Default
us-west-2. account_alias(base)- Optional; unset leaves the account's alias as it is.
name(site)- The site's short name: 1 to 34 lowercase letters, digits and hyphens, with a letter or digit at each end, different for each site in the account. It names the bucket (
<name>-site-<account id>), the deploy role (<name>-deploy) and the distribution's parts. domain(site)- The site's domain, such as
www.example.com. parent_dns(site)- Required:
{ zone_id = "<your zone's ID>" }, the zone the site's three records go in; the example's zone ID is a placeholder.nullmakes a zone of the site's own, delegated from the parent (how-to). deploy_subject(site)- The exact subject the site's deploy role trusts: the repository's looked-up prefix plus
:ref:refs/heads/main, or an environment's (:environment:<name>) for a second site in the same repository, never another branch's. Required:nullfor a site with no repository, withlocal_publish = true. monthly_budget_usd,budget_emails(base)- Optional: a budget's amount in US dollars and the addresses it mails; unset makes none.
The ones with a default
Each is off, or as before, until you set it; how-to, "Turn on an option" has each one's recipe.
- Site:
local_publish(false),not_found_page(null: a missing page answers S3's403),noindex(false),rewrite(index; orspa,none),replica(false) andreplica_region(us-east-1),allow_cidrs(null: everyone),access_key_sha256(null: no key). - Base:
access_analyzer(true),managed_elsewhere(empty: the base makes all three of the public access block, EBS encryption by default and GitHub's provider).
The outputs you use
repository_variables: the site's three names to set on its repository (its deploy role, its bucket and its distribution). They're names, not secrets.repository_variable_commands: theghcommands that set them, with your values, to read and then run.names: every name the site holds, to compare between sites.name_servers: a zone of the site's own's four name servers, for the NS record at the parent; empty when the site writes into your zone.
Account-wide resources
The base keeps what is one per account (or per Region): S3's public access block, for every bucket; EBS encryption by default, in region; GitHub's OIDC provider, which every site's deploy role trusts; the Access Analyzer, named account, in region; the alias, if you name one; and the budget, if you set one. A site makes none of them.
Each site makes its own, named by its name or its domain: its bucket (named across all of AWS), its deploy role, its origin access control, its rewrite function, its headers policy, its distribution (its domain once across all of AWS) and its certificate, in us-east-1. So any number of sites, each with its own name, domain and state, plan in one account with no collision.
Your zone is shared: each site under the domain writes three records in it (the certificate's validation record, and the A and AAAA aliases), keyed by its own domain.
The ceiling: 20 sites per account. Each site makes one custom response headers policy, and CloudFront allows 20 an account by default (its quotas page, 2026-11-18; you can ask AWS for more). The next limits are 100 functions and 100 origin access controls an account, and 500 distributions. A 21st site fails at its headers policy.
The detail: in the release, each stack's INTERFACE.md, "Account-wide and global".
Costs
AWS bills your card directly, for what you use. hyperstack's free edition costs nothing. The stacks add no fixed charge: the base is free, and a site makes nothing billed by the hour or the month. Each price below is AWS's, as the release's sources state it, with the date it was read; AWS's pricing pages have today's. None has been confirmed on a bill yet.
What bills by default
- Your hosted zone: $0.50 a month, from the month it's made, whether or not a site uses it. The records a site writes in it add no charge of their own. A zone of the site's own (
parent_dns = null) is the same price, while it stands (AWS's Route 53 pricing page). - DNS queries to the certificate's validation record: $0.40 per million queries. The alias records' queries are free.
- CloudFront, serving the site: 1 TB of data out and 10 million requests a month free, then about $0.085 per gigabyte of data out (AWS's CloudFront pricing page).
- The rewrite function, on every request (
rewrite = "index", the default): 2,000,000 runs a month free, then $0.10 per million runs. - Invalidations, one per publish: 1,000 paths a month free, then $0.005 a path;
/*is one path. - S3 storage, the site's files, with old versions kept 90 days: $0.023 per gigabyte a month in us-west-2.
- S3 requests: $0.0004 per thousand reads and $0.005 per thousand writes, in us-west-2 (AWS's S3 pricing page).
What's free
- The base: the public access block, EBS encryption by default (with AWS's own key), GitHub's OIDC provider, the alias and Access Analyzer's external-access findings (AWS's pricing pages, read 2026-11-07).
- Each site's certificate, headers policy and deploy role.
- A budget with no actions, as the base makes it.
What bills only if you turn it on
- The replica: the replica bucket's own storage and requests, and copying each file to it, $0.02 per gigabyte from us-west-2 to us-east-1.
- GuardDuty: billed by AWS by what it watches (AWS's GuardDuty pricing page).
Free tiers count once for the account, not once per site. What makes the bill grow first: data served past CloudFront's free tier; storage, if you publish large files often; then each further site's own storage and requests, with no further zone when it shares yours. Your domain, if you bought one, is a fee each year, set by the seller.
We have no real bill on record for this route yet, neither for an idle site nor a busy one.
The detail: in the release, each unit's README.md, "Cost" (modules/cloudfront, modules/s3, modules/account, modules/security, and each stack's), and the site walkthrough's "Cost".
Errors you may meet first
A failure inside one stack or module is that unit's: its HOWTO.md, in the release, has the recipes. These come before that. Where an error's exact text isn't on record, it says so.
Error: failed to get shared config profile, example-site- Cause: the profile in
profileorAWS_PROFILEdoesn't exist on this machine (aws configure list-profileslists those that do). Fix: name one it lists, or make it. To check your values with no profile at all: "Check your inputs offline". - The plan stops at the provider, naming an account that isn't allowed
- Cause: you're signed in to another account than
account_id: every provider is pinned to it. Fix: sign in to the right account, or correctaccount_id. - A site's plan stops at the lookup of GitHub's OIDC provider
- Cause: the account has no base yet: the site finds the provider, and makes none. Fix: apply
stacks/static-accountfirst, once. - The site's plan or apply fails on the zone, such as
NoSuchHostedZone(the error's text isn't on record) - Cause:
parent_dns.zone_idis still the example's placeholder, or another account's zone. Fix: your zone's ID, fromscripts/site-inputs.shor the site walkthrough's step 3. - The certificate never validates
- Cause: the zone is private, or doesn't answer for the domain; or a CAA record at the domain, or at the nearest parent that has one, allows other certificate authorities and not Amazon. Fix: the zone's checks, "Check your inputs offline", step 4. For CAA,
dig +short CAA <domain>, then each parent's up to the first that answers: an existing CAA record must allow one of the four values ACM accepts,amazon.com,amazontrust.com,awstrust.comoramazonaws.com(ACM's CAA page). None anywhere is fine. - The site's apply waits at the certificate's validation for many minutes
- Cause: a new zone the internet doesn't reach yet: the registrar's name servers (a registered domain that's new or unused) or the NS record at the domain's DNS host (a name under a domain in use) aren't set, or not seen yet. Fix:
dig NS <the zone's name> +shortmust print the zone's four ("Bring your domain's zone"). Let the apply wait; if it stops, plan again once they answer. - Subdomain: never replace the parent's name servers. After a name-server change at the registrar, the domain's mail, its other sites or its other records stop answering (not yet run: by reading)
- Cause: the registrar's name servers were replaced with a new zone's, for a name under the domain. They answer for the whole registered domain, and the new zone holds none of its records. Fix: put the registrar's name servers back as they were, at once. Then give the site a zone of its own, and one NS record at the domain's DNS host ("A zone of the site's own").
- An apply stops partway with a sign-in error: the session or token expired, or a refresh failed (the error's text isn't on record)
- Cause: the sign-in ran out mid-apply (a single sign-on session's length is set by its permission set, often an hour). Fix: stop, and change nothing by hand. Sign in again, then plan again from the same state, and read it: what the stopped apply made is in the state, so the new plan holds only the rest, and a plan saved before the stop is stale. Something cut off while it was being made can come back marked to be replaced: read the plan for it.
- The site's apply stops at the distribution with
AccessDenied: Your account must be verified before you can add new CloudFront resources - Cause: a new account that AWS hasn't cleared for CloudFront yet. Fix: open a case with AWS Support (Account and billing, which is free), quoting the message. Once AWS answers (reports say up to two days), plan and apply the site again. What the apply made before it stays, and the new plan adds the rest.
terraform initstops after the offline check, on the backend- Cause: the directory was initialized with
-backend=false, and the root has abackend.tf. Fix:terraform init -reconfigure, or remove.terraform/and init again (a real run, 2026-11-19). - The base's apply fails on something already there (the OIDC provider, the analyzer)
- Cause: the account had it already. Fix: "Adopt an account already in use"; for the analyzer,
access_analyzer = false. - The site's destroy fails on the certificate with
ResourceInUseException - Cause: ACM still lists the certificate in use by the distribution the same destroy just deleted (a real run, 2026-11-19: it cleared about 15 minutes later; another, 2026-11-20, met none in two destroys). Fix: expected, when it comes. Wait about 15 minutes, then plan the destroy again, read it and apply it. Never delete the certificate by hand.
- A second site collides with the first on a name (the error's text isn't on record)
- Cause: the two share a
name. Fix: its ownname, before its first apply. terraform initfails withUnreadable module directory, or takes another repository'smodules/- Cause: the stack was copied out of the tree. Fix: run it where it is, in
vendor/hyperstack/stacks/<stack>;realpath ../../modulesmust be this tree's. sha256sum -c SHA256SUMSreportsFAILEDstraight after unpacking- Cause: the files aren't the ones that were built. Fix: stop, and get the release again. Later, a reported
main.tfor.terraform.lock.hclis your own edit, orterraform initon another platform. - A page names a file or a check that isn't in your copy
- Cause: it isn't part of the free edition. Fix: the fact is on the unit's
README.md,HOWTO.mdorINTERFACE.md, or on these pages.
What has run
Two kinds of proof. A mocked test plans the Terraform against a stand-in for AWS, with no sign-in: it proves the configuration is consistent and its promises hold in the plan, not that AWS accepts the calls. To run one, in any module's or stack's directory: terraform init -backend=false, then terraform test, which prints its own count. A run on AWS is the real thing, in a real account.
stacks/static-account(the base): 11 mocked tests. Run on AWS once as its own root, on 2026-11-19, in one account with nothing else in it:4 to add, applied clean, every check passed.stacks/static-site(a site): 36 mocked tests. Run on AWS twice in one run, on 2026-11-19: a site under the zone, up and down with nothing left, then a site at the zone's apex, left up; each18 to add. Again on 2026-11-20, in a second proving run: two sites up and down. Six live sites have since moved onto it, in one shared account, each by a written runbook. Before that, once on 2026-11-17, in an account of an organization, with a zone of the site's own.- The modules (account, security, identity, s3, cloudfront): 8, 4, 18, 7 and 82 mocked tests. All five ran in the 2026-11-19 run, through the two stacks.
The tutorial's route, on AWS, start to finish: 2026-11-19, from the 0.1.0 free edition alone, unpatched (its checksums passed before and after), with Terraform 1.17.1 and hashicorp/aws 6.71.0, the state in S3 from the start. The state bucket; the base, 4 to add; a throwaway site under the zone, 18 to add, its distribution 2 min 33 s, answering 10.7 minutes after the run's first command, then emptied and destroyed, 18 to destroy, with nothing left; then a site at the zone's apex, 18 to add, its distribution 3 min 4 s, published by hand and served byte for byte as published. A plan of each root after it said No changes. It took 24 minutes end to end, with no step worked around.
A second proving run, on AWS: 2026-11-20, from the 0.1.1 free edition, about 50 minutes, timed step by step: a domain's zone delegated in 1 min 14 s (a subdomain, from a parent zone in Route 53; the registrar's half isn't timed), a site live in about 5 minutes (its apply 4 min 12 s), a second site in 7 min 37 s, and each teardown about 4 min 15 s. The sweep afterwards matched the account as it was before.
Six live sites moved onto stacks/static-site, in one shared account, each with a planned window of about three minutes, each rehearsed or run by a written runbook: from 2 min 42 s to 3 min 29 s.
What hasn't run yet
- No outside reader has run this route: our own operator ran each of these, from the free edition's docs.
- No publish from a repository's CI has run: the workflow is written, not yet proven.
- No publish from your own machine (
local_publish) has run on AWS. - No bill is on record, for any of these runs.
- The advanced paths (an organization of accounts, a zone in another account) are outside these pages; the organization's stack has no run on AWS on record.
Next
- A task: the how-to.
- The first site, step by step: the tutorial.