<?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: Olatunde Babawale </title>
    <description>The latest articles on DEV Community by Olatunde Babawale  (@obabawale).</description>
    <link>https://dev.to/obabawale</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%2F832407%2Fbf1e7290-cfc2-4c70-9789-d584d7c506db.png</url>
      <title>DEV Community: Olatunde Babawale </title>
      <link>https://dev.to/obabawale</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/obabawale"/>
    <language>en</language>
    <item>
      <title>Managing Rolling Updates in AWS Auto Scaling Groups with AWS CloudFormation Update Policy: Part 2</title>
      <dc:creator>Olatunde Babawale </dc:creator>
      <pubDate>Thu, 13 Jul 2023 00:35:44 +0000</pubDate>
      <link>https://dev.to/obabawale/managing-rolling-updates-in-aws-auto-scaling-groups-with-aws-cloudformation-update-policy-part-2-15gj</link>
      <guid>https://dev.to/obabawale/managing-rolling-updates-in-aws-auto-scaling-groups-with-aws-cloudformation-update-policy-part-2-15gj</guid>
      <description>&lt;p&gt;This is the concluding part of this blog post. Visit &lt;a href="https://dev.to/obabawale/managing-rolling-updates-in-aws-autoscaling-groups-with-aws-cloudformation-update-policy-part-1-3jhj"&gt;this&lt;/a&gt; post to see the foundational part.&lt;/p&gt;

&lt;p&gt;In this post, we create a cloud infrastructure using two cross-linked CloudFormation stacks: the &lt;code&gt;network&lt;/code&gt; stack deploys the networking infrastructure, while the &lt;code&gt;servers&lt;/code&gt; stack deploys the servers which are managed by an Auto Scaling Group (ASG). The purpose of this post is to demonstrate the use of &lt;code&gt;UpdatePolicy&lt;/code&gt; to guarantee a smooth roll out of changes to the CloudFormation Template. &lt;/p&gt;

&lt;p&gt;We will walkthrough this in sections as outlined below:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Description of Files and Resources used.&lt;/li&gt;
&lt;li&gt;Stack update behavior without an Update policy.&lt;/li&gt;
&lt;li&gt;Stack update behavior with an Update policy&lt;/li&gt;
&lt;li&gt;Clean up the AWS environment.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. Description of Files and Resources used&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The files and commands used can be found in this GitHub &lt;a href="https://github.com/Babawale/DevBlogPost/tree/main"&gt;repo&lt;/a&gt;. The README.md file gives a full description.

&lt;ul&gt;
&lt;li&gt;The resources created by the templates include:&lt;/li&gt;
&lt;li&gt;A Virtual Private Cloud (VPC) with four subnets in two 
availability zones (AZs)&lt;/li&gt;
&lt;li&gt;The subnets are a pair of Public and Private subnets.&lt;/li&gt;
&lt;li&gt;Two NAT Gateways&lt;/li&gt;
&lt;li&gt;A Load Balancer&lt;/li&gt;
&lt;li&gt;Auto Scaling Group&lt;/li&gt;
&lt;li&gt;Amazon Linux AMIs
AWS Cloud9 is used as the IDE. See this &lt;a href="https://dev.to/obabawale/getting-started-with-aws-cloud9-h02"&gt;post&lt;/a&gt; to learn how to set up a Cloud9 environment and learn some of its benefits.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The only difference between the two template files are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Updating the &lt;code&gt;UserData&lt;/code&gt; of the Launch Template to install &lt;code&gt;cfn-signals&lt;/code&gt; and send signals.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;WebAppLaunchTemplate&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;Type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;AWS::EC2::LaunchTemplate&lt;/span&gt;
    &lt;span class="na"&gt;Properties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;LaunchTemplateName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;!Sub&lt;/span&gt; &lt;span class="s"&gt;${AWS::StackName}-launch-template&lt;/span&gt;
      &lt;span class="na"&gt;LaunchTemplateData&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;UserData&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="s"&gt;Fn::Base64: !Sub |&lt;/span&gt;
              &lt;span class="s"&gt;#!/bin/bash -xe&lt;/span&gt;
              &lt;span class="s"&gt;yum update -y&lt;/span&gt;
              &lt;span class="s"&gt;yum upgrade -y&lt;/span&gt;
              &lt;span class="s"&gt;yum install -y aws-cfn-bootstrap&lt;/span&gt;
              &lt;span class="s"&gt;yum install -y httpd&lt;/span&gt;
              &lt;span class="s"&gt;systemctl enable httpd&lt;/span&gt;
              &lt;span class="s"&gt;systemctl start httpd&lt;/span&gt;
              &lt;span class="s"&gt;echo "&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Blog Post Demo Test Page&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;lt;h1&amp;gt;&amp;lt;center&amp;gt;"This is Version 2.0"&amp;lt;/center&amp;gt;&amp;lt;/h1&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;"  &amp;gt; /var/www/html/index.html&lt;/span&gt;
              &lt;span class="s"&gt;/opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource AppAutoScaleGroup --region ${AWS::Region}&lt;/span&gt;

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Updating the ASG resource definition with an &lt;code&gt;UpdatePolicy&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;  &lt;span class="na"&gt;AppAutoScaleGroup&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; 
    &lt;span class="na"&gt;Type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;AWS::AutoScaling::AutoScalingGroup&lt;/span&gt;
    &lt;span class="na"&gt;Properties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;VPCZoneIdentifier&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;Fn::ImportValue:&lt;/span&gt; 
          &lt;span class="s"&gt;!Sub "${EnvironmentName}-PRIV-NETS"&lt;/span&gt;
      &lt;span class="na"&gt;LaunchTemplate&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;LaunchTemplateId&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;Ref&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;WebAppLaunchTemplate&lt;/span&gt;
        &lt;span class="na"&gt;Version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;!GetAtt&lt;/span&gt; &lt;span class="s"&gt;WebAppLaunchTemplate.LatestVersionNumber&lt;/span&gt;
      &lt;span class="na"&gt;MinSize&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;2'&lt;/span&gt;
      &lt;span class="na"&gt;MaxSize&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;4'&lt;/span&gt;
      &lt;span class="na"&gt;DesiredCapacity&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2"&lt;/span&gt;
      &lt;span class="na"&gt;TargetGroupARNs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;Ref&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;WebAppTargetGroup&lt;/span&gt;
    &lt;span class="na"&gt;UpdatePolicy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;AutoScalingRollingUpdate&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;MinInstancesInService&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;1'&lt;/span&gt;
        &lt;span class="na"&gt;MaxBatchSize&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;1'&lt;/span&gt;
        &lt;span class="na"&gt;PauseTime&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;PT12M5S&lt;/span&gt;
        &lt;span class="na"&gt;WaitOnResourceSignals&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="no"&gt;true&lt;/span&gt;
        &lt;span class="na"&gt;SuspendProcesses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;HealthCheck&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;ReplaceUnhealthy&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;AZRebalance&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;AlarmNotification&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;ScheduledActions&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;2. Stack update behavior without an Update policy&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Next, we examine the behavior of a stack without a defined update policy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; We create the network stack using the helper scripts from the Cloud9 terminal&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;./create.sh infra network-infra.yaml network-infra-params.json us-east-1&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Wait for the operation to complete before proceeding to the next step.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--G1oAC4h2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w02maky30rnvvgqjvgkf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--G1oAC4h2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w02maky30rnvvgqjvgkf.png" alt="Image description" width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; We create the servers stack&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;./create.sh servers servers-without-update-policy.yaml servers-params.json us-east-1&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Wait for the operation to complete and assess the DNS of the load balancer under the outputs tab.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lYIeLcIx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/27wsumigzd8ki30w8rpp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lYIeLcIx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/27wsumigzd8ki30w8rpp.png" alt="Image description" width="800" height="414"&gt;&lt;/a&gt;&lt;br&gt;
Open the link in a new tab to see the web page as shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_As0w62M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ir2i01te0yog4sc1a3bf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_As0w62M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ir2i01te0yog4sc1a3bf.png" alt="Image description" width="800" height="495"&gt;&lt;/a&gt;&lt;br&gt;
This shows Version 1.0 of our deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Change the version number in the &lt;code&gt;UserData&lt;/code&gt; section of &lt;code&gt;servers-without-update-policy.yaml&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rsbBvEua--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9m2wlkldsmxgtsvine93.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rsbBvEua--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9m2wlkldsmxgtsvine93.png" alt="Image description" width="800" height="309"&gt;&lt;/a&gt;&lt;br&gt;
And update the stack with&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;./update.sh servers servers-without-update-policy.yaml servers-params.json us-east-1&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Observe that the update does not initiate a stack update. This is because a change in the &lt;code&gt;UserData&lt;/code&gt; section does not cause a stack to update. The &lt;code&gt;UserData&lt;/code&gt; is run only once during creation. &lt;br&gt;
The only way to force this update is to manually delete the instances in the Auto Scaling Group, thus forcing the ASG to pick up the new configuration and run the &lt;code&gt;UserData&lt;/code&gt; again.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hkttgnOj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2qhedu0dru30rcmqrw3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hkttgnOj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2qhedu0dru30rcmqrw3.png" alt="Image description" width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--i5N_3GlC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zs3he4o8ootpyve29921.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i5N_3GlC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zs3he4o8ootpyve29921.png" alt="Image description" width="800" height="479"&gt;&lt;/a&gt;&lt;br&gt;
This may case a disruption and make the application unavailable as shown below.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qBTLbJg7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q7wdihbucvsg3ittt063.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qBTLbJg7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q7wdihbucvsg3ittt063.png" alt="Image description" width="800" height="527"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;New instances are created by the ASG and the service will become available once again.&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_lOXcJR5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2s6x1i5lfkzu02mzcrg4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_lOXcJR5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2s6x1i5lfkzu02mzcrg4.png" alt="Image description" width="800" height="311"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;3. Stack update behavior with an Update policy&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Now, let's examine how an update policy impacts the same deployment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;    &lt;span class="na"&gt;UpdatePolicy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;AutoScalingRollingUpdate&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;MinInstancesInService&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;1'&lt;/span&gt;
        &lt;span class="na"&gt;MaxBatchSize&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;1'&lt;/span&gt;
        &lt;span class="na"&gt;PauseTime&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;PT12M5S&lt;/span&gt;
        &lt;span class="na"&gt;WaitOnResourceSignals&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="no"&gt;true&lt;/span&gt;
        &lt;span class="na"&gt;SuspendProcesses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;HealthCheck&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;ReplaceUnhealthy&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;AZRebalance&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;AlarmNotification&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;ScheduledActions&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;SuspendProcesses&lt;/code&gt; parameter prevents other process from interfering with the update process. The other parameters have been explained in the first post.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Delete the &lt;code&gt;servers&lt;/code&gt; stack &lt;code&gt;./delete.sh servers us-east-1&lt;/code&gt;. Wait for completion before proceeding.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jlAGL2KT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iuxjtcf2y01urr5o7fdk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jlAGL2KT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iuxjtcf2y01urr5o7fdk.png" alt="Image description" width="800" height="440"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt; Create a new &lt;code&gt;servers&lt;/code&gt; stack using the &lt;code&gt;servers-with-update-policy.yaml&lt;/code&gt; template file &lt;code&gt;./create.sh servers servers-with-update-policy.yaml servers-params.json us-east-1&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Wait for completion and visit the web page using the DNS name of the load balancer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K-iimnf0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s7wd57sl1n9zm5cwnwgg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K-iimnf0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s7wd57sl1n9zm5cwnwgg.png" alt="Image description" width="800" height="339"&gt;&lt;/a&gt;&lt;br&gt;
Observe the Instance ID of the instances as shown here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FqgvTgbI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ak3twp1prov812vysdl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FqgvTgbI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ak3twp1prov812vysdl.png" alt="Image description" width="800" height="343"&gt;&lt;/a&gt;&lt;br&gt;
This shows Version 1.0 of our deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Change the version number in the &lt;code&gt;UserData&lt;/code&gt; section of &lt;code&gt;servers-with-update-policy.yaml&lt;/code&gt; to &lt;code&gt;2.0&lt;/code&gt;. And update the stack with &lt;code&gt;./update.sh servers servers-with-update-policy.yaml servers-params.json us-east-1&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_SwqQTqD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/grg9nc42qy3tidg0gydh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_SwqQTqD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/grg9nc42qy3tidg0gydh.png" alt="Image description" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
The images above show the update process of the &lt;code&gt;servers&lt;/code&gt; stack. The "Status reason" column is worth noting. It shows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A rolling update with a batch size of 1, and at least one instance in service during the update.&lt;/li&gt;
&lt;li&gt;CloudFormation will wait 12 minutes and 5 secs to receive success signals from the instance before proceeding with the next batch update.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Refreshing the page during the update shows switches between Version 1.0 and Version 2.0 until all the instances are replaced with Version 2.0.&lt;/p&gt;

&lt;p&gt;The rolling update ensures that the application remains available the entire time as defined in the &lt;code&gt;UpdatePolicy&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;4. Clean up the AWS environment.&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Finally, remember to clean up the AWS environment by first deleting the &lt;code&gt;servers&lt;/code&gt; stack,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nWLa_1cx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/boq6k080hqr07yrsnd4a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nWLa_1cx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/boq6k080hqr07yrsnd4a.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
and then &lt;code&gt;network&lt;/code&gt; stack once the previous stack is deleted.&lt;/p&gt;

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

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

&lt;p&gt;In conclusion, taking control of the update behavior of your infrastructure using AWS CloudFormation is necessary to ensure a predictable and expected update process at all times.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Thank you for taking the time to read this blog post. If you find the article interesting, do like the article, and comment. Also connect with me on &lt;a href="https://www.linkedin.com/in/obabawale"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>tutorial</category>
      <category>aws</category>
      <category>iac</category>
      <category>devops</category>
    </item>
    <item>
      <title>Managing Rolling Updates in AWS AutoScaling Groups with AWS CloudFormation Update Policy: Part 1</title>
      <dc:creator>Olatunde Babawale </dc:creator>
      <pubDate>Thu, 13 Jul 2023 00:30:55 +0000</pubDate>
      <link>https://dev.to/obabawale/managing-rolling-updates-in-aws-autoscaling-groups-with-aws-cloudformation-update-policy-part-1-3jhj</link>
      <guid>https://dev.to/obabawale/managing-rolling-updates-in-aws-autoscaling-groups-with-aws-cloudformation-update-policy-part-1-3jhj</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Synopsis:&lt;/strong&gt;&lt;br&gt;
A stack update, sometimes, initiates the desired change; other times, it doesn't.&lt;/p&gt;

&lt;p&gt;Wouldn't it be nice to have a predetermined update behavior for the AWS Autoscaling Groups defined in your stacks?&lt;/p&gt;

&lt;p&gt;This can be achieved with an &lt;code&gt;UpdatePolicy&lt;/code&gt; defined on the AWS Auto Scaling Group in the CloudFormation template.&lt;/p&gt;

&lt;p&gt;Read on, to learn more.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This tutorial is divided into two posts: this post focuses on the underlying theory and is suitable for beginners; the &lt;a href="https://dev.to/obabawale/managing-rolling-updates-in-aws-auto-scaling-groups-with-aws-cloudformation-update-policy-part-2-15gj"&gt;second&lt;/a&gt; post contains a walkthrough of the update process.&lt;/p&gt;

&lt;p&gt;In this post, I highlight the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Why the need for an Update Policy?&lt;/li&gt;
&lt;li&gt;What is a rolling update?&lt;/li&gt;
&lt;li&gt;How to perform a rolling update on an ASG.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Why the need for an Update Policy?&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
To leverage the benefits provided by the cloud and ensure the agility, flexibility, and continuity of your business, you have implemented Infrastructure as Code (IaC). Thus, guaranteeing that you can document, deploy and update your cloud infrastructure at any time.&lt;/p&gt;

&lt;p&gt;You have adopted AWS as your cloud provider and implemented Auto Scaling Groups (ASGs) to make your instances fault-tolerant. &lt;/p&gt;

&lt;p&gt;AWS CloudFormation, as the native IaC tool on the AWS cloud, handles the deployment and update of your infrastructure as stacks define in a template.&lt;/p&gt;

&lt;p&gt;By default, CloudFormation uses a rolling update deployment strategy whenever the changes to the template initiates a stack update. The problem, though, is that the stack update behavior is determined by the update behavior of the changed attribute of the resource. This behavior could be &lt;code&gt;Update With No Interruption&lt;/code&gt;, &lt;code&gt;Update with Some Interruption&lt;/code&gt;, and &lt;code&gt;Replacement&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In other words, a change to the Launch Configuration or Launch Template of the Auto Scaling Group(ASG) may or may not take immediate effect. A deployment strategy ensures that we determine how and when the changes are made.&lt;/p&gt;

&lt;p&gt;One such strategy is a rolling deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;What is a Rolling Update?&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
A rolling update allows you to update your ASG instances in batches: gradually replacing a certain number of instances at a time while ensuring that the desired capacity of the group is maintained.&lt;/p&gt;

&lt;p&gt;In other words, a rolling update keeps some instances (with the previous configuration) online, and gradually rolls out replacement instances with the latest configuration. This guarantees that the application remains available during the entire process. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to perform a rolling update on an ASG.&lt;/strong&gt;&lt;br&gt;
To perform a rolling update on an Auto Scaling group using CloudFormation, you can use the &lt;code&gt;UpdatePolicy&lt;/code&gt; attribute in the ASG resource. &lt;/p&gt;

&lt;p&gt;Here's an example CloudFormation template snippet that demonstrates the rolling update configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;Resources&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;MyASG&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;Type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;AWS::AutoScaling::AutoScalingGroup&lt;/span&gt;
    &lt;span class="na"&gt;Properties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="c1"&gt;# Define your ASG properties here&lt;/span&gt;

      &lt;span class="na"&gt;UpdatePolicy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;AutoScalingRollingUpdate&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;MinInstancesInService&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
          &lt;span class="na"&gt;MaxBatchSize&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;
          &lt;span class="na"&gt;PauseTime&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;PT5M&lt;/span&gt;
          &lt;span class="na"&gt;WaitOnResourceSignals&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="no"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the &lt;code&gt;UpdatePolicy&lt;/code&gt; attribute is set to &lt;code&gt;AutoScalingRollingUpdate&lt;/code&gt;, which enables the rolling update behavior. The following parameters are specified:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;MinInstancesInService&lt;/code&gt;: Specifies the minimum number of instances that must remain in service during the update process. In this case, we have set it to 1, so there will always be at least one instance running during the update.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MaxBatchSize&lt;/code&gt;: Specifies the maximum number of instances that can be updated simultaneously. In this case, we have set it to 2, meaning that up to two instances can be replaced at a time.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;PauseTime&lt;/code&gt;: Specifies the time to pause between updating each batch of instances. In this example, it's set to 5 minutes (&lt;code&gt;PT5M&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;WaitOnResourceSignals&lt;/code&gt;: Specifies whether the update process waits for signals from the instances before proceeding to the next batch. If set to &lt;code&gt;true&lt;/code&gt;, CloudFormation waits for the instances to signal success before updating the next batch.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By configuring the &lt;code&gt;UpdatePolicy&lt;/code&gt; in this way, CloudFormation will perform a rolling update on the Auto Scaling group when changes are made to the ASG resource definition in the CloudFormation stack. This ensures that the update process is smooth and that the desired capacity of the ASG is maintained throughout the update.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Important note about the &lt;code&gt;WaitOnResourceSignals&lt;/code&gt; attribute:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It helps to guarantee that the update proceeds only after the new instances have successfully installed and configured the requisite applications.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cfn-signal&lt;/code&gt; is required to send signals from the instances to CloudFormation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;To wrap up, a smooth update of your Auto Scaling Groups can be guaranteed by specifying an &lt;code&gt;UpdatePolicy&lt;/code&gt; in the ASG resource definition and by setting the &lt;code&gt;WaitOnResourceSignals&lt;/code&gt; attribute to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Thank you for taking the time to read this blog post. If you find the article interesting, do like the article and connect with me on &lt;a href="https://www.linkedin.com/in/obabawale"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>iac</category>
      <category>devtools</category>
    </item>
    <item>
      <title>Getting started with AWS Cloud9</title>
      <dc:creator>Olatunde Babawale </dc:creator>
      <pubDate>Mon, 23 Jan 2023 21:43:26 +0000</pubDate>
      <link>https://dev.to/obabawale/getting-started-with-aws-cloud9-h02</link>
      <guid>https://dev.to/obabawale/getting-started-with-aws-cloud9-h02</guid>
      <description>&lt;p&gt;How do you maintain agility across several development projects with varied environment setup requirements? How do you learn and get hands-on with a new tool when you cannot install tools locally on your machine, either because you lack admin rights, the workstation cannot handle the added workload, or you simply don't want to?&lt;/p&gt;

&lt;p&gt;Do you want to easily create and destroy environments as needed in minutes? AWS Cloud9 provides the solution to these challenges.&lt;/p&gt;

&lt;p&gt;AWS Cloud9 is a powerful, cloud-based integrated development environment (IDE) that makes it easy for developers to write, run, and debug code in a web browser. With Cloud9, you can easily set up a development environment for your project, no matter what programming language you are using. &lt;/p&gt;

&lt;p&gt;In this blog post, I'll walk you through the steps to get started with AWS Cloud9.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Create an AWS account&lt;/strong&gt;&lt;br&gt;
The first step to getting started with Cloud9 is to create an AWS account. If you already have an AWS account, you can skip this step. If not, you can sign up for a free account on the AWS website. Follow this &lt;a href="https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/" rel="noopener noreferrer"&gt;how-to guide&lt;/a&gt; to get started.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Create an environment&lt;/strong&gt;&lt;br&gt;
Once you have an AWS account, log in to the AWS Management Console and navigate to the Cloud9 service page. Click the "Create environment" button to create a new environment for your project. Give your environment a name and choose the settings that best suit your needs. You may create a new EC2 instance or use an existing one.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvg56fs8318wta5tajs8a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvg56fs8318wta5tajs8a.png" alt="Create Cloud9 Env: Name and Description" width="800" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkgev07e3zdyorw6ahhr2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkgev07e3zdyorw6ahhr2.png" alt="Create Cloud9 Env: Select Instance type and Platform" width="800" height="426"&gt;&lt;/a&gt;&lt;br&gt;
The instance type determines the capacity of the underlying EC2 instance in terms of vCPU and RAM. Select from the recommended list or access the list of additional instance types.&lt;br&gt;
The Platform dictates the OS installed on the EC2 instance. There is also a default timeout of 30 minutes that helps to minimize the cost of running the EC2 instance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxht2l2sysbdidol0dp8e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxht2l2sysbdidol0dp8e.png" alt="Create Cloud9 Env: Network Settings" width="800" height="340"&gt;&lt;/a&gt;&lt;br&gt;
For the Network settings, you may select the AWS System Manager (SSM) option or the Secure Shell (SSH) option to assess the instance. SSH requires inbound ports, while SSM does not.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fowg58hgf224pd4ogbesj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fowg58hgf224pd4ogbesj.png" alt="Create Cloud9 Env: IAM Roles and Profile" width="800" height="276"&gt;&lt;/a&gt;&lt;br&gt;
AWS handles automatic creation of the IAM roles and instance profile required based on your chosen configuration.&lt;br&gt;
Click on Create, and you have a rich IDE created for you in minutes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Do your thing: AKA Start coding&lt;/strong&gt;&lt;br&gt;
Once your environment is created, you'll be taken to the IDE. Here, you can start writing code, running commands, and using the various tools provided by Cloud9. The IDE includes features such as code completion, debugging, and collaboration tools. You can also use the terminal in the IDE to run commands and interact with the underlying EC2 instance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgchj7r6i4dusorwm005z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgchj7r6i4dusorwm005z.png" alt="Create Cloud9 Env: Start Coding" width="800" height="367"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Step 4: Invite collaborators&lt;/strong&gt;&lt;br&gt;
Cloud9 also allows you to invite other members to join your environment and collaborate with them. To invite someone to your environment, go to the "Share" button in the top right corner of the IDE and enter or create the IAM user(s) you wish to invite, and set permissions for the users.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 5: Terminate environment&lt;/strong&gt;&lt;br&gt;
Once you are done with your development, you can stop your environment to save cost, and relaunch as needed. In any case, AWS hibernates the EC2 instance if idle for the selected timeout. Finally, terminate the environment.&lt;/p&gt;

&lt;p&gt;To wrap up, even though the AWS console may change, this blogpost captures the general overview of getting up and running with AWS Cloud9: easily set up a cloud-based IDE development environment for your project, no matter what programming language you're using, and stop or terminate the environment whenever you please.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Thank you for taking the time to read this blog post. If you find the article interesting, do like the article and connect with me on &lt;a href="https://www.linkedin.com/in/obabawale" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>learning</category>
      <category>tutorial</category>
      <category>braziliandevs</category>
    </item>
  </channel>
</rss>
