Package: aws-solutions-constructs.aws-events-rule-step-function
aws-events-rule-step-function module---Some of our early constructs don’t meet the naming standards that evolved for the library. We are releasing completely feature compatible versions with corrected names. The underlying implementation code is the same regardless of whether you deploy the construct using the old or new name. We will support both names for all 1.x releases, but in 2.x we will only publish the correctly named constructs. This construct is being replaced by the functionally identical aws-eventbridge-stepfunctions.Reference Documentation:https://docs.aws.amazon.com/solutions/latest/constructs/LanguagePackagePythonaws_solutions_constructs.aws_events_rule_step_functionTypescript@aws-solutions-constructs/aws-events-rule-step-functionJavasoftware.amazon.awsconstructs.services.eventsrulestepfunctionOverviewThis AWS Solutions Construct implements an AWS Events rule and an AWS Step function.Here is a minimal deployable pattern definition:Typescript//aws-events-rule-step-functionhasbeendeprecatedforCDKV2infavorofaws-eventbridge-stepfunctions.//ThissampleusestheCDKV1syntaximport*ascdkfrom'@aws-cdk/core';import*aseventsfrom'@aws-cdk/aws-events';import*asstepfunctionsfrom'@aws-cdk/aws-stepfunctions';import{EventsRuleToStepFunction,EventsRuleToStepFunctionProps}from'@aws-solutions-constructs/aws-events-rule-step-function';conststartState=newstepfunctions.Pass(this,'StartState');constconstructProps:EventsRuleToStepFunctionProps={stateMachineProps:{definition:startState},eventRuleProps:{schedule:events.Schedule.rate(cdk.Duration.minutes(5))}};newEventsRuleToStepFunction(this,'test-events-rules-step-function-stack',constructProps);Python# aws-events-rule-step-function has been deprecated for CDK V2 in favor of aws-eventbridge-stepfunctions.# This sample uses the CDK V1 syntaxfromaws_solutions_constructs.aws_events_rule_step_functionimportEventsRuleToStepFunction,EventsRuleToStepFunctionPropsfromaws_cdkimport(aws_stepfunctionsasstepfunctions,aws_eventsasevents,core)startState=stepfunctions.Pass(self,'StartState')EventsRuleToStepFunction(self,'test',state_machine_props=stepfunctions.StateMachineProps(definition=startState),event_rule_props=events.RuleProps(schedule=events.Schedule.rate(core.Duration.minutes(5))))Java// aws-events-rule-step-function has been deprecated for CDK V2 in favor of aws-eventbridge-stepfunctions.// This sample uses the CDK V1 syntaximportsoftware.constructs.Construct;importsoftware.amazon.awscdk.core.*;importsoftware.amazon.awscdk.services.events.*;importsoftware.amazon.awscdk.services.stepfunctions.*;importsoftware.amazon.awsconstructs.services.eventsrulestepfunction.*;finalPassstartState=newPass(this,"StartState");newEventsRuleToStepFunction(this,"test-eventbridge-stepfunctions-stack",newEventsRuleToStepFunctionProps.Builder().stateMachineProps(newStateMachineProps.Builder().definition(startState).build()).eventRuleProps(newRuleProps.Builder().schedule(Schedule.rate(Duration.minutes(5))).build()).build());Pattern Construct PropsNameTypeDescriptionstateMachinePropssfn.StateMachinePropsOptional user provided props to override the default props for sfn.StateMachineexistingEventBusInterface?events.IEventBusOptional user-provided custom EventBus for construct to use. Providing both this andeventBusPropsresults an error.eventBusProps?events.EventBusPropsOptional user-provided properties to override the default properties when creating a custom EventBus. Setting this value to{}will create a custom EventBus using all default properties. If neither this norexistingEventBusInterfaceis provided the construct will use thedefaultEventBus. Providing both this andexistingEventBusInterfaceresults an error.eventRulePropsevents.RulePropsUser provided eventRuleProps to override the defaultscreateCloudWatchAlarmsbooleanWhether to create recommended CloudWatch alarmslogGroupProps?logs.LogGroupPropsUser provided props to override the default props for for the CloudWatchLogs LogGroup.Pattern PropertiesNameTypeDescriptioneventBus?events.IEventBusReturns the instance of events.IEventBus used by the constructeventsRuleevents.RuleReturns an instance of events.Rule created by the constructstateMachinesfn.StateMachineReturns an instance of sfn.StateMachine created by the constructstateMachineLogGrouplogs.ILogGroupReturns an instance of the ILogGroup created by the construct for StateMachinecloudwatchAlarms?cloudwatch.Alarm[]Returns a list of cloudwatch.Alarm created by the constructDefault settingsOut of the box implementation of the Construct without any override will set the following defaults:Amazon CloudWatch Events RuleGrant least privilege permissions to CloudWatch Events to trigger the Lambda FunctionAWS Step FunctionEnable CloudWatch logging for API GatewayDeploy best practices CloudWatch Alarms for the Step FunctionArchitecture© Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.