Serverless deploy: Recoverable error occurred (write ECONNRESET), sleeping for ~5 seconds. Try 1 of 4

Viewed 3168

I ve been trying to deploy my GraphQl Apollo Server with nodejs on a Lambda function, on serverless offline it works perfectly, when i try to deploy it it fails with the error: "Recoverable error occurred (write ECONNRESET), sleeping for ~5 seconds. Try 1 of 4" Once the error appears, the console exits the proccess with no other message Once the error appears, the console exits the proccess with no other message

I'm using Typescript and Webpack

What i ve done already:

  1. Verify all dependencies and types
  2. Warnings corrections
  3. Test it with serverless offline plug in and works perfectly on local

yml file:

service: apollo-sever-kisbel

custom:
  webpack:
    webpackConfig: ./webpack.config.js
    includeModules: true


plugins:
  - serverless-webpack
  - serverless-offline

provider:
  name: aws
  runtime: nodejs12.x
  stage: dev


functions:
  graphql:
    handler: lib/index.graphqlHandler
    events:
      - http:
          path: "{proxy+}"
          method: any
          cors: true

Cheers!

3 Answers

If you have network issues with serverless you can export the AWS variable in your CLI to increase the default timeout export AWS_CLIENT_TIMEOUT=360000

Hope this help you in the future ;)

Check if you didn't reach your storage limit on S3.

I had the same issue, I have made some room (deleted old deployments) and tried again and it worked.

It can also be (somewhat related to other answers above) a result of your AWS PROFILE token expiration. So, whatever client software you use to attain those credential, try running that again.

Related