Hello everyone! I am trying to use custom domain n...
# sst
i
Hello everyone! I am trying to use custom domain name for my API. Could someone tell me how to add certificate properly and where do I need to import it from? I want to specify
alternate domain name
(programatically) so my url will be human-readable instead of an URL with ID provided by AWS The guide covers only customDomain and route53 creation but it doesn't cover full configuration of it using SST. Glad to any suggestions!
f
Hey @Ivan Roskoshnyi is the domain hosted on Route 53? And can u give me an example of what you want your domains to look like?
i
@Frank Hello. Never mind. I have solved this issue. Looks like specifying of these 3 parameters is enough:
Copy code
customDomain:
 scope.stage === "prod"
  ? {
   domainName: "....com",
   domainAlias: "...com",
   hostedZone: '....com'
  }
  : undefined,
I was taking errors because of existing records in cloud front with same custom domain names