Deploy and Invoke Function
A 4-step recipe with Amazon Lambda. We can help you get access.
Recipe · 4 steps
Deploy and Invoke Function
with Amazon Lambda
Create a function, poll until Active, and invoke it.
- Create the Lambda function from the supplied runtime, role, and handler. The function is typically returned in the Pending state.
- Poll the function until Lambda reports it has finished provisioning. A State of Active continues to invocation; a State of Failed branches to the failure handler.
- Invoke the now-Active function with the supplied event payload and capture the response.
- Re-read the function configuration when it has entered the Failed state so the caller can surface the terminal state.
What you'll need to have ready
- FunctionName: The name of the Lambda function to create (e.g. my-function).
- Runtime: The function's runtime identifier (e.g. python3.12).
- Role: The execution role ARN the function assumes when invoked.
- Handler: The handler Lambda calls to begin execution.
- Description: An optional description for the function.
- Timeout: The number of seconds Lambda allows the function to run.
- MemorySize: The amount of memory (in MB) available to the function.
- invocationPayload: The JSON event payload to send to the function on invocation.
For your developer
Arazzo workflow amazon-lambda:deploy-and-invoke-function, 4 operations: CreateFunction → GetFunction → InvokeFunction → GetFunction. Specs on APIs.io.