Prerequisites
Complete these before adding a domain:- Authenticated with Fjall (run
fjall login) - Connected an AWS account (run
fjall connect) - An application to put on the domain — deployed, or ready to deploy
fjall/domains/<zone>/infrastructure.ts with the typed Domain construct — the file you edit is the file that deploys. See Domain for the construct API and fjall domain for every verb and flag.
Create the domain
Scaffold a new domain in your project root:fjall/domains/example.com/infrastructure.ts and registers the domain in fjall-config.json, so the organisation cascade can deploy it. Edit the declaration to add your records — MX, TXT, DKIM, whatever the zone needs.
Or import an existing zone
Already hosting the domain in Route 53? Import it — the declaration is curated from the live zone, with records owned by other live stacks deliberately left undeclared:fjall domain create is the right start — delegation to Route 53 happens after the first deploy.
Deploy the zone
-t, --target <name> (and -r, --region <region>) — an unresolvable target fails closed with the available targets listed.
The first deploy of an adopted zone runs the record-takeover ceremony:
the deploy stops with a ticket naming each record both the live zone and
your declaration claim, and you consent per record with
--remediate '<name>/<TYPE>'=recreate — there is no blanket flag. Consent
withheld means exit code 4: nothing released, nothing deployed. See
Destructive Changes.Verify delegation
Check that the domain’s nameservers point at Route 53:fjall domain verify until it reports the delegation live.
Point your application at it
Set the application’sdomain — that is the whole mechanism. At deploy time the CLI injects a managed domain binding with literal values (hosted zone ID, certificate ARNs), so the app binds to the zone with no extra wiring, across accounts and regions.
For a static site, pass the domain at create time:
domain: "example.com" in the pattern’s infrastructure.ts. A compute application declares it the same way — domain: "api.example.com" on the ComputeFactory (see Application Binding). Then deploy the app as normal:
Keep the zone clean
List every live record with its ownership classification (declared, satellite, residue, or unknown):
--fix runs the same ceremony as deploy — a ticket names each residue record, you consent per row, and withheld consent exits 4 with nothing deleted. Records classified unknown are never offered for deletion.
Next Steps
fjall domain
Every domain verb, flag, and exit code.
Domain construct
Declare zones, records, certificates, and delegation in infrastructure.ts.
Static Site Pattern
Serve a static site on your domain via CloudFront.
Destructive Changes
How the destruction ceremony and named consents work.