capabilities.work

Update Code and Verify

A 4-step recipe with Amazon Lambda. We can help you get access.

Recipe · 4 steps

Update Code and Verify

Update a function's code, wait for Active, and smoke-test it.

  1. Push the new deployment package to the function. Lambda returns the version-specific configuration with the State that resulted from the update.
  2. Poll the function until the update finishes and the State returns to Active. A Failed state branches to the failure handler.
  3. Invoke the function with a smoke-test payload to confirm the new code executes successfully.
  4. Re-read the configuration when the update left the function in the Failed state so the caller can surface and roll back.
What you'll need to have ready
  • FunctionName: The name of the Lambda function whose code is being updated.
  • ZipFile: Base64-encoded contents of the deployment package zip.
  • S3Bucket: An S3 bucket holding the deployment package (alternative to ZipFile).
  • S3Key: The S3 key of the deployment package object.
  • invocationPayload: The JSON event payload used to smoke-test the updated function.
For your developer

Arazzo workflow amazon-lambda:update-code-and-verify, 4 operations: UpdateFunctionCode → GetFunction → InvokeFunction → GetFunction. Specs on APIs.io.