3

I created a Lambda function on AWS Lambda from an AWS C9 environment. The function runs well from local, but after deploying it, it times out on remote.

This is the error:

Error: 
HTTPSConnectionPool(host='lambda.us-east-2.amazonaws.com', port=443): Read timed out. (read timeout=60)

at convertStderrToError (https://d373lap04ubgnu.cloudfront.net/c9-2108b841e591-ide/build/configs/ide/@aws/cloud9/configs/ide/environment-default.js:9982:33)
at exports.EventEmitter.<anonymous> (https://d373lap04ubgnu.cloudfront.net/c9-2108b841e591-ide/build/configs/ide/@aws/cloud9/configs/ide/environment-default.js:9974:70)
at exports.EventEmitter.EventEmitter.emit (https://d373lap04ubgnu.cloudfront.net/c9-2108b841e591-ide/build/configs/ide/@aws/cloud9/configs/ide/environment-default.js:19:23)
at Consumer.onExit (https://d373lap04ubgnu.cloudfront.net/c9-2108b841e591-ide/build/configs/ide/@aws/cloud9/configs/ide/environment-default.js:48909:80)
at Consumer.<anonymous> (https://d373lap04ubgnu.cloudfront.net/c9-2108b841e591-ide/build/configs/ide/@aws/cloud9/configs/ide/environment-default.js:48698:4)
at Consumer.Agent._onMessage (https://d373lap04ubgnu.cloudfront.net/c9-2108b841e591-ide/build/configs/ide/@aws/cloud9/configs/ide/environment-default.js:48778:4)
at EngineIoTransport.EventEmitter.emit (https://d373lap04ubgnu.cloudfront.net/c9-2108b841e591-ide/build/configs/ide/@aws/cloud9/configs/ide/environment-default.js:48538:16)
at module.exports.onMessage (https://d373lap04ubgnu.cloudfront.net/c9-2108b841e591-ide/build/configs/ide/@aws/cloud9/configs/ide/environment-default.js:48838:6)
at module.exports.EventEmitter.emit (https://d373lap04ubgnu.cloudfront.net/c9-2108b841e591-ide/build/configs/ide/@aws/cloud9/configs/ide/environment-default.js:18:23)
at module.exports.ReliableSocket.onMessage (https://d373lap04ubgnu.cloudfront.net/c9-2108b841e591-ide/build/configs/ide/@aws/cloud9/configs/ide/environment-default.js:49026:76)

I can see that the problem is not in my code, because the function doesn't even get called. Any tips?

Danf
  • 1,409
  • 2
  • 21
  • 39
  • 1
    Is your function launching that exception or is it some other piece of code? – yorodm Sep 26 '18 at 15:09
  • 1
    Is this deployed in a VPC? – jarmod Sep 26 '18 at 15:12
  • Sorry, No, it's not on a VPC. And the function trows the exception (or AWS lambda itself, not sure). My code doesn't even get called. – Danf Sep 26 '18 at 15:19
  • Can you please post what language your code is written and when you say "it times out on remote" what does that mean. Also please do have a look at your cloudwatch logs for the lambda – Rajesh Sep 28 '18 at 15:47
  • It is most likely a permission/network issue. See if this helps - https://stackoverflow.com/questions/49019617/can-aws-lambdas-receive-inbound-tcp-connections – rhn89 Apr 01 '20 at 04:53

0 Answers0