Skip to content

create domain

Attach a custom domain to an existing utopia site: ACM cert (us-east-1) + Route53 DNS + CloudFront alias.

bash
awsutopia create domain <fqdn> --site <name> [--yes] [--dry-run] [--json]
bash
awsutopia create domain www.example.com --site www --yes

What happens

  1. Requests an ACM certificate in us-east-1 (CloudFront requirement) with DNS validation
  2. Upserts validation CNAME(s) + an alias A record in the matching Route53 hosted zone
  3. Updates the site's CloudFront distribution with the alias + ACM cert

You'll be asked to confirm DNS changes unless you pass --yes. Decline → no-op, exit 5. That confirm is never skipped for real applies (only --yes or --dry-run).

--dry-run resolves the site distribution and hosted zone (read-only), then prints the concrete ACM + Route53 + CloudFront steps — including distribution id and zone id — without requesting a cert or writing DNS.

JSON success includes certificateStatus and validationPending so you can see when ACM is still waiting on DNS.

Prerequisites

  • A utopia site already created (create site)
  • A public Route53 hosted zone for the apex (e.g. example.com)

Hosted zone missing

If you see HOSTED_ZONE_NOT_FOUND:

  1. Open Route 53 → Hosted zones in the AWS console
  2. Create hosted zone → public zone for the apex (usually example.com when attaching www.example.com)
  3. At your registrar, set the domain’s NS records to the four name servers Route 53 shows
  4. Wait until the zone is live, then re-run awsutopia create domain …

The error hint lists the parent names awsutopia already looked for.

DNS validation can take a few minutes before HTTPS works on the custom name. The CloudFront default URL keeps working in the meantime.

Next

See the site in list. Tear everything down with destroy site (owned ACM certs tagged utopia:kind=site-cert are removed best-effort).

Working name — your AWS account, your bill.