2

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

Mark B
  • 183,023
  • 24
  • 297
  • 295
sadaf khan
  • 38
  • 4

1 Answers1

1

Need to create symbolic links without the version no.

refer to this Connecting to Oracle RDS using AWS Lambda using Python