Skip to content

Configure custom domain with Route 53 and ACM #32

Description

@ibrahimcesar

Description

Set up a custom domain for the interactive platform with SSL certificate.

Proposed Domain Options

  • commons.ibrahimcesar.com (subdomain)
  • categories-of-the-commons.dev (new domain)
  • Or another preferred domain

Tasks

1. Domain Registration/Setup

  • Choose domain name
  • Register domain (if new) or configure existing DNS

2. SSL Certificate (ACM)

  • Request certificate in us-east-1 (required for CloudFront)
    aws acm request-certificate \
      --domain-name commons.example.com \
      --validation-method DNS \
      --region us-east-1
  • Add DNS validation record to Route 53
  • Wait for certificate validation (can take 30+ minutes)

3. Route 53 Hosted Zone

  • Create hosted zone (if new domain)
  • Note NS records for domain registrar

4. Update CDK Stack

  • Add domain name configuration
  • Reference ACM certificate
  • Add Route 53 alias record

Example CDK addition:

const certificate = acm.Certificate.fromCertificateArn(
  this, 'Certificate', 'arn:aws:acm:us-east-1:...'
);

const distribution = new cloudfront.Distribution(this, 'Distribution', {
  // ... existing config
  domainNames: ['commons.example.com'],
  certificate,
});

new route53.ARecord(this, 'AliasRecord', {
  zone: hostedZone,
  target: route53.RecordTarget.fromAlias(
    new targets.CloudFrontTarget(distribution)
  ),
});

5. Deploy and Verify

  • Redeploy CDK stack
  • Verify HTTPS works on custom domain
  • Update CORS settings if needed
  • Update API base URL in frontend config

Acceptance Criteria

  • Custom domain resolves to CloudFront distribution
  • HTTPS certificate valid (no browser warnings)
  • All routes work on custom domain
  • API endpoints accessible via domain

Related Files

  • interactive/infra/lib/interactive-stack.ts

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructureInfrastructure and toolinginteractiveInteractive platform features

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions