Skip to content

AssociateCustomDomain

Source: src/AWS/AppRunner/AssociateCustomDomain.ts

Associate a custom domain with an App Runner Service from a Lambda (or other AWS runtime) — the multi-tenant SaaS “bring your own domain” flow: a customer adds their domain, the platform associates it at runtime and hands back the DNS validation records App Runner returns. Track validation with DescribeCustomDomains.

Provide AppRunner.AssociateCustomDomainHttp on the hosting function’s Effect to implement the binding.

const associateCustomDomain = yield* AppRunner.AssociateCustomDomain(service);
const { CustomDomain, DNSTarget } = yield* associateCustomDomain({
DomainName: "app.customer.com",
EnableWWWSubdomain: false,
});
// CustomDomain.CertificateValidationRecords -> CNAMEs the customer creates
// DNSTarget -> where the customer points app.customer.com