title: AWS CLI - route53 change-resource-record-sets command failing if A record but passes if CNAME
body: <p>I am trying to add DNS records on existing hosted zone. I was trying the below command with ResourceRecordSet type as A record and also CNAME record. The command which is trying to create A record fails but the same command when changed to CNAME works</p>
  <p>Failing Command</p>
  <pre><code>aws route53 change-resource-record-sets --hosted-zone-id XXXXXXXXXXXXX --change-batch {&quot;Changes&quot;: [{&quot;Action&quot;: &quot;CREATE&quot;,&quot;ResourceRecordSet&quot;: {&quot;Name&quot;: &quot;api-test-1.envio.systems&quot;,&quot;Type&quot;: &quot;A&quot;,&quot;TTL&quot;: 30,&quot;ResourceRecords&quot;: [{&quot;Value&quot;: &quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-14xxxxxxxxxxxxx26.elb.eu-central-1.amazonaws.com&quot;}]}}]}
  </code></pre>
  <p>Error:</p>
  <blockquote>
  <p>An error occurred (InvalidChangeBatch) when calling the ChangeResourceRecordSets operation: [Invalid Resource Record: FATAL problem: ARRDATAIllegalIPv4Address (Value is not a valid IPv4 address) encountered with 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-14xxxxxxxxxxxxx26.elb.eu-central-1.amazonaws.com.']</p>
  </blockquote>
  <p>Below command works and only thing that is changed is ResourceRecordSet Type from A to CNAME</p>
  <pre><code>aws route53 change-resource-record-sets --hosted-zone-id XXXXXXXXXXXXX --change-batch {&quot;Changes&quot;: [{&quot;Action&quot;: &quot;CREATE&quot;,&quot;ResourceRecordSet&quot;: {&quot;Name&quot;: &quot;api-test-st-1.envio.systems&quot;,&quot;Type&quot;: &quot;CNAME&quot;,&quot;TTL&quot;: 30,&quot;ResourceRecords&quot;: [{&quot;Value&quot;: &quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-14xxxxxxxxxxxxx26.elb.eu-central-1.amazonaws.com&quot;}]}}]}
  </code></pre>
  <p>What is the problem and why CNAME works with the same command but not A record?</p>