{"version":"1.0","type":"rich","title":"Lambda triggers other lambdas","description":"This example shows how one AWS Lambda function orchestrates two other Lambda functions to compose a departure response. The `get-departure.js` handler receives query parameters for an `id` and `date`, then invokes `get-flight` and `get-forecast` functions concurrently using the AWS SDK’s `Lambda.invoke` API with `InvocationType: \"RequestResponse\"`. It uses Bluebird’s `Promise.all` to await both payloads, parses each JSON response, and returns a combined `departure` object containing the forecast and flight data. The code demonstrates a saga-style pattern for coordinating dependent serverless calls.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-929d8dbd67c5ec8eb8f0c38a70f33ed2?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}