A lambda layer that allows use of the Signal CLI with lambda.
Lambda Runtime | Architecture | Signal CLI | Libsignal | |
---|---|---|---|---|
Node.js 14.x | x86_64 | 0.11.3 | 0.20.0 | Download |
Upload the layer zip to S3 and create a lambda layer. Add the following environment variables the lambda function using the layer:
Name | Value | Note |
---|---|---|
JAVA_HOME | /opt/jre17 | Set JAVA_HOME |
HOME | /tmp | Set directory for signal cli. Suggest you change this for each invocation of lambda |
XDG_DATA_HOME | /tmp | Set directory for signal cli. Suggest you change this for each invocation of lambda |
The cli will be globally available within the lambda layer .eg signal-cli -a ACCOUNT register
- Setup the correct lambda runtime, signal cli, libsignal versions inside the Dockerfile
- Update the JRE version for the correct architecture e.g. x86_64, aarch64/arm64
- Build using docker:
docker build -t signal-cli-lambda-layer
- Copy the layer.zip to the host
docker cp <instance id>:/opt/layer.zip <output destination>
Each version of signal-cli requires its own version of libsignal. This needs to be built in the same architecture as the lambda base.
Follow instructions in /generate-libsignal