在等待启动实例时,我重复运行相同的 EC2 API 调用。
var check_started = function() {
console.log('Calling');
ec2.call("DescribeInstanceStatus", {InstanceId:['pretend_instance_id']}, function(err, status_result){
if (err) {
console.log('error')
console.log(err)
console.log(status_result)
} else {
console.log('success')
}
});
}
var instance_started_checker = setInterval( check_started, 5 * 1000)
第一次调用总是成功,但后续调用失败:
The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.
我该怎么做才能使重复调用起作用?