Subject: | Invalid content was found starting with element 'ResourceRecordSet' |
Date: | Thu, 22 May 2014 16:01:43 +0000 |
To: | bug-WebService-Amazon-Route53 [...] rt.cpan.org |
From: | William Carr <bill [...] bottlenose-wine.com> |
Hi,
Thanks for making WebService::Amazon::Route53. I've been using it for a year but lately have started to receive the following error:
Invalid content was found starting with element 'ResourceRecordSet'
My environment:
$ uname -a
Linux bill 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
WebService::Amazon::Route53 is up to date (0.013).
$ perl -v
This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-gnu-thread-multi
I contacted AWS support and they had the following reply:
Hi,
It was pleasure speaking with you today. The purpose of this message is to summarize our conversation and make sure your needs have been met.
You started getting the following error when attempting to change a Route 53 resource record set using CPAN (Perl) module WebService::Amazon::Route53 which is a Perl interface to Amazon Route 53 API. I looked a little closer at the XML that is being sent to Route 53 in the API request and compared it with the XML examples in our documentation. I found that your <Action> element in the XML that is being sent to Route 53 is after the <ResourceRecordSet> element. However, the correct XML syntax for Route 53 requires that the <Action> element come before the <ResourceRecordSet> element as shown in the request examples in our documentation:
http://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets_Requests.html
This is also why the request failed when I asked you to try placing the <Action> element inside the <ResourceRecordSet> element. Besides the misplaces <Action> element, your XML request seems to be well formed so I recommend you try submitting the request with the XML as follows:
<?xml version="1.0" encoding="UTF-8"?>
<ChangeResourceRecordSetsRequest xmlns="https://route53.amazonaws.com/doc/2011-05-05/">;;
<ChangeBatch>
<Changes>
<Change>
<Action>DELETE</Action>
<ResourceRecordSet>
<Name>evan.baycrestwines.com.</Name>
<Type>A</Type>
<TTL>60</TTL>
<ResourceRecords>
<ResourceRecord>
<Value>192.168.241.128</Value>
</ResourceRecord>
</ResourceRecords>
</ResourceRecordSet>
</Change>
</Changes>
</ChangeBatch>
</ChangeResourceRecordSetsRequest>
I also noticed that you are using the Route 53 API version 2011-05-05 in your requests. This is a fairly old API version and may lack features or compatibility with newer Route 53 features. Due to this, I recommend your use of the current Route 53 API, 2013-04-01, unless you have a specific compatibility requirement that necessitates the use of the older API version. Additionally, I can't confirm whether the above XML will function properly with and older API version, though I believe it should.
Let me know how that goes. If you still have issues, I would like to dive deeper into attempting to reproduce the issue. I look forward to hearing back from you.
Please let me know if I can help you with anything else. Have a great day!
Best regards,
Peter L.
Amazon Web Services
We value your feedback. Please rate my response using the link below.
===================================================
Bill Carr, President at Bottlenose
(413) 584-0400
http://www.bottlenose-wine.com
Download vCard