-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
I have two lambdas runnignin SAM local, one of them (lambda1) is an api endpoint and it works fine. Now, I add another lambda (lambda2) and I want lambda1 to call it, so I add this code in lambda1:
const lambda = new aws.Lambda({ region: 'us-east-1' });
lambda.invoke({
FunctionName: 'lambda2',
InvocationType: 'Event',
LogType: 'None',
}, (err, data) => {
console.log(err); // ERR HAS AN ERROR
cb(null, { statusCode: 200, body: data });
});
And Lambda2 is this:
module.exports.handler = (event, context, cb) => {
cb(null, true);
};
I get an error in the callback:
{"message":"connect ECONNREFUSED 192.168.65.1:8000","code":"NetworkingError","errno":"ECONNREFUSED","syscall":"connect","address":"192.168.65.1","port":8000,"region":"us-east-1","hostname":"docker.for.mac.localhost","retryable":true,"time":"2017-11-30T18:04:24.985Z"}
Any ideas?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels