Mam ten prosty opisać instancji funkcji, który próbuję uruchomić w nodejs poprzez AWS lambda:Aws lambda opisać czas instancji z
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
}
});
};
nie zwraca mi żadnych błędów jedyne wyjście to jest w CloudWatch :
2016-03-21T17:01:59.085Z xxxxxxx-xx.... Task timed out after 3.00 seconds
Ktoś ma pojęcie, jaki może być problem?
Czy włączyłeś dostęp VPC do swojej funkcji Lambda? –
@ Mark B Tak, wybrałem VPC, podsieci i grupy bezpieczeństwa – Tomas
Jeśli zwiększysz czas oczekiwania, to nadal nie działa? –