route53.change_resource_record_sets produces InvalidInput error with valid input
See original GitHub issueI’m trying update/create a number of DNS records. I’ve limited it to creating one for testing purposes, here is the format of the script I’m using:
#!/usr/bin/env python3
import boto3
import botocore
client = boto3.client('route53')
zone_id = '/hostedzone/ZONEID'
try:
response = client.change_resource_record_sets(
HostedZoneId=zone_id,
ChangeBatch={
'Changes': [
{
'Action': 'UPSERT',
'ResourceRecordSet': {
'Name': 'www.example.com',
'ResourceRecords': [
{
'Value': '10.0.0.1'
}
],
'Type': 'A'
}
}
]
}
)
print(response)
except botocore.exceptions.ClientError as e:
print(e)
I am certain that I’m using the correct HostedZoneId
property (the response is the same whether or not I prefix with /hostedzone or not). I am also certain I am using a fully qualified domain for the Name
property of the ResourceRecordSet
.
I am using Python 3.5.1 and the latest pip3 install of boto3.
The error produced when running the code above as described is An error occurred (InvalidInput) when calling the ChangeResourceRecordSets operation: Invalid request
.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Troubleshoot errors when creating Route 53 resource record ...
An error occurred (InvalidInput) when calling the ChangeResourceRecordSets operation: Invalid XML ; cvc-enumeration-valid: Value 'Delete' is ...
Read more >change-resource-record-sets - Amazon AWS
When you submit a ChangeResourceRecordSets request, Route 53 ... with either CountryCode or SubdivisionCode returns an InvalidInput error.
Read more >Getting InvalidInput error on changeResourceRecordSets
I've found out that the TTL attribute was missing, after adding that it worked just fine, complete example:
Read more >Network.AWS.Route53 - Hackage
If you own the domain name and Amazon Route 53 generates this error, ... prefix take care to ensure the correct input format...
Read more >route53 - Go Packages
func (c *Route53) AssociateVPCWithHostedZone(input ... with either CountryCode or SubdivisionCode // returns an InvalidInput error.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It looks like the missing
TTL
, which is conditionally required based on the docs, is causing the error from Route53’s side. I did something like this to get it working:I think the error message could be improved here though. Unfortunately, there is not much we can do from the boto3 side because the error is coming from route53. I would recommend pinging the developer forums to see if this can get updated.
@merps : Here is my code. Hope this will helps you