I am trying to connect to oracle db by using lambda. I have installed all the dependency in lib and made a zip container
Dir structure: `
root/
lib/(client lib)
index.py
cx_oracle.so*
`
import cx_Oracle
def handler(event, context):
message = ""
cursor = None
connection = None
connection = cx_Oracle.connect("USERNAME", "PASSWORD", "DOMAIN/orcl")
cursor = connection.cursor()
cursor.execute("""QUERY""")
message += " {Error in connection} " + str(e)
if cursor:
cursor.close()
if connection:
connection.close()
return {'message' : message}
Error are:
libaio.so and libclntsh.so library not found