# StepFunctionsStartExecution

Use an AWS Step function as a target for AWS EventBridge Scheduler.

Extends: ScheduleTargetBase › StepFunctionsStartExecution
Implements: IScheduleTarget

- Source: [`aws-scheduler-targets/lib/stepfunctions-start-execution.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-scheduler-targets/lib/stepfunctions-start-execution.ts#L10)
- Type last changed: v2.186.0 · 27 Mar 2025

## Example

```ts
import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
import * as tasks from 'aws-cdk-lib/aws-stepfunctions-tasks';

const payload = {
  Name: "MyParameter",
  Value: '🌥️',
};

const putParameterStep = new tasks.CallAwsService(this, 'PutParameter', {
  service: 'ssm',
  action: 'putParameter',
  iamResources: ['*'],
  parameters: {
    "Name.$": '$.Name',
    "Value.$": '$.Value',
    Type: 'String',
    Overwrite: true,
  },
});

const stateMachine = new sfn.StateMachine(this, 'StateMachine', {
  definitionBody: sfn.DefinitionBody.fromChainable(putParameterStep)
});

new Schedule(this, 'Schedule', {
  schedule: ScheduleExpression.rate(Duration.hours(1)),
  target: new targets.StepFunctionsStartExecution(stateMachine, {
    input: ScheduleTargetInput.fromObject(payload),
  }),
});
```

## Initializer

```ts
new StepFunctionsStartExecution(stateMachine: IStateMachine, props: ScheduleTargetBaseProps)
```

## Methods

- `bind(schedule: ISchedule): ScheduleTargetConfig` — Create a return a Schedule Target Configuration for the given schedule.

  **Returns:** a Schedule Target Configuration
