I am writing an AWS Lambda using the Node https package and my request to login to an API keeps timing out. The Lambda setup is fine:
-- once I have copied the ca-bundle.crt file into /etc/pki/tls/certs/ I can use curl to login to the external API from an instance within the same subnet the lambda is launched, retrieve my login token and proceed without issue.
-- If I request different url using https that doesn't require a login everything works fine.
My guess is that I need to replicate what I am doing with curl, but using the Node https package. Unfortunately the Node docs specify using pem files.
Should I be copying the ca-bundle.crt from within the Lambda instance, and if so, what option do I need to add to my https request to use this file?