AWS Route53 – Adding Simple Record


I am able to add "Weighted" A records for the AWS Route53 using the API, using [Weight: aws.Int64(weight)], it works great using the code below. But how to add "Simple" A record – I did not see an option for Simple?

    params := &route53.ChangeResourceRecordSetsInput{
    ChangeBatch: &route53.ChangeBatch{ // Required
        Changes: []*route53.Change{ // Required
            { // Required
                Action: aws.String("UPSERT"), // Required
                ResourceRecordSet: &route53.ResourceRecordSet{ // Required
                    Name: aws.String(name), // Required
                    Type: aws.String("A"),  // Required
                    ResourceRecords: []*route53.ResourceRecord{
                        { // Required
                            Value: aws.String(target), // Required
                    TTL: aws.Int64(TTL),
                    //Region: aws.String("us-east-1"),
                    Weight:        aws.Int64(weight),
                    SetIdentifier: aws.String("-"),
        Comment: aws.String("Sample update."),
    HostedZoneId: aws.String(zoneId), // Required


A ‘Simple’ record is just a phrasing inside the Web Console. Just leave the record without any Weight or Latency flag and it will be a standard DNS record inside Route53.

See the type ResourceRecordSet documentation, required fields are marked. The rest, like Weight are optional!

Pretty much the same as using the CLI (, just port the same fields to the Go struct.

Answered By – f7o

Answer Checked By – Mildred Charles (GoLangFix Admin)

Leave a Reply

Your email address will not be published.