我有这个简单的描述,我试图通过AWS LAMBDA在对的NodeJS运行的实例函数:AWS拉姆达描述情况下超时
var AWS = require('aws-sdk');
AWS.config.region = 'us-east-1';
exports.handler = function(event, context) {
console.log("\n\nLoading handler\n\n");
var ec2 = new AWS.EC2();
ec2.describeInstances(function(err, data) {
console.log("\nIn describe instances:\n");
if (err) {
console.log(err, err.stack);
context.done(null, 'Function Finished from error!'); // an error occurred
}else {
console.log("\n\n" + data + "\n\n");
context.done(null, 'Function Finished with data!'); // successful response
}
});
};
这不还给我任何错误,在CloudWatch的唯一输出是这样的:
2016-03-21T17:01:59.085Z xxxxxxx-xx.... Task timed out after 3.00 seconds
任何人都有任何想法可能是什么问题?
您是否为Lambda函数启用了VPC访问? –
@MarkB是我选择了VPC,子网和安全组 – Tomas
如果增加超时时间,它仍然超时? –