amazon-route53aws-java-sdk

AWS Route53- how to set routing policy - using the Java API


When I use the Java API to create a record, the default routing policy seems to be "Latency" . I haven't found an obvious way to set this policy to "Simple", for instance , . like I would be able to do on the AWS web UI .

Java API : https://docs.aws.amazon.com/fr_fr/AWSJavaSDK/latest/javadoc/com/amazonaws/services/route53/AmazonRoute53.html#changeResourceRecordSets-com.amazonaws.services.route53.model.ChangeResourceRecordSetsRequest-

enter image description here


Solution

  • To create a Simple routing policy, you should only set the values in the SDK request that are part of the simple policy parameters. If you set Region, HeathCheck, RecordID or any of the Latency values, that will make the policy be Latency.