Forgive me, but I was not able to find this question addressed in 20 mins of googling so I thought I'd ask. I have bunch of route53 cname and A records that need the name changed on them:
cname record:
aaa.xxx.xxx.xxx.com becomes bbb.xxx.xxx.xxx.com
A record:
internal-alb-aaa.xxx.xxx.xxx.com becomes internal-alb-bbb.xxx.xxx.xxx.com
I believe this needs to be done with the following api call, but it appears to me the Name: field acts as a sort of primary key so it wouldn't be possible to rename it.
Am I using the correct approach or is this possible another way?
svc := route53.New(session.New())
input := &route53.ChangeResourceRecordSetsInput{
ChangeBatch: &route53.ChangeBatch{
Changes: []*route53.Change{
{
Action: aws.String("UPSERT"),
ResourceRecordSet: &route53.ResourceRecordSet{
},
Name: aws.String("example.com"),
Region: aws.String("us-east-2"),
SetIdentifier: aws.String("Ohio region"),
Type: aws.String("A"),
},
},
},
Comment: aws.String("ELB load balancers for example.com"),
},
HostedZoneId: aws.String("Z3M3LMPEXAMPLE"),
}
result, err := svc.ChangeResourceRecordSets(input)