mengjiann / aws-step-functions-sample

Sample Workflow for AWS Step Function (with terraform)

Home Page:https://dev.to/mengjiann/sample-workflow-on-aws-step-function-acb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample Project for AWS Step Functions

This is to demonstrate the usage of several AWS Lambda functions to create a workflow on AWS Step Function. Terraform configuration files are also provided to simplify the process of setting up the required AWS resources.

AWS Lambda Function

  • power-of-number-lambda - To calculate the power of a number.
  • random-number-generator-lambda - To generate a random number between MIN and MAX.

Terraform - Prerequisite

  • To use terraform, go to here to install and learn Terraform by Hashicorp.
    • For homebrew user: brew install terraform
  • AWS user (programmatic access) with AdministratorAccess. Copy the access key ID and secret access key to setup the awscli later.
  • Install awscli from official guide
    • For homebrew user: brew install awscli
  • Using the access key ID and secret access key, follow this guide to step a new profile for your awscli.

Terraform - Guide

  • After git clone, change directory to cd ./terraform/.
  • Then, terraform init to initializes various local settings and data that will be used by subsequent commands.
  • Update the variables in variables.tf for the Step Functions sample.
  • Then, terraform apply to provision the Lambda functions and Step Function state machine for this project.
  • Finally, terraform destroy to remove the Lambda functions and Step Function state machine.

Reference

About

Sample Workflow for AWS Step Function (with terraform)

https://dev.to/mengjiann/sample-workflow-on-aws-step-function-acb


Languages

Language:HCL 95.2%Language:JavaScript 4.8%