Function lambda_runtime_types::exec[][src]

pub async fn exec<Shared, Event, Run, Return>() -> Result<()> where
    Shared: Default + Send + Sync,
    Event: for<'de> Deserialize<'de> + Debug,
    Run: Runner<Shared, Event, Return>,
    Return: Serialize
Expand description

Lambda entrypoint. This function requires a running tokio runtime. Alternativly use exec_tokio which creates one.

Types:

  • Shared: Type which is shared between lambda invocations. Note that lambda will create multiple environments for simulations invokations and environments are only kept alive for a certain time. It is thus not guaranteed that data can be reused, but with this types its possible.
  • Event: The expected Event which is being send to the lambda by AWS.
  • Run: Runner which is execued for each lambda invocation.
  • Return: Type which is the result of the lamba invocation being returned to AWS