Add Ingredient Preparation State to Workflow
Learn to integrate the Lambda function with the state machine.
We'll cover the following...
We have all the elements ready, and we can add our integration state to the Step Functions workflow. First, let's open the serverless.yml
file and make some modifications:
import { APIGatewayProxyEvent, APIGatewayProxyResult } from "aws-lambda"; export const hello = async ( event: APIGatewayProxyEvent ): Promise<APIGatewayProxyResult> => { return { statusCode: 200, body: JSON.stringify({ message: "Welcome to the Sweet Factory!", input: event, }), }; };
Project
Rename
helloStateMachine
toproductionLineStateMachine
.Rename
name: MyHelloStateMachine
toname: productionLineStateMachine
. ...