Skip to content

spikything/aws-terraform-stepfunction-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-terraform-stepfunction-demo

A basic example of an AWS Step Function using Lambdas with Terraform.

aws-terraform-stepfunction-demo

AWS CLI authentication

You will need a user with relevant privileges, its 'access key', 'secret key' and region for the profile. In this example I used London (eu-west-2)

$ aws configure --profile dev-01

Build the project

In root folder, build the project with Maven:

$ mvn clean package install

Initialise Terraform

Update 'terraform/vars.tf' otherwise my defaults will be used. Then, in the terraform/environment/dev-01 folder, initialise Terraform:

$ terraform init

Review/apply changes to AWS

$ terraform apply

To destroy

$ terraform destroy

Simulate an event to execute the Step Function

In the AWS console, look for Step Functions and test its execution using the following JSON:

{
	"event": {
		"Records": [
			{
				"s3": {
					"bucket": {
						"name": "spikything-demo01"
					},
					"object": {
						"key": "test-files/test.json"
					}
				}
			}
		]
	}
}

About

A basic example of an AWS Step Function using Lambdas with Terraform ☁️

Topics

Resources

Stars

Watchers

Forks