问题
I'm using the serverless framework and I'm trying to reference a bundled certificate in a lambda function for some API calls. Locally, when setting and pointing NODE_EXTRA_CA_CERTS
to my cert, everything works as it should.
I've configured an environment variable for NODE_EXTRA_CA_CERTS
with my lambda and point it to the bundled cert as follows in my serverless.yml
, but the AWS node environment doesn't pick it up:
provider:
name: aws
region: us-east-2
runtime: nodejs12.x
endpointType: regional
stage: dev
environment:
NODE_EXTRA_CA_CERTS: /var/task/.certs/My-Root-CA.pem
The python way seems to be illustrated here, but i'm not sure how to accomplish the same thing with node... Python AWS Lambda Certificates
来源:https://stackoverflow.com/questions/63903761/aws-lambda-doesnt-recognize-node-extra-ca-certs