3

I have a basic requirement of connecting an on premise Oracle database to Redshift.

I need to use AWS Lambda to connect to both the databases using python. While I achieved connection to Redshift by exporting Linux libraries of psycopg2, I am facing issues with the Oracle database.

Below are the steps followed to try to connect to Oracle on premise DB :

  1. Installed cx_Oracle which came up with cx_Oracle.cpython-36m-x86_64-linux-gnu.so and psycopg2-2.7.4.dist-info
  2. Installed basic oracle client lite 64 bit for linux
  3. Set LD_LIBRARY_PATH to point to the lib files of the instant client package

When we zip our python file with the dependencies of cx_Oracle and Instant client, AWS Lambda fails with below error :

"DPI-1047: 64-bit Oracle Client library cannot be loaded: \"libclntsh.so: cannot open shared object file: No such file or directory\"

BMW
  • 42,880
  • 12
  • 99
  • 116
user9428518
  • 31
  • 1
  • 2

1 Answers1

0

From within your lib folder, do:

ln -s libclntsh.so.12.1 libclntsh.so

(or similar, depending what versions you're using).

Paul
  • 578
  • 1
  • 8
  • 23