2 Answers
- Newest
- Most votes
- Most comments
0
It seems like you've encountered an issue with OpenSSL compatibility when migrating to Node.js 18 runtime in AWS Lambda. Here are some suggestions to address this:
- Check Lambda Execution Environment: Ensure that the Lambda execution environment supports the --openssl-legacy-provider flag. Some Lambda execution environments may have restrictions or limitations on environment variables and command-line options.
- Verify Wrapper Script: Double-check the wrapper script to ensure that it correctly sets the NODE_OPTIONS environment variable before executing the Lambda function. Make sure that the script has the necessary permissions to execute and access resources.
- Consider Alternative Approaches: Instead of using a PFX certificate with https.Agent(), consider other options such as using PEM certificates or integrating with AWS Certificate Manager (ACM) for SSL/TLS support. You can also explore using libraries or modules that provide better compatibility with Node.js 18 runtime and AWS Lambda nvironment.
0
I found my way around this block by updating the cipher on the pfx file following this git issue link. Once this was done Node 18 was able to send it through the HTTP Request without using the flag --openssl-legacy-provider
Commands used to update the cipher:
openssl pkcs12 -in currentFile.p12 -nodes -legacy -out decryptedPfxFile.tmp
openssl pkcs12 -in decryptedPfxFile.tmp -export -out newFile.p12
These commands will ask for the passphrase used on the current file.
answered 6 months ago
Relevant content
- asked 7 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 5 months ago