get-departure-step-fn
✓ Published0🌍 Public
Aandresmijares
Last edited Apr 3, 2018
Created on Apr 3, 2018
This example shows an AWS Lambda function that triggers a Step Functions state machine to fetch departure data for a given ID and date. It lists all state machines, filters for one named `GetDepartureMachine`, and starts an execution with the query parameters as JSON input. The code uses the AWS SDK for JavaScript (`aws-sdk`) with `AWS.StepFunctions`, `co` for generator-based control flow, and `Promise` from Bluebird. It returns the execution ARN in an HTTP response, logging “finish” before invoking the callback.
AI-generated description