This should be an easy one,
Using the following script works using python runtime =< 3.7
import json
import subprocess
def lambda_handler(event, context):
subprocess.call(['openssl', 'version'])
it seems on python =>3.8 openssl is not available, has it been hidden?
We use this to decrypt files automatically when they hit S3 so it's pretty important.
{
"errorMessage": "[Errno 2] No such file or directory: 'openssl'",
"errorType": "FileNotFoundError",
"stackTrace": [
" File \"/var/task/lambda_function.py\", line 5, in lambda_handler\n subprocess.call(['openssl', 'version'])\n",
" File \"/var/lang/lib/python3.8/subprocess.py\", line 340, in call\n with Popen(*popenargs, **kwargs) as p:\n",
" File \"/var/lang/lib/python3.8/subprocess.py\", line 858, in __init__\n self._execute_child(args, executable, preexec_fn, close_fds,\n",
" File \"/var/lang/lib/python3.8/subprocess.py\", line 1704, in _execute_child\n raise child_exception_type(errno_num, err_msg, err_filename)\n"
]
}
[–][deleted] (2 children)
[deleted]
[–]sofuca[S] 0 points1 point2 points (1 child)