This project contains Terraform configurations for setting up AWS Step Functions. The setup includes the definition of a state machine, associated Lambda functions, and necessary configurations.

main.tf: Contains the main configuration for the Terraform infrastructure, defining the AWS EventBridge rule and the Lambda function.variables.tf: Defines input variables for the Terraform configuration, specifying types and default values.outputs.tf: Specifies output values that Terraform will display after applying the configuration, including resource ARNs.provider.tf: Configures the Terraform provider, typically the AWS provider with necessary authentication details.
- Terraform installed on your machine.
- AWS account with appropriate permissions to create resources.
- AWS CLI configured with your credentials.
- Clone the repository:
git clone <repository-url> cd step_functions
1.1 Prepare lambda package:
cd lambda_package
zip -r ../lambda.zip .
cd ..
-
Initialize Terraform:
terraform init -
Review and modify the
variables.tffile as needed to set your desired configurations. -
Plan the deployment:
terraform plan -
Apply the configuration:
terraform apply -
Start State Machine
state_machine_arn="<state machine arn from output of terraform apply>" aws stepfunctions start-execution --state-machine-arn "$state_machine_arn" --input '{"taskId": "12345"}' -
Check logs that show Task ID : 12345 processed successfully
After applying the configuration, Terraform will display the output values defined in outputs.tf, including the ARN of the created resources.
To remove the resources created by this project, run:
terraform destroy
This project is licensed under the MIT License.