<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jones Zachariah Noel</title>
    <description>The latest articles on DEV Community by Jones Zachariah Noel (@zachjonesnoel).</description>
    <link>https://dev.to/zachjonesnoel</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F615180%2Ffc1ebf14-25d7-4f09-ae53-807a0a859f9d.png</url>
      <title>DEV Community: Jones Zachariah Noel</title>
      <link>https://dev.to/zachjonesnoel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zachjonesnoel"/>
    <language>en</language>
    <item>
      <title>The Jitter Strategy for Step Functions Error Retries on the New Workflow Studio</title>
      <dc:creator>Jones Zachariah Noel</dc:creator>
      <pubDate>Fri, 06 Oct 2023 17:06:28 +0000</pubDate>
      <link>https://dev.to/aws-heroes/the-jitter-strategy-for-step-functions-error-retries-on-the-new-workflow-studio-195b</link>
      <guid>https://dev.to/aws-heroes/the-jitter-strategy-for-step-functions-error-retries-on-the-new-workflow-studio-195b</guid>
      <description>&lt;p&gt;AWS Step Function just announced a &lt;a href="https://aws.amazon.com/about-aws/whats-new/2023/09/aws-step-functions-enhanced-error-handling/"&gt;new enhanced error handling and retry mechanism&lt;/a&gt; in State Machine executions that enables more fine-grain control of error retry rules. And also uses the &lt;a href="https://aws.amazon.com/blogs/compute/enhancing-workflow-studio-with-new-features-for-streamlined-authoring"&gt;enchanced Workflow Studio authoring experience&lt;/a&gt; to build the workflow.&lt;/p&gt;

&lt;p&gt;Read more about &lt;a href="https://blog.theserverlessterminal.com/handling-errors-with-stepfunctions-sns-sdk-integration"&gt;how error handling works on Step Functions&lt;/a&gt; but in this blog, we will focus more on the new parameters in error handling with catch and retries on Step Functions such as &lt;code&gt;MaxDelaySeconds&lt;/code&gt; and &lt;code&gt;JitterStrategy&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Errors in Step Functions
&lt;/h2&gt;

&lt;p&gt;During the execution of a State Machine, there are possibilities of execution would be interrupted by various errors such as &lt;code&gt;States.Timeout&lt;/code&gt; when the task execution has taken more than &lt;code&gt;TimeoutSeconds&lt;/code&gt; defined as when it failed to get a heartbeat longer than &lt;code&gt;HeartbeatSeconds&lt;/code&gt; defined.&lt;/p&gt;

&lt;p&gt;Some of the possible errors are listed below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BH2Gyw2t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694626388997/c6e99ff7-01c7-46cc-bd77-fb7d3590070f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BH2Gyw2t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694626388997/c6e99ff7-01c7-46cc-bd77-fb7d3590070f.png" alt="Errors on Step Functions" width="516" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;States.All&lt;/code&gt; wildcard is available on Step Functions to work with all the errors encountered during the execution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploying a State Machine
&lt;/h2&gt;

&lt;p&gt;Navigate to AWS Step Functions &lt;em&gt;Create state machine&lt;/em&gt; and then select the &lt;em&gt;Orchestrate Lambda Functions&lt;/em&gt; template with the new console experience.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--boH1jtUk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694710086638/3666c21a-59c6-4516-9e8c-5714bc17a414.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--boH1jtUk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694710086638/3666c21a-59c6-4516-9e8c-5714bc17a414.png" alt="Choosing a template to create State Machine on Workflow Studio" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the template is selected, Workflow Studio will give you more details of the template.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7FpDHY4z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694710186979/5df8cc84-c725-4cfc-bf2e-55509aed6b13.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7FpDHY4z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694710186979/5df8cc84-c725-4cfc-bf2e-55509aed6b13.png" alt="Choosing Orchestrate Lambda Function template and preview of the template before deploying to your AWS Account" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;Orchestrate Lambda Functions&lt;/em&gt; template showcases the stock buy/sell recommendation based on the stock price. Choose &lt;em&gt;Run a demo&lt;/em&gt; option to deploy the state machine and other resources such as Lambda Functions with SNS and SQS to your AWS Account.&lt;/p&gt;

&lt;p&gt;To test out the state machine, you could run a sample execution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GLGy8ZeE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694710569774/3aa57dfb-400f-4360-81b7-5f6754587e16.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GLGy8ZeE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694710569774/3aa57dfb-400f-4360-81b7-5f6754587e16.png" alt="A sample execution of the workflow which was successful." width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Updating the State Machine with error retries
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Enabling retry
&lt;/h3&gt;

&lt;p&gt;Let's update the &lt;em&gt;Check Stock Price&lt;/em&gt; state which invokes a Lambda function with an error retry with a few retry options&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Retry&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ErrorEquals&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;States.ALL&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
          &lt;span class="p"&gt;],&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;BackoffRate&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;IntervalSeconds&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;MaxAttempts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Comment&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Check Stock Price Lambda error&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;MaxDelaySeconds&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this error retry snippet, the wildcard &lt;code&gt;States.ALL&lt;/code&gt; error listens to all the errors in this state to perform a retry. This retry has a few other options -&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;IntervalSeconds&lt;/code&gt; is an integer that specifies the number of seconds before the first retry.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;BackoffRate&lt;/code&gt; which is a property that would multiply the &lt;code&gt;IntervalSeconds&lt;/code&gt; property to determine the next retry would occur.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;MaxAttempts&lt;/code&gt; defines the maximum number of retries possible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;MaxDelaySeconds&lt;/code&gt; defines the maximum time in seconds that the retry interval can increase.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When the state machine is executed with an error retry in the first state,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nCFo0bp6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694713246550/49571c9e-b97b-4b71-9dcf-f67a26197f76.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nCFo0bp6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694713246550/49571c9e-b97b-4b71-9dcf-f67a26197f76.png" alt="Error retry for Check Stock Price state" width="800" height="324"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Retry&lt;/th&gt;
&lt;th&gt;Retry attempt second&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1st retry&lt;/td&gt;
&lt;td&gt;1s (&lt;code&gt;IntervalSeconds&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2nd retry&lt;/td&gt;
&lt;td&gt;3s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3rd retry&lt;/td&gt;
&lt;td&gt;6s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Enabling retry with JitterStrategy
&lt;/h3&gt;

&lt;p&gt;In the second &lt;em&gt;Generate Buy/Sell recommendation&lt;/em&gt; state, enabling retry for all &lt;code&gt;States.ALL&lt;/code&gt; wildcard with the below retry options -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Retry&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ErrorEquals&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;States.ALL&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
          &lt;span class="p"&gt;],&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;JitterStrategy&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;FULL&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Comment&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Buy/Sell recommendation error&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;MaxAttempts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Along with the previously enabled options, the additional property set is - &lt;code&gt;JitterStrategy&lt;/code&gt; as &lt;code&gt;FULL&lt;/code&gt;. When &lt;code&gt;JitterStrategy&lt;/code&gt; is enabled with the value &lt;code&gt;FULL&lt;/code&gt;, it randomizes delay intervals so that the retry mechanism doesn't retry excessively, this is very powerful especially when Lambda is invoked concurrently.&lt;/p&gt;

&lt;p&gt;When the error occurs in the &lt;em&gt;Generate&lt;/em&gt; &lt;em&gt;Buy/Sell recommendation&lt;/em&gt; state,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4lXdSGV6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694713962178/6407e7cb-ad75-4d58-9e5f-69165c6c4b9e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4lXdSGV6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694713962178/6407e7cb-ad75-4d58-9e5f-69165c6c4b9e.png" alt="Error retry for Generate Buy/Sell recommendation state with JitterStrategy" width="800" height="324"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Retry&lt;/th&gt;
&lt;th&gt;Retry attempt started after&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1st retry&lt;/td&gt;
&lt;td&gt;00:00:01.298&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2nd retry&lt;/td&gt;
&lt;td&gt;00:00:01.479&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3rd retry&lt;/td&gt;
&lt;td&gt;00:00:01.752&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4th retry&lt;/td&gt;
&lt;td&gt;00:00:02.986&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5th retry&lt;/td&gt;
&lt;td&gt;00:00:04.213&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Notice the retry attempts are between 1s and 5s (&lt;code&gt;MaxAttempts&lt;/code&gt;) which are random when compared to the previous case without &lt;code&gt;JitterStrategy&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Enabling Fail flow
&lt;/h3&gt;

&lt;p&gt;Whenever failing the state machine, it throws an &lt;code&gt;error&lt;/code&gt; and the &lt;code&gt;cause&lt;/code&gt; that can customize the error states. But for this flow, enabling a custom error message defined in the state machine for the choice state.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Fail&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Fail&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Error&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Stock prediction failed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Cause&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Unable to proceed as stock prediction to buy or sell stock failed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gp-xKW8J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694714651241/218d57d2-c823-427f-86ff-c44e040f069f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gp-xKW8J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694714651241/218d57d2-c823-427f-86ff-c44e040f069f.png" alt="Fail flow with error message and cause defined for the choice state" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When the choice state goes through a default state, the state machine fails execution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--295X5_8D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694714766637/6a9d7e21-43a9-4906-97f2-00674b5adb04.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--295X5_8D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694714766637/6a9d7e21-43a9-4906-97f2-00674b5adb04.png" alt="" width="800" height="324"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When the error occurs, the &lt;code&gt;fail&lt;/code&gt; flow captures the error as &lt;em&gt;Stock prediction failed&lt;/em&gt; with the cause &lt;em&gt;Unable to proceed as stock prediction to buy or sell stock failed&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep a watch on retries
&lt;/h2&gt;

&lt;p&gt;When working with state machines that have multiple states with retries defined in all or many of them, the retry mechanism would retry until &lt;code&gt;MaxAttempts&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Q: It's good to retry multiple times
&lt;/h4&gt;

&lt;p&gt;Well, not if the computing brains or the state would reproduce the same error. However, definitely good when retrying would result in success.&lt;/p&gt;

&lt;h4&gt;
  
  
  Q: Multiple retries shouldn't cause interruptions in my state machine execution
&lt;/h4&gt;

&lt;p&gt;If the retries result in a success, it won't interrupt the state machine execution. But if the same error occurs, better to &lt;code&gt;fail&lt;/code&gt; the execution with passing events to EventBridge or DLQ.&lt;/p&gt;

&lt;h4&gt;
  
  
  Q: Would this be expensive?
&lt;/h4&gt;

&lt;p&gt;In a &lt;em&gt;Standard workflow&lt;/em&gt;, state machine execution is priced based on every state transition and when retry is configured there would be a state transition for each retry attempt this would be expensive.&lt;/p&gt;

&lt;p&gt;Also, the retry attempt is invoking another AWS resource, that execution would also be billed. In this workflow, the Lambda function was invoked multiple times which also accounts for the total workflow cost.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--svBuT-yM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694715301741/aa4bc989-5b15-41b1-983e-141a42fbe5b0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--svBuT-yM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1694715301741/aa4bc989-5b15-41b1-983e-141a42fbe5b0.png" alt="" width="800" height="259"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Wrap up!
&lt;/h3&gt;

&lt;p&gt;The retry mechanism would help when working with resource-based errors such as &lt;code&gt;Lambda.ServiceException&lt;/code&gt; or any other AWS Service error based on the task. With &lt;code&gt;JitterStrategy&lt;/code&gt; enabled, addresses the concurrent retries.&lt;/p&gt;

&lt;p&gt;Note, this example was to showcase the features with error retry and fail flow.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
      <category>stepfunctions</category>
      <category>errors</category>
    </item>
    <item>
      <title>Buses and queues: Head-on</title>
      <dc:creator>Jones Zachariah Noel</dc:creator>
      <pubDate>Thu, 05 Oct 2023 17:53:12 +0000</pubDate>
      <link>https://dev.to/awscommunity-asean/buses-and-queues-head-on-1g9f</link>
      <guid>https://dev.to/awscommunity-asean/buses-and-queues-head-on-1g9f</guid>
      <description>&lt;h2&gt;
  
  
  Choosing between Amazon EventBridge Buses and Amazon SQS queues
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/eventbridge/"&gt;Amazon EventBridge&lt;/a&gt; is a serverless managed service for event-driven applications to build loosely coupled applications and route events smartly across different services.&lt;br&gt;&lt;br&gt;
You can read more about how &lt;a href="https://blog.theserverlessterminal.com/amazon-eventbridge-the-missing-piece-to-your-app"&gt;Amazon EventBridge is the missing piece to your app&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Also, if you are wondering about &lt;a href="https://aws.amazon.com/sqs/"&gt;Amazon SQS&lt;/a&gt;, learn about &lt;a href="https://blog.theserverlessterminal.com/getting-started-with-sns-and-sqs"&gt;getting started with SQS and SNS&lt;/a&gt; and &lt;a href="https://blog.theserverlessterminal.com/standard-vs-fifo-sns-and-sqs"&gt;understand Standard and FIFO queues (in SQS) and topics (in SNS)&lt;/a&gt; with the understanding of &lt;a href="https://blog.theserverlessterminal.com/when-to-sns-or-sqs"&gt;when to use SQS and SNS&lt;/a&gt; in your Serverless architectures.&lt;/p&gt;

&lt;p&gt;In this blog, we will look into Amazon EventBridge buses and Amazon SQS queues and how and where they fit right into your Serverless architectures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Catch the bus!
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--T4QFu9RY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1688051996038/d156b0f4-50d9-416c-9858-438630d55d2b.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--T4QFu9RY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1688051996038/d156b0f4-50d9-416c-9858-438630d55d2b.gif" alt="Take a bus meme" width="498" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Building event-driven architectures
&lt;/h3&gt;

&lt;p&gt;When building EDA applications, Amazon EventBridge is best suited, as EventBridge provides you with different capabilities for service-to-service integrations across various sources in the Serverless space. Also ensuring the architecture is loosely coupled.&lt;/p&gt;

&lt;h3&gt;
  
  
  Event routing and filtering
&lt;/h3&gt;

&lt;p&gt;EventBridge is known for its smart routing feature with event rules and also the support of filtering based on different filters and filter patterns. When building for service-to-service integrations, the routing helps with designated events routed to destined destinations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Integrations
&lt;/h3&gt;

&lt;p&gt;EventBridge supports different service integrations such as AWS Lambda, AWS Step Functions, SQS, SNS, and many more. While these are natively supported service integrations, EventBridge also supports SaaS Partner integrations and third-party HTTP end-points with API destinations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get in the queue!
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uNPG7BRD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1688053575975/63ed572b-367a-4da7-aac6-3c591eacf23a.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uNPG7BRD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1688053575975/63ed572b-367a-4da7-aac6-3c591eacf23a.gif" alt="In a queue" width="498" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Building message queues
&lt;/h3&gt;

&lt;p&gt;When building applications, you may have to build messaging queues that need reliable and ordered delivery. SQS ensures this with FIFO queues and also enables load balancing with horizontal scaling.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fan out patterns
&lt;/h3&gt;

&lt;p&gt;Messages which have to be distributed across multiple consumers would efficiently process each message by each consumer. Fan-out patterns are best suited with Amazon SQS as it enables a balancing queue for the consumer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Time-bound delivery
&lt;/h3&gt;

