Closed rusnyder closed 1 year ago
I am seeing this issue today in logs on a newly deployed version of Cloud-AWS/s3-bucket-protection.
Changing the python version only changes the error. INIT_START Runtime Version: python:3.10.v10 Runtime Version ARN:
Runtime.ImportModuleError: Unable to import module 'lambda_function': cannot import name 'DEFAULTCIPHERS' from 'urllib3.util.ssl'
INIT_START Runtime Version: python:3.7.v31 Runtime Version ARN: and 3.8 Runtime.ImportModuleError: Unable to import module 'lambda_function': urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0.2k-fips 26 Jan 2017'.
Hi @jaycruiks-work -
Does this procedure help resolve the issue?
This did work for me thank you!
Describe the bug The
util/create-lambda-layer.sh
script pip installscrowdstrike-falconpy
with no other version restrictions, but since the release ofurllib3 >= 2.0
, this produces a broken layer since the Python 3.8 Lambda environment providesOpenSSL 1.0.2-fips
instead of the minimum requirement from urllib3 ofOpenSSL 1.1.1
.As a result, if you deploy the lambda from any of the AWS integration guides (e.g. - I was working with the Security Hub setup guide), the lambda will raise the same error every time it runs:
To Reproduce To truly reproduce, you just have to run the script, create a lambda from it, and try importing
urllib3
. To reproduce locally (a bit more expedient):Expected behavior The import of
urllib3
should succeed (thus indicating this issue will be fixed when deployed as an actual Lambda)Environment (please complete the following information):
main
branch at commit 5883efcf2eea3243ef0bec4049a1685a87f4f7ccAdditional context As it stands, the guides for setting up some of the AWS Crowdstrike integrations are broken until this is fixed.