Amazon Lambda · Arazzo Workflow

Amazon Lambda Update Code and Verify

Version 1.0.0

Push new function code, wait for the update to settle, then invoke to verify.

1 workflow 1 source API 1 provider
View Spec View on GitHub ComputeEvent-DrivenFunction-as-a-ServiceFunctionsServerlessArazzoWorkflows

Provider

amazon-lambda

Workflows

update-code-and-verify
Update a function's code, wait for Active, and smoke-test it.
Updates the deployment package of an existing function, polls GetFunction until the State returns to Active, and invokes the function to verify the new code responds.
4 steps inputs: FunctionName, S3Bucket, S3Key, ZipFile, invocationPayload outputs: failedState, functionArn, invocationResult
1
updateCode
Push the new deployment package to the function. Lambda returns the version-specific configuration with the State that resulted from the update.
2
waitForActive
Poll the function until the update finishes and the State returns to Active. A Failed state branches to the failure handler.
3
verifyInvoke
Invoke the function with a smoke-test payload to confirm the new code executes successfully.
4
reportFailure
Re-read the configuration when the update left the function in the Failed state so the caller can surface and roll back.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Amazon Lambda Update Code and Verify
  summary: Push new function code, wait for the update to settle, then invoke to verify.
  description: >-
    A safe code-deployment loop for an existing Lambda function. The workflow
    pushes a new deployment package, polls GetFunction until the function returns
    to the Active state after the update, and then invokes the function with a
    smoke-test payload to confirm the new code is healthy. Every step spells out
    its request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: functionsApi
  url: ../openapi/amazon-lambda-functions-api-openapi.yml
  type: openapi
workflows:
- workflowId: update-code-and-verify
  summary: Update a function's code, wait for Active, and smoke-test it.
  description: >-
    Updates the deployment package of an existing function, polls GetFunction
    until the State returns to Active, and invokes the function to verify the
    new code responds.
  inputs:
    type: object
    required:
    - FunctionName
    properties:
      FunctionName:
        type: string
        description: The name of the Lambda function whose code is being updated.
      ZipFile:
        type: string
        description: Base64-encoded contents of the deployment package zip.
      S3Bucket:
        type: string
        description: An S3 bucket holding the deployment package (alternative to ZipFile).
      S3Key:
        type: string
        description: The S3 key of the deployment package object.
      invocationPayload:
        type: object
        description: The JSON event payload used to smoke-test the updated function.
  steps:
  - stepId: updateCode
    description: >-
      Push the new deployment package to the function. Lambda returns the
      version-specific configuration with the State that resulted from the
      update.
    operationId: UpdateFunctionCode
    parameters:
    - name: FunctionName
      in: path
      value: $inputs.FunctionName
    requestBody:
      contentType: application/json
      payload:
        ZipFile: $inputs.ZipFile
        S3Bucket: $inputs.S3Bucket
        S3Key: $inputs.S3Key
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      functionArn: $response.body#/FunctionArn
      lastModified: $response.body#/LastModified
  - stepId: waitForActive
    description: >-
      Poll the function until the update finishes and the State returns to
      Active. A Failed state branches to the failure handler.
    operationId: GetFunction
    parameters:
    - name: FunctionName
      in: path
      value: $inputs.FunctionName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      state: $response.body#/State
    onSuccess:
    - name: functionActive
      type: goto
      stepId: verifyInvoke
      criteria:
      - context: $response.body
        condition: $.State == "Active"
        type: jsonpath
    - name: functionFailed
      type: goto
      stepId: reportFailure
      criteria:
      - context: $response.body
        condition: $.State == "Failed"
        type: jsonpath
    onFailure:
    - name: retryGet
      type: retry
      retryAfter: 5
      retryLimit: 20
      stepId: waitForActive
  - stepId: verifyInvoke
    description: >-
      Invoke the function with a smoke-test payload to confirm the new code
      executes successfully.
    operationId: InvokeFunction
    parameters:
    - name: FunctionName
      in: path
      value: $inputs.FunctionName
    requestBody:
      contentType: application/json
      payload: $inputs.invocationPayload
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      invocationResult: $response.body
    onSuccess:
    - name: done
      type: end
  - stepId: reportFailure
    description: >-
      Re-read the configuration when the update left the function in the Failed
      state so the caller can surface and roll back.
    operationId: GetFunction
    parameters:
    - name: FunctionName
      in: path
      value: $inputs.FunctionName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      failedState: $response.body#/State
  outputs:
    functionArn: $steps.updateCode.outputs.functionArn
    invocationResult: $steps.verifyInvoke.outputs.invocationResult
    failedState: $steps.reportFailure.outputs.failedState

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/amazon-lambda-update-code-and-verify-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.