-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Hello. I am working on deploying a new lambda layer for the PluginHelper and wanted to deploy just the lambda layers using cdk deploy in the source/shared/infrastructure folder. I am wondering if I am misinterpreting the usage of the ./build-lambda-layer.sh script but found the below issue after using it.
Expected Behavior
Running the ./build-lambda-layer.sh script and copying the MediaReplayEnginePluginHelper zip file created in the lambda_layer_factory folder into source/layers/MediaReplayEnginePluginHelper followed by a cdk deploy in source/shared/infrastructure should result in a working PluginHelper lambda layer pushed to s3 that can be attached to all necessary orchestration plugins / core lambdas.
Actual Behavior
Running the ./build-lambda-layer.sh script and copying the MediaReplayEnginePluginHelper zip file created in the lambda_layer_factory folder into source/layers/MediaReplayEnginePluginHelper followed by a cdk deploy in source/shared/infrastructure pushes a layer to s3 but packages the wrong urllib3 dependency (correctly defined as 'urllib3<2' in setup.py for source/lib/MediaReplaEnginePluginHelper/setup.py) in PluginHelper causing lambda failures.
Steps to Reproduce the Problem
- Run ./build-lambda-layer.sh
- Copy zips into respective
layers/{layer_name}folder - Deploy
source/shared/infrastructureviacdk deploy - Create new lambda layer via console and use s3 uri for PluginHelper zip file
- Run an event through MRE Orchestration
- See errors in "ProbeVideo" lambda stating
{ "errorMessage": "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 [MediaReplayEnginePluginHelper - Good.zip](https://github.com/awslabs/aws-media-replay-engine/files/13032682/MediaReplayEnginePluginHelper.-.Good.zip) 26 Jan 2017'. See: https://github.com/urllib3/urllib3/issues/2168", "errorType": "Runtime.ImportModuleError", "stackTrace": [] }
Attachments:
Two zip files are attached showing the layer built via a full deploy using ./build-and-deploy.sh showing the urllib dependency issue.
MediaReplayEnginePluginHelper - Good.zip
MediaReplayEnginePluginHelper - Bad.zip
Specifications
- Version: 2.7.0
- Deployment platform: Cloud9
- Special notes: I am testing some changes to the core so the "Good" zip will not match what is deployed in 2.7.0