我正在使用Route 53 Node API来创建和配置托管区域。创建区域工作正常,但是当我尝试使用changeResourceRecordSets函数添加A记录时,我收到一条错误,上面写着“InvalidInput:Invalid request”,但没有说明它的无效内容。这是我的请求params对象:
var zoneConfig = {
ChangeBatch: {
Changes: [{
Action: 'CREATE',
ResourceRecordSet: {
Name: 'my.domain.com',
Type: 'A',
Region: 'us-east-1',
TTL: 300,
ResourceRecords: [{
Value: '111.222.111.000'
}]
}
}],
Comment: 'direct hosted zone A record to point to the server'
},
HostedZoneId: 'ZZH1GLJKE22DK'
};
rt53.changeResourceRecordSets( zoneConfig, function(...
任何想法可能会在请求中出错?
答案 0 :(得分:0)
Finally figured it out. The problem was the Region
field in the ResourceRecordSet
. I missed it in the documentation, but that is only to be used for latency-based resource record sets. So, deleting that line fixed the issue
Really wish the API error message could have just said that.