<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Step Functions Archives - caskiSPACE</title>
	<atom:link href="https://www.caskispace.com/tag/step-functions/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.caskispace.com/tag/step-functions/</link>
	<description>Tools, tips and tutes</description>
	<lastBuildDate>Wed, 17 May 2023 04:49:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://www.caskispace.com/wp-content/uploads/2019/12/favicon-64.png</url>
	<title>Step Functions Archives - caskiSPACE</title>
	<link>https://www.caskispace.com/tag/step-functions/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>AWS: Step Functions</title>
		<link>https://www.caskispace.com/aws-step-functions/</link>
					<comments>https://www.caskispace.com/aws-step-functions/#respond</comments>
		
		<dc:creator><![CDATA[saborot]]></dc:creator>
		<pubDate>Wed, 17 May 2023 02:41:35 +0000</pubDate>
				<category><![CDATA[Code Crumbs]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[State Machine]]></category>
		<category><![CDATA[Step Functions]]></category>
		<guid isPermaLink="false">https://www.caskispace.com/?p=12725</guid>

					<description><![CDATA[<p>How to Add Your Step Functions Inside Cloud Formation I recently had to create a series of step functions for a project I am working on. The beauty of using step function is you get to work on it visually; from adding of functions, states, inputs and outputs up to real-time running and debugging. It [&#8230;]</p>
<p>The post <a href="https://www.caskispace.com/aws-step-functions/">AWS: Step Functions</a> appeared first on <a href="https://www.caskispace.com">caskiSPACE</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">How to Add Your Step Functions Inside Cloud Formation</h2>



<p class="wp-block-paragraph">I recently had to create a series of step functions for a project I am working on. The beauty of using step function is you get to work on it visually; from adding of functions, states, inputs and outputs up to real-time running and debugging.</p>



<p class="wp-block-paragraph">It is awesome! However, after the wow factor, one thing that came to mind was &#8220;How am I going to get this inside a repository so it can be versioned?&#8221;. Turns out, I can actually add all of it inside a CloudFormation! Meaning in my application, I can create a YAML file, add it in there and it will generate the State Machine which has all of my step functions inside.</p>



<p class="wp-block-paragraph">First I needed a policy so I can perform Step Function actions from within my application. </p>



<div class="wp-block-group has-white-color has-black-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<pre class="wp-block-code has-white-color has-text-color has-small-font-size"><code>
  Resources:
    MyAppRole:
      Type: AWS::IAM::Role
      Properties:
        AssumeRolePolicyDocument:
          Version: '2012-10-17'
          Statement:
            - Effect: Allow
              Principal:
                Service:
                  - states.amazonaws.com
              Action:
                - sts:AssumeRole
          - PolicyName: StepFunctions
            PolicyDocument:
              Version: '2012-10-17'
              Statement:
              - Effect: Allow
                Action:
                  - states:*
                Resource: '*'
</code></pre>
</div></div>



<p class="wp-block-paragraph">Then I added the following inside my <em>template.yaml</em> file under <em>Resources</em> section:</p>



<div class="wp-block-group has-pale-cyan-blue-background-color has-background has-small-font-size"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<pre class="wp-block-code has-white-color has-black-background-color has-text-color has-background"><code>
  Resources:
    MyStateMachine:
      Type: AWS::StepFunctions::StateMachine
      Properties:
        StateMachineName: MyStateMachineName
        RoleArn: !GetAtt MyAppRole.Arn
        DefinitionString:
          Fn::Sub: |
            {
            ... STEP FUNCTION DEFINITION HERE
            }
</code></pre>
</div></div>
<p>The post <a href="https://www.caskispace.com/aws-step-functions/">AWS: Step Functions</a> appeared first on <a href="https://www.caskispace.com">caskiSPACE</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.caskispace.com/aws-step-functions/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
