aaronshaf/dynamodb-admin

AWS_CA_BUNDLE should be honoured when DYNAMO_ENDPOINT is https

greedy52 opened this issue · 3 comments

The local dynamodb is served in a https setting. The server is not loading CA specified from environment variable AWS_CA_BUNDLE

Error: self signed certificate
    at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
    at TLSSocket.emit (node:events:390:28)
    at TLSSocket.emit (node:domain:475:12)
    at TLSSocket._finishInit (node:_tls_wrap:944:8)
    at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12) {
  code: 'NetworkingError',
  region: 'ca-central-1',
  hostname: '127.0.0.1',
  retryable: true,
  time: 2022-01-28T20:47:06.531Z
}

workaround using NODE_EXTRA_CA_CERTS=, but personally I still think the app should recognize AWS_CA_BUNDLE properly.

rchl commented

I don't know much about how AWS_CA_BUNDLE works and you haven't provided any steps to reproduce the issue but I can imagine that AWS_CA_BUNDLE is just read by the aws-sdk when set. So it should work without any extra changes.

Unless you maybe meant when using the dynamodb-admin through its docker container? But that would obviously not work by default since docker container has no access to the path that you provide.

@rchl thanks for looking into this. Seems sdk does not support this anyway. Will close and use the workaround.

aws/aws-sdk-js#2970