0
votes

Route53 doc says:

Amazon Route 53 offers ‘Alias’ records (an Amazon Route 53-specific virtual record). Alias records are used to map resource record sets in your hosted zone to Amazon Elastic Load Balancing load balancers, Amazon CloudFront distributions, AWS Elastic Beanstalk environments, or Amazon S3 buckets that are configured as websites. Alias records work like a CNAME record in that you can map one DNS name (example.com) to another ‘target’ DNS name (elb1234.elb.amazonaws.com).

Does this mean I am not able to CNAME to a non-aws host?

Here's an example from aws:

            Action: aws.String("CREATE"),
            ResourceRecordSet: &route53.ResourceRecordSet{
                AliasTarget: &route53.AliasTarget{
                DNSName:           aws.String("d123rk29d0stfj.cloudfront.net"),
                    EvaluateTargetHealth: aws.Bool(false),
                    HostedZoneId:         aws.String("Z2FDTNDATAQYW2"),
                },
                Name: aws.String("example.com"),
                Type: aws.String("A"),
            },

If it is possible to CNAME to a non-aws host, what should I specify in the ResourceRecordSet?

1
That is a description of "alias" records saying they work like a CNAME. Route53 works for standard A, CNAME, etc, for any IP or domain on the internet. Is your last sentence a typo and you are asking it's it's possible to alias (not CNAME) outside AWS?Dave S
Where in the API can I specify standard CNAME? AliasTarget stood out as the only reference to CNAME. Let me check again.lf215
No idea, I use the console for that. Check the docs?Dave S

1 Answers

0
votes

This worked for me:

    Action: aws.String("CREATE"),
    ResourceRecordSet: &route53.ResourceRecordSet{
    Name: aws.String("mysite.com."),
    Type: aws.String("CNAME"),
    ResourceRecords: []*route53.ResourceRecord{
        {
            Value: aws.String("othersite.com"),
        },
    },
    TTL: aws.Int64(600),
    },