AssemblyLift
HomeRepo
v0.3
v0.3
  • Welcome to AssemblyLift
  • Learn AssemblyLift
    • Getting Started
    • Services
      • Functions
      • Authorizers
      • IOmod Dependencies
    • Functions
      • Rust Functions
    • IO Modules
      • Registry
    • User Terraform
    • Providers
    • How to Build
    • How to Deploy
  • Development
    • Design Pillars
  • Resources
    • The Lexicon
    • Tutorial: Build a "todo list" backend with AssemblyLift
Powered by GitBook
On this page
  • Overview
  • Make a New Function

Was this helpful?

  1. Learn AssemblyLift

Functions

An overview of Functions

PreviousIOmod DependenciesNextRust Functions

Last updated 3 years ago

Was this helpful?

Functions are units of execution in the AssemblyLift framework. They are grouped into services, and are themselves structured according to the chosen language (e.g with Rust each function is a Cargo crate).

Each function is compiled to a WebAssembly module, compatible with the AssemblyLift ABI.

Overview

An AssemblyLift Function is an executable containing a handler, which is the entrypoint of the Function (similar to a main method in a regular application). A Function usually receives some input which is passed to the handler as an argument; the shape of this input will depend on the Function. The Function should return by indicating either success or an error to the runtime, though the Function is not required to return any specific data.

Functions which are invoked by an HTTP API for example, will receive input data in the shape of an (assuming you are using the default AWS provider).

The input payload received by a Function must be represented as .

Make a New Function

You can create a new function in an existing service with the make command:

$ asml make function myservice.myfunction

where myservice is the name of the service in which you would like to make the function named myfunction.

API Gateway Event
JSON