&lt;p&gt;Amazon SQS has capabilities where messages could be configured to deliver the message to the consumer using the &lt;code&gt;DelaySeconds&lt;/code&gt; parameter. Also, the messages can hold a time-to-live (TTL) attribute beyond which the message is removed from the queue. SQS supports visibility timeouts where the message is invisible and can be reversed for consumption later.&lt;/p&gt;

&lt;h2&gt;
  
  
  EventBridge v/s Queue
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Amazon EventBridge&lt;/th&gt;
&lt;th&gt;Amazon SQS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Complex processing&lt;/td&gt;
&lt;td&gt;✅ EventBridge supports transformation and filtering which makes it easy to process complex events.&lt;/td&gt;
&lt;td&gt;🚫 SQS can have targets as Lambda to process but cannot process them on its own.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multiple destinations&lt;/td&gt;
&lt;td&gt;✅ EventBridge supports multiple AWS services as the destination and also API destinations for external HTTP endpoints&lt;/td&gt;
&lt;td&gt;🚫 Would need a Lambda function or EventBridge pipe to consume the message and programmatically route it to the destination.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scheduled messages/events&lt;/td&gt;
&lt;td&gt;✅ EventBridge scheduler helps to build event scheduling with CRON patterns.&lt;/td&gt;
&lt;td&gt;🚫 SQS cannot trigger or push messages at scheduled times.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ordering&lt;/td&gt;
&lt;td&gt;🚫 EventBridge doesn't ensure strict ordering.&lt;/td&gt;
&lt;td&gt;✅ FIFO queues could be used to ensure FIFO ordering.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delay messages&lt;/td&gt;
&lt;td&gt;🚫 EventBridge immediately delivers the event as it occurs.&lt;/td&gt;
&lt;td&gt;✅ SQS supports delays in messages with &lt;code&gt;DelaySeconds&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Message retention&lt;/td&gt;
&lt;td&gt;✅ Only when archival is enabled, messages are retained for future use.&lt;/td&gt;
&lt;td&gt;✅ SQS Supports TTL and DLQs for handling failed messages.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Throughput&lt;/td&gt;
&lt;td&gt;10,000,000 events per second in a bus.&lt;/td&gt;
&lt;td&gt;10,000 messages per second in a queue.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Payload limits&lt;/td&gt;
&lt;td&gt;256 KB max supported.&lt;/td&gt;
&lt;td&gt;256 KB max supported.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Co-existence of EventBridge and SQS
&lt;/h2&gt;

&lt;p&gt;While individually EventBridge and SQS can add a lot of value to the Serverless architecture, the combination of the two in certain patterns is possible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Messaging queues with event-driven patterns&lt;/strong&gt; where both SQS and EventBridge can be used in combination. EventBridge in this pattern would broadcast events to multiple subscribers and SQS would be enforcing correct message ordering.&lt;/p&gt;

&lt;p&gt;Messages in SQS could be consumed by EventBridge pipes for better event enrichment and transformation of events to the needed destination without having Lambda functions to be performing a transformational workload on messages.&lt;/p&gt;

&lt;p&gt;Ultimately, it is about what the workload is and how each of the services - EventBridge or SQS either individually or in combination can elevate your Serverless architecture.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
      <category>eventbridge</category>
      <category>sqs</category>
    </item>
    <item>
      <title>Maintaining Lambda Function Performance During Peak Traffic</title>
      <dc:creator>Jones Zachariah Noel</dc:creator>
      <pubDate>Wed, 04 Oct 2023 16:46:22 +0000</pubDate>
      <link>https://dev.to/aws-heroes/maintaining-lambda-function-performance-during-peak-traffic-28ga</link>
      <guid>https://dev.to/aws-heroes/maintaining-lambda-function-performance-during-peak-traffic-28ga</guid>
      <description>&lt;p&gt;&lt;a href="https://aws.amazon.com/lambda/" rel="noopener noreferrer"&gt;AWS Lambda functions&lt;/a&gt; are the popular computing option for modern applications, specifically if you use Serverless or event-driven architectures on AWS. And these Lambda functions are invoked billions of times in a production environment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1685097843995%2F6759b6f9-ada9-47c6-9695-63ef7f5c9bdd.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1685097843995%2F6759b6f9-ada9-47c6-9695-63ef7f5c9bdd.jpeg" alt="A heavy traffic Serverless cloud, AI generated by Adobe Firefly"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;AI-generated image by&lt;/em&gt; &lt;a href="https://firefly.adobe.com/" rel="noopener noreferrer"&gt;&lt;em&gt;Adobe Firefly&lt;/em&gt;&lt;/a&gt; &lt;em&gt;- "Heavy traffic in Serverless cloud"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In this blog, we will understand what are the different sources for Lambda triggers and also understand the factors to ensure performance during peak traffic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lambda trigger sources
&lt;/h2&gt;

&lt;p&gt;AWS Lambda function is well-knit with different sources triggering them either on demand or event-based. Understanding the source of Lambda function triggers would help in addressing performance during high traffic.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1684932877703%2F08fec44e-1c90-43b5-9f30-3d4ce99cb3e5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1684932877703%2F08fec44e-1c90-43b5-9f30-3d4ce99cb3e5.png" alt="Add trigger to Lambda function via AWS Console"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Invoked via HTTP API
&lt;/h3&gt;

&lt;p&gt;Lambda functions would be the core compute of the backend systems which are served over API endpoints generated from &lt;a href="https://aws.amazon.com/api-gateway/" rel="noopener noreferrer"&gt;Amazon API Gateway&lt;/a&gt; or &lt;a href="https://aws.amazon.com/appsync/" rel="noopener noreferrer"&gt;AWS AppSync&lt;/a&gt; or Lambda Function URLs. These are often triggered by applications programmatically either from a front-end application or backend systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS Services invoking Lambda
&lt;/h3&gt;

&lt;p&gt;In event-driven architectures, another AWS Service usually triggers the Lambda function whenever certain events occur.&lt;/p&gt;

&lt;p&gt;A typical scenario would be, whenever there is a new object uploaded into a S3 bucket, a Lambda function could be triggered with the details of the event payload so that Lambda can further process it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance with heavy traffic
&lt;/h2&gt;

&lt;p&gt;When using Lambda functions, being mindful of what it offers and how best it fits into your solutions is essential.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1685120400554%2F804ef2ee-9fc4-49fd-9e36-f1ad85cae926.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1685120400554%2F804ef2ee-9fc4-49fd-9e36-f1ad85cae926.jpeg" alt="Busy day in a traffic cop life managing traffic, AI generated by Adobe Firefly"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;AI-generated image by&lt;/em&gt; &lt;a href="https://firefly.adobe.com/" rel="noopener noreferrer"&gt;&lt;em&gt;Adobe Firefly&lt;/em&gt;&lt;/a&gt; &lt;em&gt;- "busy day in a traffic cop life managing traffic".&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Load balancers
&lt;/h3&gt;

&lt;p&gt;Load balancers, even from the traditional systems are that piece of architecture that enable smooth traffic distribution. In a serverless system also, load balances help with distributing traffic and also ensuring there isn't a burst of invocations of Lambda functions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Enable caching
&lt;/h3&gt;

&lt;p&gt;For frequently accessed data, enabling caching in your architecture at different levels would improve performance which on a high-traffic day pays off!&lt;/p&gt;

&lt;p&gt;Allen and me (Jones) authored a blog with Momento about &lt;a href="https://www.gomomento.com/blog/improve-app-performance-by-caching-at-every-layer" rel="noopener noreferrer"&gt;how caching at every layer improves app performance&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Provision and reserved concurrency
&lt;/h3&gt;

&lt;p&gt;With Lambda's provision and reserved concurrency, you can allocate the resources which would be needed when you anticipate a high traffic flow. This ensures the architecture would be able to perform better on a peak traffic day.&lt;/p&gt;

&lt;h3&gt;
  
  
  Weighted routing
&lt;/h3&gt;

&lt;p&gt;Each lambda function is assigned weights and the weighted routing would use these weights as the measure to distribute traffic amongst different Lambda functions and in the case of Lambda aliases, it helps with distributing traffic amongst different versions of the Lambda function.&lt;/p&gt;

&lt;h3&gt;
  
  
  Triggers with batch
&lt;/h3&gt;

&lt;p&gt;When defining the event triggers for Lambda functions, different services like DynamoDB, SQS, and other messaging services support batch triggers where the service would collectively trigger the Lambda function once as per the &lt;code&gt;BatchSize&lt;/code&gt; defined.&lt;/p&gt;

&lt;h2&gt;
  
  
  Options for Serverless Architecture
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Application Load Balancers (ALBs)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;ALBs support targets as Lambda functions which help in distributing traffic with weights, geographical and round robin way.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Provides endpoints available over the public internet which helps in building APIs that can be backed with ALBs and Lambda functions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ALBs are complex to configure when compared with other options available.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;With the management and configurations, this is not truly a serverless way!&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Amazon API Gateway
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Available by design to configure API Gateway integration with Lambda functions. And also seamless to work with API Gateway when compared with ALBs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;API Gateway enables the usage of API key based usage quotas and throttling controls.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Supports multiple authentication and authorization options.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Supports payload validation with models where in a peak traffic scenario, API Gateway will ensure the validated payloads are invoking the Lambda function thus eliminating junk requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Supports WAF and CloudFront-based endpoints which has added security for DDoS attacks.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Lambda aliases
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Traffic distribution at the Lambda level when using it with different AWS Services as triggers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Configuration involves creating multiple versions of the same Lambda function and assigning an alias to one or max two versions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Supports weighted routing to each alias in a Lambda function.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Not the best fit for Lambda functions which need to be invoked via the public internet as it lacks authentication and throttling.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrap up!
&lt;/h2&gt;

&lt;p&gt;Lambda functions have proven scalability and perform well even during peak traffic. Keeping in mind different aspects of Lambda functions or other AWS Services that enrich your traffic management is the key when architecting solutions that are prone to high traffic.&lt;/p&gt;

&lt;p&gt;With the different options of ALBs, API Gateway, or even Lambda aliases, each of them has an upside and downside depending on the use case and how they are placed in the serverless architecture.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
      <category>lambda</category>
      <category>performance</category>
    </item>
    <item>
      <title>Re-think and Re-architect Your Application</title>
      <dc:creator>Jones Zachariah Noel</dc:creator>
      <pubDate>Tue, 03 Oct 2023 17:43:41 +0000</pubDate>
      <link>https://dev.to/awscommunity-asean/re-think-and-re-architect-your-application-26k6</link>
      <guid>https://dev.to/awscommunity-asean/re-think-and-re-architect-your-application-26k6</guid>
      <description>&lt;p&gt;Recently, Amazon Prime Video revealed about moving their architecture from serverless to monolithic container-based architecture. Read more about &lt;a href="https://www.primevideotech.com/video-streaming/scaling-up-the-prime-video-audio-video-monitoring-service-and-reducing-costs-by-90"&gt;Scaling up the Prime Video audio/video monitoring service and reducing costs by 90%&lt;/a&gt; by the Amazon Prime Video tech team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Initial architecture of Prime Video
&lt;/h2&gt;

&lt;p&gt;Few pointers from the tech blog about the initial architecture,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Distributed and microservices approach in their initial architecture.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A serverless architecture primarily built on AWS Lambda functions and AWS Step Functions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Designed with the intent of Serverless being cost-effective and scalable because it was on-demand scaling up or scaling down of Lambda functions which resulted in keeping cost intact.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---i-fzNS6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.primevideotech.com/dims4/default/bf61eca/2147483647/strip/true/crop/1011x803%2B0%2B0/resize/1011x803%21/quality/90/%3Furl%3Dhttps%253A%252F%252Famazon-k1-prod-entertainment.s3.amazonaws.com%252Fbrightspot%252Fb2%252Fd2%252Fdde535c6478d9c4b8c9891c4d93b%252F98191782.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---i-fzNS6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.primevideotech.com/dims4/default/bf61eca/2147483647/strip/true/crop/1011x803%2B0%2B0/resize/1011x803%21/quality/90/%3Furl%3Dhttps%253A%252F%252Famazon-k1-prod-entertainment.s3.amazonaws.com%252Fbrightspot%252Fb2%252Fd2%252Fdde535c6478d9c4b8c9891c4d93b%252F98191782.png" alt="Initial architecture of Prime Video defect detection system with Serverless" width="800" height="635"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Image courtesy: Prime Video blog post -&lt;/em&gt; &lt;a href="https://www.primevideotech.com/video-streaming/scaling-up-the-prime-video-audio-video-monitoring-service-and-reducing-costs-by-90"&gt;&lt;em&gt;https://www.primevideotech.com/video-streaming/scaling-up-the-prime-video-audio-video-monitoring-service-and-reducing-costs-by-90&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Reasons why Serverless was a challenge
&lt;/h2&gt;

&lt;p&gt;Prime Video is one of the popular OTT platforms, and the assumption here is that they would have peak traffic and the workload in this traffic times is what the architecture to hard test in terms of -&lt;/p&gt;

&lt;h3&gt;
  
  
  Scalability
&lt;/h3&gt;

&lt;p&gt;Yes, Serverless applications can scale well. But the main concern of scalability came in with orchestrating the Serverless workload with AWS Step Functions.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The main scaling bottleneck in the architecture was the orchestration management that was implemented using AWS Step Functions. Our service performed multiple state transitions for every second of the stream, so we quickly reached account limits.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As quoted in the blog post. Often when building Serverless applications when they hit a peak moment, there are challenges -&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Managing the distributed architecture because you have too many microservices doing various dedicated tasks even though it's a State Machine defined.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS Step Functions bring in limits in payload passed across states, the number of state machine executions where there should be workarounds in place to ensure the system doesn't breach the limits.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cost-effectiveness
&lt;/h3&gt;

&lt;p&gt;Serverless applications are cost-effective because they run on demand and when certain events/requests are made.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Besides that, AWS Step Functions charges users per state transition.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;AWS Step Functions have a per-state transition pricing model, for instance, in &lt;code&gt;us-east-1&lt;/code&gt; region that has $0.025 per 1000 state transitions, Prime Video would have a large number of state transitions happening as this state machine itself is used to detect if any defect is there in the video frames.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The second cost problem we discovered was about the way we were passing video frames (images) around different components. To reduce computationally expensive video conversion jobs, we built a microservice that splits videos into frames and temporarily uploads images to an &lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html"&gt;Amazon Simple Storage Service (Amazon S3)&lt;/a&gt; bucket. Defect detectors (where each of them also runs as a separate microservice) then download images and processed it concurrently using AWS Lambda. However, the high number of Tier-1 calls to the S3 bucket was expensive.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The microservice which is used to split videos in frames uploads images to an S3 bucket and these images are processed to detect defects where there would be 1000s of frames in a single video which itself would have S3 bucket costs high with respect to storage, data transfer and the cost of high-performance Lambda functions which run in parallel.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reaction to the challenges
&lt;/h2&gt;

&lt;p&gt;The reasons mentioned are very valid and the Prime Video team has taken some steps to address this -&lt;/p&gt;

&lt;h3&gt;
  
  
  Re-think
&lt;/h3&gt;

&lt;p&gt;It is important when you have scalability and cost-related concerns with your architectures that you start to take a step back and think - "&lt;em&gt;what could have been the possible best solution?"&lt;/em&gt; or "&lt;em&gt;what kind of components suit this use-case".&lt;/em&gt; Sometimes, it begins with the basic question of "why do we need XYZ service" when the challenges stand out.&lt;/p&gt;

&lt;p&gt;The first approach to adapting Serverless is good but when the architecture is not meeting the need in this use-case, the approach taken to &lt;em&gt;re-think&lt;/em&gt; says how flexible we have to be in our architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  Re-architect
&lt;/h3&gt;

&lt;p&gt;When we &lt;em&gt;re-think&lt;/em&gt;, it is obvious that we get more clarity with what is the use case and what architectural approach and components would be the &lt;em&gt;best fit&lt;/em&gt;. Once we identify the &lt;em&gt;best fit architectural approach or components&lt;/em&gt;, re-architecting the complete workload would be the way to go.&lt;/p&gt;

&lt;p&gt;In Prime Video's case, there was a shift from Serverless to a monolith because the system would always be processing images, and data transfer between different Services would make it an expensive workload but with the new architecture, the ECS task performs the orchestration of detecting deflects using the video buffer directly from Media Converter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resonating my thoughts
&lt;/h2&gt;

&lt;p&gt;When the internet broke out with Prime Video moving away from Serverless, me being a Serverless advocate was shocked "&lt;em&gt;why&lt;/em&gt;"!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.twitter.com/theslsterminal/status/1654787999484506114"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bGGPuhhT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://pbs.twimg.com/media/Fvb86n3acAAj3Ln%3Fformat%3Djpg%26name%3Dmedium" alt="Image" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But reading and understanding the blog post, appreciate the architectural shift even when it means that Serverless architecture is revamped into a monolith.&lt;/p&gt;

&lt;h3&gt;
  
  
  Serverless first, Serverless not always
&lt;/h3&gt;

&lt;p&gt;It's good to approach with the Serverless mindset and building with Serverless but if that doesn't work for your workload then "&lt;em&gt;revert! revert! revert&lt;/em&gt;!". Sometimes, Serverless may never be the right approach, and investing in that would mean that it would turn out to be expensive in the longer run.&lt;/p&gt;

&lt;h3&gt;
  
  
  One size doesn't fit all
&lt;/h3&gt;

&lt;p&gt;We assume that if any approach works for someone out there, it would work for me as well. As it's repeatedly mentioned, "&lt;em&gt;Serverless scales and is cost-effective&lt;/em&gt;" it is true but also we need to understand if the Serverless approach or any other approach in general would be the best fit for the use case.&lt;/p&gt;

&lt;h3&gt;
  
  
  Iterative building
&lt;/h3&gt;

&lt;p&gt;Oftentimes, the use-case evolves or the usage evolves which translates to the architecture should be adaptive and get there it's always with different iterations. Take software development as the instance where we go through different revisions and iterations to get to production and if we see the architecture of the software being developed, that too would have gone through revisions. These revisions are where the learning happens, to identify if the architecture is well-architected or not.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>architecture</category>
      <category>serverless</category>
      <category>monolith</category>
    </item>
    <item>
      <title>Workarounds for AppSync Subscriptions triggers via Lambda functions</title>
      <dc:creator>Jones Zachariah Noel</dc:creator>
      <pubDate>Mon, 02 Oct 2023 16:56:13 +0000</pubDate>
      <link>https://dev.to/aws-heroes/workarounds-for-appsync-subscriptions-triggers-via-lambda-functions-1fjl</link>
      <guid>https://dev.to/aws-heroes/workarounds-for-appsync-subscriptions-triggers-via-lambda-functions-1fjl</guid>
      <description>&lt;p&gt;&lt;a href="https://aws.amazon.com/appsync/" rel="noopener noreferrer"&gt;AWS AppSync&lt;/a&gt; is a serverless GraphQL offering by AWS, previously I authored a blog about &lt;a href="https://blog.theserverlessterminal.com/aws-appsync-101" rel="noopener noreferrer"&gt;AWS AppSync 101&lt;/a&gt; which gets you up to speed with the capabilities of AppSync and how you can leverage them in your serverless applications.&lt;/p&gt;

&lt;p&gt;One query that stands out is that -&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AppSync subscriptions work amazing when client makes mutations but I have some downstreaming patterns in my application where the backend uses subscriptions to send data from back-end to front-end, how do I achieve this with AppSync?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Ask ChatGPT
&lt;/h2&gt;

&lt;p&gt;Well, this does look simple so why not ask ChatGPT?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What would be the better way to handle AppSync Subscriptions which are triggered with Lambda functions?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  ChatGPT's solution
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Use the appropriate trigger:&lt;/p&gt;

&lt;p&gt;To use the appropriate trigger, you can create a trigger on the event that is relevant to your use case. For example, if you want to trigger a subscription when a record is added to a database, you can use a database trigger to invoke your Lambda function.&lt;/p&gt;

&lt;p&gt;Here's an example using AWS Lambda and Amazon DynamoDB:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create a DynamoDB table with a stream enabled.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a Lambda function that is triggered by the DynamoDB stream.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the Lambda function, write code that parses the stream event and invokes the AppSync subscription.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;And also, ChatGPT generated the code snippet for this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Sample code for a Lambda function that is triggered by a DynamoDB stream&lt;/span&gt;

&lt;span class="nx"&gt;exports&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Parse the DynamoDB stream event&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;records&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Records&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;eventName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;eventName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;record&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;dynamodb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NewImage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="c1"&gt;// Invoke the AppSync subscription&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;appSyncClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;AWSAppSyncClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://my-appsync-endpoint.aws.com/graphql&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;region&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;us-east-1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;AWS_IAM&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;credentials&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AWS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;credentials&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mutation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;gql&lt;/span&gt;&lt;span class="s2"&gt;`
    subscription OnRecordAdded {
      onRecordAdded {
        id
        name
      }
    }
  `&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;observable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;appSyncClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;subscribe&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;mutation&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="nx"&gt;observable&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;subscribe&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Subscription data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the GraphQL schema for this was also generated by AppSync.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Record&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ID&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Subscription&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;onRecordAdded&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Record&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Mutation&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;addRecord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;Record&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Query&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;getRecord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ID&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;Record&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Let's validate ChatGPT 's response
&lt;/h2&gt;

&lt;p&gt;Do you notice something from ChatGPT's response? Now let's put on the &lt;em&gt;Serverless architect&lt;/em&gt; lens and see how this would be implemented.&lt;/p&gt;

&lt;h3&gt;
  
  
  GraphQL schema
&lt;/h3&gt;

&lt;p&gt;The schema generated by ChatGPT is a generic one that looks good at first look but when from the application's perspective, all the operations - &lt;code&gt;query&lt;/code&gt;, &lt;code&gt;mutation&lt;/code&gt; and &lt;code&gt;subscription&lt;/code&gt; are accessible based on the default authorization set on AppSync.&lt;/p&gt;

&lt;p&gt;Ensure the subscription is defined for a specific mutation, this is to be noted when you have multiple mutations. Although this looks good in this single mutation schema however it's good to define them with &lt;code&gt;@aws_subscribe&lt;/code&gt; directive.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Subscription&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;onRecordAdded&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Record&lt;/span&gt;
  &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;aws_subscribe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;mutations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;addRecord&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Irrespective of what authorization is used in your application for the client (be it &lt;code&gt;Cognito User Pool&lt;/code&gt;, &lt;code&gt;API Key&lt;/code&gt;, &lt;code&gt;Lambda authorizers&lt;/code&gt; or &lt;code&gt;AWS IAM role&lt;/code&gt;), define the mutation which would be invoked from the Lambda function as &lt;code&gt;AWS IAM role&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Mutation&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;addRecord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;Record&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;
  &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;aws_iam&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  GraphQL resolvers
&lt;/h3&gt;

&lt;p&gt;The conversation with ChatGPT didn't initially give me a resolver for the mutation &lt;code&gt;addRecord&lt;/code&gt;, but a follow-up query did generate a VTL resolver (understand JS resolver is a very new, and fair guess that model doesn't know what JS resolver is at this point).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This VTL resolver defines the &lt;code&gt;PutItem&lt;/code&gt; operation for the &lt;code&gt;Mutation&lt;/code&gt; type in the AppSync schema. It uses the &lt;code&gt;$ctx.args&lt;/code&gt; variable to extract the &lt;code&gt;name&lt;/code&gt; argument from the mutation, and then generates a new &lt;code&gt;id&lt;/code&gt; for the item using the &lt;code&gt;$util.autoId()&lt;/code&gt; function. The resolver constructs a DynamoDB &lt;code&gt;PutItem&lt;/code&gt; request using these values, and then returns the request in JSON format.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;$name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;$ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;$id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;$util&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;autoId&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;version&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2018-05-29&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;operation&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;PutItem&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;tableName&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;my-table&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;item&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;S&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;$id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;S&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;$name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You may notice that the VTL resolver generated is doing a DynamoDB &lt;code&gt;PutItem&lt;/code&gt; action even though the response ChatGPT gave didn't have the schema treating the &lt;code&gt;Record&lt;/code&gt; type as a &lt;code&gt;model&lt;/code&gt; or even give the steps to create a DynamoDB data source.&lt;/p&gt;

&lt;p&gt;For the simplicity of things, let's create a simple VTL resolver that generates an ID and returns the name with the data source being a &lt;code&gt;None&lt;/code&gt; type.&lt;/p&gt;

&lt;p&gt;Request mapping template&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;version&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2017-02-28&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;payload&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;$context.arguments.name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;$util.autoId()&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Response mapping template&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;$util&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toJson&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;$context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the mutation &lt;code&gt;addRecord&lt;/code&gt; is ready to be tested!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq0weeu5meh0dm7dpd9ga.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq0weeu5meh0dm7dpd9ga.png" alt="Testing GraphQL mutation addRecord in AppSync console" width="800" height="167"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Lambda function to trigger subscriptions on client-end
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4v3pwkwjvsza6wpb1gv3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4v3pwkwjvsza6wpb1gv3.png" alt="Lambda function uses AppSync mutation to trigger a AppSync subscription on client-end" width="800" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The solution that a &lt;em&gt;Serverless architect&lt;/em&gt; would have come up with is the one above, where any Lambda trigger could invoke the Lambda function, and the Lambda function in turn uses an AppSync mutation and on the successful execution of the mutation, the subscription is internally invoked by AppSync.&lt;/p&gt;

&lt;p&gt;The Lambda function generated by ChatGPT uses AppSync Client SDK. And it subscribes to an AppSync subscription rather than a mutation. 🤔 Why! 😵‍💫&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;observable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;appSyncClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;subscribe&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;mutation&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;observable&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;subscribe&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Subscription data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Firstly, create a Lambda layer with the npm dependencies -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;npm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;aws-sdk&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;aws-appsync&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;graphql-tag&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;isomorphic-fetch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create your Lambda function with the environment variable set with the AppSync API endpoint.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;isomorphic-fetch&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;AWS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;aws-sdk/global&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;AUTH_TYPE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;aws-appsync&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;AUTH_TYPE&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;AWSAppSyncClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;aws-appsync&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;gql&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;graphql-tag&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;APPSYNC_ENDPOINT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;region&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;AWS_REGION&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AUTH_TYPE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;AWS_IAM&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;credentials&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AWS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;credentials&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;disableOffline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;createTodo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;gql&lt;/span&gt;&lt;span class="s2"&gt;`
    mutation MyMutation($name: String!) {
      addRecord(name: $name) {
        id
        name
      }
    }
