From 1fcc3934ad665cbeb21f8755b7073c61fce0fe78 Mon Sep 17 00:00:00 2001 From: kakakakakku Date: Mon, 20 Apr 2026 22:00:12 +0900 Subject: [PATCH 1/2] eventbridge-sfn-terraform: Update AWS Provider to v6 --- eventbridge-sfn-terraform/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eventbridge-sfn-terraform/main.tf b/eventbridge-sfn-terraform/main.tf index de6dd54f81..ba737a76a9 100644 --- a/eventbridge-sfn-terraform/main.tf +++ b/eventbridge-sfn-terraform/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = "~> 3.27" + version = "~> 6.0" } } @@ -185,4 +185,4 @@ output "CW-Logs-Stream-Name" { output "StepFunction-Name" { value = aws_sfn_state_machine.sfn_state_machine.name description = "The Step Function Name" -} \ No newline at end of file +} From 3733b5081a6e98fa7beea89f62523efe6132e2af Mon Sep 17 00:00:00 2001 From: kakakakakku Date: Mon, 20 Apr 2026 22:11:53 +0900 Subject: [PATCH 2/2] eventbridge-sfn-terraform: Fix Step Function to Step Functions --- eventbridge-sfn-terraform/README.md | 14 +++++++------- eventbridge-sfn-terraform/main.tf | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/eventbridge-sfn-terraform/README.md b/eventbridge-sfn-terraform/README.md index 5b92ede36a..80e32fe059 100644 --- a/eventbridge-sfn-terraform/README.md +++ b/eventbridge-sfn-terraform/README.md @@ -1,8 +1,8 @@ -# EventBridge to Step Function +# EventBridge to Step Functions -This pattern demonstrates executing a Step Function using an EventBridge rule. +This pattern demonstrates executing a Step Functions using an EventBridge rule. -In this example, the EventBridge rule specified in `main.tf` filters the events based upon the criteria in the `aws_cloudwatch_event_rule` block. When matching events are sent to EventBridge that trigger the rule, they are delivered as a JSON event payload (see "Example event payload from EventBridge to SQS" in the README) to the Step Function as an Input. +In this example, the EventBridge rule specified in `main.tf` filters the events based upon the criteria in the `aws_cloudwatch_event_rule` block. When matching events are sent to EventBridge that trigger the rule, they are delivered as a JSON event payload (see "Example event payload from EventBridge to SQS" in the README) to the Step Functions as an Input. Learn more about this pattern at Serverless Land Patterns: https://serverlessland.com/patterns/eventbridge-sfn @@ -39,7 +39,7 @@ Important: this application uses various AWS services and there are costs associ ## How it works -The template creates a shell Step Function, with a CloudWatch log group for log reporting of all events, that triggers based upon the criteria in the `aws_cloudwatch_event_rule` block and branches based on the value. +The template creates a shell Step Functions, with a CloudWatch log group for log reporting of all events, that triggers based upon the criteria in the `aws_cloudwatch_event_rule` block and branches based on the value. ## Testing @@ -51,16 +51,16 @@ The template creates a shell Step Function, with a CloudWatch log group for log ```bash aws events put-events --entries file://event-B.json ``` -1. Send an event for Path C to EventBridge, which should cause the Step Function to fail: +1. Send an event for Path C to EventBridge, which should cause the Step Functions to fail: ```bash aws events put-events --entries file://event-Fail.json ``` -Go to the Step Function created by this template to view the new execution that ran. +Go to the Step Functions created by this template to view the new execution that ran. ![](./images/stepfunctions_graph.png) -You can also go to the CloudWatch Logs stream in the Log Group displayed in the output of the terraform deployment to check the results of the three events that triggered the Step Function. +You can also go to the CloudWatch Logs stream in the Log Group displayed in the output of the terraform deployment to check the results of the three events that triggered the Step Functions. ## Cleanup 1. Change directory to the pattern directory: diff --git a/eventbridge-sfn-terraform/main.tf b/eventbridge-sfn-terraform/main.tf index ba737a76a9..12279b0c8d 100644 --- a/eventbridge-sfn-terraform/main.tf +++ b/eventbridge-sfn-terraform/main.tf @@ -52,7 +52,7 @@ resource "aws_iam_role" "StateMachineRole" { POLICY2 } -# Create an IAM policy for Eventbridge to be able to start a Step Function execution +# Create an IAM policy for Eventbridge to be able to start a Step Functions execution resource "aws_iam_policy" "EventBridgePolicy" { policy = <