Closed bpkapkar closed 3 years ago
Hi Please share the complete error trace, right now it's not clear which line caused error
The code is working fine on the PC but it's not working on the serverless cloud i.e AWS Lambda This is the error that is related to cryptography.hazmat.bindings._openssl' unable to import this code library.
As per the code, we are just trying to import the library
from jugaad_trader import Zerodha
if this works then I can write my code then I can write my logic further
Error from lambda START RequestId: 0ae8436a-b7f0-4e33-b799-34559934c0fa Version: $LATEST Unable to import module 'lambda_function': No module named ['cryptography.hazmat.bindings._openssl)))
the issue got resolved can you close the ticket, it was an error with the package building process
I am trying to deploy the code of jugad trader on AWS lambda but getting multiple error of dependency. As per the instruction of creating the layer I am created python folder and in that pip install jugaad-trader -t . once that is done I have zipped it then uploaded in layer
Code snippet
import json
from kiteconnect import KiteConnect
from jugaad_trader import Zerodha
def lambda_handler(event, context):
TODO implement
Error
Below is the error with cryptography library
Test Event Name test
Response { "errorMessage": "Unable to import module 'lambda_function'" }
Function Logs START RequestId: 0ae8436a-b7f0-4e33-b799-34559934c0fa Version: $LATEST Unable to import module 'lambda_function': No module named 'cryptography.hazmat.bindings._openssl'
END RequestId: 0ae8436a-b7f0-4e33-b799-34559934c0fa REPORT RequestId: 0ae8436a-b7f0-4e33-b799-34559934c0fa Duration: 0.50 ms Billed Duration: 1 ms Memory Size: 128 MB Max Memory Used: 77 MB Init Duration: 993.97 ms
Request ID 0ae8436a-b7f0-4e33-b799-34559934c0fa
Additional context Trying to figure out dependency or steps by step to create or is there any need of modification. Please let me know in case any additional information is required