pcorliss / ruby_route_53

Ruby gem and command line tool for Amazon's Route 53 service.
blog.50projects.com
GNU General Public License v3.0
172 stars 32 forks source link

Alias records can't be created due to lack of EvaluateTargetHealth Parameter #35

Closed rsprabery closed 10 years ago

rsprabery commented 10 years ago

I'm using this library to create record sets that point to websites on S3, but I kept getting the following error:

ERROR: Amazon returned an error for the request.
ERROR: RAW_XML: <?xml version="1.0"?>
<ErrorResponse xmlns="https://route53.amazonaws.com/doc/2012-12-12/">
<Error>
<Type>Sender</Type>
<Code>InvalidInput</Code>
<Message>
Invalid XML ; cvc-complex-type.2.4.b: The content of element 'AliasTarget' is not complete. 
One of '{&quot;https://route53.amazonaws.com/doc/2012-12-12/&quot;:EvaluateTargetHealth}' is expected.
</Message>
</Error>
<RequestId>f75ebc93-87df-11e3-a434-47fc69294b29</RequestId>
</ErrorResponse>

I was able to fix this by making changes in route53.rb. I've added an evaluate_target_health parameter to the constructor that defaults to false and gets inserted when specifying a zone_apex.

I'll send a pull request shortly and you can tell me what you think. Maybe I'm just doing something wrong and code changes aren't necessary.

Thanks!

CpuID commented 10 years ago

This also broke deletion of Alias RRSet's as well.

Looks like https://github.com/pcorliss/ruby_route_53/commit/9269685897930c710cef1bcc950a2899914b9e5c fixed both, as I can delete now.

pcorliss commented 10 years ago

Closing as #36 was merged in.