Open panos4tw opened 8 months ago
Can you share your full code? Is there a lambda_function.lambda_handler method somewhere here?
Code looks like this, it's the default AWS Lambda Python boilerplate. I ended up making a layer of my own to make this work:
Sorry to hear that, will look into this later this week.
Hi there! Just ran into the same issue - anything I can do to help debug?
I also run into the same issue. Add the following layer to a lambda function, python runtime version 3.11; architecture x86_64 arn:aws:lambda:us-east-1:770693421928:layer:Klayers-p311-aws-psycopg2:1
Will return error: Response { "errorMessage": "Unable to import module 'lambda_function': No module named 'psycopg2._psycopg'", "errorType": "Runtime.ImportModuleError", "requestId": "a7956df2-4a44-40c0-a2ea-0ae0e7ca33b7", "stackTrace": [] }
Describe the bug I import the module as "import psycopg2" and then I tried to use it as "psycopg2.connect(conn_string)" with no success
Screenshots
Layer Version ARN: arn:aws:lambda:eu-central-1:770693421928:layer:Klayers-p311-aws-psycopg2:1
Framework: Console
Additional context