@domain defines and assigns a domain name to your app


  • Standard domain characters and syntax
  • Only use the FQDN
  • Do not include protocol or path


For example, to create this domain:



get /

Running npx dns will:

  • Create a certificate request with AWS Certificate Manager
  • Setup staging and production Domains in API Gateway

If you want to use Route53 name servers running npx dns route53 will:

  • Automatically setup a certificate on AWS Certificate Manager
  • Create a Hosted Zone on Route 53
  • Create corresponding Alias records in Route 53

Also see the guide for custom DNS for working with @domain

Next: Defining events with @events