Package: aws-solutions-constructs.aws-eventbridge-stepfunctions
aws-eventbridge-stepfunctions module---Reference Documentation:https://docs.aws.amazon.com/solutions/latest/constructs/LanguagePackagePythonaws_solutions_constructs.aws_eventbridge_stepfunctionsTypescript@aws-solutions-constructs/aws-eventbridge-stepfunctionsJavasoftware.amazon.awsconstructs.services.eventbridgestepfunctionsOverviewThis AWS Solutions Construct implements an AWS Events rule and an AWS Step Functions State MachineHere is a minimal deployable pattern definition:Typescriptimport{Construct}from'constructs';import{Stack,StackProps,Duration}from'aws-cdk-lib';import{EventbridgeToStepfunctions,EventbridgeToStepfunctionsProps}from'@aws-solutions-constructs/aws-eventbridge-stepfunctions';import*asstepfunctionsfrom'aws-cdk-lib/aws-stepfunctions';import*aseventsfrom'aws-cdk-lib/aws-events';conststartState=newstepfunctions.Pass(this,'StartState');constconstructProps:EventbridgeToStepfunctionsProps={stateMachineProps:{definition:startState},eventRuleProps:{schedule:events.Schedule.rate(Duration.minutes(5))}};newEventbridgeToStepfunctions(this,'test-eventbridge-stepfunctions-stack',constructProps);Pythonfromaws_solutions_constructs.aws_eventbridge_stepfunctionsimportEventbridgeToStepfunctions,EventbridgeToStepfunctionsPropsfromaws_cdkimport(aws_stepfunctionsasstepfunctions,aws_eventsasevents,Duration,Stack)fromconstructsimportConstructstartState=stepfunctions.Pass(self,'StartState')EventbridgeToStepfunctions(self,'test-eventbridge-stepfunctions-stack',state_machine_props=stepfunctions.StateMachineProps(definition=startState),event_rule_props=events.RuleProps(schedule=events.Schedule.rate(Duration.minutes(5))))Javaimportsoftware.constructs.Construct;importsoftware.amazon.awscdk.Stack;importsoftware.amazon.awscdk.StackProps;importsoftware.amazon.awscdk.Duration;importsoftware.amazon.awscdk.services.events.*;importsoftware.amazon.awscdk.services.stepfunctions.*;importsoftware.amazon.awsconstructs.services.eventbridgestepfunctions.*;finalPassstartState=newPass(this,"StartState");newEventbridgeToStepfunctions(this,"test-eventbridge-stepfunctions-stack",newEventbridgeToStepfunctionsProps.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 Amazon.com, Inc. or its affiliates. All Rights Reserved.