Stack Creation through Step Function Workflow Execution

“ I have to create a stack automatically so I got the way to do it using step function workflow execution. It’s very easy to set up using api parameters and cost will be based on the services as s3 and step function.”

AWS Step Functions is a serverles…


This content originally appeared on DEV Community and was authored by GargeeBhatnagar

“ I have to create a stack automatically so I got the way to do it using step function workflow execution. It's very easy to set up using api parameters and cost will be based on the services as s3 and step function.”

AWS Step Functions is a serverless orchestration service that lets you combine AWS Lambda functions and other AWS services to build business-critical applications. Through Step Functions graphical console, you see your application’s workflow as a series of event-driven steps. Step Functions is based on state machines and tasks. A state machine is a workflow. A task is a state in a workflow that represents a single unit of work that another AWS service performs. Each step in a workflow is a state.

In this post, you will get to know how to do stack creation through step function workflow execution. Here I have created s3 bucket, step function and added required permission in the role of step function.

Prerequisites

You’ll need an Amazon Simple Storage Service for this post. Getting started with Amazon Simple Storage Service provides instructions on how to create a bucket in simple storage service. For this blog, I assume that I have a s3 bucket created.

Architecture Overview

Image description
The architecture diagram shows the overall deployment architecture with data flow, aws step function, iam role, cloudformation and s3.

Solution overview

The blog post consist of the following phases:

  1. Create of AWS Step Function with Design Workflow as Cloudformation Create Stack Parameter
  2. Output as Cloudformation and S3 Bucket Creation

I have a s3 bucket with required template file as below →
Image description
Image description

Phase 1: Create of AWS Step Function with Design Workflow as Cloudformation Create Stack Parameter

  1. Open the AWS Step Function console and create a state machine with default parameters. Create a design workflow as choose of cloudformation create stack for creation of cloudformation and its template service config. Also add the IAM required permission to execute the step function successfully. The api parameter contains cloudformation template url as s3 object url of template stored in s3 and capabilities parameter.

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Phase 2: Output as Cloudformation and S3 Bucket Creation

Image description

Image description

Image description

Image description

Image description

Image description

Clean-up

Delete S3 Bucket, Step Function, Iam Role and Cloudformation Stack.

Pricing

I review the pricing and estimated cost of this example.

Cost of S3 = $0.91

Cost of Step Functions = $0 for first 4,000 state transitions = $0.0

Total Cost = $0.91

Summary

In this post, I showed “stack creation through step function workflow execution”.

For more details on AWS Step Functions, Checkout Get started AWS Step Functions, open the AWS Step Functions console. To learn more, read the AWS Step Functions documentation.

Thanks for reading!

Connect with me: Linkedin
Image description


This content originally appeared on DEV Community and was authored by GargeeBhatnagar


Print Share Comment Cite Upload Translate Updates
APA

GargeeBhatnagar | Sciencx (2023-03-05T12:37:26+00:00) Stack Creation through Step Function Workflow Execution. Retrieved from https://www.scien.cx/2023/03/05/stack-creation-through-step-function-workflow-execution/

MLA
" » Stack Creation through Step Function Workflow Execution." GargeeBhatnagar | Sciencx - Sunday March 5, 2023, https://www.scien.cx/2023/03/05/stack-creation-through-step-function-workflow-execution/
HARVARD
GargeeBhatnagar | Sciencx Sunday March 5, 2023 » Stack Creation through Step Function Workflow Execution., viewed ,<https://www.scien.cx/2023/03/05/stack-creation-through-step-function-workflow-execution/>
VANCOUVER
GargeeBhatnagar | Sciencx - » Stack Creation through Step Function Workflow Execution. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/03/05/stack-creation-through-step-function-workflow-execution/
CHICAGO
" » Stack Creation through Step Function Workflow Execution." GargeeBhatnagar | Sciencx - Accessed . https://www.scien.cx/2023/03/05/stack-creation-through-step-function-workflow-execution/
IEEE
" » Stack Creation through Step Function Workflow Execution." GargeeBhatnagar | Sciencx [Online]. Available: https://www.scien.cx/2023/03/05/stack-creation-through-step-function-workflow-execution/. [Accessed: ]
rf:citation
» Stack Creation through Step Function Workflow Execution | GargeeBhatnagar | Sciencx | https://www.scien.cx/2023/03/05/stack-creation-through-step-function-workflow-execution/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.