Running the FDB client on AWS Lambda

(Sam Pullara) #1

I’m trying to get the FDB client (for Java) to work on AWS Lambda using their new Layers option. Right now I am putting fdb.cluster in the root and in the lib directory. I think it is now finding the library but it is having trouble initializing the FDB class. Has anyone gotten this to work? What else might I need?

Update. Looking more closely it is first failing to load the library. Not sure why it isn’t finding it.

/tmp/fdbjni5638734001205186806.library: cannot open shared object file: No such file or directory: java.lang.UnsatisfiedLinkError
java.lang.UnsatisfiedLinkError: /tmp/fdbjni5638734001205186806.library: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(
at java.lang.ClassLoader.loadLibrary(
at java.lang.Runtime.load0(
at java.lang.System.load(
at com.observeinc.Loader.handleRequest(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(

I’m constructing the layer as:

$ zip -u fdb.cluster lib/
zip warning: not found or empty
adding: fdb.cluster (stored 0%)
adding: lib/ (deflated 62%)

(Sam Pullara) #2

Solved. Due to the way they lay out the layers you need to set LD_LIBRARY_PATH="/opt" and FDB_CLUSTER_FILE="/opt/fdb.cluster".