我在同一天在route53中注册了几组域。 Route53自动续订这些域,同时开具多张发票和多张信用卡费用。除了第一个,我们的银行都拒绝。在讨论中,银行将其视为重复交易,AWS不会更改其续订流程的行为。这样会导致重复的发票序列,已取消的发票,重新发行的发票几天。
在Route53更新域之前,我试图一次缓解自己的续签问题,确保每次续签之间有足够的时间,这样收费不会被标记为重复。
我们下一个要更新的域名恰好是.com.au域名。我们处于.com.au域的90天注册窗口内,但是续订请求失败,并带有“ An error occurred (InvalidInput) when calling the RenewDomain operation: The TLD .com.au only allows renewals with duration between 2 and 2 years
”。我们正确地提供了当前的到期年份(失败导致出现不同的错误),并要求续订2年。
在过去的24小时内,控制台在控制台中为相关域添加了(extend)
选项,但请求仍然失败。
1)是否可以在AWS自动更新域之前通过API请求更新?
2)如果是,是否有办法确定AWS是否将处理请求?
我们还没有机会测试.com或任何其他TLD。
示例代码:
domain_name=domain['DomainName']
days_to_expiry=(domain['Expiry']-datetime.datetime.now(dateutil.tz.UTC)).days
logging.info(route53.get_domain_detail(
DomainName=domain_name
))
tld='.'+domain_name.split('.', maxsplit=1)[1]
renew_years = renewal_years(tld) # returns 2 for .com.au
logging.info('Next Domain {} is due for renewal. Expires in {} days. Renewing for {} years.'.format(domain_name, days_to_expiry, renew_years))
route53.renew_domain(
DomainName=domain_name,
DurationInYears=renew_years,
CurrentExpiryYear=domain['Expiry'].year
)
功能日志:
[INFO] {'DomainName': 'example.com.au', 'Nameservers': [{'Name': 'xxx', 'GlueIps': []}, ...], 'AutoRenew': True, 'AdminContact': {'FirstName': 'xxx', ...}, 'RegistrantContact': {...}, 'TechContact': {...}, 'AdminPrivacy': False, 'RegistrantPrivacy': True, 'TechPrivacy': False, 'RegistrarName': 'GANDI SAS', 'WhoIsServer': 'whois.gandi.net', 'RegistrarUrl': 'http://www.gandi.net', 'AbuseContactEmail': 'abuse@support.gandi.net', 'AbuseContactPhone': '+33.170377661', 'CreationDate': datetime.datetime(2016, 12, 21, ..., tzinfo=tzlocal()), 'UpdatedDate': datetime.datetime(2018, 11, 15, ..., tzinfo=tzlocal()), 'ExpirationDate': datetime.datetime(2019, 1, 16, 0, 0, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'xxx', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'xxx', 'content-type': 'application/x-amz-json-1.1', 'content-length': '1708', 'date': 'Wed, 28 Nov 2018 ... GMT'}, 'RetryAttempts': 1}}
[INFO] Next Domain example.com.au is due for renewal. Expires in 48 days. Renewing for 2 years.
响应:
{
"errorMessage": "An error occurred (InvalidInput) when calling the RenewDomain operation: The TLD .com.au only allows renewals with duration between 2 and 2 years",
"errorType": "InvalidInput",
"stackTrace": [
" File \"/var/task/lambda_function.py\", line 49, in lambda_handler\n CurrentExpiryYear=domain['Expiry'].year\n",
" File \"/var/runtime/botocore/client.py\", line 320, in _api_call\n return self._make_api_call(operation_name, kwargs)\n",
" File \"/var/runtime/botocore/client.py\", line 623, in _make_api_call\n raise error_class(parsed_response, operation_name)\n"
]
}