Project

General

Profile

Actions

Feature #50

open
AS

Feature #33: Canofy Control Centre Backend Development

Feature #46: Canofy Control Centre Onboarding Process

# [CANOFY-104] Create DNS Record (Route 53)

Feature #50: # [CANOFY-104] Create DNS Record (Route 53)

Added by Akshath Shettigara about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
07/23/2026
Due date:
% Done:

0%

Estimated time:

Description

[CANOFY-104] Create DNS Record (Route 53)

Type: Story
Epic: New Client Onboarding — Automated AWS + Frappe Provisioning
Stage key: dns_record (pipeline stage 4 of 15)
Component: utils/aws_client.py

User Story

As an operations engineer,
I want the client's site subdomain to resolve automatically to its
Elastic IP,
so that the site is reachable at its real domain (e.g.
<client>.canofy.tech) without a manual Route 53 console step, and SSL
issuance in a later stage has a working DNS record to validate against.

Description

Create an A record in the appropriate Route 53 hosted zone pointing
Onboarding Request.site_name at the Elastic IP allocated in stage 3.

  • Record type A, low TTL (e.g. 300s) so it can be corrected quickly if
    something needs to change during onboarding.
  • Must be idempotent: re-running this stage (e.g. via retry_failed_stage)
    should UPSERT, not fail on "record already exists."

Configuration / Prerequisites

  • Depends on stage 3 having produced elastic_ip_address.
  • Hosted Zone ID for the client domain (e.g. canofy.tech) must be known —
    either a fixed platform-level config value or resolved from the domain
    suffix of site_name.

Acceptance Criteria

  • A record created for site_name pointing at the Elastic IP.
  • Record propagates and resolves correctly (dig/nslookup returns the
    right IP) within the TTL window.
  • Re-running the stage updates the existing record rather than erroring
    or creating a duplicate.

Test Cases

ID Scenario Steps Expected Result
TC-1 Happy path Run stage with a valid site_name + EIP dig <site_name> resolves to the EIP within TTL
TC-2 Idempotent re-run Run the stage twice in a row Second run succeeds (UPSERT), no duplicate/error
TC-3 Wrong/missing hosted zone Point at a domain suffix with no matching hosted zone Stage fails with a clear "no hosted zone found for domain X" error
TC-4 IP change on retry EIP changes between a failed run and a retry (e.g. stage 3 was also retried) DNS record is updated to the new IP, not left pointing at a stale one

No data to display

Actions

Also available in: PDF Atom