`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;AWSAppSyncClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;exports&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;event &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mutate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
            &lt;span class="na"&gt;mutation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;createTodo&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;variables&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;result &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;error &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;credentials: AWS.config.credentials&lt;/code&gt; uses the IAM credentials from Lambda's runtime and for this to work, you would have to define&lt;/p&gt;

&lt;p&gt;Update your Lambda's execution role with the policy -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Version&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2012-10-17&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Statement&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Sid&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;VisualEditor0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Effect&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Allow&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Action&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;appsync:GraphQL&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Resource&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;Your AppSync ARN&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Back to your Lambda console, create an Event JSON.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;This is a record from Lambda fn&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When testing the subscription from the AppSync console. The API by default uses &lt;code&gt;API Key&lt;/code&gt; as authorization.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsve2gq55jvdxtg610ils.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsve2gq55jvdxtg610ils.gif" alt="Using AppSync console for testing subscriptions" width="600" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Behind the scene, the event was tested from the Lambda function console and here the mutation is authorized by &lt;code&gt;AWS IAM&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpo9ylgsg4dmzv7cp6897.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpo9ylgsg4dmzv7cp6897.png" alt="Invoking the Lambda from Lambda console" width="800" height="301"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap up
&lt;/h2&gt;

&lt;p&gt;ChatGPT gave us a high-level solution in terms of what needs to be done but the how to execute and the minor details were missed out, this is exactly where Serverless architects would come into the picture to start building on top of what AI suggests.&lt;/p&gt;

&lt;p&gt;The TL;DR of this is that you can start to get solutions from ChatGPT but the accuracy of how well it solves is something humans would have to intervene on. And building Lambda functions that invokes an AppSync mutation to trigger subscriptions would be helpful when you are relying on real-time sync from external sources other than the support data sources from AppSync.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>developement</category>
      <category>serverless</category>
      <category>appsync</category>
    </item>
    <item>
      <title>Serverless development with Amplify Studio</title>
      <dc:creator>Jones Zachariah Noel</dc:creator>
      <pubDate>Sun, 01 Oct 2023 15:32:00 +0000</pubDate>
      <link>https://dev.to/aws-heroes/serverless-development-with-amplify-studio-1fkp</link>
      <guid>https://dev.to/aws-heroes/serverless-development-with-amplify-studio-1fkp</guid>
      <description>&lt;p&gt;As full-stack developers, we often love to develop applications out of the box with tools that can visually design your application's UI and define your data and API layers that can seamlessly integrate with the application's UI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/amplify/studio/" rel="noopener noreferrer"&gt;AWS Amplify Studio&lt;/a&gt; amplifies your development with front-end and back-end by provisioning the right AWS resources under the hood for the right purposes and also the ability to easily integrate into the design.&lt;/p&gt;

&lt;h2&gt;
  
  
  Working with data
&lt;/h2&gt;

&lt;p&gt;Amplify Studio makes it really easy to define and manage your data irrespective of the environment it's used in.&lt;/p&gt;

&lt;h3&gt;
  
  
  Defining your data
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fftus5a315suynegb2yjr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fftus5a315suynegb2yjr.png" alt="Defining data on Amplify Studio"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Amplify Studio's Data allows you to define &lt;a href="https://aws.amazon.com/dynamodb/" rel="noopener noreferrer"&gt;Amazon DynamoDB&lt;/a&gt; keeping in mind the properties with the right type and also powered with &lt;a href="https://aws.amazon.com/appsync/" rel="noopener noreferrer"&gt;AWS AppSync&lt;/a&gt; where which generates a GraphQL schema under the hood.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;enum&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;TopicLevelEnum&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;INTRODUCTORY&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;INTERMEDIATE&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;ADVANCE&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="err"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;InfoCard&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;@model&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;@auth(rules:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="err"&gt;allow:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;public&lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="err"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;id:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;ID!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;title:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;String!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;short_description:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;String!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;long_description:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;String!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;thumbnail_url:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;AWSURL!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;categories:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="err"&gt;String!&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;services:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="err"&gt;String!&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;topic_level:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;TopicLevelEnum&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;aws_docs_url:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;String!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;aws_workshow_url:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;String&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;community_url:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;String&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;aws_samples_url:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;String&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;dislikes:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Int&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;url:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;String&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;s&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="err"&gt;_thumbnail:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;String&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;likes:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Int&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="err"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Service&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;@model&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;@auth(rules:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="err"&gt;allow:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;public&lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="err"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;id:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;ID!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;service_name:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;String!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;category_name:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;String!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;logo_url:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;AWSURL!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;url:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;String&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;s&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="err"&gt;_logo:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;String&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that data is defined and the AWS resources - AppSync API and DynamoDB tables for the same are created with &lt;code&gt;@model&lt;/code&gt; directives by AppSync. Since the API is using public read, &lt;code&gt;@auth(rules: [{allow: public}])&lt;/code&gt; is part &lt;code&gt;InfoCard&lt;/code&gt; and &lt;code&gt;Service&lt;/code&gt; this will ensure that the auto-generated CRUD APIs for them will allow public access.&lt;/p&gt;

&lt;h3&gt;
  
  
  Generating data
&lt;/h3&gt;

&lt;p&gt;The content management feature of Amplify Studio is elegant for ensuring an admin/content creator role to create or update content that the front-end application would be consuming. This uses the data definition based on your GraphQL schema and DynamoDB schema with a form-based input.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyhk3wc05dtf2pvakvfv9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyhk3wc05dtf2pvakvfv9.png" alt="Create Service UI from Amplify Studio"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Amplify Studio also has an &lt;em&gt;underrated feature&lt;/em&gt; that developers would love when using this during the course of development, Amplify Studio has auto-generate data which is handy for the development phase where developers need not worry about "there isn't enough data to display on the front-end" instead generate up to 100 records with the feasibility of setting some constraints so that you get valid data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8edvdr1ssr635ry7vkhu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8edvdr1ssr635ry7vkhu.png" alt="Amplify Studio with the feature of auto-generate data"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Test your data
&lt;/h3&gt;

&lt;p&gt;With the data populated, you would need to ensure the GraphQL APIs with AppSync are working as expected. Amplify Studio also features a GraphQL editor to simulate and test the APIs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2n642t5tghd532czdw4o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2n642t5tghd532czdw4o.png" alt="GraphQL simulator in Amplify Studio for testing APIs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The simulator provides the API docs - where you can navigate the different &lt;code&gt;queries&lt;/code&gt;, &lt;code&gt;mutations&lt;/code&gt; or &lt;code&gt;subscription&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Amplify Storage
&lt;/h2&gt;

&lt;p&gt;Amplify Storage let's you manage the media files and assets which are stored on Amazon S3. Amplify Storage will first create the Amazon S3 bucket where you can set the authorization rules for user to &lt;code&gt;upload&lt;/code&gt;, &lt;code&gt;view&lt;/code&gt; or &lt;code&gt;delete&lt;/code&gt; the objects (files in this case) on S3 bucket.&lt;/p&gt;

&lt;h3&gt;
  
  
  Managing files on Storage
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkwqad2ued8n3jr6ip191.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkwqad2ued8n3jr6ip191.png" alt="Managing files on Storage"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From Amplify Storage, you can navigate across different levels of folders and files and upload the files or create folders. Amplify Studio also provides your with a snippet of code that uses Storage APIs to get the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Storage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;aws-amplify/auth/aws-amplify-auth.md&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;level&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;public&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Figma design to code&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Using the &lt;a href="https://www.figma.com/community/file/1047600760128127424" rel="noopener noreferrer"&gt;&lt;strong&gt;getting started Figma design&lt;/strong&gt;&lt;/a&gt; from the community and the components available in this design uses the design guidelines which is a subset of &lt;a href="https://ui.docs.amplify.aws/" rel="noopener noreferrer"&gt;&lt;strong&gt;AWS Amplify UI Kit&lt;/strong&gt;&lt;/a&gt; that has a collection of UI components for different UI frameworks both web and mobile.&lt;/p&gt;

&lt;p&gt;With my limited knowledge of Figma designing and using the pre-defined components and modifying the components as per my requirement, I've successfully created three components - &lt;code&gt;ServiceCard&lt;/code&gt;, &lt;code&gt;FeatureCard&lt;/code&gt; and &lt;code&gt;InfoCardDetails&lt;/code&gt; .&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdht58x30nyxvza1ucawp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdht58x30nyxvza1ucawp.png" alt="Figma design with the components created using pre-defined Amplify components"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On successfully authorizing AWS Amplify Studio to access Figma designs from my Figma account, the UI Library on Amplify Studio lists all the components ready to be configured and imported into your Amplify project.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Component configuration&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvysf61jo4wdgq5jflfk1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvysf61jo4wdgq5jflfk1.png" alt="Detected ServiceCard component on Amplify Studio"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;FeatureCard&lt;/code&gt; is now ready to be configured with the data that is defined. Amplify Studio provides a tree for all the elements created in this component and configuring different component properties.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1681563346972%2Feab105f1-6407-47de-af77-6475c6f0deb3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1681563346972%2Feab105f1-6407-47de-af77-6475c6f0deb3.png" alt="Component to Data model mapping"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Firstly, map the component to the data model that is used in the component.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1681564052897%2F91b8966d-7995-479b-b31a-61b30fc92d1e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1681564052897%2F91b8966d-7995-479b-b31a-61b30fc92d1e.png" alt="Setting child properties of the component from Amplify Studio"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Set each of the child properties with the data from the defined data model. In the above screenshot, you can see the title of the card is set with &lt;code&gt;infoCard.Title&lt;/code&gt; to the &lt;code&gt;label&lt;/code&gt; property of the child component.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1681564433437%2F08d32684-5437-4d57-9495-4123726c6f1d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1681564433437%2F08d32684-5437-4d57-9495-4123726c6f1d.png" alt="Configuring properties for event handlers"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In case of &lt;code&gt;InfoCardDetails&lt;/code&gt; component, the data model defines URLs for documentation, samples and workshop. For those to be functional as a button &lt;code&gt;onClick&lt;/code&gt; event, Amplify Studio allows those configurations where you can specify the target by selecting &lt;code&gt;Open URL in new tab&lt;/code&gt; and also mapping the equivalent data from &lt;code&gt;InfoCard&lt;/code&gt; data model.&lt;/p&gt;

&lt;h3&gt;
  
  
  Collection components
&lt;/h3&gt;

&lt;p&gt;In the component configuration page, click on &lt;em&gt;Create collection&lt;/em&gt; button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1681564780015%2F3064cb6c-358a-4948-8d48-71e373cc7643.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1681564780015%2F3064cb6c-358a-4948-8d48-71e373cc7643.png" alt="Collections configuration on Amplify Studio"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The collections can be configured with properties that can make the collections UI really customizable in terms of how they would appear as a - &lt;code&gt;List&lt;/code&gt; or &lt;code&gt;Grid&lt;/code&gt;, ordering, spacing, alignment, enabling &lt;code&gt;search&lt;/code&gt; functionality in the collection and also &lt;code&gt;pagination&lt;/code&gt; with the page size.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1681565407298%2F4b9dbe47-9f5f-4d53-b920-8688c5c59cbf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1681565407298%2F4b9dbe47-9f5f-4d53-b920-8688c5c59cbf.png" alt="Configuring collection properties in Amplify Studio"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The collections could also be configured with &lt;code&gt;filters&lt;/code&gt; which are applied to the collections and also define the &lt;code&gt;sort&lt;/code&gt; conditions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sync Amplify Studio with local IDE
&lt;/h2&gt;

&lt;p&gt;With the data and UI configurations done on Amplify Studio, these changes can be synced to your local IDE with Amplify CLI.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;amplify&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pull&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--appId&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;your-amplify-project-id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--envName&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;your-env&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create all the &lt;code&gt;amplify&lt;/code&gt; related files in your local project folder with &lt;code&gt;amplify&lt;/code&gt; backed and resources configurations under &lt;code&gt;/amplify&lt;/code&gt; folder. In your &lt;code&gt;src&lt;/code&gt; folder, the UI components and data model related files are generated in &lt;code&gt;/ui-components&lt;/code&gt; folder and &lt;code&gt;/models&lt;/code&gt; folder respectively.&lt;/p&gt;

&lt;h3&gt;
  
  
  Importing and using components
&lt;/h3&gt;

&lt;p&gt;Installing the needed npm dependencies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;npm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-g&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="nx"&gt;aws-amplify/cli&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;npm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;aws-amplify&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="nx"&gt;aws-amplify/ui-react&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In &lt;code&gt;index.js&lt;/code&gt; file, configure Amplify.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ThemeProvider&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@aws-amplify/ui-react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Amplify&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;aws-amplify&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;awsconfig&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./aws-exports&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@aws-amplify/ui-react/styles.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;studioTheme&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./ui-components&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;Amplify&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;configure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;awsconfig&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using a theme from Amplify with &lt;code&gt;ThemeProvider&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;ThemeProvider&lt;/span&gt; &lt;span class="na"&gt;theme=&lt;/span&gt;&lt;span class="s"&gt;{studioTheme}&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;App&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/ThemeProvider&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Import the UI component created and configured from Amplify Studio.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nx"&gt;FeatureCardCollection&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./ui-components&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Modifying the components locally
&lt;/h3&gt;

&lt;p&gt;From the above screenshots, you may have noticed the images being broken while previewing on Amplify Studio. Let's modify the &lt;code&gt;InfoCardDetails&lt;/code&gt; component to retrieve data from Amplify Storage.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;getOverrideProps&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;useNavigateAction&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@aws-amplify/ui-react/internal&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Divider&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Flex&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Text&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@aws-amplify/ui-react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Storage&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;aws-amplify&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useHistory&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-router-dom&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;InfoCardDetails&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;infoCard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;overrides&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;rest&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;//Set the states&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;imageThumbnail&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setImageThumbnail&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;mdDoc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setMDDoc&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;fetchImage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="nf"&gt;fetchMD&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[])&lt;/span&gt;

&lt;span class="c1"&gt;//Using Amplify Storage to download images &lt;/span&gt;
  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fetchImage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;image&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Storage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;infoCard&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;s3_thumbnail&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;level&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;public&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;})&lt;/span&gt;
      &lt;span class="nf"&gt;setImageThumbnail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;error fetching images&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;....&lt;/span&gt;
&lt;span class="c1"&gt;//Setting image to Image component&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Image&lt;/span&gt;
              &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;unset&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;408px&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;display&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;block&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;gap&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;unset&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;alignItems&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;unset&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;justifyContent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;unset&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;shrink&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;alignSelf&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;stretch&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;position&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;relative&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;padding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0px 0px 0px 0px&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;objectFit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cover&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;imageThumbnail&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="p"&gt;{...&lt;/span&gt;&lt;span class="nf"&gt;getOverrideProps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;overrides&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;image&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;
            &lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Image&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="p"&gt;....&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After modifying the same in &lt;code&gt;FeatureCard&lt;/code&gt; and &lt;code&gt;ServiceCard&lt;/code&gt;, locally run the app with &lt;code&gt;npm start&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1681567088777%2Fa23b3f22-5960-45b0-88de-fa797d15f6cd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1681567088777%2Fa23b3f22-5960-45b0-88de-fa797d15f6cd.png" alt="FeatureCard collection rendering on the front-end"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1681567227116%2F0f01193b-1c17-4464-8ea2-460f94dade82.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1681567227116%2F0f01193b-1c17-4464-8ea2-460f94dade82.gif" alt="InfoCardDetails rendering with images and data from InfoCard model"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The app renders all the images after they are downloaded from Amplify Storage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap-up
&lt;/h2&gt;

&lt;p&gt;Building applications with Amplify Studio has certainly amplified developer experience with defining, provisioning, and also managing different AWS services.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1681568244210%2F278e905b-24eb-4126-b97e-5b330a8b3c12.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1681568244210%2F278e905b-24eb-4126-b97e-5b330a8b3c12.png" alt="Managing AWS resources with Amplify Studio"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Having to do it manually for a full-stack developer during development would mean that they would need in-depth knowledge of all those underlying AWS services.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
      <category>amplify</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Amazon EventBridge: The missing piece to your app</title>
      <dc:creator>Jones Zachariah Noel</dc:creator>
      <pubDate>Sun, 05 Mar 2023 14:25:10 +0000</pubDate>
      <link>https://dev.to/awscommunity-asean/amazon-eventbridge-the-missing-piece-to-your-app-5edp</link>
      <guid>https://dev.to/awscommunity-asean/amazon-eventbridge-the-missing-piece-to-your-app-5edp</guid>
      <description>&lt;p&gt;&lt;a href="https://aws.amazon.com/eventbridge/"&gt;Amazon EventBridge&lt;/a&gt; is a Serverless AWS Service that enables building event-driven applications with seamless integrations with multiple AWS Services and AWS Partner SaaS applications.&lt;/p&gt;

&lt;p&gt;Launched in 2019, it was focused on building pathways for SaaS Product events to be consumed and routing the events to the AWS Lambda function. It initially supported buses and CloudWatch Events which was previously part of AWS CloudWatch. Since then, a lot of powerful features have been added to EventBridge to build an event-driven Serverless app.&lt;/p&gt;

&lt;h2&gt;
  
  
  EventBridge Buses
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DZizrTRz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vlnmfjax2fz60ncu2znl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DZizrTRz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vlnmfjax2fz60ncu2znl.png" alt="EventBridge buses in an architecture" width="880" height="566"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Event Buses&lt;/em&gt; are the communication channel that receives events from different &lt;em&gt;event sources&lt;/em&gt; which could be AWS Services such as Amazon S3 which is posting in events whenever there is any action happening in an S3 bucket, programmatically using &lt;em&gt;EventBridge APIs&lt;/em&gt; to &lt;code&gt;send&lt;/code&gt; events to a &lt;em&gt;default&lt;/em&gt; or &lt;em&gt;custom bus&lt;/em&gt; or events from a partner SaaS product posting events to a defined &lt;em&gt;SaaS event bus&lt;/em&gt;. Once the events are available on the bus, &lt;em&gt;event rules&lt;/em&gt; are used to route the event to the right designation these rules have powerful filtering capabilities which can be applied to event payloads.&lt;/p&gt;

&lt;p&gt;Some scenarios, where you would be using it in your application -&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;An S3 event that is &lt;code&gt;putObject&lt;/code&gt; event would be routed to AWS Lambda functions for further computation or AWS Step Functions to kick-start a state machine execution.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An S3 event that is &lt;code&gt;deleteObject&lt;/code&gt; would result in invoking an API destination that would use the &lt;em&gt;Input Transformer&lt;/em&gt; to restructure the event as per API's specifications.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note: these rules are specific to event buses, and there can be multiple rules in a bus.&lt;/p&gt;

&lt;h2&gt;
  
  
  EventBridge Pipes
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pgANxk-4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zyickxifo9xy2fdxe7jf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pgANxk-4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zyickxifo9xy2fdxe7jf.png" alt="Sample EventBridge Pipe" width="880" height="103"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;EventBridge Pipes&lt;/em&gt; enable direct point-to-point integrations from defined event sources like Amazon DynamoDB streams, Amazon Kinesis, Amazon SQS, and more which can be filtered with advanced EventBridge filtering on the event payloads.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"eventName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"prefix"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"INSERT"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The filtered events could be enriched to uplift the data before it is delivered to the target AWS Service. &lt;em&gt;Input Transformer&lt;/em&gt; is available for the &lt;em&gt;enrichment&lt;/em&gt; and &lt;em&gt;target&lt;/em&gt; states which can transform to the expected payload structure by the AWS Service and also define the output path.&lt;/p&gt;

&lt;p&gt;EventBridge Pipes, opening up the direct service integration with advanced filtering and enrichment&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;EventBridge Pipe uses events from DynamoDB streams on any action on a DynamoDB table and would use filtering to process only &lt;code&gt;eventName: INSERT&lt;/code&gt; for newly created items on DynamoDB and invoke a state machine execution.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;New messages from Amazon MQ could be used to start a state machine execution.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  EventBridge Scheduler
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--knrmojF7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6tyg11f9mte2zxug4kop.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--knrmojF7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6tyg11f9mte2zxug4kop.png" alt="A sample EventBridge Scheduler with cron job" width="800" height="707"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;EventBridge Scheduler&lt;/em&gt; is a way to schedule your tasks that happen from time to time and need recurring events with corn expressions, time windows, and one time with a specific date and time. These events from the scheduler could be targeted to a specific AWS Service where the event payload set in the scheduler will be delivered.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Tasks that have to be performed every day at a specific time (like 1 am).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Workloads that generate billing every month where the scheduler can invoke a Lambda function to generate bills.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  In a nutshell
&lt;/h2&gt;

&lt;p&gt;Amazon EventBridge can be a crucial component of your Serverless applications which could be &lt;em&gt;solution-ed&lt;/em&gt; to deliver the right events effectively to the destinations. For Event-driven architectures that consume a multitude of events, EventBridge can easily scale, and events can be filtered with advanced filtering capabilities. EventBridge eliminates the glue-coded Lambda functions which might contain additional logic to validate the events against certain patterns which are necessary to the application for further processing. EventBridge Pipes enhances your Serverless workload with direct service integration that positively affects the application's performance and scalability.&lt;/p&gt;

&lt;p&gt;In any application, the design might contain multiple features by Amazon EventBridge where specific tasks could be scheduled with an &lt;em&gt;EventBridge Scheduler&lt;/em&gt;, all events could be sent to an &lt;em&gt;Event Bus&lt;/em&gt; which would use &lt;em&gt;Event Rules&lt;/em&gt; to route the events to the designated targets or have point-to-point integrations with AWS services as producer and consumer for smooth orchestration.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
      <category>eventbridge</category>
      <category>eventdriven</category>
    </item>
    <item>
      <title>Building Serverless apps with more configurations</title>
      <dc:creator>Jones Zachariah Noel</dc:creator>
      <pubDate>Mon, 13 Feb 2023 09:24:01 +0000</pubDate>
      <link>https://dev.to/aws-heroes/building-serverless-apps-with-more-configurations-4p4f</link>
      <guid>https://dev.to/aws-heroes/building-serverless-apps-with-more-configurations-4p4f</guid>
      <description>&lt;p&gt;Applications built on the Serverless stack have existed for nearly a decade with &lt;a href="https://aws.amazon.com/lambda/" rel="noopener noreferrer"&gt;AWS Lambda functions&lt;/a&gt; being launched in 2014. And ever since, the association of a Serverless application is always with a Lambda function.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmysb8dg179vlmpk64ezu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmysb8dg179vlmpk64ezu.png" alt="Reference meme by Captain America" width="640" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this blog post, we will look into how Serverless apps can be built with just configurations and leveraging the features of AWS Services which can integrate with different services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do we need direct integrations?
&lt;/h2&gt;

&lt;p&gt;The AWS Services with direct integrations capabilities improve the architectures by removing the &lt;em&gt;glue code&lt;/em&gt; needed.&lt;/p&gt;

&lt;p&gt;Just let us think about building REST APIs with &lt;a href="https://aws.amazon.com/api-gateway/" rel="noopener noreferrer"&gt;AWS API Gateway&lt;/a&gt; which returns a particular set of data. For this, we would have to have an API Gateway stage in which &lt;code&gt;GET&lt;/code&gt; method invoking a Lambda function which is either using &lt;code&gt;query&lt;/code&gt; or &lt;code&gt;scan&lt;/code&gt; to search the items on DynamoDB. The response from DyanmoDB SDK would then be returned to API Gateway from the Lambda function.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1frc14spjcdv5pw8gczl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1frc14spjcdv5pw8gczl.png" alt="Architecture of API Gateway + Lambda Fn + DynamoDB table" width="800" height="246"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, let's understand how direct integrations with this would help.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx62f7zrx236pcb80eh77.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx62f7zrx236pcb80eh77.png" alt="Upside of direct integrations" width="800" height="246"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Cold Starts
&lt;/h3&gt;

&lt;p&gt;Now that we are familiar with the downside of having a Lambda would be the Cold Starts that we would have to be mindful of and also have a workaround to overcome them. But when doing a direct integration with different AWS Services, since we would not have a Lambda function as the middle-man or the glue code, we would not have to worry about the problem of Cold Starts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Latency
&lt;/h3&gt;

&lt;p&gt;With the removal of an additional component from the architecture, we are reducing the latency with the requests routed with a Lambda function and returning the results back. Although this would be in milliseconds, it is very accountable in a production environment where there would be 100s and 1000s of requests at a given time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scalability
&lt;/h3&gt;

&lt;p&gt;"Would it be highly scalable when we have concurrent requests that are coming in?" With Lambda the other question of concern is, "how can we handle concurrency and ensure the application is scalable proof?" When we do a direct integration this responsibility would be on the cloud provider and the AWS Service would ensure your application could scale better.&lt;/p&gt;

&lt;h2&gt;
  
  
  Direct integrations with AWS Services
&lt;/h2&gt;

&lt;h3&gt;
  
  
  AWS Step Functions
&lt;/h3&gt;

&lt;p&gt;Serverless applications which would need orchestration and a dedicated workflow that would integrate with multiple AWS Services are a huge win! Starting from AWS re:Invent 2021, where Step Functions announced supporting AWS SDK-based integrations there have been over 300+ API actions that are currently been supported.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzrksijwfwpl6mwecbka2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzrksijwfwpl6mwecbka2.png" alt="AWS Step Functions with SDK support" width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are a lot of possibilities that would open up with SDK-based integrations with AWS Step Functions, there is a &lt;a href="https://blog.theserverlessterminal.com/series/aws-step-functions" rel="noopener noreferrer"&gt;blog post series&lt;/a&gt; about the same.&lt;/p&gt;

&lt;h3&gt;
  
  
  Amazon EventBridge
&lt;/h3&gt;

&lt;p&gt;Amazon EventBridge plays a vital role in event-driven, choreography-based Serverless architectures. While EventBridge supports different integrations with different &lt;code&gt;event sources&lt;/code&gt; or &lt;code&gt;destinations&lt;/code&gt; and also configuring HTTP endpoints as &lt;code&gt;API destinations&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frdd5uvoqtkaqi1t510nn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frdd5uvoqtkaqi1t510nn.png" alt="Amazon EventBridge direct service integrations" width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not only does it support AWS Services which can post events to the &lt;code&gt;event bus&lt;/code&gt; but also with the new &lt;a href="https://aws.amazon.com/eventbridge/pipes/" rel="noopener noreferrer"&gt;EventBridge Pipes&lt;/a&gt;, it is possible to have configurations that can integrate service to service.&lt;/p&gt;

&lt;p&gt;For instance, before DynamoDB Streams could only trigger a Lambda function but now with EventBridge Pipes, you can build integrations where the source of the event originating from DynamoDB Streams and then it could be targeted to invoke a Step Functions state machine execution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Amazon API Gateway
&lt;/h3&gt;

&lt;p&gt;API Gateway can integrate with Velocity Template Langauge (VTL) which could be used for request and response resolver mapping and integrate with services like DynamoDB, Step Functions, Kinesis, and more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgt06djfvmfdxguio5i8a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgt06djfvmfdxguio5i8a.png" alt="AWS API Gateway with direct integrations" width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Like the above mentioned example, API Gateway can directly integrate with DynamoDB. Take a look at the &lt;a href="https://serverlessland.com/patterns/apigw-dynamodb" rel="noopener noreferrer"&gt;pattern from ServerlessLand&lt;/a&gt;. And the snippet of the same of how you can integrate an API Gateway to &lt;code&gt;query&lt;/code&gt; DynamoDB.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;  &lt;span class="na"&gt;MusicArtistMethodGet&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;Type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;AWS::ApiGateway::Method'&lt;/span&gt;
    &lt;span class="na"&gt;Properties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;RestApiId&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;!Ref&lt;/span&gt; &lt;span class="s"&gt;Api&lt;/span&gt;
      &lt;span class="na"&gt;ResourceId&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;!Ref&lt;/span&gt; &lt;span class="s"&gt;MusicArtistResource&lt;/span&gt;
      &lt;span class="na"&gt;HttpMethod&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;GET&lt;/span&gt;
      &lt;span class="na"&gt;ApiKeyRequired&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
      &lt;span class="na"&gt;AuthorizationType&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;NONE&lt;/span&gt;
      &lt;span class="na"&gt;RequestParameters&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;method.request.path.artist&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
      &lt;span class="na"&gt;Integration&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;Type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;AWS&lt;/span&gt;
        &lt;span class="na"&gt;Credentials&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;!GetAtt&lt;/span&gt; &lt;span class="s"&gt;APIGatewayRole.Arn&lt;/span&gt;
        &lt;span class="na"&gt;IntegrationHttpMethod&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;POST&lt;/span&gt;
        &lt;span class="na"&gt;Uri&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;!Sub&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;arn:aws:apigateway:${AWS::Region}:dynamodb:action/Query'&lt;/span&gt;
        &lt;span class="na"&gt;PassthroughBehavior&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;WHEN_NO_TEMPLATES&lt;/span&gt;
        &lt;span class="na"&gt;RequestParameters&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;integration.request.path.artist&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;method.request.path.artist&lt;/span&gt;
        &lt;span class="na"&gt;RequestTemplates&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;application/json&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;TableName&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;Music&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;,&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;IndexName&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;Artist-Index&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;,&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;KeyConditionExpression&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;artist=:v1&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;,&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;ExpressionAttributeValues&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;:{&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;:v1&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;:{&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;S&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;$util.urlDecode($input.params('artist'))&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;}}}"&lt;/span&gt;
        &lt;span class="na"&gt;IntegrationResponses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;StatusCode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;200'&lt;/span&gt;
            &lt;span class="na"&gt;ResponseTemplates&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;application/json&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;#set($inputRoot&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;=&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;$input.path('$'))&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;{&lt;/span&gt;&lt;span class="se"&gt;\n\t\"&lt;/span&gt;&lt;span class="s"&gt;music&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;[&lt;/span&gt;&lt;span class="se"&gt;\n\t\t&lt;/span&gt;&lt;span class="s"&gt;#foreach($field&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;in&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;$inputRoot.Items)&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;{&lt;/span&gt;&lt;span class="se"&gt;\n\t\t\t\"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;$field.id.S&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;,&lt;/span&gt;&lt;span class="se"&gt;\n\t\t\t\"&lt;/span&gt;&lt;span class="s"&gt;artist&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;$field.artist.S&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;,&lt;/span&gt;&lt;span class="se"&gt;\n\t\t\t\"&lt;/span&gt;&lt;span class="s"&gt;album&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;$field.album.S&lt;/span&gt;&lt;span class="se"&gt;\"\n\t\t&lt;/span&gt;&lt;span class="s"&gt;}#if($foreach.hasNext),#end&lt;/span&gt;&lt;span class="se"&gt;\n\t\t&lt;/span&gt;&lt;span class="s"&gt;#end&lt;/span&gt;&lt;span class="se"&gt;\n\t&lt;/span&gt;&lt;span class="s"&gt;]&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;}"&lt;/span&gt;
      &lt;span class="na"&gt;MethodResponses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;StatusCode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;200'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  AWS AppSync
&lt;/h3&gt;

&lt;p&gt;AppSync being a Serverless GraphQL offering, the &lt;code&gt;queries&lt;/code&gt;, &lt;code&gt;mutations&lt;/code&gt; and &lt;code&gt;subscriptions&lt;/code&gt; can use data sources which are DynamoDB, Aroura, Open Search, or HTTP endpoints other than the expected AWS Lambda Functions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw68n4tdlnll3lu05zn59.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw68n4tdlnll3lu05zn59.png" alt="AppSync integrations with VTL resolvers" width="800" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These direct service integrations can leverage Velocity Template Langauge (VTL) or JavaScript resolvers. Additional to the function based resolvers, you can create pipeline resolvers that can not only integrate one but multiple AWS Services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to configure
&lt;/h2&gt;

&lt;p&gt;These direct service configurations would make more sense when you are working with these Services from Infrastructure as Code (IaC) or Infrastructure from Code (IfC) approaches. Like the API Gateway example showcasing a &lt;code&gt;YAML&lt;/code&gt; template, you can use AWS SAM where you can define the resources and then the integrations with resolver info.&lt;/p&gt;

&lt;p&gt;Another simpler way to integrate services from AWS Step Functions is from the Workflow Studio on AWS Console, where you can define the task along with SDK integration by defining the parameters and results.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3z49eubmc2h0z3ts2aii.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3z49eubmc2h0z3ts2aii.png" alt="AWS Step Function Workflow Studio" width="800" height="653"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This generates a JSON structure for the State Machine which could be imported to your IaC project.&lt;/p&gt;

&lt;p&gt;Similar to Workflow Studio, you can design Serverless apps that can generate SAM Template from AWS Application Composer. This currently supports EventBridge integrations with different Services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sometimes you may need more than a configuration
&lt;/h2&gt;

&lt;p&gt;Before wrapping up, yes! Sometimes you may need more than a configuration where you need to define your Lambda function or glue codes that process the data from these Services in an efficient way. The above AWS Services support direct integration with different AWS Services, there are some of which like Amazon SNS and Amazon SQS which could use configurations to trigger a Lambda function.&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>It's time to re:Wind 2022</title>
      <dc:creator>Jones Zachariah Noel</dc:creator>
      <pubDate>Fri, 30 Dec 2022 18:35:12 +0000</pubDate>
      <link>https://dev.to/aws-heroes/its-time-to-rewind-2022-20i3</link>
      <guid>https://dev.to/aws-heroes/its-time-to-rewind-2022-20i3</guid>
      <description>&lt;p&gt;2️⃣0️⃣2️⃣2️⃣ has been quite an interesting year and a year of learnings for me. &lt;/p&gt;

&lt;p&gt;Some of the highlights is what I tweeted about &lt;br&gt;
&lt;iframe class="tweet-embed" id="tweet-1607813236266762240-212" src="https://platform.twitter.com/embed/Tweet.html?id=1607813236266762240"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1607813236266762240-212');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1607813236266762240&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h3&gt;
  
  
  📜 Authoring blog-posts
&lt;/h3&gt;

&lt;p&gt;This year has been &lt;em&gt;content-ful&lt;/em&gt; with this being my 25th blog-post this year. And also have been contributing to -&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/aws-heroes"&gt;AWS Heroes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/aws-builders"&gt;AWS Community Builder&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/awscommunity-asean"&gt;AWS Community ASEAN&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most of the blog-posts were focused on AWS Step Functions and some of the sessions that I've delivered over this year. &lt;/p&gt;

&lt;p&gt;Numbers from December&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9cxgmasnai2az2tnuut.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9cxgmasnai2az2tnuut.png" alt="Numbers from December alone"&gt;&lt;/a&gt;&lt;br&gt;
This year my blog-post (&lt;a href="https://dev.to/zachjonesnoel"&gt;https://dev.to/zachjonesnoel&lt;/a&gt;) crossed &lt;br&gt;
&lt;strong&gt;500+ reactions&lt;/strong&gt; and &lt;strong&gt;100k+ views&lt;/strong&gt;, cheers to all my readers who have been benefitted from my writings. &lt;br&gt;
&lt;iframe class="tweet-embed" id="tweet-1605483967385178112-463" src="https://platform.twitter.com/embed/Tweet.html?id=1605483967385178112"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1605483967385178112-463');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1605483967385178112&amp;amp;theme=dark"
  }



&lt;br&gt;
One of my blog-post - &lt;a href="https://dev.to/aws-builders/when-to-sns-or-sqs-2aji"&gt;When to : SNS or SQS&lt;/a&gt; contributed to &lt;a href="https://dev.to/aws-builders"&gt;AWS Community Builder&lt;/a&gt; org was recognised as one of the top viewed blog-posts.&lt;/p&gt;

&lt;p&gt;The growing trend of AI and how ChatGPT constructs the responses for my blog-post, &lt;a href="https://www.linkedin.com/in/walterwlee" rel="noopener noreferrer"&gt;Walter Lee&lt;/a&gt; compares one of my blog-post verses ChatGPT and shares about how human authored content would be more relatable and good for skilling up.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgcuu86kqyxpfbq5x3pq2.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgcuu86kqyxpfbq5x3pq2.jpeg" alt="Walter Lee's take on my blog-post vs ChatGPT"&gt;&lt;/a&gt;&lt;br&gt;
Check out the &lt;a href="https://www.linkedin.com/feed/update/urn:li:activity:7013773242511347712/" rel="noopener noreferrer"&gt;LinkedIn post&lt;/a&gt; by Walter Lee.&lt;/p&gt;
&lt;h3&gt;
  
  
  🎤 Speaking engagements
&lt;/h3&gt;

&lt;p&gt;Breaking back from the practices of the pandemic, going back to in-person events has elevated my learnings in a special way. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Skilling up with latest happenings.&lt;/li&gt;
&lt;li&gt;Networking with peers.&lt;/li&gt;
&lt;li&gt;Understanding how tech is in action.&lt;/li&gt;
&lt;li&gt;Looking into the cool things folks have developed.&lt;/li&gt;
&lt;li&gt;Sharing my knowledge&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fflv3d5y48enih1b6bjag.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fflv3d5y48enih1b6bjag.jpeg" alt="Lanyards from in-person events"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In every in-person event, I've made it a practice to get feedbacks which has helped me to level-up and improvise my content, how I deliver, my pace and more things.&lt;/p&gt;

&lt;p&gt;Have delivered sessions at &lt;em&gt;AWS APJ Community Summit, Bangkok&lt;/em&gt; (first-ever international in-person session), &lt;em&gt;Freshworks Developer Summit, Bengaluru&lt;/em&gt;, &lt;em&gt;AWS Community Day Kochi&lt;/em&gt;, &lt;em&gt;AWS Dev Day, Bengaluru&lt;/em&gt;, &lt;em&gt;AWS Community Day Pune&lt;/em&gt; with a total of &lt;strong&gt;6 in-person sessions&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We all have our first-times and this year it was my first time being part of the Serverless Panel Discussion at AWS APJ Community Day, Bangkok sharing the stage with &lt;a href="https://www.linkedin.com/in/farrahcampbell/" rel="noopener noreferrer"&gt;Farrah Campbell&lt;/a&gt; with an amazing moderator &lt;a href="https://www.linkedin.com/in/donnieprakoso/" rel="noopener noreferrer"&gt;Donnie Prakoso&lt;/a&gt;  along with &lt;a href="https://www.linkedin.com/in/raphael-justin-jambalos" rel="noopener noreferrer"&gt;Raphael Justin Jambalos&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/takahiro-horike-69894a133" rel="noopener noreferrer"&gt;Takahiro Horike&lt;/a&gt; on the panel where conversation and views was about different development practices, things we love about AWS Serverless, what we love to see in AWS Serverless.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp0897w2fkn8a9wq1jr0q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp0897w2fkn8a9wq1jr0q.png" alt="Serverless Panel Discussion"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Virtual is the new norm&lt;/em&gt;, have been contributing to several &lt;a href="https://aws.amazon.com/developer/community/usergroups/?community-user-groups-cards.sort-by=item.additionalFields.ugName&amp;amp;community-user-groups-cards.sort-order=asc&amp;amp;awsf.location=*all&amp;amp;awsf.category=*all" rel="noopener noreferrer"&gt;AWS User Groups&lt;/a&gt; globally (until last year it was in APJ region). A huge shout-out to all the AWS UG Leaders to accommodate and also hosting me virtually - battling the hassles of timezone, streaming setups, internet hiccups and what not! In total sharing my knowledge about Serverless in &lt;strong&gt;10 virtual sessions&lt;/strong&gt; which also includes Freshworks Community Hours where I had the opportunity to evangelise about some of Freshworks Platform features, AWS Summit India 2022. Guest at the AWS GameDay. &lt;/p&gt;

&lt;p&gt;Great to be part of AWS Community Panel at AWS Innovate Modern Apps Edition with the host &lt;a href="https://www.linkedin.com/in/derekwbingham/" rel="noopener noreferrer"&gt;Derek Bingham&lt;/a&gt; on virtual stage along with &lt;a href="https://www.linkedin.com/in/ahaydar/" rel="noopener noreferrer"&gt;Ali Haydar&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/dipalik/" rel="noopener noreferrer"&gt;Dipali Kulshrestha&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/faizal-khan/" rel="noopener noreferrer"&gt;Faizal Khan&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/wendywong7/" rel="noopener noreferrer"&gt;Wendy Wong&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  🥑 Developer Advocate transition
&lt;/h3&gt;

&lt;p&gt;Being part of the AWS Community and working with Developer Relations team got me to aspire for the responsibilities of the Developer Advocate role. While I interviewed and cracked a couple, I decided to make a move to &lt;a href="https://www.freshworks.com/" rel="noopener noreferrer"&gt;Freshworks Inc&lt;/a&gt; as a &lt;em&gt;Senior Developer Advocate&lt;/em&gt; starting from end of May 2022. &lt;br&gt;
Coming from a background of a start-up borne &lt;em&gt;Full-Stack Developer&lt;/em&gt; transformed to a &lt;em&gt;Cloud Architect - Serverless&lt;/em&gt;, &lt;em&gt;Developer Advocate&lt;/em&gt; role was a transformation which I embrace a lot. &lt;br&gt;
Cheers to my fellow DevRels and teammates - &lt;a href="https://www.linkedin.com/in/satwikhebbar" rel="noopener noreferrer"&gt;Satwik Hebbar&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/kaustavdm/" rel="noopener noreferrer"&gt;Kaustav Das Modak&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/ravirajsubramanian/" rel="noopener noreferrer"&gt;Raviraj Subramanian&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/saif-shines/" rel="noopener noreferrer"&gt;Saif Ali Shaik&lt;/a&gt; who supported me to transform from a solution and architecture focused person to empathised, community focused, helping developers solution on Freshworks Developer Platform and focusing on Developer Experience (DX) for the new features.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0dbvhx7uuferf1da0i8s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0dbvhx7uuferf1da0i8s.png" alt="True Friend of Customer Q3, 2022"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  🗞️ Sharing via Serverless newsletter
&lt;/h3&gt;

&lt;p&gt;I started the newsletter &lt;a href="https://www.getrevue.co/profile/zachjonesnoel" rel="noopener noreferrer"&gt;Everything AWS, Serverless and Architectures ☁️🚀👨‍💻&lt;/a&gt; which is currently powered with Revue. The newsletter is semimonthly where the issues are published on 15th and 30th of every month. The newsletter features some of the commendable content from AWS Community, AWS Serverless announcements, some of the events happening in AWS Serverless community. &lt;br&gt;
&lt;iframe class="tweet-embed" id="tweet-1553454520742690816-900" src="https://platform.twitter.com/embed/Tweet.html?id=1553454520742690816"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1553454520742690816-900');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1553454520742690816&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu3g7sctu494b9vdu1g42.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu3g7sctu494b9vdu1g42.png" alt="Newsletter engagement"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With Ruvue shutting down, the newsletter is successfully migrated to Substack and the new link is - &lt;a href="https://everythingawsserverless.substack.com/" rel="noopener noreferrer"&gt;https://everythingawsserverless.substack.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you had already subscribed, nothing to worry! But if you hadn't and want to stay on top of Serverless happenings, I would recommend you to subscribe right away! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5nqghrr6wg0t75v4lp5h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5nqghrr6wg0t75v4lp5h.png" alt="Growth on Substack"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  ⭐ AWS Community Builder - Serverless
&lt;/h3&gt;

&lt;p&gt;AWS Community Builder journey began in Q4 of 2021 where I had the opportunity to spread the word of Serverless to folks globally via blog-posts, virtual and in-person sessions at various AWS UG meet-ups and AWS Community Day and also contributed via building samples for different AWS Services.&lt;/p&gt;

&lt;p&gt;Honoured with a two quarter &lt;em&gt;Top Contributor&lt;/em&gt; in APJ region and once globally!&lt;/p&gt;

&lt;p&gt;AWS Community Builder program has not only facilitated me with opportunities but also has helped me learn from peers about things into Serverless to how to improvise on the personal level. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffaswqkg7jzt29d5m0grq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffaswqkg7jzt29d5m0grq.png" alt="AWS Community Builder in a picture!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This year had the opportunity to meet folks in the APJ region during AWS APJ Community Summit, Bangkok. And I was nominated for the &lt;em&gt;AWS Community Builder of the year&lt;/em&gt;! Which is huge for me, being close to 1 year into the AWS Community Builder program.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgzy43uszped68z6mxaaa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgzy43uszped68z6mxaaa.png" alt="Nominees for AWS Community Builder of the year"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1570092172099325954-21" src="https://platform.twitter.com/embed/Tweet.html?id=1570092172099325954"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1570092172099325954-21');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1570092172099325954&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/dPwuq3tARiA"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  🎙️ Kickstarted a podcast - The Zacs' Show - Talking AWS
&lt;/h3&gt;

&lt;p&gt;Through the AWS Community Builder program, I even met &lt;a href=""&gt;Arshad Zackeriya&lt;/a&gt; at AWS Community Day ASEAN and we decided to spread the word of DevOps and Serverless with our podcast &lt;a href="https://www.youtube.com/@thezacsshowtalkingaws5034" rel="noopener noreferrer"&gt;The Zacs' Show - Talking AWS&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Here is the latest episode where Zack and me re:Capped about re:Invent 2022. &lt;br&gt;
&lt;iframe class="tweet-embed" id="tweet-1604363947230265344-648" src="https://platform.twitter.com/embed/Tweet.html?id=1604363947230265344"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1604363947230265344-648');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1604363947230265344&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;A lot is in plan for the coming year so stay tuned! 🤩&lt;/p&gt;

&lt;h3&gt;
  
  
  👥 Co-organizing AWS User Group Bengaluru
&lt;/h3&gt;

&lt;p&gt;From May 2022, cheers to the opportunity by &lt;a href="https://www.linkedin.com/in/jeevandongre/" rel="noopener noreferrer"&gt;Jeevan Dongre&lt;/a&gt; to be part of the &lt;a href="https://meetup.com/awsugblr" rel="noopener noreferrer"&gt;AWS User Group Bengaluru&lt;/a&gt; as a co-organizer. While we started getting back to post-pandemic normal, in-person meet-ups have been a challenge and it's with Jeevan and &lt;a href="https://www.linkedin.com/in/chetanramegowda/" rel="noopener noreferrer"&gt;Chethan Ramegowda&lt;/a&gt;, we were able to kick start in-person meet-ups in Bengaluru, India with a successful 4 meet-ups! 🎉&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4e5jgycwycakcmeniy7d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4e5jgycwycakcmeniy7d.png" alt="AWS UG BLR Meet-up"&gt;&lt;/a&gt;&lt;br&gt;
We had a collaborative meet-up with cloud - AWS, Azure and GCP along with Kubernetes and Docker communities which has got amazing response.&lt;/p&gt;

&lt;p&gt;We will gear up and have more meet-ups in 2023. 🚀&lt;/p&gt;

&lt;p&gt;Tech enthusiasts from Bengaluru have always been receptive and an amazing when it comes to tech meetups. Cheers to everyone actively participating. 🙌&lt;/p&gt;

&lt;h3&gt;
  
  
  🦸‍♂️ AWS Serverless Hero
&lt;/h3&gt;

&lt;p&gt;In Nov 2022, honoured to be recognized as the &lt;em&gt;AWS Serverless Hero&lt;/em&gt; along with AWSome community members! &lt;br&gt;
&lt;iframe class="tweet-embed" id="tweet-1592650265739812865-530" src="https://platform.twitter.com/embed/Tweet.html?id=1592650265739812865"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1592650265739812865-530');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1592650265739812865&amp;amp;theme=dark"
  }



&lt;br&gt;
Being an AWS Community Builder and graduating into AWS Serverless Hero is one of my most pride takes from this year. It's been over a month of being a AWS Serverless Hero, I'm on a journey continuing Serverless Advocacy.&lt;br&gt;&lt;br&gt;
More details in &lt;a href="https://aws.amazon.com/developer/community/heroes/jones-zachariah-noel/?did=dh_card&amp;amp;trk=dh_card" rel="noopener noreferrer"&gt;Heroes profile&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;That's my 2️⃣0️⃣2️⃣2️⃣! Thanks to everyone who have been part of it making it more memorable and wonderful for me. 🎉🤘 Have met some super AWSome folks this year. Hope to meet y'all again in 2023 and also the folks whom I've missed to meet.&lt;/p&gt;

&lt;p&gt;Have a great time! Happy New year 2️⃣0️⃣2️⃣3️⃣ 🎉🎉🎉&lt;/p&gt;

&lt;p&gt;Some tips for a cheerful 2️⃣0️⃣2️⃣3️⃣&lt;br&gt;
⚡ Be kind to each other. &lt;br&gt;
⚡ Encourage folks to be a better version of themselves. &lt;br&gt;
⚡ Share your knowledge.&lt;br&gt;
⚡ Focus on mental and physical health. &lt;br&gt;
⚡ Skill-up. &lt;/p&gt;

</description>
      <category>appreciation</category>
      <category>devrel</category>
      <category>rewind</category>
      <category>2022</category>
    </item>
    <item>
      <title>Amazon Inspector can now scan AWS Lambda Functions</title>
      <dc:creator>Jones Zachariah Noel</dc:creator>
      <pubDate>Wed, 30 Nov 2022 12:21:10 +0000</pubDate>
      <link>https://dev.to/aws-heroes/amazon-inspector-can-now-scan-aws-lambda-functions-acg</link>
      <guid>https://dev.to/aws-heroes/amazon-inspector-can-now-scan-aws-lambda-functions-acg</guid>
      <description>&lt;p&gt;&lt;a href="https://aws.amazon.com/inspector/" rel="noopener noreferrer"&gt;Amazon Inspector&lt;/a&gt;, a service focused on automated vulnerability scanner that continuously scans AWS workloads for vulnerabilities is &lt;a href="https://aws.amazon.com/about-aws/whats-new/2022/11/aws-amazon-inspector-support-aws-lambda-functions/" rel="noopener noreferrer"&gt;now supporting scanning for AWS Lambda functions&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Amazon Inspector supports scanning of AWS Lambda functions and Lambda layers with Java, NodeJS and Python runtimes. &lt;/p&gt;

&lt;h3&gt;
  
  
  Need for vulnerability checks
&lt;/h3&gt;

&lt;p&gt;Often times, we have code which depends on many packages from installed via different package managers which are prone to security leaks. Although, updating to new version could resolve it, you might have dependencies which are still prone to vulnerabilities. The best way to address is a regular scanning of your codebase to ensure there aren't serious issues.&lt;/p&gt;

&lt;p&gt;Serverless specific, until now we had to depend on a third party tool to scan but now it's possible with Amazon Inspector&lt;/p&gt;

&lt;h3&gt;
  
  
  Enabling Inspector
&lt;/h3&gt;

&lt;p&gt;First off, you would have to enable Inspector for your AWS Account.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff7jkvz2qa03ys6os5isu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff7jkvz2qa03ys6os5isu.png" alt="Enabling Inspector for your account" width="800" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Your first scan
&lt;/h3&gt;

&lt;p&gt;Once enabled, you will need a few minutes for &lt;a href="https://aws.amazon.com/inspector/" rel="noopener noreferrer"&gt;Amazon Inspector&lt;/a&gt; to scan across your resources across Amazon EC2 instances, Amazon ECR images and now AWS Lambda functions and Lambda layers.&lt;/p&gt;

&lt;p&gt;After &lt;a href="https://aws.amazon.com/inspector/" rel="noopener noreferrer"&gt;Amazon Inspector&lt;/a&gt; has scanned you can view the report on Inspector dashboard.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr5pqdecmoqh63uu6yi6w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr5pqdecmoqh63uu6yi6w.png" alt="Amazon Inspector dashboard of all vulnerabilities" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;[Fun Fact] &lt;em&gt;As you can see, I don't have a single EC2 instance running on this AWS Account&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scanned findings
&lt;/h3&gt;

&lt;p&gt;Inspector found that &lt;em&gt;9 of my Lambda functions&lt;/em&gt; had a vulnerabilities with critical, high and medium levels.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxg29787qti3zumn9lplr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxg29787qti3zumn9lplr.png" alt="Inspector findings by Lambda functions" width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you click on one of the functions, you can find the summary for vulnerabilities in that specific AWS Lambda function or the vulnerability because of using an AWS Lambda layer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feg1aaplm6hfmmjmaltoh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feg1aaplm6hfmmjmaltoh.png" alt="Summary for a Lambda function" width="800" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj32elcivjjluebc3gktn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj32elcivjjluebc3gktn.png" alt="Findings for a Lambda function" width="800" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Let's dive into the finding
&lt;/h3&gt;

&lt;p&gt;One of the vulnerability is with &lt;a href="https://www.npmjs.com/package/axios" rel="noopener noreferrer"&gt;Axios NPM package&lt;/a&gt;.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fez8fnbjqffnf5ybe8emc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fez8fnbjqffnf5ybe8emc.png" alt="Vulnerability with Axios" width="800" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This also gives details about axios package and the affected with fixed version.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdl44g5tpoz20o881o4wz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdl44g5tpoz20o881o4wz.png" alt="Affected packages" width="800" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Inspector provides you the complete details of the vulnerability along with the link to National Vulnerability Database (NVD) report.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy34zx1ec2of0s3ybwf4e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy34zx1ec2of0s3ybwf4e.png" alt="Vulnerability details" width="800" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Along the details, you can also find how to fix it with the available remedy.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8eqzexbfuyuplqcj3s0d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8eqzexbfuyuplqcj3s0d.png" alt="Remedy to fix the vulnerability" width="800" height="160"&gt;&lt;/a&gt;&lt;br&gt;
In this case, it's updating axios version.&lt;/p&gt;

&lt;p&gt;Another way to understand the severity of the vulnerability, the score from National Vulnerability Database (NVD) and Inspector is available. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgdbr0959q6q4ttqgyg8m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgdbr0959q6q4ttqgyg8m.png" alt="Inspector score" width="800" height="705"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Pricing
&lt;/h3&gt;

&lt;p&gt;Amazon Inspector is available as part of free trial for 15 days. &lt;br&gt;
For Lambda scans alone, there is monthly based on average number of Lambda functions scanned per month and price is prorated based on total Inspector coverage hours for the month. &lt;/p&gt;

&lt;p&gt;More details on &lt;a href="https://aws.amazon.com/inspector/pricing" rel="noopener noreferrer"&gt;Amazon Inspector Pricing&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Action time!
&lt;/h3&gt;

&lt;p&gt;Now it's time to scan your Lambda functions and layers with Amazon Inspector.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiscsw33127mdlvb883go.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiscsw33127mdlvb883go.gif" alt="Time for scans now" width="400" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>Why AWS Step Functions and SDK integrations</title>
      <dc:creator>Jones Zachariah Noel</dc:creator>
      <pubDate>Sun, 23 Oct 2022 17:49:06 +0000</pubDate>
      <link>https://dev.to/aws-builders/why-aws-step-functions-and-sdk-integrations-4eeh</link>
      <guid>https://dev.to/aws-builders/why-aws-step-functions-and-sdk-integrations-4eeh</guid>
      <description>&lt;p&gt;&lt;a href="https://aws.amazon.com/step-functions/" rel="noopener noreferrer"&gt;AWS Step Functions&lt;/a&gt; helps you orchestrate your Serverless workflows and AWS Step Functions is expanding the way you integrate with multiple AWS Services with SDK integrations. &lt;/p&gt;

&lt;p&gt;In this blog, we will look at how AWS Step functions and SDK integrations can help you architect better your Serverless applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why AWS Step Functions?
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;This is the most common question I hear!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx5ba0vn3seoeurn0270t.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx5ba0vn3seoeurn0270t.gif" alt="Let's answer that!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Support of flow components &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;AWS Step Functions allows you to define your workflows with different components - &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Task - Single unit of work which can integrate with different AWS Services&lt;/li&gt;
&lt;li&gt;Choice - Conditional branching of flows&lt;/li&gt;
&lt;li&gt;Parallel - When you have to simultaneously have to execute different tasks&lt;/li&gt;
&lt;li&gt;Wait - Wait until &lt;em&gt;x&lt;/em&gt; seconds&lt;/li&gt;
&lt;li&gt;Fail - Stop the execution with a failure&lt;/li&gt;
&lt;li&gt;Succeed - Stop the execution successfully&lt;/li&gt;
&lt;li&gt;Pass - For pass through to the next state&lt;/li&gt;
&lt;li&gt;Map - When working with loops&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Integrates with different AWS Services &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;AWS Step Functions integrates with over 200+ AWS Services API Actions enabling you to build workflows which can in reality communicate with multiple combination of AWS Services either with SDK integration or with other Serverless services with HTTP optimised integration.&lt;/p&gt;

&lt;h4&gt;
  
  
  Workflow definitions
&lt;/h4&gt;

&lt;p&gt;The workflows (state machines) are well defined in a JSON format called &lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html" rel="noopener noreferrer"&gt;Amazon States Language (ASL)&lt;/a&gt;. ASL define the workflow using different components and the possible &lt;a href=""&gt;intrinsic functions&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Comment"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"State machine to recognize celebrities and write into DynamoDB"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"StartAt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"RecognizeCelebrities"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"States"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"RecognizeCelebrities"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Task"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Parameters"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"Image"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"S3Object"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
              &lt;/span&gt;&lt;span class="nl"&gt;"Bucket.$"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$.detail.bucket.name"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
              &lt;/span&gt;&lt;span class="nl"&gt;"Name.$"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$.detail.object.key"&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"arn:aws:states:::aws-sdk:rekognition:recognizeCelebrities"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Next"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ProcessEachCeleb"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"ResultPath"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$.response.celebrities"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"ProcessEachCeleb"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Map"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Iterator"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"StartAt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DynamoDB PutItem"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"States"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"DynamoDB PutItem"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
              &lt;/span&gt;&lt;span class="nl"&gt;"Type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Task"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
              &lt;/span&gt;&lt;span class="nl"&gt;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"arn:aws:states:::aws-sdk:dynamodb:putItem"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
              &lt;/span&gt;&lt;span class="nl"&gt;"Parameters"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"TableName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${DDBTable}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"Item"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                  &lt;/span&gt;&lt;span class="nl"&gt;"pk"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                    &lt;/span&gt;&lt;span class="nl"&gt;"S.$"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"States.UUID()"&lt;/span&gt;&lt;span class="w"&gt;
                  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
                  &lt;/span&gt;&lt;span class="nl"&gt;"sk"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                    &lt;/span&gt;&lt;span class="nl"&gt;"S.$"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$.DocumentName"&lt;/span&gt;&lt;span class="w"&gt;
                  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
                  &lt;/span&gt;&lt;span class="nl"&gt;"CelebrityName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                    &lt;/span&gt;&lt;span class="nl"&gt;"S.$"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$.CelebJSON.Name"&lt;/span&gt;&lt;span class="w"&gt;
                  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
                  &lt;/span&gt;&lt;span class="nl"&gt;"MatchConfidence"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                    &lt;/span&gt;&lt;span class="nl"&gt;"N.$"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"States.Format('{}',$.CelebJSON.MatchConfidence)"&lt;/span&gt;&lt;span class="w"&gt;
                  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
                  &lt;/span&gt;&lt;span class="nl"&gt;"Urls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                    &lt;/span&gt;&lt;span class="nl"&gt;"S.$"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"States.ArrayGetItem($.CelebJSON.Urls,0)"&lt;/span&gt;&lt;span class="w"&gt;
                  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
              &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
              &lt;/span&gt;&lt;span class="nl"&gt;"End"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"ItemsPath"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$.response.celebrities.CelebrityFaces"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Parameters"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"CelebIndex.$"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$$.Map.Item.Index"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"CelebJSON.$"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$$.Map.Item.Value"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"DocumentName.$"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$.detail.object.key"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"ResultPath"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$.response.items"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"End"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h4&gt;
  
  
  Serverless orchestration of workflows
&lt;/h4&gt;

&lt;p&gt;When you want to build a workflow which has series of tasks that uses different components with the Amazon States Language (ASL) defining the state machine with different integrations to several AWS services.&lt;/p&gt;
&lt;h4&gt;
  
  
  Workflow Studio
&lt;/h4&gt;

&lt;p&gt;AWS Step Functions provides &lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/workflow-studio.html" rel="noopener noreferrer"&gt;Workflow Studio&lt;/a&gt; which is a low-code visual workflow designer. This is available in your AWS Console where you can create Standard or Express workflows with different combinations of tasks. With Workflow Studio, you can auto-generate the ASL as a JSON file which can be exported for your developing with different IaC practices. &lt;/p&gt;
&lt;h4&gt;
  
  
  API actions with sync and async
&lt;/h4&gt;

&lt;p&gt;When integrating with different AWS Services, some of the services' API actions expects you to just start the execution or &lt;code&gt;await&lt;/code&gt; for response to be returned, in such scenarios, AWS Step Functions supports both the ways of invocations as part of the API actions integrations.&lt;/p&gt;
&lt;h4&gt;
  
  
  Intrinsic functions
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html" rel="noopener noreferrer"&gt;Intrinsic functions&lt;/a&gt; are functions available in Amazon States Language (ASL) which are focused on making integrations with different &lt;em&gt;Tasks&lt;/em&gt; easier with pre-processing and post-processing the data.&lt;/p&gt;

&lt;p&gt;Here is another blog-post which talks about how Intrinsic functions are helpful.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/awscommunity-asean" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__org__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F3974%2F95700370-548c-431b-8ed5-cce70f477aed.png" alt="AWS Community ASEAN"&gt;
      &lt;div class="ltag__link__user__pic"&gt;
        &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F615180%2Ffc1ebf14-25d7-4f09-ae53-807a0a859f9d.png" alt=""&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/awscommunity-asean/intrinsic-functions-to-level-up-your-step-functions-2k84" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Intrinsic functions to level-up your Step Functions&lt;/h2&gt;
      &lt;h3&gt;Jones Zachariah Noel for AWS Community ASEAN ・ Sep 4 '22&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#aws&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#serverless&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#stepfunctions&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#functions&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;



&lt;h4&gt;
  
  
  Pricing model for Step Functions
&lt;/h4&gt;

&lt;p&gt;The pricing model for AWS Step Functions is based on each state machine execution which includes state transitions for Standard or Express workflows. &lt;/p&gt;

&lt;h5&gt;
  
  
  To summarise
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvc5p8k6ha2qe8fqew665.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvc5p8k6ha2qe8fqew665.png" alt="Benefits of AWS Step Functions"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Service integration patterns
&lt;/h3&gt;

&lt;p&gt;When integrating with different AWS Services, we would have to integrate with one of the patterns - &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Request / Response&lt;/li&gt;
&lt;li&gt;Run a job (sync)&lt;/li&gt;
&lt;li&gt;Callback&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Request / Response &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;AWS Services API action which process the &lt;em&gt;request&lt;/em&gt; and waits to return the &lt;em&gt;response&lt;/em&gt; from the HTTP request.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ojgl4k2eolotqmihfc2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ojgl4k2eolotqmihfc2.png" alt="Request / Response example"&gt;&lt;/a&gt;&lt;br&gt;
In the above example, we are using DynamoDB's &lt;em&gt;Query&lt;/em&gt; API action with SDK integration, the state machine will expect the response from &lt;em&gt;Query&lt;/em&gt; API action. &lt;/p&gt;
&lt;h4&gt;
  
  
  Run a job (sync) &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;When working with batch tasks or synchronous tasks you would have to wait for a longer period of time until this is completed. In such scenarios, you could choose to &lt;em&gt;wait for the task to complete&lt;/em&gt; which will pause the state machine execution until the task is completed. Once it is complete, the state machine execution resumes. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7gcpnyrauc0m5ophbo8o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7gcpnyrauc0m5ophbo8o.png" alt="Run a job (sync) example"&gt;&lt;/a&gt;&lt;br&gt;
The resource for sync based integrations are suffixed with &lt;code&gt;.sync&lt;/code&gt;, for example when running an ECS task -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Resource": "arn:aws:states:::aws-sdk:ecs:runTask.sync",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h4&gt;
  
  
  Callback &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;Callbacks work with a &lt;em&gt;task token&lt;/em&gt; that has to be returned, until that &lt;em&gt;task token&lt;/em&gt; is returned, state machine execution is paused. Whenever working with callbacks, the resource is suffixed with &lt;code&gt;.waitForTaskToken&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe5k8x41dlw2rte2kkhv6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe5k8x41dlw2rte2kkhv6.png" alt="Callback example"&gt;&lt;/a&gt;&lt;br&gt;
In the above example, the state machine defines that AWS Lambda functions is invoked with a &lt;em&gt;callback&lt;/em&gt; integration pattern and it expects a &lt;em&gt;task token&lt;/em&gt; returned from Lambda function to continue with the state machine execution.&lt;/p&gt;
&lt;h3&gt;
  
  
  SDK Integrations
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/step-functions/" rel="noopener noreferrer"&gt;AWS Step Functions&lt;/a&gt; announced the support of &lt;a href="https://aws.amazon.com/about-aws/whats-new/2021/09/aws-step-functions-200-aws-sdk-integration/" rel="noopener noreferrer"&gt;SDK integrations with AWS Services' API actions&lt;/a&gt; last year with over 200+ services and it's been growing the list of service API actions supported.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy5871mvbyojgb2970lot.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy5871mvbyojgb2970lot.png" alt="SDK integrations"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Single source of workflow
&lt;/h4&gt;

&lt;p&gt;With Serverless architecture, you would be working with multiple Serverless services these would traditionally distributed over multiple Lambda functions. With AWS Step Functions, you can have the complete workflow in a single &lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html" rel="noopener noreferrer"&gt;Amazon States Language (ASL)&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;
  
  
  Direct service integrations
&lt;/h4&gt;

&lt;p&gt;SDK integrations enable you to directly integrate with different AWS Services with the supported API actions. This helps developers to work with direct service integration with the API action's payload of both request and response.&lt;/p&gt;
&lt;h4&gt;
  
  
  Error handling
&lt;/h4&gt;

&lt;p&gt;AWS Step Functions provides a good way to handle errors with &lt;em&gt;retry-catch&lt;/em&gt; definitions on your &lt;em&gt;tast&lt;/em&gt; state where you can anticipate the errors would come in.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"Lambda Invoke"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Task"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"arn:aws:states:::aws-sdk:lambda:invoke.waitForTaskToken"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"OutputPath"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$.Payload"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Parameters"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Payload.$"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Retry"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"ErrorEquals"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="s2"&gt;"Lambda.ServiceException"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="s2"&gt;"Lambda.AWSLambdaException"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="s2"&gt;"Lambda.SdkClientException"&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"IntervalSeconds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"MaxAttempts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"BackoffRate"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Next"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ECS RunTask"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Catch"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"ErrorEquals"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="s2"&gt;"States.ResultPathMatchFailure"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="s2"&gt;"States.Timeout"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="s2"&gt;"States.BranchFailed"&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"Next"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Lambda Invoke"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h4&gt;
  
  
  Lambda-less
&lt;/h4&gt;

&lt;p&gt;AWS Step functions being a low-code Serverless workflow orchestrator, you can define multiple AWS Services direct integrations which can reduce the usage of Lambda functions for working with several AWS Services. &lt;/p&gt;
&lt;h4&gt;
  
  
  Cost effective
&lt;/h4&gt;

&lt;p&gt;With the reduction of Lambda functions in your architecture as Step Function tasks are directly integrated with the AWS Service using SDK based API actions, the cost of running your Serverless workflow would reduce. Given that based on the use-case you could even choose between &lt;em&gt;Standard&lt;/em&gt; or &lt;em&gt;Express&lt;/em&gt; workflows which helps in cost optimisation. &lt;/p&gt;
&lt;h3&gt;
  
  
  AWS Step Functions and SDK integrations in action
&lt;/h3&gt;

&lt;p&gt;When you have a workflow which needs integration with &lt;a href="https://aws.amazon.com/rekognition/" rel="noopener noreferrer"&gt;AWS Rekognition&lt;/a&gt;, &lt;a href="https://aws.amazon.com/dynamodb/" rel="noopener noreferrer"&gt;Amazon DynamoDB&lt;/a&gt; and the additional business logic on AWS Lambda functions, the architecture of using them in your Serverless application would be with AWS Lambda functions as seen in the below diagram.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabamgg9n2o5q3fkxsg6n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabamgg9n2o5q3fkxsg6n.png" alt="Workflow without Step functions"&gt;&lt;/a&gt;&lt;br&gt;
When converting to an architecture using AWS Step Functions would mean that you can leverage the workflow based sequential flow. Again you would be using Lambda functions with the Lambda functions would in-turn invoke the respect AWS Service API action with SDKs.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo8o1xa57ov4pbmz50yqb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo8o1xa57ov4pbmz50yqb.png" alt="Workflow with Lambda functions"&gt;&lt;/a&gt;&lt;br&gt;
To step-up with the usage of SDK integrations on Step Functions and intrinsic functions, you can eliminate Lambda functions from your architecture and maintain your Serverless workflow completely on Step Functions.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz3otpo43ddnil62ty78x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz3otpo43ddnil62ty78x.png" alt="With Step Functions and SDK integration"&gt;&lt;/a&gt;&lt;br&gt;
When the workflow is executed, you can view the complete results on AWS Console which is available for both Standard and now available for Express workflows also.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpmk1yw7r9ugnxt4t9jfg.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpmk1yw7r9ugnxt4t9jfg.gif" alt="Execution details of the workflow"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is based on the session presented at AWS APAC Community Summit 2022, you can also view the &lt;a href="https://speakerdeck.com/zachjonesnoel/build-better-with-step-functions-and-sdk-integrations" rel="noopener noreferrer"&gt;slide deck&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The GitHub repository with SAM template is available for the above example.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/zachjonesnoel" rel="noopener noreferrer"&gt;
        zachjonesnoel
      &lt;/a&gt; / &lt;a href="https://github.com/zachjonesnoel/celebgram" rel="noopener noreferrer"&gt;
        celebgram
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A fun application to recognize celebrities in an image using AWS Step Functions, Amazon EventBridge combining the patterns of orchestration and choreography.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Celebgram&lt;/h1&gt;

&lt;/div&gt;

&lt;p&gt;This is for demonstrating AWS Step Functions with SDK integrations!&lt;/p&gt;

&lt;p&gt;In this demo, the &lt;a href="https://github.com/zachjonesnoel/celebgram./template.yaml" rel="noopener noreferrer"&gt;SAM Template&lt;/a&gt; shows how the State Machines could use SDK integrations with Amazon Rekognition and Amazon DynamoDB to create Serverless orchestration of Recognizing a celebrity from an image uploaded to S3.&lt;/p&gt;

&lt;p&gt;You can read more about it in my blog-post - &lt;a href="https://dev.to/aws-builders/why-aws-step-functions-and-sdk-integrations-4eeh" rel="nofollow"&gt;https://dev.to/aws-builders/why-aws-step-functions-and-sdk-integrations-4eeh&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was presented at AWS APAC Community Summit '22, Bangkok. You can view the &lt;a href="https://speakerdeck.com/zachjonesnoel/build-better-with-step-functions-and-sdk-integrations" rel="nofollow noopener noreferrer"&gt;slide-deck&lt;/a&gt;.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;How to try it?&lt;/h1&gt;

&lt;/div&gt;

&lt;p&gt;Clone the project&lt;/p&gt;

&lt;p&gt;With &lt;a href="https://aws.amazon.com/serverless/sam/" rel="nofollow noopener noreferrer"&gt;AWS SAM&lt;/a&gt; CLI pre-installed, build the SAM app with&lt;/p&gt;

&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;sam build
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Deploy to your AWS Account with&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;sam deploy --guided
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Once you have tried it out, don't forget to delete with&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;sam delete
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/zachjonesnoel/celebgram" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;This series holds a lot of other Serverless workflows powered with Step Functions and SDK Integrations - &lt;a href="https://dev.to/zachjonesnoel/series/16484"&gt;https://dev.to/zachjonesnoel/series/16484&lt;/a&gt; &lt;/p&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
      <category>stepfunctions</category>
      <category>sdk</category>
    </item>
    <item>
      <title>Intrinsic functions to level-up your Step Functions</title>
      <dc:creator>Jones Zachariah Noel</dc:creator>
      <pubDate>Sun, 04 Sep 2022 10:20:41 +0000</pubDate>
      <link>https://dev.to/awscommunity-asean/intrinsic-functions-to-level-up-your-step-functions-2k84</link>
      <guid>https://dev.to/awscommunity-asean/intrinsic-functions-to-level-up-your-step-functions-2k84</guid>
      <description>&lt;p&gt;&lt;a href="https://aws.amazon.com/step-functions/" rel="noopener noreferrer"&gt;AWS Step Functions&lt;/a&gt;  enables you to orchestrate serverless workflows by integrating with different AWS services. Those AWS services would need inputs in a specific format and also produces output in a specific format and to do that we have mapping templates / resolvers. &lt;/p&gt;

&lt;h3&gt;
  
  
  Intrinsic functions
&lt;/h3&gt;

&lt;p&gt;When working with different resolvers on &lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html" rel="noopener noreferrer"&gt;Amazon States Language (ASL)&lt;/a&gt;, you can have in-built methods called &lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html" rel="noopener noreferrer"&gt;intrinsic functions&lt;/a&gt;. These &lt;em&gt;intrinsic functions&lt;/em&gt; help with several operations in your mapping templates where you can process and manipulate with &lt;em&gt;arrays, JSON objects, strings, math operations&lt;/em&gt; and more.&lt;/p&gt;

&lt;p&gt;Previously, there were 4 intrinsic functions - &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;States.Array&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;States.Format&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;States.JsonToString&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;States.stringToJson&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just a couple of days back, &lt;a href="https://aws.amazon.com/step-functions/" rel="noopener noreferrer"&gt;AWS Step Functions&lt;/a&gt; added 14 new intrinsic functions, you can read the announcement &lt;a href="https://aws.amazon.com/about-aws/whats-new/2022/08/aws-step-functions-14-new-intrinsic-features-process-data-workflows/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Intrinsic function&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html#asl-intrsc-func-arrays" rel="noopener noreferrer"&gt;Array&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;States.ArrayPartition&lt;/code&gt;, &lt;code&gt;States.ArrayContains&lt;/code&gt;, &lt;code&gt;States.ArrayRange&lt;/code&gt;, &lt;code&gt;States.ArrayGetItem&lt;/code&gt;, &lt;code&gt;States.ArrayUnique&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html#asl-intrsc-func-data-encode-decode" rel="noopener noreferrer"&gt;Data encoding and decoding&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;States.Base64Encode&lt;/code&gt;, &lt;code&gt;States.Base64Decode&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html#asl-intrsc-func-hash-calc" rel="noopener noreferrer"&gt;Hash calculation&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;States.Hash&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html#asl-intrsc-func-json-manipulate" rel="noopener noreferrer"&gt;JSON&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;States.JsonMerge&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html#asl-intrsc-func-math-operation" rel="noopener noreferrer"&gt;Math&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;States.MathRandom&lt;/code&gt;, &lt;code&gt;States.MathAdd&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html#asl-intrsc-func-string-operation" rel="noopener noreferrer"&gt;String&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;States.StringSplit&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html#asl-intrsc-func-uuid-generate" rel="noopener noreferrer"&gt;UID generator&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;States.UUID&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Now we have 18 intrinsic functions. &lt;/p&gt;

&lt;h3&gt;
  
  
  What it looked like without &lt;em&gt;intrinsic functions&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Without the intrinsic functions, the need for any such data processing or manipulation required you to write code in your &lt;a href="https://aws.amazon.com/lambda/" rel="noopener noreferrer"&gt;AWS Lambda functions&lt;/a&gt; which involved having a dedicated &lt;em&gt;Task&lt;/em&gt; in the State Machine where it would invoke your Lambda function. &lt;br&gt;
And your architectures would have excessive resources, your workflows mostly included AWS Step Functions which is invoking AWS Lambda functions for all data manipulations. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5wm9exlt7r2y4ob3nla9.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5wm9exlt7r2y4ob3nla9.gif" alt="Too many things to do!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When &lt;a href="https://aws.amazon.com/about-aws/whats-new/2021/09/aws-step-functions-200-aws-sdk-integration/" rel="noopener noreferrer"&gt;SDK integrations&lt;/a&gt; was announced, we started thinking about workflows that could easily integrate with other AWS services. Many of us thought of migrating our workflows in AWS Lambda to AWS Step Functions but there were a few challenges - &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We could use it only for direct SDK integrations without data processing and we could not eliminate Lambda functions completely.&lt;/li&gt;
&lt;li&gt;From the &lt;em&gt;sustainability&lt;/em&gt; angle, we still had our Lambda code which was executing whenever our State Machine executes. &lt;/li&gt;
&lt;li&gt;The State Machines had additional &lt;em&gt;Tasks&lt;/em&gt;, which affected the pricing as it's with every transition of state. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  First set of &lt;em&gt;intrinsic functions&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Intrinsic functions helped us reduce some of the basic parsing use-cases executed in Lambda functions and were limited to -&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Format the message with variables&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Parsing String to JSON and vice versa&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Working with arrays either creating or retrieving the array&lt;/em&gt;. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What's possible now with &lt;em&gt;intrinsic functions&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;With the 14 new intrinsic functions introduced, we have use-cases which are now possible within Step Functions without having additional &lt;em&gt;Tasks&lt;/em&gt;. Some of the use-cases possible - &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Generating UUIDs when you are creating new records in your DynamoDB or messages which are posted to SQS queues or SNS topics.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Able to hash string with different hashing algorithms - &lt;code&gt;MD5&lt;/code&gt;, &lt;code&gt;SHA-256&lt;/code&gt; and more. Or even encoding and decoding string to &lt;code&gt;Base64&lt;/code&gt;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Working with different array based manipulations, where you may have to get a specific item or a unique item in the array or partitioning your arrays.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Easier way to split string into an array.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Generating random numbers.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhhpbc1x03cyeoaftnhdu.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhhpbc1x03cyeoaftnhdu.gif" alt="Can't wait to try them up!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But when using intrinsic functions, you would have to consider the &lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html#amazon-states-language-intrinsic-functions-escapes" rel="noopener noreferrer"&gt;reserved characters&lt;/a&gt; which requires you to escape the characters with a backslash (&lt;code&gt;\&lt;/code&gt;). And the &lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html#amazon-states-language-intrinsic-functions-states" rel="noopener noreferrer"&gt;fields which support&lt;/a&gt; them which gives you a better understanding of which state what can be performed. &lt;/p&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
      <category>stepfunctions</category>
      <category>functions</category>
    </item>
  </channel>
</rss>
