This will only work with the Route53 setup and Custom CloudFormation resource at Ixor.
import {R53} from "@ixor/aws-cdk-ixor-r53";
import {Stack, Construct, StackProps} from "aws-cdk-lib";
import {Construct} from "contstructs";
export class MyStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
new R53(
this, `r53_${this.node.id}`,
{
topicArn: this.node.tryGetContext("r53TopicArn"),
RecordType: "CNAME",
Source: "aLoadBalancerDnsName",
Target: "www.my.domain"
})
}
}
A test stack is added in lib/test-aws-cdk-ixor-r53-stack
. The stack uses the R53
construct to create a CNAME of
ellen.ixor-tst.be
. When you deploy to sandbox, you should be able to run dig ellen.ixor-tst.be
and receive
a NOERROR
status.