Resources: StateMachineFunction: Type: AWS::Serverless::Function Properties: InlineCode: | exports.handler = async (event) => { console.log("Hello world!") }; Handler: index.handler Runtime: nodejs14.x StateMachine: Type: AWS::Serverless::StateMachine Properties: Type: STANDARD Definition: StartAt: MyLambdaState States: MyLambdaState: Type: Task Resource: !GetAtt StateMachineFunction.Arn End: true Policies: - LambdaInvokePolicy: FunctionName: !Ref StateMachineFunction TriggerFunction: Type: AWS::Serverless::Function Properties: Runtime: nodejs14.x Handler: index.handler InlineCode: | const AWS = require('aws-sdk'); exports.handler = async (event) => { console.log(JSON.stringify(event)); var params = { stateMachineArn: process.env.SFN_ARN, maxResults: "25", }; const stepfunctions = new AWS.StepFunctions(); await stepfunctions.listExecutions(params).promise(); }; Environment: Variables: SFN_ARN: !Ref StateMachine MyConnector: Type: AWS::Serverless::Connector Properties: Source: Id: TriggerFunction Destination: Id: StateMachine Permissions: - Read Metadata: SamTransformTest: true