在 changeResourceRecordSets 上出现 InvalidInput 错误

Getting InvalidInput error on changeResourceRecordSets

我正在尝试为托管区域创建记录集:

var params = {
    ChangeBatch: {
        Changes: [
            {
                Action: 'UPSERT',
                ResourceRecordSet: {
                    Name: 'google5.com', //Domain name
                    Type: 'A',
                    ResourceRecords: [{
                        'Value': '52.255.255.255' //Instance Public IP
                    }]
                }
            }
        ]
    },
    HostedZoneId: '/hostedzone/Z0.....' //Hosted Zone ID
}
route53.changeResourceRecordSets(params, function(err, data) {
    console.log(err);
});

我一直收到错误消息:InvalidInput: Invalid request

我发现缺少 TTL 属性,添加后它工作得很好,完整示例:

var params = {
    ChangeBatch: {
        Changes: [
            {
                Action: 'UPSERT',
                ResourceRecordSet: {
                    Name: 'google5.com', //Domain name
                    Type: 'A',
                    TTL: 86400, //Critical!
                    ResourceRecords: [{
                        'Value': '52.255.255.255' //Instance Public IP
                    }]
                }
            }
        ]
    },
    HostedZoneId: '/hostedzone/Z0.....' //Hosted Zone ID
}
route53.changeResourceRecordSets(params, function(err, data) {
    console.log(err);
});