You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This script generates the libsignal_jni.so required to run signal-cli for lambda.
4
+
5
+
It will out put the file libsignal_jni.so in the root (/root/libsignal_jni.so).
6
+
7
+
8
+
## Build libsignal
9
+
Each version of signal-cli requires its own version of libsignal. This needs to be built in the same architecture as the lambda base.
10
+
11
+
1. Setup the correct lambda runtime, libsignal versions inside the Dockerfile
12
+
2. Update the [JRE version](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) for the correct architecture e.g. [x86_64](https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpm), [aarch64/arm64](https://download.oracle.com/java/17/archive/jdk-17.0.5_linux-aarch64_bin.rpm)
13
+
3. Build using docker: `docker build -t libsignal`
14
+
4. Copy the layer.zip to the host `docker cp <instance id>:/root/libsignal_jni.so <output destination>`
Upload the layer zip to S3 and create a lambda layer. Add the following environment variables the lambda function using the layer:
13
+
14
+
| Name | Value | Note |
15
+
| - | - | - |
16
+
| JAVA_HOME | /opt/jre17 | Set JAVA_HOME
17
+
| HOME | /tmp | Set directory for signal cli. Suggest you change this for each invocation of lambda
18
+
| XDG_DATA_HOME | /tmp | Set directory for signal cli. Suggest you change this for each invocation of lambda
19
+
20
+
The cli will be globally available within the lambda layer .eg `signal-cli -a ACCOUNT register`
21
+
22
+
## Build
23
+
24
+
1. Setup the correct lambda runtime, signal cli, libsignal versions inside the Dockerfile
25
+
2. Update the [JRE version](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) for the correct architecture e.g. [x86_64](https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpm), [aarch64/arm64](https://download.oracle.com/java/17/archive/jdk-17.0.5_linux-aarch64_bin.rpm)
26
+
3. Build using docker: `docker build -t signal-cli-lambda-layer`
27
+
4. Copy the layer.zip to the host `docker cp <instance id>:/opt/layer.zip <output destination>`
28
+
29
+
## Build libsignal
30
+
Each version of signal-cli requires its own version of libsignal. This needs to be built in the same architecture as the lambda base.
0 commit comments