lscstu22 lscstu22 - 4 months ago 59
Python Question

aws python sdk boto3 client route53domains get_domain_suggestions ClientError

>>> import boto3
>>> r53d = boto3.client('route53domains', aws_access_key_id='(removed)', aws_secret_access_key='(removed)', region_name='us-east-1')
>>> response = r53d.get_domain_suggestions(DomainName='example', SuggestionCount=5, OnlyAvailable=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/.pyenv/versions/", line 159, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/home/user/.pyenv/versions/", line 494, in _make_api_call
raise ClientError(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidInput) when calling the GetDomainSuggestions operation: Errors: [Give domain name must contain more than 1 label]

A google search of "aws boto route53 Give domain name must contain more than 1 label" or of variations yields nothing, and I can't seem to find the ClientError exceptions documentation... Any help?

EDIT: From what I can tell all of my parameters are OK according to the docs, and
response = r53d.list_domains()
works so I know it's not the


Contrary to what Boto3 documentation says, get_domain_suggestions() expects a valid TLD. Passing should return some results.

>>> for val in r53d.get_domain_suggestions(DomainName='', SuggestionCount=5, OnlyAvailable=True)['SuggestionsList']: print val['DomainName']