0
當我運行這個boto3創建一個A記錄,我得到的錯誤:NoSuchHostedZone錯誤,同時創造了一個紀錄
botocore.exceptions.ClientError: An error occurred (NoSuchHostedZone) when calling the ChangeResourceRecordSets operation: No hosted zone found with ID: my_zone
我運行boto3,我知道我創建一個名爲「my_zone」託管區,我可以在AWS控制檯中看到它。
response2 = client.change_resource_record_sets(
HostedZoneId = 'my_zone',
ChangeBatch={
'Comment': 'Points to an instance',
'Changes': [
{
'Action': 'CREATE',
'ResourceRecordSet': {
'Name': 'fookeeper.bla',
'Type': 'A',
'SetIdentifier': 'my_a_record',
'GeoLocation': {}, # US is the default zone.
'TTL': 300,
'ResourceRecords': [
{
'Value': '172.31.11.50'
},
],
}
},
]
}
)
謝謝,我應該更仔細地閱讀變量名稱,它確實表示HostedZoneId。這是一個像X2JUKEEOB9K4RZ –
這樣的生成值。不用擔心。樂意效勞。 – gregwhitaker