Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS Deploy hangs and then times out #32

Open
gokeji opened this issue Jan 25, 2019 · 3 comments
Open

AWS Deploy hangs and then times out #32

gokeji opened this issue Jan 25, 2019 · 3 comments

Comments

@gokeji
Copy link

gokeji commented Jan 25, 2019

When I do npm run deploy, this is what I get in the terminal. The lambda upload function doesn't complete, and later fails with a timeout. Does anyone have any clues as to why this is happening? Thanks!

=> Running npm install --production
=> Zipping deployment package
=> Zipping repo. This might take up to 30 seconds
=> Reading zip file to memory
=> Reading event source file to memory
=> Uploading zip file to AWS Lambda eu-east-1 with parameters:
{ FunctionName: 'cloudwatch-to-slack-2',
  Code: { ZipFile: <Buffer 50 4b 03 04 14 00 08 00 08 00 a4 ab 39 4e 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00 00 2e 44 53 5f 53 74 6f 72 65 ed 57 4d 6c dc 54 10 9e 6f b3 4d ... > },
  Handler: 'index.handler',
  Role: 'arn:aws:iam::xxxxxxxxxxx:role/cloudwatch-to-slack-role',
  Runtime: 'nodejs8.10',
  Description: 'Better Slack notifications for AWS CloudWatch',
  MemorySize: 128,
  Timeout: 60,
  Publish: false,
  VpcConfig: { SubnetIds: [], SecurityGroupIds: [] },
  Environment: { Variables: { UNENCRYPTED_HOOK_URL: 'https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXX } },
  KMSKeyArn: '',
  DeadLetterConfig: { TargetArn: null },
  TracingConfig: { Mode: null } }
{ Error: connect ETIMEDOUT 92.242.140.21:443
    at Object._errnoException (util.js:1041:11)
    at _exceptionWithHostPort (util.js:1064:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1153:14)
  message: 'connect ETIMEDOUT 92.242.140.21:443',
  code: 'NetworkingError',
  errno: 'ETIMEDOUT',
  syscall: 'connect',
  address: '92.242.140.21',
  port: 443,
  region: 'eu-east-1',
  hostname: 'lambda.eu-east-1.amazonaws.com',
  retryable: true,
  time: 2019-01-25T21:31:56.154Z }

@sallesma
Copy link

I am facing the same issue. Does anyone have tips about it?

@CodyReichert
Copy link
Member

CodyReichert commented Apr 23, 2019

Hmm..that's interesting. I haven't hit this, but for anyone seeing the same issue, you might try to play with the timeout setting. Since it's not hitting an error, just a timeout, it could just be that it needs a little longer.

You can't change this directly in the env, but this package uses node-lambda so I believe you can set the AWS_TIMEOUT variable (mentioned here):

$ AWS_TIMEOUT=120 npm run deploy

Alternatively, you could edit the last line in the scripts/deploy.sh file and add the --timeout 120 flag to the very last line (that flag is mentioned here).

I would try that out first. If anyone does it and it seems to work, we can figure out how to add an option to this package for it.

@sallesma
Copy link

I was eager to try your solution this morning, but the deploy worked directly with no timeout...

So problem fixed for me, but without knowing what would have been the fix

Thanks for helping anyways

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants