<?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: Ali Ogun</title>
    <description>The latest articles on DEV Community by Ali Ogun (@ayogun).</description>
    <link>https://dev.to/ayogun</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%2F1156932%2F1975a78e-8da9-434c-aadc-ea20fe781e17.png</url>
      <title>DEV Community: Ali Ogun</title>
      <link>https://dev.to/ayogun</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ayogun"/>
    <language>en</language>
    <item>
      <title>Step by Step Troubleshooting WAFv2 - With Pictures</title>
      <dc:creator>Ali Ogun</dc:creator>
      <pubDate>Mon, 03 Jun 2024 16:53:58 +0000</pubDate>
      <link>https://dev.to/aws-builders/step-by-step-troubleshooting-wafv2-with-pictures-4hnp</link>
      <guid>https://dev.to/aws-builders/step-by-step-troubleshooting-wafv2-with-pictures-4hnp</guid>
      <description>&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%2Fpy3rwk77fmtuhatbou7y.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%2Fpy3rwk77fmtuhatbou7y.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You suspect that the Web Application Firewall (WAF) may be obstructing the functionality of your application. This article provides guidance on diagnosing the issue and adjusting/removing WAF rules as necessary.&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%2Fy5217a7m94hil4caxmur.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%2Fy5217a7m94hil4caxmur.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;code&gt;WEB ACLs&lt;/code&gt; tab under the WAF dashboard as shown in figure.&lt;/li&gt;
&lt;/ol&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%2F0mtm0ynwz719lljp9qjz.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%2F0mtm0ynwz719lljp9qjz.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make sure you choose the correct region. In this example my WAF is deployed in Ohio(us-east-2). And then click your WAF rule, here in this example the name is managed_rules.&lt;/li&gt;
&lt;/ol&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%2Fxeu25rr5y5q78sdulaua.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%2Fxeu25rr5y5q78sdulaua.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In this dashboard, you can access comprehensive metrics related to your WAF. Take a moment to review the graphics and metrics to become acquainted with them. Make sure that Blocked button is selected only. However, the information we require is located at the bottom of the page, so please scroll down accordingly.&lt;/li&gt;
&lt;/ol&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%2Fqq447igjdpbtdycjfas9.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%2Fqq447igjdpbtdycjfas9.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4.At the bottom, we can see at the Attack Types graph that our WAF detected 3 different attack types as SQL Injection, NoUserAgent and BadBots.  We see those 3 because previously I tried to do an SQL injection to my application and also I made HTTPS requests without proper headers. In Requests terminated by managed rule groups you can see which rule groups are blocking your requests. In my case they are AWSManagedRulesSQLiRuleSet (for SQL injection) and AWSManagedRulesCommonRuleSet (for missing and bad agent header). Now that we have gathered some information, our focus needs to shift to the individual rules rather than the rule groups. Let's direct our attention to the graphic located at the bottom left Top 10 managed rule labels. &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%2F4s2wpk7y607fv3n3wy3z.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%2F4s2wpk7y607fv3n3wy3z.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If we take a closer look at this graph, we can see exactly when each rule kicks in and stops your access. Just match up the times when you tried to access with the points on the graph. The pink line on the graph shows which rule is stopping you. Below the graph, you'll see a list of rules that were triggered, each with its own color. In my case, it looks like the rule that's causing the trouble is aws:core-rule-set:NoUserAgent_Header. So what does it mean?&lt;/li&gt;
&lt;/ol&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%2F0cop7gwd9hbn5fb3lehf.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%2F0cop7gwd9hbn5fb3lehf.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The rule label is aws:core-rule-set:NoUserAgent_Header. After the last column, we see the name of the rule we want to exclude, which is NoUserAgent_Header. I actually sent a request with an empty user agent header, triggering this rule. Now, let's proceed and see how to exclude the rule programmatically.&lt;/li&gt;
&lt;/ol&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%2Fghvvzmy0ouix350x0bqz.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%2Fghvvzmy0ouix350x0bqz.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The rule NoUserAgent_Header belongs to the core-rule-set, and we need to refer to the corresponding AWS documentation to verify the actual name of NoUserAgent_Header because it is case-sensitive. As shown in the image below, we find the corresponding LABEL and Role Name. So in our case, the rule name I need to use in the exclude list is NoUserAgent_HEADER, not NoUserAgent_Header, because it is case-sensitive. Please take a look at the table below to find corresponding AWS page for your label name that you see in CloudWatch.&lt;/li&gt;
&lt;/ol&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%2Feh1nfvb9dref0hd32jjz.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%2Feh1nfvb9dref0hd32jjz.png" alt="Image description"&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;Label from CloudWatch&lt;/th&gt;
&lt;th&gt;Corresponding AWS Page&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;core-rule-set&lt;/td&gt;
&lt;td&gt;AWSManagedRulesCommonRuleSet&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sql-database&lt;/td&gt;
&lt;td&gt;AWSManagedRulesSQLiRuleSet&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;windows-os&lt;/td&gt;
&lt;td&gt;AWSManagedRulesWindowsRuleSet&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;known-bad-inputs&lt;/td&gt;
&lt;td&gt;AWSManagedRulesKnownBadInputsRuleSet&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;amazon-ip-list&lt;/td&gt;
&lt;td&gt;AWSManagedRulesAmazonIpReputationList&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;Now we can go to our root module and define our variables as shown below. We wanted to exclude NoUserAgent_HEADER and I place it under the rules_to_exclude_common list because this rule is part of the AWSManagedRulesCommonRuleSet. As you can see I also exclude as I wish other rules. Here I also excluded SQLi_QUERYARGUMENTS which is a rule blocks SQL injections and also I excluded UserAgent_BadBots_HEADER which inspects for common User-Agent header values that indicate that the request is a bad bot. You can see the code snippet at the bottom of the page.&lt;/li&gt;
&lt;/ol&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%2Ffvhepmfqn4p6zc2dilzn.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%2Ffvhepmfqn4p6zc2dilzn.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But why did we place NoUserAgent_HEADER under the rules_to_exclude_commonblock? In the table below, you can identify the corresponding Terraform variable to utilize in your code by comparing it with the Label from the CloudWatch column. &lt;br&gt;
| Label from CloudWatch | Corresponding TF Variable      |&lt;br&gt;
|-----------------------|--------------------------------|&lt;br&gt;
| core-rule-set         | rules_to_exclude_common        |&lt;br&gt;
| sql-database          | rules_to_exclude_sql           |&lt;br&gt;
| windows-os            | rules_to_exclude_windows       |&lt;br&gt;
| known-bad-inputs      | rules_to_exclude_bad           |&lt;br&gt;
| amazon-ip-list        | rules_to_exclude_reputation    |&lt;/p&gt;

&lt;p&gt;Now we can provision our infrastructure with that code (or whichever IaC Tool you use):&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;terraform apply


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;Now we can check whether our changes have been applied with going back to the dashboard from STEP 3. In that screen you need to click to Rules.&lt;/li&gt;
&lt;/ol&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%2F04j3i6qkq7artahr76nv.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%2F04j3i6qkq7artahr76nv.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Here I will click common. Because I wanted to exclude NoUserAgent_HEADER , and I know that I declared it in exclusion list under the rules_to_exclude_common block and this rule is part of AWSManagedRulesCommonRuleSet. &lt;/li&gt;
&lt;/ol&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%2F2skhkg9rxwuqtk94jvt6.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%2F2skhkg9rxwuqtk94jvt6.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Below, you can observe that NoUserAgent_HEADER is explicitly allowed now. Additionally, UserAgent_BadBots_HEADER is allowed, as both have been excluded. Remember that SQLi_QUERYARGUMENTS rule has also been excluded, which you can confirm under the sql section rather than common.&lt;/li&gt;
&lt;/ol&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%2Frih8oka0xsfpf1f8mvnq.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%2Frih8oka0xsfpf1f8mvnq.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;So finally, you can see that again I send a request with an empty user agent header, but this time I receive successful response rather than &lt;code&gt;403 Forbidden&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&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%2Fe2ot741qzventol5t0d2.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%2Fe2ot741qzventol5t0d2.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>waf</category>
      <category>security</category>
    </item>
    <item>
      <title>IDE Extension for AWS Application Composer</title>
      <dc:creator>Ali Ogun</dc:creator>
      <pubDate>Tue, 19 Dec 2023 10:45:03 +0000</pubDate>
      <link>https://dev.to/aws-builders/ide-extension-for-aws-application-composer-3k3a</link>
      <guid>https://dev.to/aws-builders/ide-extension-for-aws-application-composer-3k3a</guid>
      <description>&lt;h3&gt;
  
  
  In re:Invent 2023, AWS announced IDE extension for AWS Application Composer. Let’s explore!
&lt;/h3&gt;

&lt;p&gt;About a year ago, &lt;a href="https://openai.com/blog/chatgpt"&gt;OpenAI unveiled ChatGPT&lt;/a&gt;, a Large Language Model(LLM) that drove a great attention, and the AI hype got rapidly integrated into our daily lives. In this wave of innovation, AWS — as a key player pioneer in tech advancements — has been leveraging AI in numerous ways, notably with their recent announcements in &lt;a href="https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;cad=rja&amp;amp;uact=8&amp;amp;ved=2ahUKEwi_-9_FhZuDAxU7gf0HHSlGC2oQFnoECB8QAQ&amp;amp;url=https%3A%2F%2Freinvent.awsevents.com%2F&amp;amp;usg=AOvVaw2nNrcy7-_rOe6Ypfvyn3lg&amp;amp;opi=89978449"&gt;AWS re:Invent 2023&lt;/a&gt;, like &lt;a href="https://aws.amazon.com/q/"&gt;AWS Q&lt;/a&gt;. As a Cloud Engineer, Infrastructure as Code (IaC) remains a cornerstone of my daily operations, crucial for maintaining sustainable IT infrastructure. However, amidst the buzz, an announcement seems to me that it has slipped under the radar of the community.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;AWS Application Composer and its IDE Extension&lt;/strong&gt;, fortified with AI enhancements. While Terraform dominates my workload, I can see the potential significance of this release, especially for those relying heavily on CloudFormation. So, shall we?&lt;/p&gt;

&lt;h3&gt;
  
  
  What is AWS Application Composer?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2022/12/aws-application-composer-preview/"&gt;In AWS re:Invent 2022&lt;/a&gt; event, AWS announced that service and it’s available since March 2023. AWS Application Composer is a powerful tool that makes developing and deploying apps on the AWS cloud easier. It serves as a visual builder that lets developers quickly and effectively design, build, and coordinate different AWS services to create applications.&lt;/p&gt;

&lt;p&gt;This tool makes it easier to integrate several AWS services into a coherent application architecture by offering a drag and drop interface. Using pre-built components, templates, and workflows, developers can shorten the time it takes to construct an application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_mJGKHfX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2ZkzqrsR4cUdqxLf5bADparyNwk.png%253FimgSize%253D3456x1758%26w%3D1920%26q%3D75" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_mJGKHfX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2ZkzqrsR4cUdqxLf5bADparyNwk.png%253FimgSize%253D3456x1758%26w%3D1920%26q%3D75" alt="" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Without requiring complex manual configuration, customers can use Application Composer to visually sketch out the architecture of their apps, integrating different AWS services including Lambda functions, API Gateways, databases, and more. However, it’s currently available on the AWS website. AWS has elevated its capabilities with an IDE extension. While it’s only available with Visual Studio Code at the moment, I expect broader IDE support in the future. Let’s take a look at it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is IDE extension for AWS Application Composer?
&lt;/h2&gt;

&lt;p&gt;Now, AWS Application Composer seamlessly integrates into your IDE, allowing you to visually construct modern applications and refine your IaC(infrastructure as code) templates using &lt;a href="https://aws.amazon.com/codewhisperer/"&gt;AWS CodeWhisperer&lt;/a&gt; (CodeWhisperer is a service like GitHub CoPilot, an AI-powered productivity tool for the IDE and command line that generates &lt;strong&gt;code&lt;/strong&gt;suggestions based on comments and existing &lt;strong&gt;code.&lt;/strong&gt; ).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ehwt6EaA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl00mi0ZBY4BP6yty8mUq8OtHb.png%253FimgSize%253D1500x793%26w%3D1920%26q%3D75" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ehwt6EaA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl00mi0ZBY4BP6yty8mUq8OtHb.png%253FimgSize%253D1500x793%26w%3D1920%26q%3D75" alt="" width="800" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/blogs/aws/ide-extension-for-aws-application-composer-enhances-visual-modern-applications-development-with-ai-generated-iac/"&gt;[How it looks like on IDE]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This IDE extension mirrors the &lt;strong&gt;familiar drag-and-drop experience&lt;/strong&gt; found in the console, empowering you to swiftly prototype ideas and concentrate on your application code. Not only does it bring Application Composer to your IDE, but it also enables generative AI-powered code suggestions(CodeWhisperer) within the CloudFormation template, all while visualizing the application architecture in a split view. With synchronized visualization and CloudFormation template editing in the IDE, you can refine designs without switching between consoles, reducing manual coding and enhancing productivity. And it is available at no charge. Awesome, isn’t it?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://aws.amazon.com/blogs/aws/ide-extension-for-aws-application-composer-enhances-visual-modern-applications-development-with-ai-generated-iac/"&gt;*With Application Composer running in your IDE, you can also use the various tools available in your IDE. For example, you can seamlessly integrate IaC templates generated real-time by Application Composer with AWS Serverless Application Model (AWS SAM) to manage and deploy your serverless applications.&lt;/a&gt;*&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Beside from the use cases mentioned in the announcement of the &lt;a href="https://aws.amazon.com/blogs/aws/ide-extension-for-aws-application-composer-enhances-visual-modern-applications-development-with-ai-generated-iac/"&gt;IDE extension for AWS Application Composer&lt;/a&gt;, I believe &lt;strong&gt;of&lt;/strong&gt; that this will make it far easier to quickly validate what resources will be created by a CloudFormation template. This will be especially useful in CDK stacks where it will work as a quick way to verify that all the right components of an architecture are present without digging through the actual generated template.&lt;/p&gt;

&lt;p&gt;It also integrates directly with StepFunctions workflow studio on Visual Studio Code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cXKfPosk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl075wOGWZQKhv6o9bj7qO3Fnv.jpeg%253FimgSize%253D1200x750%26w%3D1920%26q%3D75" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cXKfPosk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl075wOGWZQKhv6o9bj7qO3Fnv.jpeg%253FimgSize%253D1200x750%26w%3D1920%26q%3D75" alt="" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before proceeding, let’s install it together.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Install AWS Application Composer in Visual Studio Code?
&lt;/h3&gt;

&lt;p&gt;We’ll install the latest &lt;a href="https://aws.amazon.com/visualstudiocode/?trk=ad553193-613c-4a84-acde-bf4fa6c173a5&amp;amp;sc_channel=el"&gt;AWS Toolkit for Visual Studio Code&lt;/a&gt; plugin. Don’t mind and go ahead if you already have the AWS Toolkit plugin installed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zBS2tPx5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl0AOHXNlU6lKrqDjWEDm8B73f.png%253FimgSize%253D3456x2234%26w%3D1920%26q%3D75" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zBS2tPx5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl0AOHXNlU6lKrqDjWEDm8B73f.png%253FimgSize%253D3456x2234%26w%3D1920%26q%3D75" alt="" width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In Visual Studio Code Extensions Marketplace, you can search for AWS Toolkit and click the blue install button. Or, just &lt;a href="https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.aws-toolkit-vscode&amp;amp;refid=ad553193-613c-4a84-acde-bf4fa6c173a5"&gt;click here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now, on left hand side you can see on your Visual Studio Code that AWS and Q sections have been added. But as you can see, now we need to login oeither with AWS Builder ID or SSO(single sign-on). And that’s it. You have it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wCuXdqVA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl0DzeKHG5nt5YnrIpN5abGM9E.png%253FimgSize%253D3456x2234%26w%3D1920%26q%3D75" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wCuXdqVA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl0DzeKHG5nt5YnrIpN5abGM9E.png%253FimgSize%253D3456x2234%26w%3D1920%26q%3D75" alt="" width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order to start using Application Composer, no need to authenticate into your AWS account. With Application Composer available on your IDE, you can open your existing AWS CloudFormation or AWS SAM templates.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--N6i0TIKt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl0JJN9qvzjPChd0zcHokVildJ.png%253FimgSize%253D1500x622%26w%3D1920%26q%3D75" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--N6i0TIKt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl0JJN9qvzjPChd0zcHokVildJ.png%253FimgSize%253D1500x622%26w%3D1920%26q%3D75" alt="" width="800" height="332"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Or simply you can create a new empty file, and right-click on the file, then select “&lt;em&gt;Open with Application Composer&lt;/em&gt;” to start developing with drag and drop interface of Application Composer. In my case, I created a “try.yaml” file. You can see in the picture below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ymm7trIv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl0YMKduCn2x8L4VMSynIPaeTO.png%253FimgSize%253D3456x2234%26w%3D1920%26q%3D75" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ymm7trIv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl0YMKduCn2x8L4VMSynIPaeTO.png%253FimgSize%253D3456x2234%26w%3D1920%26q%3D75" alt="" width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Voila! You have it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--c_slQ0zY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl19k6yUNtGleBN4rwTLWuj9ZY.png%253FimgSize%253D3456x2234%26w%3D1920%26q%3D75" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--c_slQ0zY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl19k6yUNtGleBN4rwTLWuj9ZY.png%253FimgSize%253D3456x2234%26w%3D1920%26q%3D75" alt="" width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see above, it provided me with a blank canvas which I can work on it. Here I have both code and visual editors at the same time. Any changes that I make on the canvas will also be reflected in real time on my IaC template.&lt;/p&gt;

&lt;p&gt;As you can see below, my “try.yaml” file is empty for now.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iOMFLfg8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl0gQB6tdPpNf5cztccCqv99Y3.png%253FimgSize%253D3456x2234%26w%3D1920%26q%3D75" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iOMFLfg8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl0gQB6tdPpNf5cztccCqv99Y3.png%253FimgSize%253D3456x2234%26w%3D1920%26q%3D75" alt="" width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For instance, I just drag and drop on canvas an API Gateway and a Lambda function. Then I connected them simply with drag and drop functionality again.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--07APMJlF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl1Ix4wQeKCvrlpO8KKhoozVho.png%253FimgSize%253D3456x2234%26w%3D1920%26q%3D75" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--07APMJlF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl1Ix4wQeKCvrlpO8KKhoozVho.png%253FimgSize%253D3456x2234%26w%3D1920%26q%3D75" alt="" width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Do you remember my empty “try.yaml” file? Now let’s go back and look at my YAML file. You can see below in the image that it’s not empty anymore. Generative AI already wrote the IaC for us.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Db3pHOqt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl0lltILcgJe9K4xQFY0AgBaEP.png%253FimgSize%253D3456x2234%26w%3D1920%26q%3D75" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Db3pHOqt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.aws/_next/image%3Furl%3Dhttps%253A%252F%252Fassets.community.aws%252Fa%252F2Zl0lltILcgJe9K4xQFY0AgBaEP.png%253FimgSize%253D3456x2234%26w%3D1920%26q%3D75" alt="" width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With available IaC templates in your local, it’ll be easier for you to manage the applications with AWS SAM CLI. You can easily create CI/CD with sam pipeline or deploy your stack with sam deploy.&lt;/p&gt;

&lt;p&gt;One of the features which will accelerate your dev workflow is the built-in Sync feature that easily integrates with AWS SAM command sam sync. This feature syncs your local app changes to your AWS account, that’s helpful for you to do test and validation before you deploy your app into the prod.&lt;/p&gt;

&lt;p&gt;With the new development of IaC templates with generative AI capabilities, you can instantly launch over 1000 resources in CloudFormation with generative AI code suggestions. This simplifies the integration of standard IaC resources and allows you to easily scale your architecture.&lt;/p&gt;

&lt;p&gt;For example, suppose you have configured Amazon MQ, a standard IaC resource, and you want to use Application Composer to adjust some settings in your AWS CloudFormation resource. Adjust the values ​​in the Resource Configuration section and select Generate. Application Composer provides code suggestions that seamlessly integrate with your IaC templates. This feature eliminates the need for context switching and streamlines the development process. Build modern applications with AWS Application Composer Canvas while leveraging tools like Amazon CodeWhisperer and AWS SAM to accelerate your development workflow.&lt;a href="https://aws.amazon.com/blogs/aws/ide-extension-for-aws-application-composer-enhances-visual-modern-applications-development-with-ai-generated-iac/"&gt;[*]&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Some Possible Use Cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Rapid Application Prototyping: In today’s Agile IT World, AWS Application Composer’s visual canvas within the IDE may allow for quick prototyping of application ideas. Developers can easily design, modify, and visualize architectures without relying on manual coding. This may accelerate the initial development phase, and enabling faster experimentation and validation of concepts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Infrastructure as Code (IaC) Development: For CloudFormation users, the IDE extension powered by Gen-AI offers a game changing approach to IaC development. It generates AI code suggestions, which reducing the time spent old style coding CloudFormation templates. The split view feature combines visualization and template editing, streamlining the iteration process and booming productivity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enhanced Collaboration and Iteration: By eliminating the need for constant context switching between consoles, teams may collaboratively work on projects more efficiently. The synchronization of Application Composer’s visualization and CloudFormation template editing in the IDE helps easy collaboration, allowing for quicker iterations and better development cycles.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Code Efficiency and Resource Inclusion: The generative AI capabilities empower developers to easily incorporate CloudFormation’s extensive library of resources. This ensures effective coding by providing suggestions that align with specific resource configurations, enabling easy integration of standard IaC resources into architectural designs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Streamlined Application Development Workflow: AWS Application Composer, in conjunction with Amazon CodeWhisperer and AWS SAM, facilitates a comprehensive and efficient application development workflow. Developers can harness visual design, AI-driven suggestions, and associated AWS tools to streamline the entire application development lifecycle.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have any questions, please don’t hesitate to contact me.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://aws.amazon.com/blogs/aws/ide-extension-for-aws-application-composer-enhances-visual-modern-applications-development-with-ai-generated-iac/"&gt;https://aws.amazon.com/blogs/aws/ide-extension-for-aws-application-composer-enhances-visual-modern-applications-development-with-ai-generated-iac/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2023/11/ide-extension-aws-application-composer/"&gt;https://aws.amazon.com/about-aws/whats-new/2023/11/ide-extension-aws-application-composer/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>reinvent</category>
      <category>ai</category>
      <category>iac</category>
    </item>
    <item>
      <title>AWS ECS - Spot Instance Draining vs Fargate Spot</title>
      <dc:creator>Ali Ogun</dc:creator>
      <pubDate>Mon, 20 Nov 2023 10:21:26 +0000</pubDate>
      <link>https://dev.to/aws-builders/aws-ecs-spot-instance-draining-vs-fargate-spot-3kbj</link>
      <guid>https://dev.to/aws-builders/aws-ecs-spot-instance-draining-vs-fargate-spot-3kbj</guid>
      <description>&lt;p&gt;For most organisations, cutting costs on AWS is a constant struggle. The goal of this article is to assist you to understand key differences in between Spot Instance Draining versus Fargate Spot.&lt;/p&gt;

&lt;p&gt;Amazon Web Services (AWS) offers different services for running containerized workloads efficiently. Two of them, ECS Spot Instance Draining and Fargate Spot, serve to different needs within the AWS ecosystem. Understanding their functionalities, benefits, and trade-offs is crucial for optimizing cost of containerised services.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nOwMREq2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uplo7w9lu2of2qfs6xne.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nOwMREq2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uplo7w9lu2of2qfs6xne.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I assume that you already know what the Spot Instance is and how unreliable they are due to the their nature.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS ECS Spot Instance Draining
&lt;/h2&gt;

&lt;p&gt;Spot Instance provides us up to 90% off. ECS Spot Instance Draining enables the graceful handling of Spot Instance terminations. This feature allows ECS tasks to respond to termination notifications, ensuring applications complete tasks, preserve data integrity, and shut down gracefully before Spot Instances are reclaimed. But how?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Termination Notifications&lt;/strong&gt;: You receive advance warnings of Spot Instance terminations, which enabling ECS tasks to prepare and complete ongoing processes.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Automated Spot Instance Draining will automatically place Spot instances in “DRAINING” state upon the receipt of two minute interruption notice. ECS tasks running on Spot instances will automatically be triggered for shutdown before the instance terminates and replacement tasks will be scheduled elsewhere on the cluster. No new ECS service tasks will be started on the instances once the termination process has begun. ECS takes over the coordination of termination of tasks with the termination of the underlying EC2 instance using the inherent instance “DRAINING” functionality. The managed termination, scheduling of replacement tasks and graceful termination of the LB connections reduces the probability of service interruptions. This makes it easier for customers to use Spot instances as part of their ECS cluster.&lt;br&gt;
&lt;a href="https://aws.amazon.com/about-aws/whats-new/2019/09/amazon-ecs-supports-automated-draining-for-spot-instances-running-ecs-services/"&gt;*&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Fargate Spot
&lt;/h2&gt;

&lt;p&gt;Fargate Spot offers a serverless computing experience by managing the underlying infrastructure, including Spot Instances, on behalf of the user. It provides up to a 70% discount off the regular Fargate price. This service combines the benefits of Fargate's serverless approach with the cost efficiency of Spot Instances, ensuring seamless scalability and cost savings. It comes with managed infrastructure advantage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Managed Infrastructure&lt;/strong&gt;: Eliminate the need for managing underlying instances, allowing users to focus solely on deploying and managing containerized applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choosing the Right Service for Your Use Case
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Management Overhead&lt;/strong&gt;: Consider the trade-off between managing underlying infrastructure (ECS Spot Instance Draining) and adopting a fully managed service (Fargate Spot). If you don't need to access the underlying infrastructure go for Fargate.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Workload Characteristics:&lt;/strong&gt; Evaluate workload requirements and make the decision in accordance. Because with Spot Instances pricing is per hour whereas Fargate pricing is per hour based on requested vCPU, memory, Operating Systems, CPU Architecture1, and storage resources for the Task or Pod. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;I hope this quick recap was beneficial for you, providing a perspective that helps you to work along within the tools available within AWS for ECS-related operations.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>fargate</category>
      <category>ecs</category>
    </item>
    <item>
      <title>AWS Secrets Manager vs. Systems Manager Parameter Store - Choosing the Right Solution for Your Needs</title>
      <dc:creator>Ali Ogun</dc:creator>
      <pubDate>Thu, 21 Sep 2023 10:57:16 +0000</pubDate>
      <link>https://dev.to/aws-builders/aws-secrets-manager-vs-systems-manager-parameter-store-choosing-the-right-solution-for-your-needs-42ed</link>
      <guid>https://dev.to/aws-builders/aws-secrets-manager-vs-systems-manager-parameter-store-choosing-the-right-solution-for-your-needs-42ed</guid>
      <description>&lt;p&gt;AWS offers two powerful tools, &lt;em&gt;AWS Secrets Manager&lt;/em&gt; and &lt;em&gt;Systems Manager Parameter Store&lt;/em&gt;. These services are essential for securely managing secrets and configuration data in your AWS environment.&lt;/p&gt;

&lt;p&gt;Here, we'll compare AWS Secrets Manager and Systems Manager Parameter Store to help you make a choice for your specific requirements. Whether you're an experienced AWS user or just confused starting, this comparison will guide you in choosing the right solution for your cloud security and configuration management needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  I. AWS Secrets Manager
&lt;/h2&gt;

&lt;p&gt;AWS Secrets Manager is a robust service designed for the secure management of sensitive information within AWS environments.  It provides a centralized repository for secrets, reducing the risk of accidental exposure and simplifies the task of storing, retrieving, and rotating credentials, API keys, and other secrets. &lt;/p&gt;

&lt;h2&gt;
  
  
  II. Systems Manager Parameter Store
&lt;/h2&gt;

&lt;p&gt;Systems Manager Parameter Store is another valuable service provided by AWS, offering secure management of configuration data and secrets. Systems Manager Parameter Store is designed for storing and managing configuration data, secrets, and other information. It provides a secure and centralized location for these critical assets. And now you see how those two services sound similar. We'll take a look at the similarities and the differences down below. Let's dive in!&lt;/p&gt;

&lt;h2&gt;
  
  
  III. Comparing AWS Secrets Manager and Systems Manager Parameter Store
&lt;/h2&gt;

&lt;p&gt;Let's dive into a detailed comparison of AWS Secrets Manager and Systems Manager Parameter Store to help you make an informed decision based on your specific needs. We'll explore various aspects of both services:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ease of Use&lt;/strong&gt;:&lt;br&gt;
Both services offer similar UIs on which you can declare key-values pairs for your parameters and secrets.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Storage and Encyrption&lt;/strong&gt;:&lt;br&gt;
When it comes to data storage and encryption, both AWS Secrets Manager and Systems Manager Parameter Store offer robust capabilities, but with some notable differences. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS Secrets Manager&lt;/strong&gt;: It allows you to store secrets with a generous size limit of up to 64KB. These secrets can include sensitive information like passwords, API keys, and other confidential data. Encryption is seamlessly integrated with AWS Key Management Service (KMS), ensuring that your secrets remain secure. However, it's important to note that AWS Secrets Manager is primarily designed for secret management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Systems Manager Parameter Store&lt;/strong&gt;: It provides flexibility in data storage. Standard Parameters can hold values of up to 4KB (4096 characters), while Advanced Parameters can accommodate larger entries, up to 8KB. Unlike AWS Secrets Manager, Parameter Store's primary use case extends beyond secrets. It is designed to manage various configuration variables, including URLs, database hostnames, custom settings, product keys, and more. While encryption is an option, it's not enforced by default. You can choose to enable encryption explicitly for added security. Encryption in Parameter Store is also handled via AWS KMS, requiring KMS Decrypt permissions for applications retrieving encrypted values.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Version Control&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS Secrets Manager&lt;/strong&gt;: It allows multiple versions to exist at the same time when you are performing a secret rotation. Secrets Manager distinguishes between different versions by the staging labels. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Systems Manager Parameter Store&lt;/strong&gt;: Parameter Store only allows one version of the parameter to be active at any given time. &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Secret Rotation&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS Secrets Manager&lt;/strong&gt;: It offers the ability to switch secrets at any given time and can be configured to regularly rotate depending on your requirements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Systems Manager Parameter Store&lt;/strong&gt;: In contrast, Systems Manager Parameter Store does not provide the same level of automated secret rotation as AWS Secrets Manager. While Parameter Store is a nice tool for managing configuration data and secrets, it does not offer built-in automation for secret rotation. If you rely on Parameter Store for secrets you may need to implement custom rotation processes to achieve the same level of security that AWS Secrets Manager provides.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Cross-Account Access&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS Secrets Manager:&lt;/strong&gt; It offers a convenient feature for cross-account access. You can configure secrets in AWS Secrets Manager to be accessed from another AWS account. This is particularly useful when you have secrets that are centrally managed in one AWS account but need to be accessed by applications or services running in different accounts. You can set up IAM roles or permissions that allow the necessary cross-account access, ensuring that your secrets remain protected while enabling secure sharing between AWS accounts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Systems Manager Parameter Store:&lt;/strong&gt; It also provides options for cross-account access, although the process may require more manual configuration compared to AWS Secrets Manager. You can implement IAM roles and policies to grant access to Parameter Store parameters from another AWS account. While this approach allows for cross-account access, it may involve additional setup steps and management efforts.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Pricing&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS Secrets Manager:&lt;/strong&gt; AWS Secrets Manager operates on a pay-as-you-go model, meaning you are billed based on your usage. While it offers advanced secret management features, these come at a cost from the very beginning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Systems Manager Parameter Store:&lt;/strong&gt; One of the standout advantages of Systems Manager Parameter Store is that it offers a free tier, allowing you to store up to 10,000 parameters at no cost. This can be particularly cost-effective for organizations with a substantial need for parameter management. If you require more advanced functionality for your parameters, such as setting expiration dates or time-to-live, you can choose to use Advanced Parameters, which comes at an additional cost!&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Secrets Manager is purpose-built for the secure management of sensitive information, and as such, it enforces encryption by default when you create a secret. This means that you can never store data in plaintext within Secrets Manager, ensuring that your confidential information remains protected. Additionally, Secrets Manager offers a convenient built-in password generator accessible through the AWS CLI. This feature proves invaluable when you need to create resources like an RDS (Relational Database Service) instance using a CloudFormation template. With the password generator, you can effortlessly generate a randomized, highly secure password and later reference it in your RDS configuration, enhancing the overall security of your resources.&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%2Fervgnaleim4fyho1e1jk.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%2Fervgnaleim4fyho1e1jk.png" alt="Comparison Table"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tutorialsdojo.com/aws-secrets-manager-vs-systems-manager-parameter-store/" rel="noopener noreferrer"&gt;Image-source&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  IV. How to Choose Between AWS Secrets Manager and Systems Manager Parameter Store
&lt;/h2&gt;

&lt;p&gt;Choosing between AWS Secrets Manager and Systems Manager Parameter Store boils down to your specific needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AWS Secrets Manager:&lt;/strong&gt; Opt for AWS Secrets Manager if you require robust secret management with features like automated rotation, audit logging, and seamless AWS service integration. It's ideal for securing confidential data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Systems Manager Parameter Store:&lt;/strong&gt; If you need a versatile solution for managing both secrets and non-secret configuration data, especially in larger quantities, Systems Manager Parameter Store, with its free tier and parameter policies, is a cost-effective choice.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Evaluate your security and cost requirements to make the right choice for your cloud environment.&lt;/p&gt;

&lt;p&gt;In a nutshell, AWS Secrets Manager excels in securing confidential data, providing automated rotation, audit logging, and seamless integration with AWS services.&lt;/p&gt;

&lt;p&gt;On the other hand, Systems Manager Parameter Store, on the other hand, offers versatility, cost-effectiveness, and a free tier for managing both secrets and non-secret configuration data.&lt;/p&gt;

&lt;p&gt;The choice between these services hinges on your specific requirements, balancing security, scalability, and cost considerations. Evaluate your needs carefully to make the right selection for your AWS environment.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>security</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The DIY Cloud At Home</title>
      <dc:creator>Ali Ogun</dc:creator>
      <pubDate>Sun, 10 Sep 2023 22:01:36 +0000</pubDate>
      <link>https://dev.to/aws-builders/the-diy-cloud-at-home-4k0i</link>
      <guid>https://dev.to/aws-builders/the-diy-cloud-at-home-4k0i</guid>
      <description>&lt;h2&gt;
  
  
  The DIY Cloud At Home
&lt;/h2&gt;

&lt;p&gt;An Epic Journey with the Cloudfryer!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WnfcI6Pv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3136/1%2ApKOnCawQpOb2F6mXIp0ImQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WnfcI6Pv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3136/1%2ApKOnCawQpOb2F6mXIp0ImQ.png" alt="" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’ve been a long-time follower of &lt;a href="https://twitter.com/MetinSeylan"&gt;Metin Seylan&lt;/a&gt;, a Senior Software Developer known for sharing both entertaining and educational content. Today, I stumbled upon Metin Seylan’s tweet explaining his homegrown ‘Cloudfryer’ project. I was captivated by the insights he shared and felt compelled to spread the knowledge within the community.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Qz3ey5tj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2APju9SdtL39p1BqcSOo2cwA.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Qz3ey5tj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2APju9SdtL39p1BqcSOo2cwA.jpeg" alt="" width="316" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this article, we will find answers to these questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Why did he start this project?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What hardware did he use?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What kind of cloud experience did he create at home?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How much investment did he make in the hardware?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Was all this effort worth it for him to avoid using the cloud?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, let’s start.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rxqoUpi7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3664/1%2AUSGZoy_fncuLr2UaGAjSEA.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rxqoUpi7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3664/1%2AUSGZoy_fncuLr2UaGAjSEA.jpeg" alt="" width="800" height="981"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;He started learning TensorFlow and realized that his primary need wasn’t a massive GPU but rather an efficient data pipeline.&lt;/p&gt;

&lt;p&gt;So, what did he need to do?&lt;/p&gt;

&lt;p&gt;According to him;&lt;/p&gt;

&lt;h3&gt;
  
  
  1) It involved:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Continuously scraping data from websites using bots.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using Kafka Streams to preprocess this data, making it ideal for model training.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2) His hardware requirements included:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Approximately 36 CPU cores&lt;/li&gt;
&lt;li&gt;Around 200GB of RAM&lt;/li&gt;
&lt;li&gt;10Gbit network bandwidth&lt;/li&gt;
&lt;li&gt;Space-saving&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At first, he considered using a Raspberry Pi, but he found it to be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Insufficient&lt;/li&gt;
&lt;li&gt;Costly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;His preference was the Lenovo Thinkcentre Tiny M720Q, which he described as a real beast.&lt;/p&gt;

&lt;h3&gt;
  
  
  3) So, why did he choose it? Let’s take a look
&lt;/h3&gt;

&lt;p&gt;According to him, the Lenovo Thinkcentre Tiny M720Q had several appealing features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;All components are upgradeable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It supports 8th and 9th generation CPUs, including the i9–9900T (8 Core 16 Thread).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It can handle up to 64GB of RAM.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It has a PCI-E slot, which is a significant advantage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It offers a variety of storage options, including NVME and SATA slots.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4) To meet his needs, he made the following changes:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Upgraded the CPU to an i5–9500T, offering 6 cores and 6 threads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Increased RAM to 64GB with Corsair Vengeance SODIMM.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Opted for a Samsung 980 NVME SSD for storage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enhanced networking with a 10GB Cluster Networking Intel X540-T2 NIC.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5)Now let’s talk about the software and the automation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;All software components were automated using Ansible, eliminating manual installations. It’s entirely open source!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can find the details and configurations on &lt;a href="https://github.com/MetinSeylan/homelab"&gt;*his GitHub repository&lt;/a&gt;*.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;He also mentioned that he used various software components, and you can learn more about which ones and why by checking out the repository.&lt;/p&gt;

&lt;h3&gt;
  
  
  6) Which software he used and why?
&lt;/h3&gt;

&lt;p&gt;According to him, he used the following software components and the reasons behind their selection:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="http://Kubernetes.io"&gt;**Kubernetes&lt;/a&gt;** — A well-known choice for container orchestration.&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://Cilium.io"&gt;**Cilium&lt;/a&gt;** — Selected for Kubernetes networking and bare-metal load balancing support.&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://Helm.sh"&gt;**Helm&lt;/a&gt;** — Chosen as the Kubernetes package manager.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prometheus and Grafana&lt;/strong&gt; — Utilized for cluster observability.&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://Longhorn.io"&gt;**Longhorn&lt;/a&gt;**] — Referred to as “SSD for K8s,” it allows distributed use of all disks within the cluster and automates backup and snapshot processes.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://argoproj.github.io/argo-cd/"&gt;**ArgoCD&lt;/a&gt;** — For GitOps.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These software choices were made based on their respective functionalities and suitability for the project’s requirements.&lt;/p&gt;

&lt;h3&gt;
  
  
  7) So, what is he programming and what are the dependencies?
&lt;/h3&gt;

&lt;p&gt;For his web scraper bot, he is writing code in Kotlin and outlined his approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;He’s using &lt;strong&gt;Kotlin&lt;/strong&gt; for web scraping.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To build a lightweight and efficient native executable application, he relies on a combination of Spring Boot, Spring Native, and GraalVM.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For storage and pipeline management, he mentioned using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Kafka for handling messaging.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Kafka Streams for stream processing.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These choices reflect his strategy for building an efficient and resource-friendly web scraper bot and pipeline.&lt;/p&gt;

&lt;h3&gt;
  
  
  8) The cost of the setup
&lt;/h3&gt;

&lt;p&gt;Regarding the costs of the hardware components, here’s the breakdown:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Think Centre Tiny: Approximately 65 Euro&lt;/li&gt;
&lt;li&gt;i5–9500T CPU: Ranging from 30 to 65 Euro&lt;/li&gt;
&lt;li&gt;64GB RAM: Approximately 100 Euro&lt;/li&gt;
&lt;li&gt;X540 T2 NIC: Ranging from 30 to 70 Euro&lt;/li&gt;
&lt;li&gt;NVME: About 30 Euro&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;He highlights that it’s a budget-friendly setup, mainly consisting of second-hand purchases, making it a cost-effective solution. Roughly around 255 to 330 euro.&lt;/p&gt;

&lt;h3&gt;
  
  
  9) How about electric bill?
&lt;/h3&gt;

&lt;p&gt;When it comes to electricity consumption, he shared:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;At idle, it consumes only about ~66 watts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Under heavy usage, it’s around ~250 watts or so.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MC8cUoRV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2Am7bIZtFGPFQToGK7Xwh6Xw.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MC8cUoRV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2Am7bIZtFGPFQToGK7Xwh6Xw.jpeg" alt="" width="472" height="1024"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  10) Why just not cloud?
&lt;/h3&gt;

&lt;p&gt;He explained why he opted for an on-premises setup instead of the cloud:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;He doesn’t have critical, customer-focused work, so concerns about downtime and security are minimal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;His home has a parallel internet connection with 1GBit up/down speeds, which makes it feasible for him to run his own infrastructure effectively.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These factors contributed to his decision to choose an on-premises solution over a cloud-based one.&lt;/p&gt;

&lt;h3&gt;
  
  
  11) How much would it cost on the cloud?
&lt;/h3&gt;

&lt;p&gt;He shared his estimation on Google Cloud Platform(GCP). By the way, it’s time to mention that he is a Google Cloud Developer Expert. Don’t forget to visit &lt;a href="https://metin.sh"&gt;his personal website.&lt;/a&gt; And here is the GCP bill:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--i_2EQN1T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2A4qKI4NeY225Uc13-JCz-yw.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i_2EQN1T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2A4qKI4NeY225Uc13-JCz-yw.jpeg" alt="" width="800" height="891"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;12) How about AWS?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;As an AWS Community Builder, I want to share the cost of a similar infra on AWS(Amazon Web Services). If you go with an on-demand machine like the Metin did(I assume), the cost is:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VXzymolI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AbVZTXjOCtbacf0fh-bPDOQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VXzymolI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AbVZTXjOCtbacf0fh-bPDOQ.png" alt="" width="484" height="256"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And this would make around 2,694 USD. It’s slightly more expensive than GCP. But since we compare it with a home setup, there will be an initial investment. Hence, we can choose Reserve Instances with a 3-year commitment. And the price goes down to:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3kX-ehqs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3352/1%2AVKMVHI__SK-EKngzamB89w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3kX-ehqs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3352/1%2AVKMVHI__SK-EKngzamB89w.png" alt="" width="800" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It’s monthly 2,403 USD. With proper adjustments, this price can go even more down. It’s just a matter of adjustment according to your use cases.&lt;/p&gt;

&lt;p&gt;By making informed plan choices, cloud bills can be significantly reduced. This underscores the invaluable role of consulting with cloud professionals who can guide you toward optimizing your infrastructure and keeping costs in check.&lt;/p&gt;

&lt;p&gt;As you can see with specific requirements, a meticulously crafted ‘Cloudfryer’ setup at home might just be the perfect recipe. However, the cloud offers unparalleled scalability, convenience, and cost-efficiency, making it an enticing choice for many. So, as you embark on your own journey of technological exploration, remember that the answer lies in aligning your choice with your goals, resources, and ambitions. Whichever path you choose, whether it’s the cozy corner of your home or the boundless skies of the cloud, let it serve as the canvas upon which you craft your digital masterpiece.&lt;/p&gt;

&lt;p&gt;To see the original Twitter thread(in Turkish) &lt;a href="https://twitter.com/MetinSeylan/status/1700770030508560474"&gt;click here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>aws</category>
      <category>gcp</category>
      <category>devops</category>
    </item>
    <item>
      <title>Let’s Create a Cron Job</title>
      <dc:creator>Ali Ogun</dc:creator>
      <pubDate>Sat, 09 Sep 2023 12:58:25 +0000</pubDate>
      <link>https://dev.to/ayogun/lets-create-a-cron-job-28m3</link>
      <guid>https://dev.to/ayogun/lets-create-a-cron-job-28m3</guid>
      <description>&lt;p&gt;In this article we will write a bash script and set a schedule with crontab. Students can use this article for “born2beroot” project (from 42 Cursus). My greetings to especially 42-Heilbronn peers. Okay, let’s start real quick.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KzIHgiW_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AtGQ1OFL1hdvy64upJ6bv2A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KzIHgiW_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AtGQ1OFL1hdvy64upJ6bv2A.png" alt="" width="728" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Bash Script
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;If you are already familiar with bash, you might skip this part and directly jump next section. (&lt;/em&gt;&lt;strong&gt;Setting Up Crontab&lt;/strong&gt;&lt;em&gt;)&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Create script file under this directory as: /usr/local/bin/monitoring.sh&lt;/p&gt;

&lt;p&gt;Let’s take a look at our script below and dive into it.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash

arc=$(uname -a)
pcpu=$(grep “physical id” /proc/cpuinfo | sort | uniq | wc -l)
vcpu=$(grep “^processor” /proc/cpuinfo | wc -l)
fram=$(free -m | awk ‘$1 == “Mem:” {print $2}’) 
uram=$(free -m | awk ‘$1 == “Mem:” {print $3}’)
pram=$(free | awk ‘$1 == “Mem:” {printf(“%.2f”), $3/$2*100}’) 
fdisk=$(df -Bg | grep ‘^/dev/’ | grep -v ‘/boot$’ | awk ‘{ft += $2} END {print ft}’)

udisk=$(df -Bm | grep ‘^/dev/’ | grep -v ‘/boot$’ | awk ‘{ut += $3} END {print ut}’)

pdisk=$(df -Bm | grep ‘^/dev/’ | grep -v ‘/boot$’ | awk ‘{ut += $3} {ft+= $2} END {printf(“%d”), ut/ft*100}’)

cpul=$(top -bn1 | grep ‘^%Cpu’ | cut -c 9- | xargs | awk ‘{printf(“%.1f%%”), $1 + $3}’)

lb=$(who -b | awk ‘$1 == “system” {print $3 “ “ $4}’)lvmt=$(lsblk | grep “lvm” | wc -l)

lvmu=$(if [ $lvmt -eq 0 ]; then echo no; else echo yes; fi)
ctcp=$(cat /proc/net/sockstat{,6} | awk ‘$1 == “TCP:” {print $3}’)
ulog=$(users | wc -w)
ip=$(hostname -I)
mac=$(ip link show | awk ‘$1 == “link/ether” {print $2}’) 
cmds=$(journalctl _COMM=sudo | grep COMMAND | wc -l)

wall “ 
       #Architecture: $arc
       #CPU Physical: $pcpu
       #vCPU: $vcpu
       #Total and Used Amount of RAM: $uram/${fram}MB ($pram%)
       #Disk Amount and Use: $udisk/${fdisk}Gb ($pdisk%)
       #CPU Use Rate: $cpul
       #Last Restart Time: $lb
       #LVM State of Use: $lvmu
       #Active Number of Connection: $ctcp ESTABLISHED
       #Number of Users Using the Server: $ulog
       #IP and MAC Addresses: IP $ip ($mac)
       #Number of Used Sudo: $cmds cmd
     ”
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;So, let’s explain briefly what I wrote above:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;arc=$(uname -a) → Shows the architecture and kernel version of the current operating system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;pcpu=$(grep “physical id” /proc/cpuinfo | sort | uniq | wc -l) → Returns the number of physical processors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;vcpu=$(grep “^processor” /proc/cpuinfo | wc -l) → Returns the number of virtual processors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;fram=$(free -m | awk ‘$1 == “Mem:” {print $2}’) → Returns the amount of available RAM of the server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;uram=$(free -m | awk ‘$1 == “Mem:” {print $3}’) → Returns the amount of RAM used.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;pram=$(free | awk ‘$1 == “Mem:” {printf(“%.2f”), $3/$2*100}’) → printf(“%.2f”) returns 2 values ​​after the comma and if it is $3/$2*100 then it returns percentage version.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;fdisk=$(df -Bg | grep ‘^/dev/’ | grep -v ‘/boot$’ | awk ‘{ft += $2} END {print ft}’) → Returns the amount of available storage of the server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;udisk=$(df -Bm | grep ‘^/dev/’ | grep -v ‘/boot$’ | awk ‘{ut += $3} END {print ut}’) → Returns the server’s used storage space.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;pdisk=$(df -Bm | grep ‘^/dev/’ | grep -v ‘/boot$’ | awk ‘{ut += $3} {ft+= $2} END {printf(“%d”), ut/ft*100}’) → (storage used / accessible space * 100) gives us percentage usage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;cpul=$(top -bn1 | grep ‘^%Cpu’ | cut -c 9- | xargs | awk ‘{printf(“%.1f%%”), $1 + $3}’) → Returns the CPU utilization rate as a percentage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;lb=$(who -b | awk ‘$1 == “system” {print $3 “ “ $4}’) → Returns the last reboot date and time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;lvmt=$(lsblk | grep “lvm” | wc -l) → Returns the information of disks configured with LVM.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;lvmu=$(if [ $lvmt -eq 0 ]; then echo no; else echo yes; fi) → Indicates whether LVM is active in the system. P.S: You need to install the net-tools package for other items to run smoothly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ctcp=$(cat /proc/net/sockstat{,6} | awk ‘$1 == “TCP:” {print $3}’) → Returns the current number of active connections.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ulog=$(users | wc -w) → Returns the number of users using the server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ip=$(hostname -I) → Gives the server’S IP Address.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;mac=$(ip link show | awk ‘$1 == “link/ether” {print $2}’) → Gives the server’s MAC Address.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;cmds=$(journalctl _COMM=sudo | grep COMMAND | wc -l) → Returns the number of commands run with sudo. (If sudo is logged in, it is written with the number of sudo usage of other users; otherwise, it gives as much information as the sudo command used by the current user.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;wall “some message” → is a command-line utility that displays a message on the terminals of all logged-in users. The messages can be either typed on the terminal or the contents of a file.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Add the rule that script could be executed without sudo password
&lt;/h3&gt;

&lt;p&gt;Open sudoers file:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo visudo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Add this line:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ your_username ALL=(root) NOPASSWD: /usr/local/bin/monitoring.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;And the reboot the system with :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo reboot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You can check if your script works well with this command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo /usr/local/bin/monitoring.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Okay we completed the script. Now we gotta setup the crontab for scheduling it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up Crontab
&lt;/h2&gt;

&lt;p&gt;Open the crontab with:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo crontab -u root -e
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;At the end of the file add this rule as it shown in Figure-1:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ */10 * * * * /usr/local/bin/monitoring.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--poIVO09---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2A7MuWAzVcA34ffMvYR-oxEw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--poIVO09---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2A7MuWAzVcA34ffMvYR-oxEw.png" alt="Figure-1" width="800" height="561"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And finally use chmod +x to make your script executable:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ chmod +x monitoring.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;And you are ready to go. You should have such an output every 10 minutes:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WsYNloXD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AoSe0WAN-XVW7N4trNn-JHg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WsYNloXD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AoSe0WAN-XVW7N4trNn-JHg.jpeg" alt="" width="800" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well done!&lt;/p&gt;

</description>
      <category>devops</category>
      <category>linux</category>
      <category>crontab</category>
      <category>cron</category>
    </item>
    <item>
      <title>Deploy React App to AWS S3 Bucket with GitLab Pipeline</title>
      <dc:creator>Ali Ogun</dc:creator>
      <pubDate>Sat, 09 Sep 2023 12:56:07 +0000</pubDate>
      <link>https://dev.to/aws-builders/deploy-react-app-to-aws-s3-bucket-with-gitlab-pipeline-26j8</link>
      <guid>https://dev.to/aws-builders/deploy-react-app-to-aws-s3-bucket-with-gitlab-pipeline-26j8</guid>
      <description>&lt;h2&gt;
  
  
  How to deploy React App into AWS S3 Bucket?
&lt;/h2&gt;

&lt;p&gt;In this article step by step I will try to explain how to deploy a basic React App on AWS S3 bucket and how to automate this process with GitLab CI/CD pipeline.&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-images-1.medium.com%2Fmax%2F2400%2F1%2Ak5VWvcq6ia_-Xu1TKTxZGA.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-images-1.medium.com%2Fmax%2F2400%2F1%2Ak5VWvcq6ia_-Xu1TKTxZGA.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have prepared a simple primitive React App. With &lt;a href="https://github.com/byaliego/Final_Project-DevOps_Bootcamp/blob/main/react-app/Dockerfile" rel="noopener noreferrer"&gt;Dockerfile&lt;/a&gt;, I dockerize my React App. I try to keep this docker image as small as possible with .dockerignore file. I deploy my React App on to AWS S3 bucket. In order to improve the efficiency, I built a CI/CD pipeline on GitLab.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Static Web Page&lt;/strong&gt; — I have a one single static page built with React App.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;**AWS Account — **This little deployment will be in free-tier limits.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GitLab Account&lt;/strong&gt; — We need this to build a CI/CD pipeline.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  📦 Dockerize
&lt;/h2&gt;

&lt;p&gt;In order to keep my docker image as small as possible, I’ve done 2 things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;I’ve used .dockerignore file to excluded unnecessary files&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I’ve used node:slim as base image. As the word "slim" imply, this image is slim version of node image. I've used node image to be able to use npm package manager.&lt;/p&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%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F1%2AXtK2paaaILS3rDSUhaGFqA.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-images-1.medium.com%2Fmax%2F2800%2F1%2AXtK2paaaILS3rDSUhaGFqA.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In my Docker image, I’ve used two main commands. First, I’ve build the artifact form the files with:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Then, I’ve run the artifact with:&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ npm start&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  🚀 Deployment&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;I use a GitLab CI/CD &lt;a href="https://github.com/byaliego/Final_Project-DevOps_Bootcamp/edit/main/kubernetes/README.md#pipeline" rel="noopener noreferrer"&gt;pipeline&lt;/a&gt; to carry out the deployment which I will cover in upcoming section more detailed.&lt;/p&gt;

&lt;h2&gt;
  
  
  ♾️ CI/CD Pipeline
&lt;/h2&gt;

&lt;p&gt;For pipeline, I use &lt;a href="https://docs.gitlab.com/ee/ci/" rel="noopener noreferrer"&gt;GitLab CI/CD&lt;/a&gt;. In order to provision my pipeline, I use .gitlab-ci.yml file.&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-images-1.medium.com%2Fmax%2F2000%2F1%2A5_RENgafvH9j6OPh_CSnNQ.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-images-1.medium.com%2Fmax%2F2000%2F1%2A5_RENgafvH9j6OPh_CSnNQ.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It looks like this:&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-images-1.medium.com%2Fmax%2F4412%2F1%2AuCLlAjeZSm2OmFn_J6qo3g.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-images-1.medium.com%2Fmax%2F4412%2F1%2AuCLlAjeZSm2OmFn_J6qo3g.png"&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-images-1.medium.com%2Fmax%2F3868%2F1%2Aq6-xr5tCS4EPvshLeKGNgA.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-images-1.medium.com%2Fmax%2F3868%2F1%2Aq6-xr5tCS4EPvshLeKGNgA.png"&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-images-1.medium.com%2Fmax%2F2472%2F1%2ARHG6tkqzWUE_pafSM-rcog.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-images-1.medium.com%2Fmax%2F2472%2F1%2ARHG6tkqzWUE_pafSM-rcog.png"&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-images-1.medium.com%2Fmax%2F4496%2F1%2Aw7blwdRugLIa_JH5gc5tJw.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-images-1.medium.com%2Fmax%2F4496%2F1%2Aw7blwdRugLIa_JH5gc5tJw.png"&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-images-1.medium.com%2Fmax%2F4260%2F1%2AqT4cBST0hGRoijKsJLCM7Q.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-images-1.medium.com%2Fmax%2F4260%2F1%2AqT4cBST0hGRoijKsJLCM7Q.png"&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-images-1.medium.com%2Fmax%2F4224%2F1%2Ad2fj2pDQW4sJ2dFOyWTPBw.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-images-1.medium.com%2Fmax%2F4224%2F1%2Ad2fj2pDQW4sJ2dFOyWTPBw.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IMPORTANT&lt;/strong&gt;: Before use of this file, please remember to add those:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;AWS ACCOUNT ID&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS_ACCESS_KEY (I added as Masked Variables)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS_SECRET_KEY (I added as Masked Variables)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ⚙️ Pipeline Architecture
&lt;/h2&gt;

&lt;p&gt;I designed my pipeline on GitLab CI/CD with 4 stages and 4 jobs as seen in the figure:&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-images-1.medium.com%2Fmax%2F5220%2F1%2AjlrLR9AJUpxuFFKgnrIl4A.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-images-1.medium.com%2Fmax%2F5220%2F1%2AjlrLR9AJUpxuFFKgnrIl4A.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For more information, you can click &lt;a href="https://github.com/byaliego/Final_Project-DevOps_Bootcamp/edit/main/kubernetes/README.md#deployment-stage" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Anyway, my CI/CD pipeline’s stages are like down below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Build&lt;/strong&gt; — Here I build the artifact.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Test&lt;/strong&gt; — Here I do tests with npm test command. One important thing is, npm test requires an interactive use. In order to turn this off, I've used CI=true parameter.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;**Image-push — **In this stage I dockerize my React App. And then I push the image to the AWS ECR.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;**Deploy — **In deploy job, I am deploying my React App to AWS S3. By this way I am hoping to access my React App and represent a demo. You can &lt;a href="https://protein-bootcamp-prod.s3.eu-central-1.amazonaws.com/index.html" rel="noopener noreferrer"&gt;click here&lt;/a&gt; to check how it looks like.&lt;/p&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2Aa5J5o1eCjl_k8chJGfHH9g.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-images-1.medium.com%2Fmax%2F2000%2F1%2Aa5J5o1eCjl_k8chJGfHH9g.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Here is the link of my React App, if you would like to take a look at it:&lt;/em&gt;&lt;br&gt;
 &lt;a href="https://protein-bootcamp-prod.s3.eu-central-1.amazonaws.com/index.html" rel="noopener noreferrer"&gt;*https://protein-bootcamp-prod.s3.eu-central-1.amazonaws.com/index.html&lt;/a&gt;*&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you are not willing to click the link, let me leave here an image for you to see how it works:)&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-images-1.medium.com%2Fmax%2F5276%2F1%2AIK6imVzxsjvR69GGGyjLnw.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-images-1.medium.com%2Fmax%2F5276%2F1%2AIK6imVzxsjvR69GGGyjLnw.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ☁️ Amazon Web Services
&lt;/h2&gt;

&lt;p&gt;I use AWS as Cloud Provider in this projet. I tried to use Free-tier services. Anyway, it is always good practice to set an alert threshold in budget. Watch out your money!&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-images-1.medium.com%2Fmax%2F2000%2F1%2ALbC4nRKPa_C3ymxTiFs2HQ.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-images-1.medium.com%2Fmax%2F2000%2F1%2ALbC4nRKPa_C3ymxTiFs2HQ.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteHosting.html" rel="noopener noreferrer"&gt;&lt;strong&gt;Hosting a static website using Amazon S3&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://docs.gitlab.com/ee/ci/" rel="noopener noreferrer"&gt;&lt;strong&gt;GitLab CI/CD | GitLab&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>aws</category>
      <category>cloud</category>
      <category>cicd</category>
    </item>
    <item>
      <title>Replace GitLab Shared Runners With an AWS EC2 Instance</title>
      <dc:creator>Ali Ogun</dc:creator>
      <pubDate>Sat, 09 Sep 2023 12:46:48 +0000</pubDate>
      <link>https://dev.to/aws-builders/replace-gitlab-shared-runners-with-an-aws-ec2-instance-1gbp</link>
      <guid>https://dev.to/aws-builders/replace-gitlab-shared-runners-with-an-aws-ec2-instance-1gbp</guid>
      <description>&lt;h3&gt;
  
  
  No More GitLab Runner
&lt;/h3&gt;

&lt;p&gt;We love GitLab. We love GitLab CI/CD Pipeline. Out of question. Free GitLab runners are perfect for personal small projects since they are free, available and fully managed. On the other hand it may seem short for the bigger project’s pipelines. And the reason is obvious. Because they are shared with other users.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8I1LOkYe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2A5_RENgafvH9j6OPh_CSnNQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8I1LOkYe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2A5_RENgafvH9j6OPh_CSnNQ.png" alt="" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ain’t we tired of old and slow GitLab Runners? If the answer is yes, then this article is cut out exactly for you. We will use an AWS EC2 machine for our pipeline to run at. I will stay in free-tier during the article, so no worries.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to do?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. &lt;a href="https://portal.aws.amazon.com/billing/signup#/start/email"&gt;Create&lt;/a&gt; an AWS account and log in.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Create an EC2 machine:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I use t2.micro machine since it will be enough for my projet and it is free-tier eligible. Don’t forget to choose your PEM because we will use it in next step.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_64rcJo2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3184/1%2AGLCaYRoYVeVbssM_meUyVw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_64rcJo2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3184/1%2AGLCaYRoYVeVbssM_meUyVw.png" alt="t2.micro" width="800" height="249"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mZaPeUqT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3216/1%2AezEqnAW1PUyvzF-2T70S0Q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mZaPeUqT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3216/1%2AezEqnAW1PUyvzF-2T70S0Q.png" alt="I created a keypair beforehand with the name of “protein”" width="800" height="211"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I’ve used Linux/GNU Debian distribution but you can choose any distro you want.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yGTFvwKr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2992/1%2AsuugGNalg4mSCKEqwRH6pg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yGTFvwKr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2992/1%2AsuugGNalg4mSCKEqwRH6pg.png" alt="" width="800" height="610"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can choose the computation power of the machine as the size of your CI/CD jobs grow. I’ve used default settings since I was deploying a very basic React app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Connect to EC2 machine:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Open an SSH client. Locate your private key file.For instancein my case it is protein.pem. Then run the comment below. But replace the protein.pem with your own PEM file name and also change the PublicIPv4DNS address with your own EC2 machine's ip address:&lt;/p&gt;

&lt;p&gt;$ ssh -i "privatekey.pem" ec2-user@PublicIPv4DNS&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Take registration token from GitLab:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the GitLab repository respectively click Settings &amp;gt; CI/CD &amp;gt; Runners. There you will see your registration token. We will use it to connect our pipeline to our EC2 machine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WGDApMgK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/5760/1%2AetbUkk3--56tsluLQ8V4Hw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WGDApMgK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/5760/1%2AetbUkk3--56tsluLQ8V4Hw.png" alt="In this image it is visible the registration token. Copy it fellow" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Install Gitlab Runner to EC2:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Download the binary for your system:&lt;/p&gt;

&lt;p&gt;$ sudo curl -L --output /usr/local/bin/gitlab-runner &lt;a href="https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64"&gt;https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Give it permission to execute&lt;/p&gt;

&lt;p&gt;$ sudo chmod +x /usr/local/bin/gitlab-runner&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a GitLab Runner user&lt;/p&gt;

&lt;p&gt;$ sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install and run as a service&lt;/p&gt;

&lt;p&gt;$ sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner $ sudo gitlab-runner start&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6. Register Runner to EC2&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo gitlab-runner register --url [https://gitlab.com/](https://gitlab.com/) --registration-token $REGISTRATION_TOKEN
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Don’t forget&lt;/strong&gt; to replace your registration token in the above script.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Activate Your Runner&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now you runners should be visible in Settings &amp;gt; CI/CD &amp;gt; Runners like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qZus8r_N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/5760/1%2A0ZWYhE4jntMM2DOrfWq8Vg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qZus8r_N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/5760/1%2A0ZWYhE4jntMM2DOrfWq8Vg.png" alt="" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click the button shown in the image in order to activate your runners.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Deactivate Shared Runners&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As default GitLab use shared runners. So, stop shared runners to use your runners to carry out your pipe line executions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HbJDuOiX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/5760/1%2ACHBKCYD-8Atmtv7LzU0GFA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HbJDuOiX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/5760/1%2ACHBKCYD-8Atmtv7LzU0GFA.png" alt="" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Congratulations&lt;/strong&gt;! You’re done. Now, you are running your pipeline on your own EC2 machine. As a result, your Settings &amp;gt; CI/CD &amp;gt; Runners screen should looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GE8RI2Ui--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/5760/1%2AkBNFh5z1_cZPNcyuMDMe-A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GE8RI2Ui--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/5760/1%2AkBNFh5z1_cZPNcyuMDMe-A.png" alt="" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuration
&lt;/h2&gt;

&lt;p&gt;For advance settingsou can change the behavior of GitLab Runner and of individual registered runners.&lt;/p&gt;

&lt;p&gt;To do this, you modify a file called config.toml, which uses the TOML format.&lt;/p&gt;

&lt;p&gt;You can find the config.toml file in: /etc/gitlab-runner/&lt;/p&gt;

&lt;p&gt;Here as shown:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TLryroas--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2588/1%2AXqV6LMTfbl41E0193Edzvw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TLryroas--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2588/1%2AXqV6LMTfbl41E0193Edzvw.png" alt="" width="800" height="547"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the last but not the least; I leave my git repository link here where you can find my config.toml file. &lt;a href="https://github.com/byaliego/Final_Project-DevOps_Bootcamp/blob/main/bonus_part/gitlab-cicd-runner/config.toml"&gt;Here you can go and take a look at it.&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>ec2</category>
      <category>gitlab</category>
    </item>
    <item>
      <title>Discover the key differences between AWS WAF, ACLs, and Security Groups to protect your cloud applications like a pro!</title>
      <dc:creator>Ali Ogun</dc:creator>
      <pubDate>Sat, 09 Sep 2023 12:44:22 +0000</pubDate>
      <link>https://dev.to/aws-builders/discover-the-key-differences-between-aws-waf-acls-and-security-groups-to-protect-your-cloud-applications-like-a-pro-4clm</link>
      <guid>https://dev.to/aws-builders/discover-the-key-differences-between-aws-waf-acls-and-security-groups-to-protect-your-cloud-applications-like-a-pro-4clm</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dis8z1Xn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3840/1%2A8jtdczaktbCRcopaJJd1qA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dis8z1Xn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3840/1%2A8jtdczaktbCRcopaJJd1qA.png" alt="" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When it comes to securing your applications and infrastructure on the cloud, there are various tools and services available. AWS offers several security features that can help you protect your resources. I was recently asked by one of my colleagues about what the difference is between AWS WAF vs ACLs vs Security Groups. And here we are!&lt;/p&gt;

&lt;p&gt;While these tools all serve the same purpose, there are differences between them that you need to understand to choose the right tool for your needs.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is AWS WAF?
&lt;/h3&gt;

&lt;p&gt;In the simplest way, AWS WAF (Web Application Firewall) is a Firewall service as the name implies.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p2LRhG1k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2A9DXVK3AyAOmEe7K9dU0-6g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p2LRhG1k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2A9DXVK3AyAOmEe7K9dU0-6g.png" alt="" width="231" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It helps protect your web applications from common web exploits that could affect application availability, compromise security, or consume excessive resources. AWS WAF allows you to create rules that block common attack patterns, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;SQL injection&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cross-site scripting (XSS)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;UDP floods&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SYN floods&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HTTP floods&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bad bots&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Spoofing&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With AWS WAF, you can also protect your APIs from bots and scrapers and can create custom rules or use pre-configured rules to protect your applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is NetworkACL?
&lt;/h3&gt;

&lt;p&gt;Network ACL (Access Control List) is used to filter traffic based on IP addresses or ranges.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XXKZRBp2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2ArXZL1gUcw_zz9RdOKhiZfg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XXKZRBp2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2ArXZL1gUcw_zz9RdOKhiZfg.png" alt="" width="300" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ACLs can be applied to individual subnets or network interfaces, and they allow or deny traffic based on the rules you set up. ACLs are commonly used to control traffic in and out of a VPC (Virtual Private Cloud). Besides that, ACLs are stateless. It means they do not keep track of the traffic flow.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are Security Groups?
&lt;/h3&gt;

&lt;p&gt;Security Groups are also used to control traffic, but they operate at the instance level rather than the subnet level. It is the security level that you encounter after you pass through the NACLs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4tUUG82U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2Av-ffY2CbJ_h43gg2e_eFVA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4tUUG82U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2Av-ffY2CbJ_h43gg2e_eFVA.png" alt="" width="800" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Security Groups act as virtual firewalls for your instances, controlling inbound and outbound traffic. Security Groups are stateful, which means they keep track of the traffic flow. This makes them easier to use than ACLs, as you don’t have to worry about setting up separate rules for inbound and outbound traffic.&lt;/p&gt;

&lt;h3&gt;
  
  
  Differences between AWS WAF, ACLs, and Security Groups
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The main difference between AWS WAF, ACLs, and Security Groups is the level at which they operate. AWS WAF is a service that operates at the application layer, protecting your web applications from common web exploits. ACLs operate at the subnet level, controlling traffic in and out of your VPC based on IP addresses or ranges. Security Groups operate at the instance level, acting as virtual firewalls for your instances and controlling inbound and outbound traffic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Another key difference is the type of traffic they filter. AWS WAF is focused on protecting your web applications from common web exploits, such as SQL injection or cross-site scripting. ACLs and Security Groups, on the other hand, are focused on controlling traffic based on IP addresses or ranges.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finally, there is a difference in the way they handle the traffic. ACLs are stateless, which means they don’t keep track of the traffic flow. This makes them more difficult to manage than Security Groups. Because Security Groups are stateful and can track the traffic flow. By the way, AWS WAF can also be used in conjunction with Security Groups to provide additional protection for your web applications.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let me try to provide an analogy to make things clear. Imagine that you are an individual who places a high value on personal security and decides to hire a team of security personnel. For example, you may choose to hire three employees.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A private guard&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An old security guy in front of your building&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A security desk in front of your home&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6nvEpU_4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AWdA1zNAA6FABTZk7VLLHKA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6nvEpU_4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AWdA1zNAA6FABTZk7VLLHKA.png" alt="" width="600" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your private WAF guardians remain ever-vigilant against potential hazards. They are highly professional and continuously monitor for security risks, always keeping an eye on the bigger picture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WwhMUjeT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2A3Yw98jrdNc-sVD0leLQNWg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WwhMUjeT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2A3Yw98jrdNc-sVD0leLQNWg.png" alt="" width="600" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Someone wants to enter the building to see you. They must pass our security personnel, but our ACL security personnel is elderly and cannot remember everyone who comes in or goes out. Also, as you can see, he does not have a desk to write down people’s names. Therefore, he must always check who you are whenever you enter or exit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_YyLGGjM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AWOQzucrh5aN33jhFwxrHJA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_YyLGGjM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AWOQzucrh5aN33jhFwxrHJA.png" alt="" width="600" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, your visitor has arrived at the front door of the building, but there is one more security measure in place — Security Groups. As you can see, this security personnel works indoors and has a desk to keep track of information. Once you inform him of your identity upon entering, he will record it and allow you to exit without asking again. This is because he knows who you are, unlike the ACL security personnel who must check again when you exit the building.&lt;/p&gt;

&lt;p&gt;So the image pretty much looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tnnmxiIb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2560/1%2AIB6kMBx9YctI5ASsTLfHRg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tnnmxiIb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2560/1%2AIB6kMBx9YctI5ASsTLfHRg.jpeg" alt="[[***](https://www.youtube.com/watch?v=tLAgYQlMWGo)**]" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;In summary, AWS WAF, ACLs, and Security Groups are all important tools for securing your applications and infrastructure on the cloud. While they all serve the same purpose, they operate at different levels and filter different types of traffic. Understanding the differences between these tools is important when choosing the right tool for your needs. By choosing the right tool, you can ensure that your applications and infrastructure are protected from common web exploits and unauthorized access.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>security</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>I chose EC2 Storage over EBS despite it’s ephemeral — Here’s Why…</title>
      <dc:creator>Ali Ogun</dc:creator>
      <pubDate>Sat, 09 Sep 2023 12:41:16 +0000</pubDate>
      <link>https://dev.to/aws-builders/i-chose-ec2-storage-over-ebs-despite-its-ephemeral-heres-why-4m33</link>
      <guid>https://dev.to/aws-builders/i-chose-ec2-storage-over-ebs-despite-its-ephemeral-heres-why-4m33</guid>
      <description>&lt;p&gt;In the world of cloud infrastructure, selecting the right storage solution is essential to getting the best performance and reliability. I don’t say it as a AWS Storage Community Builder, I tell it also as a regular AWS customer. I started to think about writing this article when I had to choose between EC2 Storage and EBS (Elastic Block Store).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EKPGOcq5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2ASM-BpiSgKspHrYra3eFvKw.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EKPGOcq5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2ASM-BpiSgKspHrYra3eFvKw.jpeg" alt="" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Contrary to popular belief, I decided on EC2 Storage despite its ephemeral nature. I’ll explain the motivations behind my unusual choice in this article, as well as the benefits that EC2 Storage offers.&lt;/p&gt;

&lt;p&gt;First thing first;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1- EC2 Storage vs EBS:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Before diving into the logic behind my choice, let’s establish a foundational understanding of EC2 Storage and EBS. If you are already familiar with the services, you can simply skip this section. The local instance storage that comes with Amazon EC2 instances is referred to as “EC2 Storage”; it provides high-speed performance temporary block-level storage but lacks durability. EBS, on the other hand, offers robust and long-lasting block storage that is compatible with EC2 instances. While EBS is frequently the preferred option, I needed to go against it because of my client’s requirement, but I decided to investigate the unrealized potential of EC2 Storage. If you want to read more about other possible storage solutions on AWS, I recommend you to &lt;a href="https://medium.com/@ayogun/ebs-efs-s3-comparison-from-aws-storage-solutions-aaae9bde731d"&gt;read my article.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Main reason is;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2- Superiority of Performance:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One of the main reasons and also the ultimate one, for choosing EC2 Storage was its exceptional performance. With EC2 Storage, you can simply experience lightning-fast data access, accelerated disk I/O, and remarkably low latency. Me personally in this use case, I had a database requires a block storage with the throughput to support several million transactions per second. &lt;a href="https://aws.amazon.com/ebs/features/"&gt;If you look closer to the EBS&lt;/a&gt;; you can get more information about EBS types. Although let me give a quick answer; 350,000 IOPS. Well if you don’t know what IOPS is, &lt;strong&gt;Input/output operations per second **(&lt;/strong&gt;IOPS*&lt;em&gt;, pronounced *eye-ops&lt;/em&gt;) is an &lt;a href="https://en.wikipedia.org/wiki/Input/output"&gt;input/output&lt;/a&gt; performance measurement used to characterize &lt;a href="https://en.wikipedia.org/wiki/Data_storage_device"&gt;computer storage&lt;/a&gt; devices like &lt;a href="https://en.wikipedia.org/wiki/Hard_disk_drive"&gt;hard disk drives&lt;/a&gt; (HDD), &lt;a href="https://en.wikipedia.org/wiki/Solid_state_drives"&gt;solid state drives&lt;/a&gt; (SSD), and &lt;a href="https://en.wikipedia.org/wiki/Storage_area_network"&gt;storage area networks&lt;/a&gt; (SAN). Like &lt;a href="https://en.wikipedia.org/wiki/Benchmark_(computing)"&gt;benchmarks&lt;/a&gt;, IOPS numbers published by storage device manufacturers do not directly relate to real-world application performance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PEPoSIjO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2664/1%2A9s1bjNOdrFqbZQjW9iYYXg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PEPoSIjO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2664/1%2A9s1bjNOdrFqbZQjW9iYYXg.png" alt="" width="800" height="795"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MW9RP-Va--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2628/1%2A4BKJaMQTFYBN2pvqFQlhaA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MW9RP-Va--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2628/1%2A4BKJaMQTFYBN2pvqFQlhaA.png" alt="" width="800" height="798"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And unrevealed potential;&lt;/p&gt;

&lt;h3&gt;
  
  
  3- Flexible and Cost-Efficient:
&lt;/h3&gt;

&lt;p&gt;EC2 Storage’s inherent flexibility and cost effectiveness were further strong arguments in its favor. As an ephemeral storage option, EC2 Storage can be dynamically provisioned and terminated as needed. This flexibility empowered me to design highly scalable and fault-tolerant architectures, leveraging auto-scaling capabilities and reducing unnecessary costs associated with persistent storage.&lt;/p&gt;

&lt;p&gt;I chose a different route by embracing the ephemeral nature of EC2 Storage in a world where EBS is frequently seen as the de facto option for persistent storage. The client requirement for superior performance, flexibility, and cost effectiveness motivated me to architect this solution. I wanted to use this blog to show off EC2 Storage’s latent potential and encourage readers to choose a creative storage solution. Even while EC2 Storage might not be appropriate for all use cases, it has changed the game for me. We can open new doors and significantly improve our cloud infrastructure by questioning the established quo and looking at other solutions.&lt;/p&gt;

&lt;p&gt;Remember, sometimes it’s worth venturing into uncharted territory to uncover hidden gems that can revolutionize our technological landscapes. I also encourage you to read this article to get more detailed &lt;a href="https://www.percona.com/blog/using-aws-ec2-instance-store-vs-ebs-for-mysql-how-to-increase-performance-and-decrease-cost/"&gt;about using AWS EC2 instance store vs EBS for MySQL.&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ec2</category>
      <category>ebs</category>
      <category>storage</category>
      <category>aws</category>
    </item>
    <item>
      <title>Byzantine Generals Problem</title>
      <dc:creator>Ali Ogun</dc:creator>
      <pubDate>Sat, 09 Sep 2023 12:37:12 +0000</pubDate>
      <link>https://dev.to/ayogun/byzantine-generals-problem-285e</link>
      <guid>https://dev.to/ayogun/byzantine-generals-problem-285e</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Byzantine Generals Problem&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A Byzantine fault is a state of a computer system, particularly distributed computing systems, where components may fail and there is imperfect information on whether a component has failed. It is also known as a Byzantine generals problem, interactive consistency, source congruency, error avalanche, Byzantine agreement problem, and Byzantine failure. The phrase gets its name from an allegory known as the “Byzantine generals problem”, which was created to explain a scenario in which the system’s participants must agree on a coordinated approach to prevent catastrophic system failure, yet some of these individuals are unreliable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tGzCBCVr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AvuoViwfNXDWj4Q2Czh6t-g.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tGzCBCVr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AvuoViwfNXDWj4Q2Czh6t-g.jpeg" alt="" width="275" height="183"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A server, for example, may inconsistently appear to failure-detection systems as both malfunctioning and working while exhibiting various symptoms to various observers in a Byzantine fault. It is challenging for the other components to declare it failed and block it from the network since they first need to agree on which component actually failed. A fault-tolerant computer system’s resistance to such circumstances is known as byzantine fault tolerance (BFT).&lt;/p&gt;

&lt;p&gt;Consider a group of generals attacking a fort as an example of the flaw in its most basic form. The generals must determine whether to advance or retire as a group; some may favour advance while others favour retreat. The most crucial factor is that all generals come to an agreement on a strategy since a few generals’ haphazard attack would result in a rout and would be worse than either a coordinated attack or a coordinated retreat.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tu6T2Lg---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2620/1%2AxJGKNqJVrkFVtZ6NggwHbw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tu6T2Lg---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2620/1%2AxJGKNqJVrkFVtZ6NggwHbw.png" alt="" width="800" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The issue is made more difficult by the existence of treacherous generals who might not only vote for a poor strategy, but also do so selectively. For instance, the ninth general may send a vote of attack to the remaining generals and a vote of retreat to the four generals who support attacking while the remaining four generals support retreating. While the remainder will attack (which might not go well for the attackers), those who obtained a vote to retreat from the ninth general will retreat. The generals’ physical separation from one another and requirement to convey their votes via messengers who might not deliver them or might fabricate votes adds to the difficulty of the situation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Some Solutions
&lt;/h3&gt;

&lt;p&gt;In 1982, Lamport, Shostak, and Pease described a number of pioneering solutions. They started off by noticing that the Generals’ Problem may be reduced to solving a “Commander and Lieutenants” problem, in which all faithful Lieutenants must act together and that their actions must match what the Commander ordered, assuming the Commander is loyal:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;One method takes into account circumstances in which signals may be faked, but they would still be Byzantine-fault tolerant so long as there were less than one-third of the generals who were disloyal. It basically comes down to showing that the one Commander and two Lieutenants problem cannot be handled if the Commander is a traitor. Dealing with one-third or more traitors is impossible. To illustrate this, imagine that we have a traitorous Commander A and two Lieutenants, B and C. When A orders B to attack and C to retreat, and B and C communicate with one another by forwardeding A’s message, neither B nor C can determine who the traitor is because it may not necessarily be A — the other Lieutenant may have forged the message claiming to be from A. It can be shown that if &lt;em&gt;n&lt;/em&gt; is the number of generals in total, and &lt;em&gt;t&lt;/em&gt; is the number of traitors in that &lt;em&gt;n&lt;/em&gt;, then there are solutions to the problem only when &lt;em&gt;n&lt;/em&gt; &amp;gt; 3*t* and the communication is synchronous (bounded delay)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unforgeable message signatures are required for the second solution. Digital signatures (in contemporary computer systems, this may be accomplished in practise via public-key cryptography) can offer Byzantine fault tolerance in the presence of an arbitrary number of betraying generals for security-critical systems.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You may hear the term “Byzantine Generals Problem” also in Blockchains. Blockchain is a public, distributed ledger that contains the records of all transactions. If all users of the Bitcoin network, known as nodes, could agree on which transactions occurred and in what order, they could verify the ownership and create a functioning, trustless money system without the need for a centralized authority. Due to its decentralized nature, blockchain relies heavily on a consensus technique to validate transactions. It is a peer-to-peer network that offers its users transparency as well as trust. Its distributed ledger is what sets it apart from other systems. Blockchain technology can be applied to any system that requires proper verification.&lt;a href="https://www.geeksforgeeks.org/byzantine-generals-problem-in-blockchain/"&gt;[*]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In terms of distrbiuted systems; a source processor is assumed to broadcast its initial value to another processor in the system in accordance with the Byzantine agreement problem notion. To select a source processor, sequential ordering is used and a source processor is chosen at random.&lt;/p&gt;

&lt;p&gt;All non-faulty processors must agree on the same value in order to obtain the byzantine agreement procedure. The source processor might not always be defective. Then, other processors do not use its starting value.&lt;/p&gt;

&lt;p&gt;The goal of the Byzantine problem is to develop defences against failures in which system components fail in unpredictable ways, such as by processing requests erroneously, corrupting their local information, or generating inconsistent or wrong outputs. The Byzantine failure simulates real-world conditions in which computer and network hardware failures, network congestion, disconnection, and malicious attacks can cause computers and networks to behave in unexpected ways.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://groups.csail.mit.edu/tds/papers/Lynch/jacm85.pdf"&gt;In an article&lt;/a&gt; published by MICHAEL J. FISCHER, NANCY A. LYNCH, and MICHAEL S. PATERSON; they have shown that a natural and important problem of fault-tolerant cooperative computing cannot be solved in a totally asynchronous model of computation. These results do not show that such problems cannot be “solved” in practice; rather, they point up the need for more refined models of distributed computing that better reflect realistic assumptions about processor and communication tim- ings, and for less stringent requirements on the solution to such problems.&lt;/p&gt;

&lt;p&gt;To sum up, we find ourselves at the nexus of creativity and history as we reach the end of our adventure through the complex world of the Byzantine Generals Problem. This age-old puzzle, which was inspired by the generals of the Byzantine Empire, has survived the test of time and now paves the way for contemporary technologies.&lt;/p&gt;

&lt;p&gt;The underlying ideas of blockchain technology and distributed systems are intimately resonant with the nature of the challenge, which is attaining consensus and order in the face of deceit and ambiguity. Just as it previously directed commanders seeking victory behind the walls of Byzantium, The Byzantine Generals Problem acts as a beacon, directing us through the maze-like intricacies of networked communication.&lt;/p&gt;

&lt;p&gt;The Byzantine Generals Problem is an enduring challenge in the blockchain realm, necessitating creative solutions to guarantee that ledgers are immutable, trust is upheld, and digital transactions are secure. This emphasises the importance of the Byzantine Fault Tolerance (BFT) algorithms, consensus mechanisms, and cryptographic protocols that now underpin the decentralised currency and smart contract foundations.&lt;/p&gt;

&lt;p&gt;The Byzantine Generals Problem is a signal for distributed systems engineers and architects to take up arms. It serves as a reminder that reaching consensus in a networked environment where components may malfunction or act maliciously is a riddle requiring creative solutions. It encourages us to create systems that, like those ancient generals, can cooperate and have faith in the face of uncertainty.&lt;/p&gt;

&lt;p&gt;As we leave the Byzantine Generals to their ancient strategies, we step into the future, armed with the wisdom they imparted. Their challenge has evolved, but the quest for consensus and order endures. It’s a reminder that in the ever-expanding landscape of technology, the lessons of the past continue to shape the possibilities of tomorrow. So, with Byzantium as our guide, let us continue forging ahead, navigating the Byzantine labyrinth of the digital age, and seeking innovation amidst the echoes of history.&lt;/p&gt;

</description>
      <category>byztaninegenerals</category>
      <category>distributedsystems</category>
      <category>cloud</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>What Byzantine Generals Teach Us About AWS SQS</title>
      <dc:creator>Ali Ogun</dc:creator>
      <pubDate>Sat, 09 Sep 2023 11:52:40 +0000</pubDate>
      <link>https://dev.to/aws-builders/what-byzantine-generals-teach-us-about-aws-sqs-3fi5</link>
      <guid>https://dev.to/aws-builders/what-byzantine-generals-teach-us-about-aws-sqs-3fi5</guid>
      <description>&lt;p&gt;Ever heard of the Byzantine Generals? &lt;a href="https://medium.com/@ayogun/byzantine-generals-problem-a47b33ef87fc"&gt;Click here&lt;/a&gt; and check it out. But in a nutshell: Generals trying to launch a coordinated attack on a city, but some of them are secretly plotting to confuse the troops. It's like trying to plan a surprise party when a few friends are determined to spill the beans.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--P3giDyjm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mhr3z1oh3mqyy9kz0y6g.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P3giDyjm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mhr3z1oh3mqyy9kz0y6g.jpeg" alt="Byzantine Generals" width="275" height="183"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, let's step into the tech world. We're talking about messages traveling through a web of computers and bouncing around. They need to arrive in the right order. This is where the &lt;a href="https://aws.amazon.com/message-queue/#:~:text=A%20message%20queue%20is%20a,once%2C%20by%20a%20single%20consumer."&gt;message queues&lt;/a&gt; comes in. In AWS the service is called Amazon Simple Queue Service (SQS).&lt;/p&gt;

&lt;p&gt;So, how come they are related you are wondering. Right? Stay still. Today, we'll uncover the connection between Byzantine Generals and SQS. It's a story of how ancient problems can teach us a lot about modern tech. So grab your coffee, and let's dive in!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS SQS and Message Ordering:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In AWS, SQS is the very first service that was published for public use in 2004. In cloud computing, where information flows like a river through Amazon Web Services (AWS). Among its many offerings, Amazon Simple Queue Service (SQS) stands as a  message queue service for Asynchronous messaging. It's essential to create decoupled resilient applications.&lt;/p&gt;

&lt;p&gt;Within AWS SQS, two distinct queue types emerge: Standard Queues and FIFO (First-In-First-Out) Queues.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Standard Queues&lt;/strong&gt; : It offers a &lt;strong&gt;best-effort&lt;/strong&gt; approach to message ordering. The reason is here standard queues &lt;strong&gt;prioritize scalability and high throughput&lt;/strong&gt;, which may lead to messages being processed out of order. But why? We'll come to that in a moment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SlBUg23g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/su5j99sni9h7fti61p43.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SlBUg23g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/su5j99sni9h7fti61p43.png" alt="standard queue" width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FIFO Queues&lt;/strong&gt; : These queues guarantee that messages are delivered in the exact same order. When message ordering is a crucial assurance for applications, such as processing financial transactions or completing e-commerce sales, this service comes in handy. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S8jbz3TX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1rma8ybq62jedeibvtk4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S8jbz3TX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1rma8ybq62jedeibvtk4.png" alt="FIFO queue" width="800" height="123"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Okay, here that question comes to mind. What is &lt;strong&gt;best-effort&lt;/strong&gt; and why my messages come out of order in the standard queue? &lt;/p&gt;

&lt;p&gt;To make things easy to understand, we use often illustrations to grab that kind of abstract concept like SQS. You can see that it looks like a solid pipe. But is it? What is going on under the hood really? Let's take a look at the image below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fdv13o_p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4rnrbioluiqbtv474vb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fdv13o_p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4rnrbioluiqbtv474vb.png" alt="reinvent-sqs" width="800" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This image is from AWS reinvent event. You can see that it's represented as a solid pipe. But let's take a look at the next image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M6oV4Y40--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v73o69ntzglpwmvf47yl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--M6oV4Y40--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v73o69ntzglpwmvf47yl.png" alt="reinvent-sqs2" width="800" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this image, messages seem randomly distributed but of course, sorted with best-effort. &lt;a href="https://en.wikipedia.org/wiki/Best-effort_delivery"&gt;What is best-effort&lt;/a&gt;? Why order is not guaranteed? Let's zoom into the pipe itself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tLzZ6MCj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kgqr2z83fmmk9lbs96is.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tLzZ6MCj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kgqr2z83fmmk9lbs96is.png" alt="zoom-sqs" width="614" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we look closer, we understand the reason why it's not a solid pipe. &lt;a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-basic-architecture.html"&gt;*&lt;/a&gt;Because it is distributed on Amazon SQS servers!   &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JkMmOGd2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dto7e409z8u1q0so3798.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JkMmOGd2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dto7e409z8u1q0so3798.png" alt="sqs-distributed" width="596" height="396"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What do I mean? When you push a message into the queue, Amazon SQS redundantly stores a message in more than one availability zone (AZ). Message copies are stored in multiple AZs, no single computer, network, or AZ failure can make messages inaccessible. It's perfect right! A standard queue makes a best effort to preserve the order of messages, but more than one copy of a message might be delivered out of order. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SAJ0o58m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/12pc47bw8dn1bw2ksp96.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SAJ0o58m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/12pc47bw8dn1bw2ksp96.jpg" alt="meme" width="736" height="552"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Amazon SQS stores copies of your messages on multiple servers for redundancy and high availability. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mvzCa4ww--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r78wtrow5wi8z8wn7bpn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mvzCa4ww--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r78wtrow5wi8z8wn7bpn.png" alt="multiple-az" width="750" height="538"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On rare occasions, one of the servers that stores a copy of a message might be unavailable when you receive or delete a message. If this occurs, the copy of the message isn't deleted on that unavailable server, and you might get that message copy again when you receive messages. &lt;a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/standard-queues.html#standard-queues-at-least-once-delivery"&gt;*&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you don't mind the order of the messages in your use case, it brings you some superiority in terms of scalability. As long as you keep pushing new messages, AWS can spin up more and more SQS servers and keep handling your messages. Well, here the price that you pay is an ordering issue.&lt;/p&gt;

&lt;h2&gt;
  
  
  Okay, but how does SQS FIFO Queue work its magic?
&lt;/h2&gt;

&lt;p&gt;Here the AWS team put in hard work to guarantee and to provide &lt;a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing"&gt;exactly-once processing&lt;/a&gt;. The exact details of how AWS SQS maintains the order of messages in a FIFO queue are not publicly disclosed, as this is considered part of AWS's internal architecture and proprietary information. &lt;/p&gt;

&lt;p&gt;It's a blend of intelligent mechanisms. Each message entering an SQS FIFO queue carries a unique &lt;strong&gt;Message Deduplication ID&lt;/strong&gt; to prevent duplicates. Additionally, messages are organized into &lt;strong&gt;Message Groups&lt;/strong&gt; defined by a &lt;strong&gt;Message Group ID&lt;/strong&gt;. Messages within the same group are processed sequentially, respecting the order of entry. The AWS team here making an extra effort to make sure the order is maintained which comes with a cost. It's more expensive than Standard Queue and has a limited number of transactions per second (TPS). &lt;/p&gt;

&lt;p&gt;The second thing is the maximum timeout for storing a given message deduplication ID is 5 minutes. A duplicate message would be accepted and continued processing in the SQS FIFO queue if it arrived more than five minutes after the original. If exactly-once were a crucial requirement, other distributed system components would have to be responsible for ensuring message uniqueness.&lt;/p&gt;

&lt;p&gt;So, let's come back to our topic. How all those are related to the Byzantine Generals? &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding the Byzantine Generals Problem:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To grasp the connection between Byzantine Generals and the modern-day challenges of message ordering, let's take a closer look at the historical problem.&lt;/p&gt;

&lt;p&gt;Imagine an ancient army preparing to lay siege to an enemy's city. The success of their mission depends on synchronized attacks from multiple fronts. But here's the catch: not all the generals can be trusted. Some of them might be traitors and they can sabotage the plan.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BCKmIsdH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/80vv7bec59rke7ybqmdb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BCKmIsdH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/80vv7bec59rke7ybqmdb.png" alt="Byzantine Generals Problem" width="800" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the face of this problem, the loyal generals must somehow agree on a common strategy, even though they can't be sure if the orders they receive from their fellow commanders are genuine or deceitful. The challenge, known as the "&lt;a href="https://en.wikipedia.org/wiki/Byzantine_fault"&gt;Byzantine Generals Problem&lt;/a&gt;", is to achieve consensus in a distributed and potentially unreliable communication network.&lt;/p&gt;

&lt;p&gt;The complexity of contemporary distributed systems corresponds to this historical issue in a world where integrity is of utmost importance. Our digital systems struggle with faulty parts, network issues, and the necessity of maintaining the right sequence of events, much like the devoted generals trying to plan their attack.&lt;/p&gt;

&lt;p&gt;The Byzantine Generals Problem serves as a timeless parable of the difficulties inherent in distributed decision-making. It underscores the vital importance of achieving consensus and maintaining order, whether on the battlefield of ancient Byzantium or in today's cloud computing infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Message Ordering Challenges in Distributed Systems such as SQS:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Maintaining the proper sequence of messages is comparable to orchestrating a difficult symphony in the interconnected world of distributed computing, where data passes across networks. Consider a situation where you must make sure a set of activities takes place exactly as planned.&lt;/p&gt;

&lt;p&gt;Distributed systems(such as SQS) often involve multiple nodes(most probably different AZs) or components that communicate and collaborate to achieve a common goal. However, these systems operate in a volatile environment with uncertainty. Network delays, hardware failures, and asynchronous communication can introduce chaos into what should be an orderly sequence of events. This quest for precise message ordering is a fundamental challenge in distributed systems.&lt;/p&gt;

&lt;p&gt;In the AWS world, AWS Simple Queue Service (SQS) comes to the rescue and AWS team manages this chaos for us. SQS offers a solution to the solve the message ordering problem. However, it's not the end of the story. SQS FIFO queues guarantee in-order and exactly-once processing only within the queue itself, not in the entire distributed system that would use the queue.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://en.wikipedia.org/wiki/Atomic_broadcast"&gt;Total Order Broadcast&lt;/a&gt; problem appears in the field of distributed computing. According to the Total sequence Broadcast, messages must be sent to every participant in the same sequence, regardless of who they are to. In a distributed system, FIFO delivery of messages is basically a special case of the issue with extra order restrictions. Understanding the constraints of potential FIFO delivery problem solutions is aided by research on the Total Order Broadcast problem. Simply put, the Total Order Broadcast problem is equivalent to the problem of achieving distributed consensus, i.e. having all participants in a distributed system agree on message delivery order.&lt;/p&gt;

&lt;p&gt;Although a SQS FIFO queue is undoubtedly a very helpful tool in developing a solution to this issue, it is not a solution in and of itself. The task of guaranteeing exactly-once publication outside the queue typically falls to us developers. &lt;/p&gt;

</description>
      <category>aws</category>
      <category>sqs</category>
      <category>distributedsystems</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
