arazzo: 1.0.1 info: title: Amazon Lambda Reconfigure Function summary: Change a function's runtime settings, wait for Active, then invoke to verify. description: >- Adjusts the version-specific settings of an existing Lambda function — such as memory, timeout, handler, or description — then polls GetFunction until the configuration update settles back into the Active state before invoking the function to confirm it still runs. 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: amazonLambdaApi url: ../openapi/amazon-lambda-openapi.yml type: openapi workflows: - workflowId: reconfigure-function summary: Update function configuration, wait for Active, and invoke. description: >- Modifies the version-specific settings of a function, polls GetFunction until the State returns to Active, and invokes the function to confirm the new configuration is healthy. inputs: type: object required: - FunctionName properties: FunctionName: type: string description: The name of the Lambda function to reconfigure. Role: type: string description: A new execution role ARN for the function. Handler: type: string description: A new handler for the function. Description: type: string description: A new description for the function. Timeout: type: integer description: A new timeout (in seconds) for the function. MemorySize: type: integer description: A new memory size (in MB) for the function. invocationPayload: type: object description: The JSON event payload used to verify the reconfigured function. steps: - stepId: updateConfiguration description: >- Apply the new version-specific settings to the function. Lambda returns the updated configuration and the resulting State. operationId: UpdateFunctionConfiguration parameters: - name: FunctionName in: path value: $inputs.FunctionName requestBody: contentType: application/json payload: Role: $inputs.Role Handler: $inputs.Handler Description: $inputs.Description Timeout: $inputs.Timeout MemorySize: $inputs.MemorySize successCriteria: - condition: $statusCode == 200 outputs: functionArn: $response.body#/FunctionArn lastModified: $response.body#/LastModified - stepId: waitForActive description: >- Poll the function until the configuration change settles 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 to confirm it still executes under the new configuration. 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 it. operationId: GetFunction parameters: - name: FunctionName in: path value: $inputs.FunctionName successCriteria: - condition: $statusCode == 200 outputs: failedState: $response.body#/State outputs: functionArn: $steps.updateConfiguration.outputs.functionArn invocationResult: $steps.verifyInvoke.outputs.invocationResult failedState: $steps.reportFailure.outputs.failedState