A Task state does the work named in its Resource field. Here it calls the Data Checking function. The Parameters field builds the function input from the state input: a key ending in .$ takes its value from a JSONPath, so "name.$": "$.application.name" passes the applicant name.
cd ~/workshop-dir
REGION=$(grep region samconfig.toml | awk -F\= '{gsub(/"/, "", $2); gsub(/ /, "", $2); print $2}')
STACK_NAME=$(grep stack_name samconfig.toml | awk -F\= '{gsub(/"/, "", $2); gsub(/ /, "", $2); print $2}')
aws cloudformation describe-stacks --region $REGION --stack-name $STACK_NAME --query 'Stacks[0].Outputs[?OutputKey==`DataCheckingFunctionArn`].OutputValue' --output text

Open Process_New_Account_Applications and choose Edit (1).

In Code, replace the definition with the JSON below.
Resource still holds a placeholder.{
"StartAt": "Check Name",
"States": {
"Check Name": {
"Type": "Task",
"Parameters": {
"command": "CHECK_NAME",
"data": {
"name.$": "$.application.name"
}
},
"Resource": "REPLACE_WITH_DATA_CHECKING_LAMBDA_ARN",
"Next": "Check Address"
},
"Check Address": {
"Type": "Task",
"Parameters": {
"command": "CHECK_ADDRESS",
"data": {
"address.$": "$.application.address"
}
},
"Resource": "REPLACE_WITH_DATA_CHECKING_LAMBDA_ARN",
"Next": "Approve Application"
},
"Approve Application": {
"Type": "Pass",
"End": true
}
}
}

Replace both REPLACE_WITH_DATA_CHECKING_LAMBDA_ARN with the ARN from step 1 (1)(2). The states become Lambda: Invoke (3).

Choose Save (1). The role is not changed: the console does not add permissions to a role you chose yourself. Then choose Execute (2).

Use the same input as before (1) and choose Start execution (2).

This time the execution Failed (1).

Expand Cause (1). The role FCJ-SFN-Console-Role is not allowed to perform lambda:InvokeFunction on the Data Checking function.

When a state machine runs, it assumes its IAM role, and every call it makes is checked against that role. The role has no permission to invoke the function yet. You fix this in the next step.