My AWS Lambda-based Node.js application occasionally generates an error similar to the following when connecting to an Amazon DynamoDB table:

Error { [NetworkingError: write EPROTO

cause:

{ [NetworkingError: write EPROTO]

message: 'write EPROTO',

code: 'NetworkingError',

errno: 'EPROTO',

syscall: 'write',

address: undefined,

region: 'us-east-1',

hostname: 'dynamodb.us-east-1.amazonaws.com',

retryable: true,

time: Mon July 11 2016 06:08:49 GMT+0000 (UTC) }

This error can occur if your Lambda-based Node.js application is using AWS Lambda version 4.3 with Node.js version 4.x.

A Lambda-based Node.js version 4.x application connection to a TLS 1.2 server cannot be stored and subsequently reused when connecting to a TLS 1.0 server. This issue can occur when a Lambda-based Node.js version 4.x application initiates an SSL connection to an endpoint with servers that support either TLS 1.0 or TLS 1.2 connections.

Complete one of the following steps to resolve this issue:

  • Install Node.js 5.6 or later. The latest build of Node.js is available at https://nodejs.org/en/
  • Specify a secureProtocol: parameter of TLSv1_method for the DynamoDB client httpOptions:

var dynamodb = new AWS.DynamoDB({

    httpOptions: {

        agent: new https.Agent({

            secureProtocol: "TLSv1_method",

            ciphers: "ALL"})

}})

EPROTO, DynamoDB, node.js, NetworkingError, Lambda, TLS, endpoint, OpenSSL, httpOptions


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2016-08-03