Skip to content

Deploy a vFunction ​

Once you have a vFunction, you need to deploy the vFunction and then execute it. There are two ways to deploy your vFunction: upload your image, or upload the source code to build the image with codebuild.

Deploy with source code ​

You can upload your source code and we will build an image (.eif file) to be executed on a secure enclave. Your source code should have all the .py files you need and a file named requirements.txt that has the dependencies for your function.

- vFunction
  - file1.py
  - file2.py
  - ...
  - requirements.txt

You then need to make a zip of your directory and upload it using the API.

curl --request POST --data vFunction.zip "api.verfiably.com/upload/zip"

Deploy with an image (eif file) ​

An eif file is an image file that contains the instructions that will be run on the enclave. Think of it as a docker image that instead of running in a container it will run on a secure enclave.

To upload an eif file you can use the verifiably API and send a URL to download the image you generated.

curl --request POST --data {"url":"url_to_your_file"} "api.verfiably.com/upload/file"

API response ​

You will get a response from the API with the Sha256 value for your image, this value will be used to execute the function.

{image_hash:1234567890000000000000000}

Verifiably Documentation