aws-events-rule-step-function

All classes are under active development and subject to
non-backward compatible changes or removal in any future version.
These are not subject to the
Semantic Versioning
Language | Package |
---|---|
![]() |
aws_solutions_constructs.aws_events_rule_step_function
|
![]() |
@aws-solutions-constructs/aws-events-rule-step-function
|
![]() |
software.amazon.awsconstructs.services.eventsrulestepfunction
|
This AWS Solutions Construct implements an AWS Events rule and an AWS Step function.
Here is a minimal deployable pattern definition in TypeScript:
import { EventsRuleToStepFunction, EventsRuleToStepFunctionProps } from '@aws-solutions-constructs/aws-events-rule-step-function'; const startState = new stepfunctions.Pass(this, 'StartState'); const props: EventsRuleToStepFunctionProps = { stateMachineProps: { definition: startState }, eventRuleProps: { schedule: events.Schedule.rate(Duration.minutes(5)) } }; new EventsRuleToStepFunction(stack, 'test-events-rule-step-function-stack', props);
Initializer
new EventsRuleToStepFunction(scope: Construct, id: string, props: EventsRuleToStepFunctionProps);
Parameters
-
scope
Construct
-
id
string
Pattern Construct Props
Name | Type | Description |
---|---|---|
stateMachineProps |
sfn.StateMachineProps
|
Optional user provided props to override the default props for sfn.StateMachine |
eventRuleProps |
events.RuleProps
|
User provided eventRuleProps to override the defaults |
createCloudWatchAlarms |
boolean
|
Whether to create recommended CloudWatch alarms. |
logGroupProps? |
logs.LogGroupProps
|
Optional user-provided props to override the default props for the CloudWatch Logs log group. |
Pattern Properties
Name | Type | Description |
---|---|---|
cloudwatchAlarms? |
cloudwatch.Alarm[]
|
Returns a list of one or more CloudWatch alarms created by the pattern. |
eventsRule |
events.Rule
|
Returns an instance of the Events rule created by the pattern. |
stateMachine |
sfn.StateMachine
|
Returns an instance of the state machine created by the pattern. |
stateMachineLogGroup |
logs.LogGroup
|
Returns an instance of the log group created by the pattern for the state machine. |
Default settings
Out-of-the-box implementation of this pattern without any overrides will set the following defaults:
Amazon CloudWatch Events Rule
-
Grant least privilege permissions to CloudWatch Events to trigger the Lambda Function
AWS Step Function
-
Enable CloudWatch logging for API Gateway
-
Deploy best practices CloudWatch Alarms for the Step Function
Architecture

GitHub
To view the code for this pattern, create/view issues and pull requests, and more: | |
---|---|
![]() |
@aws-solutions-constructs/aws-events-rule-step-function |