<?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>Forem: Jatin Mehrotra</title>
    <description>The latest articles on Forem by Jatin Mehrotra (@jatinmehrotra).</description>
    <link>https://forem.com/jatinmehrotra</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%2F1349181%2F49ff3e61-e8bd-463a-9c7f-8925c1e1254f.jpg</url>
      <title>Forem: Jatin Mehrotra</title>
      <link>https://forem.com/jatinmehrotra</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jatinmehrotra"/>
    <language>en</language>
    <item>
      <title>AWS DevOps Agent is not here to replace you! It's here to compliment you by acting like 24/7 on call engineers finding root cause for issues while you build new feature and innovate. More details in the blog on how to setup with 2 Demo.</title>
      <dc:creator>Jatin Mehrotra</dc:creator>
      <pubDate>Mon, 08 Dec 2025 11:56:45 +0000</pubDate>
      <link>https://forem.com/jatinmehrotra/aws-devops-agent-is-not-here-to-replace-you-its-here-to-compliment-you-by-acting-like-247-on-1e32</link>
      <guid>https://forem.com/jatinmehrotra/aws-devops-agent-is-not-here-to-replace-you-its-here-to-compliment-you-by-acting-like-247-on-1e32</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/aws-builders/aws-devops-agent-explained-architecture-setup-and-real-root-cause-demo-cloudwatch-eks-ng7" class="crayons-story__hidden-navigation-link"&gt;AWS DevOps Agent Explained: Architecture, Setup, and Real Root-Cause Demo (CloudWatch + EKS)&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;
          &lt;a class="crayons-logo crayons-logo--l" href="/aws-builders"&gt;
            &lt;img alt="AWS Community Builders  logo" 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%2Forganization%2Fprofile_image%2F2794%2F88da75b6-aadd-4ea1-8083-ae2dfca8be94.png" class="crayons-logo__image"&gt;
          &lt;/a&gt;

          &lt;a href="/jatinmehrotra" class="crayons-avatar  crayons-avatar--s absolute -right-2 -bottom-2 border-solid border-2 border-base-inverted  "&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%2Fuser%2Fprofile_image%2F1349181%2F49ff3e61-e8bd-463a-9c7f-8925c1e1254f.jpg" alt="jatinmehrotra profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/jatinmehrotra" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Jatin Mehrotra
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Jatin Mehrotra
                
              
              &lt;div id="story-author-preview-content-3087487" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/jatinmehrotra" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F1349181%2F49ff3e61-e8bd-463a-9c7f-8925c1e1254f.jpg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Jatin Mehrotra&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

            &lt;span&gt;
              &lt;span class="crayons-story__tertiary fw-normal"&gt; for &lt;/span&gt;&lt;a href="/aws-builders" class="crayons-story__secondary fw-medium"&gt;AWS Community Builders &lt;/a&gt;
            &lt;/span&gt;
          &lt;/div&gt;
          &lt;a href="https://dev.to/aws-builders/aws-devops-agent-explained-architecture-setup-and-real-root-cause-demo-cloudwatch-eks-ng7" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Dec 6 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/aws-builders/aws-devops-agent-explained-architecture-setup-and-real-root-cause-demo-cloudwatch-eks-ng7" id="article-link-3087487"&gt;
          AWS DevOps Agent Explained: Architecture, Setup, and Real Root-Cause Demo (CloudWatch + EKS)
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/aws"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;aws&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/agents"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;agents&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/awsdevopsagent"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;awsdevopsagent&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/aws-builders/aws-devops-agent-explained-architecture-setup-and-real-root-cause-demo-cloudwatch-eks-ng7" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;37&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/aws-builders/aws-devops-agent-explained-architecture-setup-and-real-root-cause-demo-cloudwatch-eks-ng7#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              12&lt;span class="hidden s:inline"&gt; comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            8 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>ai</category>
      <category>aws</category>
      <category>agents</category>
      <category>awsdevopsagent</category>
    </item>
    <item>
      <title>AWS DevOps Agent is not here to replace you! It's here to compliment you by acting like 24/7 on call engineers finding root cause for issues while you build new feature and innovate. More details in the blog on how to setup with 2 Demo.</title>
      <dc:creator>Jatin Mehrotra</dc:creator>
      <pubDate>Mon, 08 Dec 2025 10:56:34 +0000</pubDate>
      <link>https://forem.com/jatinmehrotra/aws-devops-agent-is-not-here-to-replace-you-its-here-to-compliment-you-by-acting-like-247-on-7dc</link>
      <guid>https://forem.com/jatinmehrotra/aws-devops-agent-is-not-here-to-replace-you-its-here-to-compliment-you-by-acting-like-247-on-7dc</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/aws-builders/aws-devops-agent-explained-architecture-setup-and-real-root-cause-demo-cloudwatch-eks-ng7" class="crayons-story__hidden-navigation-link"&gt;AWS DevOps Agent Explained: Architecture, Setup, and Real Root-Cause Demo (CloudWatch + EKS)&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;
          &lt;a class="crayons-logo crayons-logo--l" href="/aws-builders"&gt;
            &lt;img alt="AWS Community Builders  logo" 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%2Forganization%2Fprofile_image%2F2794%2F88da75b6-aadd-4ea1-8083-ae2dfca8be94.png" class="crayons-logo__image"&gt;
          &lt;/a&gt;

          &lt;a href="/jatinmehrotra" class="crayons-avatar  crayons-avatar--s absolute -right-2 -bottom-2 border-solid border-2 border-base-inverted  "&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%2Fuser%2Fprofile_image%2F1349181%2F49ff3e61-e8bd-463a-9c7f-8925c1e1254f.jpg" alt="jatinmehrotra profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/jatinmehrotra" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Jatin Mehrotra
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Jatin Mehrotra
                
              
              &lt;div id="story-author-preview-content-3087487" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/jatinmehrotra" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F1349181%2F49ff3e61-e8bd-463a-9c7f-8925c1e1254f.jpg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Jatin Mehrotra&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

            &lt;span&gt;
              &lt;span class="crayons-story__tertiary fw-normal"&gt; for &lt;/span&gt;&lt;a href="/aws-builders" class="crayons-story__secondary fw-medium"&gt;AWS Community Builders &lt;/a&gt;
            &lt;/span&gt;
          &lt;/div&gt;
          &lt;a href="https://dev.to/aws-builders/aws-devops-agent-explained-architecture-setup-and-real-root-cause-demo-cloudwatch-eks-ng7" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Dec 6 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/aws-builders/aws-devops-agent-explained-architecture-setup-and-real-root-cause-demo-cloudwatch-eks-ng7" id="article-link-3087487"&gt;
          AWS DevOps Agent Explained: Architecture, Setup, and Real Root-Cause Demo (CloudWatch + EKS)
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/aws"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;aws&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/agents"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;agents&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/awsdevopsagent"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;awsdevopsagent&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/aws-builders/aws-devops-agent-explained-architecture-setup-and-real-root-cause-demo-cloudwatch-eks-ng7" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;37&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/aws-builders/aws-devops-agent-explained-architecture-setup-and-real-root-cause-demo-cloudwatch-eks-ng7#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              12&lt;span class="hidden s:inline"&gt; comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            8 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>ai</category>
      <category>aws</category>
      <category>agents</category>
      <category>awsdevopsagent</category>
    </item>
    <item>
      <title>AWS DevOps Agent Explained: Architecture, Setup, and Real Root-Cause Demo (CloudWatch + EKS)</title>
      <dc:creator>Jatin Mehrotra</dc:creator>
      <pubDate>Sat, 06 Dec 2025 22:19:36 +0000</pubDate>
      <link>https://forem.com/aws-builders/aws-devops-agent-explained-architecture-setup-and-real-root-cause-demo-cloudwatch-eks-ng7</link>
      <guid>https://forem.com/aws-builders/aws-devops-agent-explained-architecture-setup-and-real-root-cause-demo-cloudwatch-eks-ng7</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Amazon Web Services(AWS) launched &lt;a href="https://aws.amazon.com/ai/frontier-agents/" rel="noopener noreferrer"&gt;Frontier agents&lt;/a&gt; that are &lt;strong&gt;autonoumous systems&lt;/strong&gt; during re:Invent 2025 &lt;em&gt;which achieve various use cases goals, scale massively to tackle concurrent tasks, and run persistently for hours or days without intervention&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;In this blog we will talk about one of the frontier agents i.e &lt;strong&gt;&lt;em&gt;AWS DevOps Agent !!!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This blog will explain what is AWS DevOps Agent, its architecture &amp;amp; components, security &amp;amp; &lt;strong&gt;demo for investigating Ec2 CPU spike (CW alarm) and EKS Pod error&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;People can also jump straight in to investigating Cloudwatch alarms or EKS errors plus there is &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2025/tree/master/devops-agent/eks-devops-agent" rel="noopener noreferrer"&gt;tf repo as well for EKS&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the end also &lt;strong&gt;&lt;em&gt;shared DevOps Engineer Perspective on the fear of being replaced and its a must read&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Architecture&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is AWS DevOps Agent&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to maximize Agent's Effectiveness&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS DevOps Agent working architecture&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Resource Discovery by AWS DevOps Agent&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt; Demo 1: Investigate Cloudwatch Alarm&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Demo 2: Investigate EKS errors&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DevOps Engineer perspective&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Architecture
&lt;/h2&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%2Fsgw8l3au1wfz7nlse0w0.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%2Fsgw8l3au1wfz7nlse0w0.png" alt="architecture" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is AWS DevOps Agent
&lt;/h2&gt;

&lt;p&gt;Think of AWS DevOps Agent like an 24/7 continuously learning Autonomous on call Engineer which has all the &lt;strong&gt;tools(more about it later)&lt;/strong&gt; primarily to investigate incidents, finds root causes, provides mitigation plan and provide you Prevention as well.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;At the moment it cannot fix the incidents on its own. Of course a &lt;strong&gt;human will be needed to fix the root cause&lt;/strong&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How it investigates and find the root cause
&lt;/h3&gt;

&lt;p&gt;To investigate root cause and give recommendations it needs understanding and relationships of the infrastructure &amp;amp; applications &lt;code&gt;called as topology&lt;/code&gt; inside AWS account.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The understanding of infrastructure holistically becomes the &lt;code&gt;CONTEXT&lt;/code&gt; for this DevOps Agent&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to maximize Agent's Effectiveness
&lt;/h2&gt;

&lt;p&gt;While the topology provides important context during investigations, AWS DevOps Agent is &lt;strong&gt;not limited to investigating only the resources shown in the topology&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;The agent may use additional data sources, such as AWS service APIs or connected observability tools, to investigate resources that are not in the application topology.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And that is why AWS has given option to add &lt;a href="https://docs.aws.amazon.com/devopsagent/latest/userguide/configuring-capabilities.html" rel="noopener noreferrer"&gt;capabilities&lt;/a&gt; to maximize Agent's effectiveness by :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connect multiple AWS accounts&lt;/li&gt;
&lt;li&gt;Connect CI/CD pipelines through repo like Github/GitLab&lt;/li&gt;
&lt;li&gt;MCP servers&lt;/li&gt;
&lt;li&gt;Telemetry sources like Datadog, New Relic&lt;/li&gt;
&lt;li&gt;Ticketing and chat like serviceNow and slack&lt;/li&gt;
&lt;li&gt;Even EKS (demo over here)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note: We can also provide &lt;a href="https://docs.aws.amazon.com/devopsagent/latest/userguide/userguide-devops-agent-runbooks.html" rel="noopener noreferrer"&gt;runbooks&lt;/a&gt; as pre-loaded guidance/hints to enhance investigation performance to provide investigation hints and guidance.&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%2Fc4szs3wdp2y91prv21tr.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%2Fc4szs3wdp2y91prv21tr.png" alt="runbooks" width="800" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;IN THE END IT ALL ABOUT UNDERSTANDING RELATIONSHIPS ABOUT YOUR RESOURCES&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS DevOps Agent working architecture [IMP]
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Operates through a &lt;strong&gt;dual-console architecture&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Admins uses management Console to create and manage Agent Spaces,configure capabilities &amp;amp; set up access controls.&lt;/li&gt;
&lt;li&gt;Operations teams uses AWS Agent web app to interact with agent and start investigation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  DevOps Agent Spaces
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/devopsagent/latest/userguide/userguide-what-are-devops-agent-spaces.html" rel="noopener noreferrer"&gt;DevOps Agent spaces&lt;/a&gt; &lt;strong&gt;is logical container/boundary that defines what tools and infrastructure AWS DevOps Agent has access to&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;When you create an Agent Space, you define which AWS accounts the agent can access, which external tools it can connect to, and which users in your organization can interact with the agent.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Admins configure the Agent Space&lt;/code&gt; through the AWS Management Console&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/devopsagent/latest/userguide/userguide-what-are-devops-agent-spaces.html#how-agent-spaces-are-isolated" rel="noopener noreferrer"&gt;Security Aspect of Agent Spaces&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each Agent Space uses dedicated IAM roles that grant access only to specific AWS accounts and resources&lt;/li&gt;
&lt;li&gt;You control which users or groups can access each Agent Space.&lt;/li&gt;
&lt;li&gt;Information from one Agent Space is not visible or accessible from another Agent Space&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  DevOps Agent Web App
&lt;/h3&gt;

&lt;p&gt;Operations team uses web apps for daily incident response activities.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/devopsagent/latest/userguide/userguide-what-is-a-devops-agent-web-app.html#authentication" rel="noopener noreferrer"&gt;Security Aspect of Web Apps&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;IAM identity Center (user Access):&lt;/strong&gt; centrally manage user access to the DevOps Agent Space web apps even federate with external identity providers. MFA support is included&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;IAM authentication link (Admin access):&lt;/strong&gt; direct access to the web app from the AWS Management Console using your existing console session.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Resource Discovery by AWS DevOps Agent
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Until this point we understand Agent's context starts with Resource discovery(topology) and it does by 2 ways&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CloudFormation stacks:&lt;/strong&gt; By default Agent will list all of the CloudFormation stacks and their resources. Resources created by CDK is also supported.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Resource Tags:&lt;/strong&gt; Resources not deployed from CloudFormation (like Console or TF), will be discovered by AWS Tag Key and value pairs to include in topology. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Demo 1: Investigate Cloudwatch Alarm
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Pre-requisite
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;For the brevity of the blog I won't cover &lt;a href="https://docs.aws.amazon.com/devopsagent/latest/userguide/getting-started-creating-an-agent-space.html" rel="noopener noreferrer"&gt;how to create agent space&lt;/a&gt;. Pretty straightforward and you don't need aws organizations to do this.&lt;/li&gt;
&lt;li&gt;Cloudformation basics&lt;/li&gt;
&lt;li&gt;Access to us-east-1 region. DevOps agent is available only in this region.&lt;/li&gt;
&lt;li&gt;I used single standalone account.&lt;/li&gt;
&lt;/ul&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%2Fof2vx25aibfo0zfnj5mf.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%2Fof2vx25aibfo0zfnj5mf.png" alt="create AS-1" width="800" height="407"&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%2Ffnoql90zgx5n2o2sv561.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%2Ffnoql90zgx5n2o2sv561.png" alt="Icreate AS-2" width="800" height="409"&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%2Fw8uoa2r8fne6wkwf5e45.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%2Fw8uoa2r8fne6wkwf5e45.png" alt="screen after creating" width="800" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1) Investigate Cloudwatch Alarm
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Deploy the &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2025/blob/master/devops-agent/AWS-AIDevOps-ec2-test.yaml" rel="noopener noreferrer"&gt;cloudformation stack&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&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%2Fatjzy1lapx64zxjsjjl1.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%2Fatjzy1lapx64zxjsjjl1.png" alt="cfn stack deployed" width="800" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This CFN template is creating an security group, key-pair for ssh &lt;strong&gt;ec2 instance with startup script to do CPU stress test&lt;/strong&gt;, CW alarm for CPU utilization, auto shutdown ec2 instances after 2 hours.&lt;/li&gt;
&lt;li&gt;After ec2 instance is created wait for 5-10 minutes to trigger cloudwatch alarm&lt;/li&gt;
&lt;li&gt;You can also SSH into instance and run the stress test manually as well &lt;code&gt;./cpu-stress-test.sh&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once stack is deployed DevOps Agent automatically identifies the new resources.&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%2F5p5f23xuq19r6q8kwctb.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%2F5p5f23xuq19r6q8kwctb.png" alt="topology with 42 resources" width="800" height="375"&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%2Fzo7xtjfpe84qbqjxgc9f.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%2Fzo7xtjfpe84qbqjxgc9f.png" alt="topology-42 resources" width="800" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Access Web App
&lt;/h3&gt;

&lt;p&gt;After creating agent spaces click on &lt;code&gt;View Details&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc9ivzc6se0bv3mggnlf8.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%2Fc9ivzc6se0bv3mggnlf8.png" alt="Agent creation spaces" width="800" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on Web app or directly &lt;code&gt;Operator Access&lt;/code&gt; link&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%2Fk3cvb9byrhoz6df20m5g.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%2Fk3cvb9byrhoz6df20m5g.png" alt="web app access" width="800" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Investigation Root Cause
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4pv513qyzke0pgmnjhhs.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%2F4pv513qyzke0pgmnjhhs.png" alt="cloudwatch trigger" width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once your Cloudwatch Alarm is triggered go to Web app and under &lt;code&gt;incident Response&lt;/code&gt; click on &lt;code&gt;latest alarm&lt;/code&gt; and hit on Start Investigation&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;_DevOps Agent is smart enough to fill the completed prompt. Agent will figure out the steps on its own and give you the final ROOT CAUSE&lt;br&gt;
_&lt;/strong&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%2Fzwci73okhh5m4kc4mib0.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%2Fzwci73okhh5m4kc4mib0.png" alt="root cause" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well I also found an interesting finding when the time between 2 alarms was around 40 minutes agent was unable to find the root cause and I had to rerun the investigation.&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%2Fg53a7qlc47how0d3pz9u.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%2Fg53a7qlc47how0d3pz9u.png" alt="cloudwatch-trigger-second" width="800" height="405"&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%2Fwa45ux31xkc8he8vg4xh.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%2Fwa45ux31xkc8he8vg4xh.png" alt="rootcause not found" width="800" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Mitigation plan
&lt;/h3&gt;

&lt;p&gt;Well since it was user initiated agent was smart enough to give no mitigation plan&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%2Fto6nqlekazlspykqy4i4.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%2Fto6nqlekazlspykqy4i4.png" alt="no mitigation plan" width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Prevention
&lt;/h3&gt;

&lt;p&gt;Since it was a very straightforward demo with user initiated errors so it wasn't enough to generate prevention recommendations&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%2Foy9c1vdenowimh42c3x9.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%2Foy9c1vdenowimh42c3x9.png" alt="Prevention recommendations" width="800" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Investigation gaps
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;One of my favorite feature which even docs does not cover is Investigation gaps.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No investigation can be perfect and that's what investigation gaps fill in to tell when it cannot cover extreme details due to absence of resource at infrastructure level for example in this absence of ssh agent, CloudWatch log groups then it tells those details. &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%2Fc3wxbb180uk0lf7uviyz.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%2Fc3wxbb180uk0lf7uviyz.png" alt="Investigation gaps" width="800" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Using Chat
&lt;/h3&gt;

&lt;p&gt;You can ask more detailed questions using chat in natural language &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%2Fs0400d46oi4zowh06q0f.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%2Fs0400d46oi4zowh06q0f.png" alt="chat" width="469" height="825"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo 2: Investigate EKS errors
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Adding Capability;Give DevOps Agent access to EKS clusters
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Go to Capabilities and click &lt;code&gt;Edit&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;As we learned earlier Agent space IAM role control the access of AWS resources of Agent, &lt;code&gt;Click view role permissions&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&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%2Ftx5cm8wqjte22gnpsmuk.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%2Ftx5cm8wqjte22gnpsmuk.png" alt="agent space role" width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cope the IAM Role ARN. You will need to add an access entry in the EKS cluster with &lt;code&gt;AmazonEKSAdminViewPolicy&lt;/code&gt; ( we have tf code for it)&lt;/li&gt;
&lt;/ul&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%2Fryr8kfyixa14ceqzyu0u.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%2Fryr8kfyixa14ceqzyu0u.png" alt="agent space arn" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Go to terraform code and replace the arn in terraform.vars&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After the terraform code is finished you can see nginx has imagePullBack Error which is intentional&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2Fgprz316gh9u33irwy457.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%2Fgprz316gh9u33irwy457.png" alt="pod error" width="800" height="62"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;As we learn earlier we are deploying resources by terraform so we need to add tags in the Agent space so that DevOps agent can find the resources.&lt;/li&gt;
&lt;/ul&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%2Fy7wi6hb80gg8d8sh7mf0.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%2Fy7wi6hb80gg8d8sh7mf0.png" alt="Agent space tags" width="800" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am using the same tags in my terraform code as well. Click &lt;code&gt;Save&lt;/code&gt;. You will see Agent Space automatically finds the Newly created resources.&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%2Fqw00hcch2ajtjb7aaca7.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%2Fqw00hcch2ajtjb7aaca7.png" alt="eks cluster topology" width="800" height="709"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Go to Web App
&lt;/h3&gt;

&lt;p&gt;Now we will ask the AWS DevOps Agent what is the cause of this error.&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%2Fj6ypa9iiyzo98olz556v.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%2Fj6ypa9iiyzo98olz556v.png" alt="pods question" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Agent successfully investigated the EKS cluster and find out the root cause&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%2Fm5ktafhz50l71212icur.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%2Fm5ktafhz50l71212icur.png" alt="root cause of pod" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Not only it found out the root cause it also gave the mitigation steps also rollback steps if mitigation cause issues.&lt;/strong&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%2Fy4u8pj47d8ijnp1o2ugi.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%2Fy4u8pj47d8ijnp1o2ugi.png" alt="mitigation-1" width="800" height="454"&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%2Fs3aude07kz4mogkklq29.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%2Fs3aude07kz4mogkklq29.png" alt="mitigation-2" width="800" height="421"&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%2Fw1xczt43j0yt8awwm5nn.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%2Fw1xczt43j0yt8awwm5nn.png" alt="mitgation-3" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  DevOps Engineer perspective
&lt;/h2&gt;

&lt;p&gt;We explored how the AWS DevOps Agent reduces MTTR, prevents future incidents through recommendations, and pinpoints root causes. &lt;/p&gt;

&lt;p&gt;The Agent’s effectiveness comes from its deep understanding of your infrastructure—both inside AWS accounts and across external systems. &lt;em&gt;It would be interesting to connect MCP server to enhance context even further.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Though Devops Agent is in preview and its free but has &lt;a href="https://docs.aws.amazon.com/devopsagent/latest/userguide/userguide-public-preview-pricing-and-limits.html" rel="noopener noreferrer"&gt;some limits&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is it secure? if configured Absolutely yes!&lt;/strong&gt; because administrators control what &lt;a href="https://docs.aws.amazon.com/devopsagent/latest/userguide/security-and-access-control-limiting-agent-access-in-an-aws-account.html" rel="noopener noreferrer"&gt;DevOps Agent can access in AWS account&lt;/a&gt;, &lt;a href="https://docs.aws.amazon.com/devopsagent/latest/userguide/security-and-access-control-devops-agent-iam-permissions.html" rel="noopener noreferrer"&gt;Agent IAM permissions control access to its feature and capabilities&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Will it replace you? Absolutely not!&lt;/strong&gt; because still need an engineer to fix the issues, an engineer to build new features for the infrastructure &amp;amp; need that understanding of infrastructure how to rollback if things goes wrong.&lt;/p&gt;

&lt;p&gt;Let me know what do you think?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I share such amazing &lt;strong&gt;AWS updates on DevOps, Kubernetes and GenAI&lt;/strong&gt; daily over &lt;a href="https://www.linkedin.com/in/jatinmehrotra/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;, &lt;a href="https://x.com/imjatinmehrotra" rel="noopener noreferrer"&gt;X&lt;/a&gt;. Follow me over there so that I can make your life more easy.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>aws</category>
      <category>agents</category>
      <category>awsdevopsagent</category>
    </item>
    <item>
      <title>AWS launched EKS Capabilities to simplify Kubernetes with a quick on/off model. It runs Argo CD, ACK, and kro for you—no installs or upgrades. I tested it by deploying an S3 bucket using ACK + Argo CD using EKS Capabilities. Terraform Repo link inside.</title>
      <dc:creator>Jatin Mehrotra</dc:creator>
      <pubDate>Wed, 03 Dec 2025 16:40:44 +0000</pubDate>
      <link>https://forem.com/jatinmehrotra/aws-launched-eks-capabilities-to-simplify-kubernetes-with-a-quick-onoff-model-it-runs-argo-cd-2dp1</link>
      <guid>https://forem.com/jatinmehrotra/aws-launched-eks-capabilities-to-simplify-kubernetes-with-a-quick-onoff-model-it-runs-argo-cd-2dp1</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/aws-builders/i-created-s3-buckets-using-argocd-ack-with-eks-capabilities-no-controllers-installed-cm0" class="crayons-story__hidden-navigation-link"&gt;I Created S3 Buckets Using ArgoCD , ACK with EKS Capabilities—No Controllers Installed.&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;
          &lt;a class="crayons-logo crayons-logo--l" href="/aws-builders"&gt;
            &lt;img alt="AWS Community Builders  logo" 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%2Forganization%2Fprofile_image%2F2794%2F88da75b6-aadd-4ea1-8083-ae2dfca8be94.png" class="crayons-logo__image" width="350" height="350"&gt;
          &lt;/a&gt;

          &lt;a href="/jatinmehrotra" class="crayons-avatar  crayons-avatar--s absolute -right-2 -bottom-2 border-solid border-2 border-base-inverted  "&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%2Fuser%2Fprofile_image%2F1349181%2F49ff3e61-e8bd-463a-9c7f-8925c1e1254f.jpg" alt="jatinmehrotra profile" class="crayons-avatar__image" width="800" height="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/jatinmehrotra" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Jatin Mehrotra
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Jatin Mehrotra
                
              
              &lt;div id="story-author-preview-content-3076889" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/jatinmehrotra" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F1349181%2F49ff3e61-e8bd-463a-9c7f-8925c1e1254f.jpg" class="crayons-avatar__image" alt="" width="800" height="800"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Jatin Mehrotra&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

            &lt;span&gt;
              &lt;span class="crayons-story__tertiary fw-normal"&gt; for &lt;/span&gt;&lt;a href="/aws-builders" class="crayons-story__secondary fw-medium"&gt;AWS Community Builders &lt;/a&gt;
            &lt;/span&gt;
          &lt;/div&gt;
          &lt;a href="https://dev.to/aws-builders/i-created-s3-buckets-using-argocd-ack-with-eks-capabilities-no-controllers-installed-cm0" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Dec 1 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/aws-builders/i-created-s3-buckets-using-argocd-ack-with-eks-capabilities-no-controllers-installed-cm0" id="article-link-3076889"&gt;
          I Created S3 Buckets Using ArgoCD , ACK with EKS Capabilities—No Controllers Installed.
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/aws"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;aws&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/kubernetes"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;kubernetes&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/eks"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;eks&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/reinvent2025"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;reinvent2025&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/aws-builders/i-created-s3-buckets-using-argocd-ack-with-eks-capabilities-no-controllers-installed-cm0" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;12&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/aws-builders/i-created-s3-buckets-using-argocd-ack-with-eks-capabilities-no-controllers-installed-cm0#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            9 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>aws</category>
      <category>kubernetes</category>
      <category>eks</category>
      <category>reinvent2025</category>
    </item>
    <item>
      <title>I Created S3 Buckets Using ArgoCD , ACK with EKS Capabilities—No Controllers Installed.</title>
      <dc:creator>Jatin Mehrotra</dc:creator>
      <pubDate>Mon, 01 Dec 2025 15:08:10 +0000</pubDate>
      <link>https://forem.com/aws-builders/i-created-s3-buckets-using-argocd-ack-with-eks-capabilities-no-controllers-installed-cm0</link>
      <guid>https://forem.com/aws-builders/i-created-s3-buckets-using-argocd-ack-with-eks-capabilities-no-controllers-installed-cm0</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Amazon Web Services (AWS) EKS team has introduced &lt;strong&gt;EKS capabilities&lt;/strong&gt; on &lt;strong&gt;Dec 1, 2025&lt;/strong&gt; to help developers for writing their code by offloading Kubernetes management of resources like Argo CD, ACK, kro by a simple turn/off switch.&lt;/p&gt;

&lt;p&gt;Amazon EKS Capabilities is a new set of fully managed features designed to make running Kubernetes easier and faster for developers. Think of it as a &lt;strong&gt;on-off button&lt;/strong&gt; on top of your EKS cluster that removes a lot of the heavy lifting for you.&lt;br&gt;
These capabilities give you Kubernetes-native tools for things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;deploying your apps continuously (Argo CD)&lt;/li&gt;
&lt;li&gt;managing AWS resources directly from Kubernetes (ACK)&lt;/li&gt;
&lt;li&gt;creating and organizing your Kubernetes objects (kro)
And the best part? AWS manages all of this for you.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Instead of installing, updating, and scaling these tools on your worker nodes, EKS now runs them for you. That means less time fighting with cluster operations and more time actually building and scaling the applications.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For the people who wants to jump straight in to trying the solution can follow &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2025/tree/master/eks-capabilities" rel="noopener noreferrer"&gt;my repo here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I tested this setup today and here’s how I deployed an S3 bucket with ACK and GitOps using Argo CD and EKS Capabilities.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Bonus&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Architecture&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pricing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is EKS capability&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Prerequisites&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terraform Code Walkthrough&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DevOps and Platform Engineering perspective&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Bonus
&lt;/h2&gt;

&lt;p&gt;I have found a bug which does not allow ArgoCD to get in healthy state, follow along to find out what that bug is and how to fix that bug.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: This blog assumes that you have fundamental knowledge on how &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/argocd-concepts.html" rel="noopener noreferrer"&gt;Argo CD&lt;/a&gt;, &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/ack-concepts.html" rel="noopener noreferrer"&gt;ACK&lt;/a&gt; and &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/kro-concepts.html" rel="noopener noreferrer"&gt;kro&lt;/a&gt; works conceptually.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&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%2Fh3spiw2isp2c7r7n6exw.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%2Fh3spiw2isp2c7r7n6exw.png" alt="architecture" width="800" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Available capabilities
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ACK:&lt;/strong&gt; ACK enables the management of AWS resources using Kubernetes APIs, allowing you to create and manage S3 buckets, RDS databases, IAM roles, and other AWS resources using Kubernetes custom resources.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Argo CD:&lt;/strong&gt; GitOps-based continuous deployment for your applications, using Git repositories as the source of truth for your workloads and system state.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;kro:&lt;/strong&gt; Create custom Kubernetes APIs that compose multiple resources into higher-level abstractions, allowing platform teams to define reusable patterns for common resource combinations-cloud building blocks&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Pricing [IMP]
&lt;/h2&gt;

&lt;p&gt;Well the &lt;a href="https://aws.amazon.com/eks/pricing/" rel="noopener noreferrer"&gt;pricing&lt;/a&gt; is tricky. You pay for EKS Capabilities based on two components that are both billed hourly: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;a base hourly rate for each enabled capability&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;hourly usage charges based on the quantity of resources managed by each capability&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;In short base charge + usage charge.&lt;/strong&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%2Fvoch50n2nl04kdtorgfw.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%2Fvoch50n2nl04kdtorgfw.png" alt="pricing" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For Argo CD, you pay hourly for each Argo CD Application managed. For AWS Controllers for Kubernetes (ACK), you pay hourly for each ACK resource managed. For Kubernetes Resource Orchestrator (KRO), you pay hourly for each KRO Resource Graph Definition (RGD) instance managed.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is EKS Capability?
&lt;/h2&gt;

&lt;p&gt;It is basically an AWS resource managed by AWS including its scaling, lifecycle, security but runs inside your EKS cluster but not on your worker nodes.&lt;/p&gt;

&lt;p&gt;Basically Capabilities run in EKS, &lt;strong&gt;&lt;em&gt;eliminating the need to install and maintain controllers and other operational components on your worker nodes&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources That can be created by Capability
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;For ArgoCD&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Application&lt;/li&gt;
&lt;li&gt;ApplicationSet&lt;/li&gt;
&lt;li&gt;AppProject&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;For kro&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ResourceGraphDefinition (RGD)&lt;/li&gt;
&lt;li&gt;Custom resource instances&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;For ACK&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When you enable the ACK capability, you can create and manage AWS resources using Kubernetes custom resources. ACK provides over 200 CRDs for more than 50 AWS services,&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Capability IAM Role [IMP]
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Each EKS capability resource has a configured capability IAM role. &lt;/li&gt;
&lt;li&gt;&lt;p&gt;The capability role is used to grant AWS service permissions for EKS capabilities to act on your behalf. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For example, to use the EKS Capability for ACK to manage Amazon S3 Buckets, you will grant S3 Bucket administrative permissions to the capability, enabling it to create and manage buckets.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;In order to follow along make sure you have following prerequisites met. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common to all 3 capabilities&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An EKS cluster&lt;/li&gt;
&lt;li&gt;An IAM Capability Role with permissions for ACK, ArgoCD, kro &lt;/li&gt;
&lt;li&gt;Sufficient IAM permissions to create capability resources on EKS clusters&lt;/li&gt;
&lt;li&gt;(For CLI/eksctl) The appropriate CLI tool installed and configured&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Argo CD capability specific&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS Identity Center configured - Required for Argo CD authentication (local users are not supported)&lt;/li&gt;
&lt;li&gt;kubectl configured to communicate with your cluster&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Terraform Code Walkthrough
&lt;/h2&gt;

&lt;p&gt;Terraform code for this repo lies in this &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2025/tree/master/eks-capabilities" rel="noopener noreferrer"&gt;repo&lt;/a&gt;. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Just run &lt;code&gt;terraform apply&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Demo: Creating S3 buckets with ACK and ArgoCD using EKS Capabilities
&lt;/h2&gt;

&lt;p&gt;The whole process of giving this managed platform capabilities is simple.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create IAM Capability Role -&amp;gt; Enable Capabilities (ACK and ArgoCD for this Demo) -&amp;gt; Register cluster to ArgoCD -&amp;gt; add ArgoCD applications to track Git repo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;We create an capability IAM role with &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/capability-role.html" rel="noopener noreferrer"&gt;trust policies as mentioned in the docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;We add permissions for the role like if we want to create s3 bucket using ACK we add s3 policy to the role so that ack can talk to AWS Services.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For kro and ArgoCD &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/capability-role.html#capability-permissions" rel="noopener noreferrer"&gt;the role does not need any permissions&lt;/a&gt; because when you enable capability adds access entries policies which add permissions for these capabilities to interact with EKS cluster. &lt;/p&gt;

&lt;h3&gt;
  
  
  The Capability Role
&lt;/h3&gt;

&lt;p&gt;For this we create a trust relationship which allows capabilities to assume role.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "Version": "2012-10-17",               
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "capabilities.eks.amazonaws.com"
      },
      "Action": [
        "sts:AssumeRole",
        "sts:TagSession"
      ]
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now based on the capability you add permissions to it, for the brevity of this blog ACK and ArgoCD capability will use the same role and in the &lt;a&gt;tf code&lt;/a&gt; I have added full s3 permissions for ACK to create S3 bucket.&lt;/p&gt;

&lt;h3&gt;
  
  
  ArgoCD IAM Identity Center Integration
&lt;/h3&gt;

&lt;p&gt;The Argo CD managed capability &lt;strong&gt;integrates with AWS Identity Center for authentication and uses built-in RBAC roles for authorization&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That is why IAM identity Center is a prerequisite.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is how permissions work with ArgoCD. When a user accesses Argo CD UI:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They authenticate using AWS Identity Center (which can federate to your corporate identity provider)&lt;/li&gt;
&lt;li&gt;AWS Identity Center provides user and group information to Argo CD&lt;/li&gt;
&lt;li&gt;Argo CD maps users and groups to RBAC roles based on your configuration&lt;/li&gt;
&lt;li&gt;Users see only the applications and resources they have permission to access&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is exactly what I have done in my &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2025/blob/master/eks-capabilities/data.tf" rel="noopener noreferrer"&gt;terraform code&lt;/a&gt;, &lt;strong&gt;accessing IAM identity center instance and user details and passing to the argoCD capability and configuring RBAC role for my user as ADMIN role&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;data "aws_ssoadmin_instances" "main" {}

data "aws_identitystore_user" "admin" {
  identity_store_id = tolist(data.aws_ssoadmin_instances.main.identity_store_ids)[0]

  alternate_identifier {
    unique_attribute {
      attribute_path  = "UserName"
      attribute_value = var.idc_username
    }
  }
}

resource "null_resource" "eks_capability_argocd" {
  depends_on = [module.eks]

  provisioner "local-exec" {
    command = &amp;lt;&amp;lt;-EOT
      aws eks create-capability \
        --region ${local.region} \
        --cluster-name ${local.cluster_name} \
        --capability-name my-argocd \
        --type ARGOCD \
        --role-arn ${aws_iam_role.eks_capability_role.arn} \
        --delete-propagation-policy RETAIN \
        --configuration '{
          "argoCd": {
            "awsIdc": {
              "idcInstanceArn": "${tolist(data.aws_ssoadmin_instances.main.arns)[0]}",
              "idcRegion": "${local.region}"
            },
            "rbacRoleMappings": [{
              "role": "ADMIN",
              "identities": [{
                "id": "${data.aws_identitystore_user.admin.user_id}",
                "type": "SSO_USER"
              }]
            }]
          }
        }' \
        --profile jj
    EOT
  }
}

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

&lt;/div&gt;



&lt;p&gt;To restrict for your use- case see &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/argocd-permissions.html#_built_in_rbac_roles" rel="noopener noreferrer"&gt;built-in RBAC roles&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  EKS cluster and installing capabilities]
&lt;/h3&gt;

&lt;p&gt;I am using EKS auto mode for this blog. As this is fresh update I am using aws cli commands to enable capabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;1) Capabilities are not &lt;code&gt;ACTIVE&lt;/code&gt; instantly so we need to wait until they become &lt;code&gt;ACTIVE&lt;/code&gt; for next operation.&lt;/p&gt;

&lt;p&gt;2) Behind the scenes after enabling capabilities, an access entry is created for the capability role with access entries like &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/access-policy-permissions.html#_amazoneksargocdpolicy" rel="noopener noreferrer"&gt;AmazonEKSArgoCDPolicy&lt;/a&gt;,&lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/access-policy-permissions.html#_amazoneksackpolicy" rel="noopener noreferrer"&gt;AmazonEKSACKPolicy &lt;/a&gt;, &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/access-policy-permissions.html#_amazoneksargocdclusterpolicy" rel="noopener noreferrer"&gt;AmazonEKSArgoCDClusterPolicy&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resource "null_resource" "eks_capability_ack" {
  depends_on = [module.eks]

  provisioner "local-exec" {
    command = &amp;lt;&amp;lt;-EOT
      aws eks create-capability \
        --region ${local.region} \
        --cluster-name ${local.cluster_name} \
        --capability-name my-ack \
        --type ACK \
        --role-arn ${aws_iam_role.eks_capability_role.arn} \
        --delete-propagation-policy RETAIN \
        --profile jj
    EOT
  }
}

resource "null_resource" "eks_capability_argocd" {
  depends_on = [module.eks]

  provisioner "local-exec" {
    command = &amp;lt;&amp;lt;-EOT
      aws eks create-capability \
        --region ${local.region} \
        --cluster-name ${local.cluster_name} \
        --capability-name my-argocd \
        --type ARGOCD \
        --role-arn ${aws_iam_role.eks_capability_role.arn} \
        --delete-propagation-policy RETAIN \
        --configuration '{
          "argoCd": {
            "awsIdc": {
              "idcInstanceArn": "${tolist(data.aws_ssoadmin_instances.main.arns)[0]}",
              "idcRegion": "${local.region}"
            },
            "rbacRoleMappings": [{
              "role": "ADMIN",
              "identities": [{
                "id": "${data.aws_identitystore_user.admin.user_id}",
                "type": "SSO_USER"
              }]
            }]
          }
        }' \
        --profile jj
    EOT
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Registering the eks cluster to ArgoCD to deploy applications
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/argocd-concepts.html#_getting_started_with_argo_cd" rel="noopener noreferrer"&gt;Docs &lt;/a&gt;suggest to use argocd cli but it never succeeded as it always timed out s&lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/argocd-register-clusters.html#_register_the_local_cluster" rel="noopener noreferrer"&gt;o I register the secret using K8 Secret&lt;/a&gt;. &lt;em&gt;This is possible because of the new access entry(&lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/access-policy-permissions.html#_amazoneksargocdpolicy" rel="noopener noreferrer"&gt;AmazonEKSArgoCDPolicy&lt;/a&gt;) policy which ArgoCD capability to read the K8 secrets&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resource "null_resource" "argocd_add_cluster" {
  depends_on = [null_resource.wait_for_argocd]

  provisioner "local-exec" {
    command = &amp;lt;&amp;lt;-EOT
      aws eks update-kubeconfig \
        --name ${local.cluster_name} \
        --region ${local.region} \
        --profile jj

      kubectl apply -f - &amp;lt;&amp;lt;EOF
apiVersion: v1
kind: Secret
metadata:
  name: ${local.cluster_name}-cluster
  namespace: argocd
  labels:
    argocd.argoproj.io/secret-type: cluster
stringData:
  name: ${local.cluster_name}
  server: ${module.eks.cluster_arn}
  project: default
EOF
    EOT
  }
}

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  Create an ArgoCD Application
&lt;/h3&gt;

&lt;p&gt;This demo uses a public GitHub repository, so no repository configuration is required. For private repositories, configure access using AWS Secrets Manager, CodeConnections, or Kubernetes Secrets&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: eks-capability
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/jatinmehrotra/aws-reinvent-2025
    targetRevision: HEAD
    path: eks-capabilities/ack_yaml
  destination:
    name: reinvent-2025
    namespace: ack
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
    - CreateNamespace=true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Over this path there is yaml file to create S3 bucket using ACK which will be synced and applied to cluster and then ACK will create this bucket in our AWS Account&lt;/em&gt;&lt;/strong&gt;&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;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;s3.services.k8s.aws/v1alpha1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Bucket&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;my-test-bucket&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;default&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;jj-bucket-name-12345&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Fixing the Bug
&lt;/h3&gt;

&lt;p&gt;Even after doing all this or following AWS docs this won't run because the access entries(&lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/access-policy-permissions.html#_amazoneksargocdclusterpolicy" rel="noopener noreferrer"&gt;AmazonEKSArgoCDClusterPolicy&lt;/a&gt;) policies created by AWS for ArgoCD Capability lacks permissions to list the cluster resources.&lt;/p&gt;

&lt;p&gt;SO added cluster admin permission for the blog&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%2F86aco694c0y4t9nqn858.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%2F86aco694c0y4t9nqn858.png" alt="access enteries" width="800" height="325"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;horizontalpodautoscalers.autoscaling is forbidden: 
User "arn:aws:sts::xxxxxxx:assumed-role/eks-capability-role/aws-go-sdk-1764587162523491382" 
cannot list resource "horizontalpodautoscalers" in API group "autoscaling" at the cluster scope
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fcbaj8kcvuf2bsk7zickr.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%2Fcbaj8kcvuf2bsk7zickr.png" alt="blur argued account error" width="800" height="263"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So to fix that we need to import the access entry created by AWS and add the Cluster Admin Access entry.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Import the access entry created by EKS capability
resource "null_resource" "import_access_entry" {
  depends_on = [null_resource.wait_for_argocd]

  provisioner "local-exec" {
    command = &amp;lt;&amp;lt;-EOT
      terraform import -input=false \
        aws_eks_access_entry.capability_role \
        "${local.cluster_name}:${aws_iam_role.eks_capability_role.arn}" || true
    EOT
  }
}

resource "aws_eks_access_entry" "capability_role" {
  cluster_name  = module.eks.cluster_name
  principal_arn = aws_iam_role.eks_capability_role.arn
  type          = "STANDARD"

  lifecycle {
    ignore_changes = [kubernetes_groups]
  }

  depends_on = [null_resource.import_access_entry]
}

# Add ClusterAdmin policy to fix insufficient ArgoCD permissions
resource "aws_eks_access_policy_association" "capability_role_admin" {
  cluster_name  = module.eks.cluster_name
  principal_arn = aws_iam_role.eks_capability_role.arn
  policy_arn    = "arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy"

  access_scope {
    type = "cluster"
  }

  depends_on = [aws_eks_access_entry.capability_role]
}

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

&lt;/div&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%2Fa3stx7c1e08l1btqznkz.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%2Fa3stx7c1e08l1btqznkz.png" alt="ArgoCD fixed" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can access ArgoCD UI from console -&amp;gt; Capabilities and Under Argo CD&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%2Fuqe3i1ae22xh2jjk7xxc.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%2Fuqe3i1ae22xh2jjk7xxc.png" alt="Argo CD UI" width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can login using your IAM identity Center&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%2Ffa0hjnbcauff2pp486xt.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%2Ffa0hjnbcauff2pp486xt.png" alt="Argo CD UI Login" width="800" height="409"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Argo CD successfully sync the application for Git repository and then ACK creates the S3 bucket&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%2Fc27es01dfu2iz711mull.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%2Fc27es01dfu2iz711mull.png" alt="Argo CD UI synced" width="800" height="397"&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%2Fotgn4cqpct9yjqf19ur3.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%2Fotgn4cqpct9yjqf19ur3.png" alt="ACK created the S3 Bucket" width="800" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Cleanup
&lt;/h2&gt;

&lt;p&gt;For cleanup before running terraform destroy. Read the &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/working-with-capabilities.html#_delete_a_capability" rel="noopener noreferrer"&gt;delete docs&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%2Fbn03rkgnud0puddg2rqa.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%2Fbn03rkgnud0puddg2rqa.png" alt="delete capability" width="800" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Delete the s3 bucket first &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;run the &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2025/blob/master/eks-capabilities/cleanup-capabilities.sh" rel="noopener noreferrer"&gt;cleanup script&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then run &lt;code&gt;terraform destroy&lt;/code&gt;.Because cluster won't be deleted if capabilities are not deleted.&lt;/p&gt;

&lt;h2&gt;
  
  
  DevOps and Platform Engineering perspective
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;In this blog we saw the Use case of &lt;em&gt;&lt;strong&gt;GitOps for Applications and Infrastructure&lt;/strong&gt;&lt;/em&gt; where Use Argo CD to deploy applications and ACK to provision infrastructure, both from Git repositories. Your entire stack—applications, databases, storage, and networking—is defined as code and automatically deployed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;We just push the AWS infra yaml files to Git and ArgoCD deploys the updated application, and ACK provisions a new S3 bucket with the correct configuration. &lt;br&gt;
All changes are auditable, reversible, and consistent across environments.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;There &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/capabilities.html#_common_use_cases" rel="noopener noreferrer"&gt;can be many use cases &lt;/a&gt; for these capabilities like Account and regional Bootstrapping, Modernization of EKS resources &lt;/p&gt;

&lt;p&gt;Its very interesting to see how they are compared to self managed versions &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/ack-comparison.html" rel="noopener noreferrer"&gt;ack&lt;/a&gt;,&lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/argocd-comparison.html" rel="noopener noreferrer"&gt;argocd&lt;/a&gt;,&lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/kro-comparison.html" rel="noopener noreferrer"&gt;kro&lt;/a&gt;. Ofcourse there are limitations like ArgoCD right now supper single namespace deployment or Notifications Controller in ArgoCD isn't supported&lt;/p&gt;

&lt;p&gt;But overall a great update for Platform engineering which offloads the setup, complexity and management of Kubernetes resources to AWS and lets developers focus on their productivity and applications. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;I share such amazing &lt;strong&gt;AWS updates on DevOps, Kubernetes and GenAI&lt;/strong&gt; daily over &lt;a href="https://www.linkedin.com/in/jatinmehrotra/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;, &lt;a href="https://x.com/imjatinmehrotra" rel="noopener noreferrer"&gt;X&lt;/a&gt;. Follow me over there so that I can make your life more easy.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>aws</category>
      <category>kubernetes</category>
      <category>eks</category>
      <category>reinvent2025</category>
    </item>
    <item>
      <title>Cut CI/CD Costs by 77% &amp; 2x Deployment Speed with GitHub Actions on EKS Auto Mode</title>
      <dc:creator>Jatin Mehrotra</dc:creator>
      <pubDate>Mon, 21 Apr 2025 00:18:08 +0000</pubDate>
      <link>https://forem.com/aws-builders/cut-cicd-costs-by-77-2x-deployment-speed-with-github-actions-on-eks-auto-2ob2</link>
      <guid>https://forem.com/aws-builders/cut-cicd-costs-by-77-2x-deployment-speed-with-github-actions-on-eks-auto-2ob2</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/s23QvNz2WuY"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;On April 5, 2025 I did a live stream on &lt;a href="https://www.youtube.com/live/s23QvNz2WuY?si=nfqgSid8w1Lm7Epj" rel="noopener noreferrer"&gt;how to run Github Actions Self Hosted Runners on EKS Auto&lt;/a&gt; with AWS Heroes &lt;a href="https://www.linkedin.com/in/arshad-zackeriya-713b821b/" rel="noopener noreferrer"&gt;Arshad Zackeriya&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/jones-zachariah-noel-n/" rel="noopener noreferrer"&gt;Jones Zachariah Noel&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disclaimer:&lt;/strong&gt; 🐶 No Beagles were harmed. Slightly annoyed, maybe — but unharmed.&lt;/p&gt;

&lt;p&gt;The results &lt;code&gt;{Performance, Speed, Cost}&lt;/code&gt; were not only astonishing but impeccable and &lt;strong&gt;&lt;em&gt;promising enough to adopt this solution at the enterprise level&lt;/em&gt;&lt;/strong&gt;. This solution isn't just AWS agnostic, with the knowledge gained in this blog can be extended to Azure(AKS), google(GKE) or if you are running K8 on your own bare metal servers.&lt;/p&gt;

&lt;p&gt;For the people who wants to jump straight in to trying the solution can follow &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners" rel="noopener noreferrer"&gt;my repo here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is going to be a bit of a long one, so grab a coffee, get comfy, and make sure you're sitting in your optimal developer position™ — you know the one.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Architecture&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Why this solution&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Self Hosted Runner Concept on K8&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terraform Code Walkthrough&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to test this solution&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Github Large Hosted Runner vs Running Runners on EKS Auto&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;From a solutions architect perspective&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Architecture
&lt;/h2&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%2Fty3nwf93x73i7bksl55z.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%2Fty3nwf93x73i7bksl55z.png" alt="architecture image " width="800" height="339"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this solution
&lt;/h2&gt;

&lt;p&gt;I work as a senior DevOps Engineer at &lt;a href="https://www.colorkrew.com" rel="noopener noreferrer"&gt;Colorkrew&lt;/a&gt; where we have a lot of products and to support the development workflow we have lot of GitHub repositories.&lt;/p&gt;

&lt;p&gt;As we started to increase our product portfolio, our CI/CD pipelines also started to become more complex, concurrent and frequent leading to the need of more computation power and eventually more robust infrastructure layer which supports our growing needs.&lt;/p&gt;

&lt;p&gt;Running Github Actions on default free machines (called as runners) started to become slow and the initial solution was to either use Large hosted runners by GitHub which are paid or run the runners on our Infrastructure like Kubernetes.&lt;/p&gt;

&lt;p&gt;So I started to &lt;code&gt;compare both solutions on performance, speed and cost&lt;/code&gt; and this lead to the inception of this running GitHub's self hosted runners on EKS Auto.&lt;/p&gt;




&lt;h2&gt;
  
  
  Self Hosted Runner Concept on K8
&lt;/h2&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%2F3o7l3em2rm6oas02zlu6.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%2F3o7l3em2rm6oas02zlu6.png" alt="ARC architecture" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Runners:&lt;/strong&gt; The machines (servers or virtual environments) that actually execute the jobs defined in your workflows. When you manage called as Self Hosted runners otherwise GitHub Hosted runners. Runners are ephemeral in nature. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Runner Scale Sets:&lt;/strong&gt; Think of it as a logical grouping of runners that are homogeneous in nature which means all runners under a particular group will have same configuration. Can be installed at repository, organization or enterprise level. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you want heterogeneous setup which means different configuration for runners for different ci/cd jobs then you need a multiple runner scale sets.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Another important thing to know about Runner scale sets are that you configure how many minimum and maximum runners you want all the time.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Name of Runner Scale Sets:&lt;/strong&gt; Runner scale sets are addressable by their name so remember it because when you need to specify that name of runner scale set in the &lt;code&gt;runs on:&lt;/code&gt; property of GHA to assign that workflow on on a particular runner scale set.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Endpoints:&lt;/strong&gt; ARC talks to two endpoints &lt;code&gt;api.github.com&lt;/code&gt; and &lt;code&gt;pipelines.actions.githubusercontent.com&lt;/code&gt;. Make sure your organization's firewall, proxies, nat gateway whatever being used to access internet should be configured to allow the above endpoints for ARC controller.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;ARC controller:&lt;/strong&gt; contains of 2 elements/pods.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;controller-manager&lt;/code&gt;: First pod that comes online. This has different controllers managing different resources in the cluster. Important one to understand is &lt;code&gt;AutoScalingListener&lt;/code&gt; Controller manages the listener pod. 

&lt;ul&gt;
&lt;li&gt;Responsible for creating the resources and making sure that match the desired count and state.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt; &lt;code&gt;Runner ScaleSet Listener&lt;/code&gt;: Manages the decision making about scaling needs. Responsible to decide how many runners to create. Each listener has its own pod which means 1 listener pod per runner scale set. If you have 2 runner scale set then 2 listener pods either on same namespace like controller manager or different namespace ( configurable)&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;I thought should give easier explanation in my own analogies 😋🫣&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/actions/actions-runner-controller" rel="noopener noreferrer"&gt;Actions Runner Controller (ARC&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;is like the manager of a smart, automated coffee shop — it watches how many customers are coming in (workflows) and instantly hires or releases baristas (runners) as needed.&lt;br&gt;
Instead of having baristas standing around all day just in case, ARC spins up temporary baristas (containers in Kubernetes) only when customers arrive, and lets them go when the work is done. This keeps the system fast, efficient, and cost-effective.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;With &lt;strong&gt;&lt;a href="https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners" rel="noopener noreferrer"&gt;Runner Scale Sets&lt;/a&gt;,&lt;/strong&gt; you can define the rules for how many baristas you want at any given time, based on how busy your shop is — and ARC handles the rest.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can read more about detailed end to end workflow over &lt;a href="https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/about-actions-runner-controller#about-actions-runner-controller" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  Terraform Code Walkthrough
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/jatin-mehrotra-personal" rel="noopener noreferrer"&gt;
        jatin-mehrotra-personal
      &lt;/a&gt; / &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners" rel="noopener noreferrer"&gt;
        eks-auto-self-hosted-runners
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Run GitHub Actions Self Hosted Runners on EKS Auto Mode&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;This repository provides infrastructure as code (IaC) to deploy auto-scaling GitHub Actions self-hosted runners on Amazon EKS using GitHub's Actions Runner Controller (ARC).&lt;/p&gt;
&lt;p&gt;detailed blog: &lt;a href="https://dev.to/aws-builders/cut-cicd-costs-by-77-2x-deployment-speed-with-github-actions-on-eks-auto-2ob2" rel="nofollow"&gt;https://dev.to/aws-builders/cut-cicd-costs-by-77-2x-deployment-speed-with-github-actions-on-eks-auto-2ob2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;See it in action: &lt;a href="https://www.youtube.com/live/s23QvNz2WuY?si=08n0qCVpMYC1qTKc" rel="nofollow noopener noreferrer"&gt;https://www.youtube.com/live/s23QvNz2WuY?si=08n0qCVpMYC1qTKc&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Overview&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;This solution allows you to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Deploy a fully managed EKS cluster with auto-scaling capabilities&lt;/li&gt;
&lt;li&gt;Set up GitHub Actions Runner Controller (ARC) for managing self-hosted runners&lt;/li&gt;
&lt;li&gt;Configure auto-scaling runner sets that scale based on workflow demand&lt;/li&gt;
&lt;li&gt;Support Docker-in-Docker (DinD) runners for container-based workflows&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Architecture&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/./architecture/self-hosted-runner-eks-auto.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fjatin-mehrotra-personal%2Feks-auto-self-hosted-runners%2FHEAD%2F.%2Farchitecture%2Fself-hosted-runner-eks-auto.png" alt="arch-image"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The infrastructure consists of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Amazon EKS cluster running in a custom VPC&lt;/li&gt;
&lt;li&gt;GitHub Actions Runner Controller deployed via Helm&lt;/li&gt;
&lt;li&gt;Auto-scaling runner sets configured to scale from 0 to meet demand&lt;/li&gt;
&lt;li&gt;Optional Docker-in-Docker (DinD) runner support&lt;/li&gt;
&lt;li&gt;Karpenter for node auto-scaling (configured but optional)&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Prerequisites&lt;/h2&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;AWS CLI configured with appropriate permissions&lt;/li&gt;
&lt;li&gt;Terraform v1.0.0+&lt;/li&gt;
&lt;li&gt;kubectl&lt;/li&gt;
&lt;li&gt;Helm v3+&lt;/li&gt;
&lt;li&gt;A GitHub repository or organization where you want to deploy runners&lt;/li&gt;
&lt;li&gt;…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Setting Up Auto-Scaling GitHub Actions Self-Hosted Runners on Amazon EKS
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Introduction
&lt;/h4&gt;

&lt;p&gt;In this walkthrough, we'll set up GitHub Actions Runner Controller (ARC) on Amazon EKS to automatically scale self-hosted runners based on workflow demand.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project Structure
&lt;/h3&gt;

&lt;p&gt;Here's the structure of our implementation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eks-auto-self-hosted-runners/
├── README.md
├── architecture/
├── commit_log.txt
├── scripts/
└── terraform/
    ├── base/
    └── modules/
        ├── arc/
        ├── eks/
        ├── karpenter_config/
        └── vpc/

1. Root directory - Contains the main README and architecture diagrams
2. scripts/ - Contains utility scripts for cleanup and performance testing
3. terraform/ - The main infrastructure code
   base/ - The entry point for Terraform deployment
   modules/ - Reusable Terraform modules:
   arc/ - Actions Runner Controller configuration
   eks/ - EKS cluster configuration
   karpenter_config/ - Node auto-scaling configuration
   vpc/ - Network infrastructure configuration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Architecture Overview
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwrxb13ddxjlkxxmi1j7o.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%2Fwrxb13ddxjlkxxmi1j7o.png" alt="Architecture Diagram" width="800" height="339"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our solution uses the following components:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Amazon EKS Auto: Managed Kubernetes service to host our runner infrastructure with Karpenter for provisioning nodes on-demand for runners compute&lt;/li&gt;
&lt;li&gt;GitHub Actions Runner Controller (ARC): Kubernetes controller that manages self-hosted runners&lt;/li&gt;
&lt;li&gt;Terraform: Infrastructure as Code tool to deploy and manage all components&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The architecture allows GitHub Actions workflows to dynamically request runners, which are provisioned on-demand in our EKS cluster and automatically scaled down when not needed.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 1: Setting Up the Infrastructure
&lt;/h4&gt;

&lt;h5&gt;
  
  
  VPC Configuration
&lt;/h5&gt;

&lt;p&gt;We start by creating a VPC with public and private subnets. Our VPC configuration uses a CIDR block of 10.0.0.0/16 with subnets spread across two availability zones. The &lt;br&gt;
private subnets host our EKS nodes, while public subnets are used for NAT gateways and load balancers.&lt;/p&gt;

&lt;p&gt;The configuration in &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/master/terraform/base/vpc.tf" rel="noopener noreferrer"&gt;terraform/base/vpc.tf&lt;/a&gt; references the VPC module and sets up all necessary networking components with appropriate tagging for Kubernetes integration.&lt;/p&gt;
&lt;h5&gt;
  
  
  EKS Cluster Setup
&lt;/h5&gt;

&lt;p&gt;Next, we create an EKS cluster using the EKS module defined in &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/tree/master/terraform/modules/eks" rel="noopener noreferrer"&gt;terraform/modules/eks&lt;/a&gt;. Our cluster runs Kubernetes version 1.31 and includes a system node group for running &lt;br&gt;
essential cluster services.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/master/terraform/base/eks.tf" rel="noopener noreferrer"&gt;terraform/base/eks.tf&lt;/a&gt; file configures the cluster with public endpoint access and places the worker nodes in the private subnets for enhanced security.&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 2: Configuring EKS Auto's pre-installed Karpenter for Auto-Scaling
&lt;/h4&gt;

&lt;p&gt;EKS Auto comes with Karpenter pre-installed. We leverage Karpenter to  provision and auto scale Ec2 spot instances from our desired Ec2 type, capacity and configuration for our GHA runner's compute.&lt;/p&gt;

&lt;p&gt;Our Karpenter configuration in &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/master/terraform/base/karpenter_config.tf" rel="noopener noreferrer"&gt;terraform/base/karpenter_config.tf &lt;/a&gt;uses m7a instance types with spot pricing for cost efficiency. The consolidation policy is set to "WhenEmpty" with a 5-minute timeout, which means nodes will be removed when they're no longer needed.&lt;/p&gt;

&lt;p&gt;Key configuration parameters include:&lt;br&gt;
• Instance types: m7a family with 8 CPUs&lt;br&gt;
• Capacity type: Spot instances for cost savings&lt;br&gt;
• Storage: 300GB with 5000 IOPS&lt;br&gt;
• Availability zones: us-east-1a and us-east-1b&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 3: Deploying Actions Runner Controller (ARC)
&lt;/h4&gt;

&lt;p&gt;Now we deploy the GitHub Actions Runner Controller using the ARC module defined in terraform/modules/arc. The module is referenced in &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/master/terraform/base/arc.tf" rel="noopener noreferrer"&gt;terraform/base/arc.tf&lt;/a&gt; with configuration parameters from &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/master/terraform/base/locals.tf" rel="noopener noreferrer"&gt;locals.tf&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The ARC deployment consists of two main components:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Controller: Manages the lifecycle of runner pods&lt;/li&gt;
&lt;li&gt;Runner Sets: Define the configuration for the runners&lt;/li&gt;
&lt;/ol&gt;
&lt;h5&gt;
  
  
  Controller Deployment
&lt;/h5&gt;

&lt;p&gt;The controller is deployed using a Helm chart from the official GitHub Actions Runner Controller repository. The configuration is defined in &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/master/terraform/modules/arc/controller.tf" rel="noopener noreferrer"&gt;terraform/modules/arc/controller.tf&lt;/a&gt; and uses values from &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/master/terraform/modules/arc/helm/controller_values.yaml" rel="noopener noreferrer"&gt;helm/controller_values.yaml&lt;/a&gt;.&lt;/p&gt;
&lt;h5&gt;
  
  
  Runner Sets Configuration
&lt;/h5&gt;

&lt;p&gt;We deploy two types of runner sets:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Standard Runners: For general workflow jobs&lt;/li&gt;
&lt;li&gt;Docker-in-Docker (DinD) Runners: For jobs that need to build Docker images

&lt;ul&gt;
&lt;li&gt;There is also another type of runner set called &lt;code&gt;Kubernetes mode&lt;/code&gt; &lt;strong&gt;which should be used when organizations cannot afford to run docker with superuser context as in case DinD runners then use Kubernetes mode&lt;/strong&gt; ( not covered in this blog) &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The runner sets are defined in &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/master/terraform/modules/arc/runner_sets.tf" rel="noopener noreferrer"&gt;terraform/modules/arc/runner_sets.tf&lt;/a&gt; and use values from &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/master/terraform/modules/arc/helm/arc_listener_values.yaml" rel="noopener noreferrer"&gt;helm/arc_listener_values.yaml&lt;/a&gt; and &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/master/terraform/modules/arc/helm/arc_listener_values_dind.yaml" rel="noopener noreferrer"&gt;helm/arc_listener_values_dind.yaml&lt;/a&gt; respectively.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This is very important that &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/2e5c6488350feadef130a883e56c5c07ad0494bf/terraform/modules/arc/helm/controller_values.yaml#L69-L74" rel="noopener noreferrer"&gt;Controller pod &lt;/a&gt;and &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/2e5c6488350feadef130a883e56c5c07ad0494bf/terraform/modules/arc/helm/arc_listener_values.yaml#L109-L113" rel="noopener noreferrer"&gt;runner scale set pod&lt;/a&gt; should be configured to be deployed on on-demand ec2 instance for reliability and ephermal runner pods should be configured to run spot instances.&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="c1"&gt;# controller config for on demand node&lt;/span&gt;

&lt;span class="na"&gt;nodeSelector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;karpenter.sh/nodepool&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;system&lt;/span&gt;

&lt;span class="na"&gt;tolerations&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;CriticalAddonsOnly"&lt;/span&gt;
  &lt;span class="na"&gt;operator&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Exists"&lt;/span&gt;

&lt;span class="c1"&gt;# listener config for on demand node&lt;/span&gt;

&lt;span class="na"&gt;listenerTemplate&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;nodeSelector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;karpenter.sh/nodepool&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;system&lt;/span&gt;
    &lt;span class="na"&gt;tolerations&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;CriticalAddonsOnly"&lt;/span&gt;
      &lt;span class="na"&gt;operator&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Exists"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 4: GitHub Authentication Setup
&lt;/h4&gt;

&lt;p&gt;ARC authenticates with GitHub using a GitHub App. The credentials are stored in Kubernetes secrets and used by the runner controller to authenticate with GitHub.&lt;/p&gt;

&lt;p&gt;To set up authentication:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a GitHub App with the necessary permissions&lt;/li&gt;
&lt;li&gt;Generate a private key for the app&lt;/li&gt;
&lt;li&gt;Store the app ID, installation ID, and private key in the terraform/modules/arc/secrets &lt;strong&gt;(Don't forget to create it, gitignored)&lt;/strong&gt; the directory &lt;/li&gt;
&lt;li&gt;The &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/master/terraform/modules/arc/secrets.tf" rel="noopener noreferrer"&gt;terraform/modules/arc/secrets.tf&lt;/a&gt; file creates a Kubernetes secret with these credentials&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Step 5: Namespace Management
&lt;/h4&gt;

&lt;p&gt;We create dedicated namespaces for ARC components:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;arc-systems: For the controller components&lt;/li&gt;
&lt;li&gt;arc-runners: For the runner pods&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These namespaces are defined in &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/master/terraform/modules/arc/namespaces.tf" rel="noopener noreferrer"&gt;terraform/modules/arc/namespaces.tf&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 6: Cleanup Handling
&lt;/h4&gt;

&lt;p&gt;To ensure proper cleanup of resources, we've included a cleanup script in scripts/cleanup-finalizers.sh that removes finalizers from Kubernetes resources. This script is called during the Terraform destroy process to ensure resources are properly cleaned up.&lt;/p&gt;

&lt;p&gt;The script handles various resource types including:&lt;br&gt;
• AutoscalingRunnerSet&lt;br&gt;
• EphemeralRunnerSet&lt;br&gt;
• AutoscalingListener&lt;br&gt;
• ServiceAccounts&lt;br&gt;
• RoleBindings&lt;br&gt;
• Roles&lt;/p&gt;

&lt;h3&gt;
  
  
  How It Works
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;When a GitHub Actions workflow runs, it requests a runner with specific labels&lt;/li&gt;
&lt;li&gt;The ARC controller detects this request and creates a runner pod in the EKS cluster&lt;/li&gt;
&lt;li&gt;If needed, Karpenter provisions a new EC2 instance to host the runner pod&lt;/li&gt;
&lt;li&gt;The runner registers with GitHub and runs the workflow job&lt;/li&gt;
&lt;li&gt;After the job completes, the runner pod is terminated&lt;/li&gt;
&lt;li&gt;When no more runners are needed, Karpenter consolidates and removes unused nodes&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Benefits of This Approach
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Cost Efficiency:&lt;/strong&gt; Runners are only provisioned when needed and automatically scaled down when idle&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexibility:&lt;/strong&gt; Custom runner environments can be defined to meet specific workflow requirements&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability:&lt;/strong&gt; The system can handle large numbers of concurrent workflows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security:&lt;/strong&gt; Runners run in isolated Kubernetes pods with defined security contexts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reliability:&lt;/strong&gt; Failed runners are automatically replaced, ensuring workflow reliability&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  How to test this solution
&lt;/h2&gt;

&lt;p&gt;I have created &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/actions" rel="noopener noreferrer"&gt;3 GHA of different types&lt;/a&gt; to test different scenarios.&lt;/p&gt;

&lt;h3&gt;
  
  
  Simple test
&lt;/h3&gt;

&lt;p&gt;The first type is the simple GHA but important point to pay attention is &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/952ce8e4636a47c8eb448c495651322dc02ada6d/.github/workflows/test-gha.yml#L8" rel="noopener noreferrer"&gt;runs-on&lt;/a&gt; parameter which uses &lt;code&gt;arc-runner-set&lt;/code&gt; label.&lt;/p&gt;

&lt;p&gt;The moment you run the first workflow it takes around 1 minute because &lt;code&gt;Karpenter&lt;/code&gt; is provisioning an Ec2 instance.&lt;/p&gt;

&lt;p&gt;Once it is provisioned and if you run the workflow again because Ec2 instance is already present the action completes its execution immediately.&lt;/p&gt;

&lt;p&gt;Karpenter will delete the node if it's unused for at least 5 minutes.&lt;/p&gt;

&lt;p&gt;Now if you have latency sensitive requirement of running your actions immediately then set &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/952ce8e4636a47c8eb448c495651322dc02ada6d/terraform/modules/arc/runner_sets.tf#L21-L24" rel="noopener noreferrer"&gt;minRunners&amp;gt;0 for the runner scale set configuration&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Concurrent job test
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/master/.github/workflows/short-sleepy-matrix.yml" rel="noopener noreferrer"&gt;In this GHA&lt;/a&gt; I am running 5 concurrent jobs running for exactly 1 minute each triggered either through push or manually.&lt;/p&gt;

&lt;h3&gt;
  
  
  DinD job test
&lt;/h3&gt;

&lt;p&gt;There are times when we want to run microservice in container like redis and do e2e testing.&lt;/p&gt;

&lt;p&gt;That's where we need Docker Inside Docker kind of GHA.&lt;/p&gt;

&lt;p&gt;Important point to pay attention here is &lt;a href="https://github.com/jatin-mehrotra-personal/eks-auto-self-hosted-runners/blob/952ce8e4636a47c8eb448c495651322dc02ada6d/.github/workflows/dind-gha.yml#L14" rel="noopener noreferrer"&gt;runs-on parameter&lt;/a&gt; which uses different runner set configured especially for dind workflows&lt;/p&gt;

&lt;p&gt;In this workflow busy box container runs the main job which can talk to redis service container.&lt;/p&gt;




&lt;h2&gt;
  
  
  Github Large Hosted Runner vs Running Runners on EKS Auto
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Performance &amp;amp; Speed
&lt;/h3&gt;

&lt;p&gt;I tried to do the performance and speed comparison of 8 Core CPU vs our solution. &lt;/p&gt;

&lt;p&gt;I tried to run the sleep-matrix GHA using auto-commit script for 10 minutes and every commit happening in every 45 seconds effectively simulating a concurrent job situations for both EKS Auto solution and Github large Runners and results were hands down in favor of our solution&lt;/p&gt;

&lt;p&gt;Our solutions has stable performance with constant 1 minute 8 seconds Execution time throughout.&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%2Fzkx717stsslndsv1pbp6.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%2Fzkx717stsslndsv1pbp6.png" alt="GHA Large runner performance" width="800" height="537"&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%2Ft5015q7winjr928emoyy.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%2Ft5015q7winjr928emoyy.png" alt="EKS Auto performance" width="800" height="541"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Price
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Update [21st April 2025]&lt;/strong&gt; : I did a mistake in EKS Auto node management price earlier but after correction our solution makes it even cheaper&lt;/p&gt;

&lt;p&gt;This is little tricky and may not be 100% accurate comparison but still can be considered 70-80% accurate.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Assume over a 30‑day month with 1 hour of concurrent CI workloads per day (12 jobs running in parallel). Lets calculate the cost on our solution and as well on Github's self hosted runners&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  For our solution
&lt;/h4&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%2Fh6x1r303ywakadnrx42z.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%2Fh6x1r303ywakadnrx42z.png" alt="EKS Auto solution cost" width="771" height="634"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  For Github's large runner
&lt;/h4&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%2Fhbqa570r60bo2otxgwjk.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%2Fhbqa570r60bo2otxgwjk.png" alt="Github large runners" width="599" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is also a cost Github Teams/Enterprise subscription. I am assuming it's on cheaper side i.e Team's plan for a team of 10 developer&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%2F2g2a4te34u4oqkr4c4yg.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%2F2g2a4te34u4oqkr4c4yg.png" alt="GitHub Team cost" width="619" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;self‑hosting on EKS with m7a.2xlarge Spot nodes costs approximately &lt;strong&gt;$170.38/month​&lt;/strong&gt;, while same GitHub’s 8‑core large hosted runners cost &lt;strong&gt;$731.20/month&lt;/strong&gt;, &lt;strong&gt;&lt;em&gt;so my solution on EKS Auto is YIELDING A WHOOPING SAVINGS OF 76.7%.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;em&gt;Even if we add Github Team's for EKS solution i.e $40 more which is 170+40 =$210/month which is still a whooping savings of 72%&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Lets assume it's not 1 hour, it's 2 hour of concurrent CI workloads per day (12 jobs running in parallel)&lt;/p&gt;
&lt;/blockquote&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%2Fzvbmm2kw8x4ecb7rf5m4.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%2Fzvbmm2kw8x4ecb7rf5m4.png" alt="EKS auto cost for 2 hours" width="757" height="618"&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%2F6kvlupxutd29ctxllvd8.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%2F6kvlupxutd29ctxllvd8.png" alt="Github Large runners cost" width="800" height="515"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;&lt;em&gt;yielding a savings of 84%&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; I know I haven't added the networking components cost like &lt;code&gt;nat gateway&lt;/code&gt; even if we add up it will still be cheaper GitHub's large runners :D&lt;/p&gt;




&lt;h2&gt;
  
  
  From a solutions architect perspective
&lt;/h2&gt;

&lt;p&gt;By combining Amazon EKS Auto and GitHub Actions Runner Controller, we've created a solution that aligns with the AWS Well-Architected Framework:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Operational Excellence:&lt;/strong&gt;&lt;br&gt;
•  Infrastructure as code through Terraform ensures consistent deployments&lt;br&gt;
• Auto-scaling runners eliminate manual capacity management&lt;br&gt;
• Clean separation of components improves maintainability&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt;&lt;br&gt;
• GitHub App authentication with scoped access&lt;br&gt;
• EKS security groups and IAM roles enforce least-privilege&lt;br&gt;
• Private subnets reduce attack surface&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reliability:&lt;/strong&gt;&lt;br&gt;
• Multi-AZ deployment ensures high availability&lt;br&gt;
• Auto-scaling from zero accommodates varying workloads without manual intervention&lt;br&gt;
• EKS Auto's Karpenter provides intelligent node provisioning, ensuring resources are available when needed&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance Efficiency:&lt;/strong&gt;&lt;br&gt;
• On-demand scaling ensures resources are used only when needed&lt;br&gt;
• Spot instances reduce costs while maintaining performance&lt;br&gt;
• Customizable instance types allow optimization for specific workload requirements&lt;br&gt;
• Docker-in-Docker support enables container-based workflows with minimal overhead&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cost Optimization:&lt;/strong&gt;&lt;br&gt;
• Scale-to-zero capability eliminates costs when no workflows are running&lt;br&gt;
• Spot instances provide significant cost savings (up to 90%) compared to on-demand instances&lt;br&gt;
• Resource consolidation through Karpenter's WhenEmpty policy reduces idle resources&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sustainability:&lt;/strong&gt;&lt;br&gt;
• Efficient resource utilization through auto-scaling minimizes environmental impact&lt;br&gt;
• Scale-to-zero capability reduces energy consumption during idle periods&lt;br&gt;
• Reduced idle resources lower energy consumption&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This solution provides organizations with a scalable, cost-effective platform for running GitHub Actions workflows while maintaining full control over their infrastructure. The architecture can easily scale from small development teams to enterprise-level deployments, adapting to changing workflow requirements without compromising on security or performance.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;By leveraging AWS managed services like EKS and implementing infrastructure as code through Terraform, this solution reduces operational overhead while providing the flexibility needed &lt;br&gt;
for modern CI/CD pipelines. The result is a robust, efficient platform that enables teams to focus on delivering value rather than managing infrastructure.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Follow &lt;a href="https://www.youtube.com/@thezacsshowtalkingaws" rel="noopener noreferrer"&gt;The Zacs' Show Talking AWS&lt;/a&gt; on YouTube or reach out to them if you want to share your knowledge on AWS.&lt;/p&gt;

&lt;p&gt;Have some questions on this solution reach out to me over &lt;a href="https://www.linkedin.com/in/jatinmehrotra/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;, &lt;a href="https://x.com/imjatinmehrotra" rel="noopener noreferrer"&gt;X&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>eks</category>
      <category>githubactions</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>AWS CodePipeline + EKS Action: The Easiest Way to Deploy Containers Yet!</title>
      <dc:creator>Jatin Mehrotra</dc:creator>
      <pubDate>Tue, 25 Feb 2025 06:26:06 +0000</pubDate>
      <link>https://forem.com/aws-builders/aws-codepipeline-eks-action-the-easiest-way-to-deploy-containers-yet-51g9</link>
      <guid>https://forem.com/aws-builders/aws-codepipeline-eks-action-the-easiest-way-to-deploy-containers-yet-51g9</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Amazon Web Services (AWS) CodePipeline Team has simplified Developer, DevOps engineers operational overhead and streamlined the Deployment process to EKS by &lt;a href="https://aws.amazon.com/about-aws/whats-new/2025/02/aws-codepipeline-native-amazon-eks-deployment-support/" rel="noopener noreferrer"&gt;introducing an CodePipeline action&lt;/a&gt; to deploy directly to your EKS cluster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Why does it matter to you?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Previously&lt;/strong&gt; if I had to deploy resources to EKS using DevOps approach, &lt;strong&gt;I had to manage codebuild project, permissions to access eks, kubectl, helm commands, other horrific shell commands and still it wont be perfect in one shot&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;I tried this out today so &lt;strong&gt;let me show you how you can simplify your deployment pipeline for EKS by 100%&lt;/strong&gt;, say goodbye to codebuild and remove all the complex process, scripts and command!!!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&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%2F14ktf6z4738pb3zzjpc4.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%2F14ktf6z4738pb3zzjpc4.png" alt="codepipeline eks action architecture" width="800" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;EKS cluster with public endpoint.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Kubernetes resource like &lt;code&gt;deployment.yaml&lt;/code&gt; file&lt;/li&gt;
&lt;li&gt;You can also helm chart if you wish.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you want to try this update with &lt;strong&gt;EKS private Endpoint&lt;/strong&gt; then checkout &lt;a href="https://blog.awsfanboy.com/aws-codepipeline-now-includes-native-support-for-deploying-to-amazon-eks" rel="noopener noreferrer"&gt;this blog&lt;/a&gt; by AWS Hero &lt;a href="https://www.linkedin.com/in/arshad-zackeriya-713b821b/" rel="noopener noreferrer"&gt;Arshad Zackeriya&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Whichever you prefer I have provided both &lt;a href="https://github.com/jatinmehrotra/codepipeline-eks-deployment/tree/master" rel="noopener noreferrer"&gt;(helm chart and deployment.yaml) in this repository&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Behind the Scenes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  In case of kubernetes manifest file
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faqc4nvi5ibms4z4o52b4.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%2Faqc4nvi5ibms4z4o52b4.png" alt="codepipeline bts with kubernetes" width="800" height="316"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This action logs into eks cluster, set kubeconfig context&lt;/li&gt;
&lt;li&gt;Installs kubectl&lt;/li&gt;
&lt;li&gt;Applies Kubernetes manifests&lt;/li&gt;
&lt;li&gt;Rollout resources&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  In case of helm chart
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9r354eokgttrpj89nb4v.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%2F9r354eokgttrpj89nb4v.png" alt="codepipeline bts with helm chart" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This action logs into eks cluster, set kubeconfig context&lt;/li&gt;
&lt;li&gt;Instals helm &lt;/li&gt;
&lt;li&gt;Instal Helm charts&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Create an EKS cluster
&lt;/h2&gt;

&lt;p&gt;Your cluster can be public or private (including those in private VPCs).The pipeline will automatically establish a connection into your private network to deploy your container application, without additional infrastructure needed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I have used eks auto using &lt;a href="https://github.com/terraform-aws-modules/terraform-aws-eks" rel="noopener noreferrer"&gt;terraform eks module &lt;/a&gt;which is quick and easy with &lt;em&gt;EKS endpoint as public&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  eks.tf
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# eks cluster

module "eks" {
  source  = "terraform-aws-modules/eks/aws"
  version = "~&amp;gt; 20.31"

  cluster_name                   = local.cluster_name
  cluster_version                = "1.32"
  cluster_endpoint_public_access = true


  vpc_id     = module.vpc.vpc_id
  subnet_ids = module.vpc.private_subnets

  cluster_compute_config = {
    enabled    = true
    node_pools = ["general-purpose"]
  }

  # Cluster access entry
  # To add the current caller identity as an administrator
  enable_cluster_creator_admin_permissions = true


  tags = {
    Environment = "dev"
    Terraform   = "true"
  }
}

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  vpc.tf
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module "vpc" {
  source  = "terraform-aws-modules/vpc/aws"
  version = "5.19.0"

  name = "codepipeline-eks-action"
  cidr = "10.0.0.0/16"

  azs             = ["us-east-1a", "us-east-1b"]
  private_subnets = ["10.0.1.0/24", "10.0.2.0/24"]
  public_subnets  = ["10.0.4.0/24", "10.0.5.0/24"]

  enable_nat_gateway     = true
  single_nat_gateway     = true
  one_nat_gateway_per_az = false

  enable_dns_hostnames = true
  enable_dns_support   = true

  public_subnet_tags = {
    "kubernetes.io/role/elb" = "1"
  }
  private_subnet_tags = {
    "kubernetes.io/role/internal-elb" = "1"
  }

  tags = {
    Environment = "terraform-playground"
  }
}

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  pod_identity.tf
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;data "aws_iam_policy_document" "allow_pod_identity" {
  statement {
    effect = "Allow"

    principals {
      type        = "Service"
      identifiers = ["pods.eks.amazonaws.com"]
    }

    actions = [
      "sts:AssumeRole",
      "sts:TagSession"
    ]
  }
}

resource "aws_iam_role" "read_ecr" {
  name               = "read-ecr-role"
  assume_role_policy = data.aws_iam_policy_document.allow_pod_identity.json
}

resource "aws_iam_role_policy_attachment" "read_ecr" {
  role       = aws_iam_role.read_ecr.name
  policy_arn = "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly"
}

resource "aws_eks_pod_identity_association" "read_ecr" {
  cluster_name    = local.cluster_name
  namespace       = "default"
  service_account = "ecr-sa"
  role_arn        = aws_iam_role.read_ecr.arn
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;em&gt;I am using pod identity with ecr repository permission to obtain ecr image for deployment.yaml.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you want complete code for cluster, you can follow this &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2024/tree/master/eks-auto-mode-terraform-module-support" rel="noopener noreferrer"&gt;repo&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Create pipeline with EKS deployment action
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Case 1: when kubectl configuration is used.
&lt;/h3&gt;

&lt;p&gt;I am using the source as GitHub using code start connection and code resides in this &lt;a href="https://github.com/jatinmehrotra/codepipeline-eks-deployment/tree/master" rel="noopener noreferrer"&gt;repo&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%2Foqwylxpyxbbbduc8oe98.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%2Foqwylxpyxbbbduc8oe98.png" alt="codepipeline helm config" width="800" height="637"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select the cluster&lt;/li&gt;
&lt;li&gt;Provide the path for your &lt;code&gt;deployment.yaml&lt;/code&gt; file (in my case its &lt;a href="https://github.com/jatinmehrotra/codepipeline-eks-deployment/blob/master/deployment.yaml" rel="noopener noreferrer"&gt;deployment.yaml&lt;/a&gt; file)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Case 2: When Helm chart is used
&lt;/h4&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%2Fxl8wwnkjn2a8vsslx6w1.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%2Fxl8wwnkjn2a8vsslx6w1.png" alt="codepipeline helm config" width="800" height="621"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enter the release name &lt;/li&gt;
&lt;li&gt;Enter the helm chart (in my case its the &lt;a href="https://github.com/jatinmehrotra/codepipeline-eks-deployment/tree/master/test-chart" rel="noopener noreferrer"&gt;test-chart&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Important step
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Once pipeline is created you need to edit the pipeline service role or update the existing one and add the following permissions to avoid error.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"Statement"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"iam:PassRole"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Condition"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"StringEqualsIfExists"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
                    &lt;span class="s2"&gt;"iam:PassedToService"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                        &lt;span class="s2"&gt;"cloudformation.amazonaws.com"&lt;/span&gt;,
                        &lt;span class="s2"&gt;"elasticbeanstalk.amazonaws.com"&lt;/span&gt;,
                        &lt;span class="s2"&gt;"ec2.amazonaws.com"&lt;/span&gt;,
                        &lt;span class="s2"&gt;"ecs-tasks.amazonaws.com"&lt;/span&gt;
                    &lt;span class="o"&gt;]&lt;/span&gt;
                &lt;span class="o"&gt;}&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"codecommit:CancelUploadArchive"&lt;/span&gt;,
                &lt;span class="s2"&gt;"codecommit:GetBranch"&lt;/span&gt;,
                &lt;span class="s2"&gt;"codecommit:GetCommit"&lt;/span&gt;,
                &lt;span class="s2"&gt;"codecommit:GetRepository"&lt;/span&gt;,
                &lt;span class="s2"&gt;"codecommit:GetUploadArchiveStatus"&lt;/span&gt;,
                &lt;span class="s2"&gt;"codecommit:UploadArchive"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"codedeploy:CreateDeployment"&lt;/span&gt;,
                &lt;span class="s2"&gt;"codedeploy:GetApplication"&lt;/span&gt;,
                &lt;span class="s2"&gt;"codedeploy:GetApplicationRevision"&lt;/span&gt;,
                &lt;span class="s2"&gt;"codedeploy:GetDeployment"&lt;/span&gt;,
                &lt;span class="s2"&gt;"codedeploy:GetDeploymentConfig"&lt;/span&gt;,
                &lt;span class="s2"&gt;"codedeploy:RegisterApplicationRevision"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"codestar-connections:UseConnection"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"elasticbeanstalk:*"&lt;/span&gt;,
                &lt;span class="s2"&gt;"ec2:*"&lt;/span&gt;,
                &lt;span class="s2"&gt;"elasticloadbalancing:*"&lt;/span&gt;,
                &lt;span class="s2"&gt;"autoscaling:*"&lt;/span&gt;,
                &lt;span class="s2"&gt;"cloudwatch:*"&lt;/span&gt;,
                &lt;span class="s2"&gt;"s3:*"&lt;/span&gt;,
                &lt;span class="s2"&gt;"sns:*"&lt;/span&gt;,
                &lt;span class="s2"&gt;"cloudformation:*"&lt;/span&gt;,
                &lt;span class="s2"&gt;"rds:*"&lt;/span&gt;,
                &lt;span class="s2"&gt;"sqs:*"&lt;/span&gt;,
                &lt;span class="s2"&gt;"ecs:*"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"lambda:InvokeFunction"&lt;/span&gt;,
                &lt;span class="s2"&gt;"lambda:ListFunctions"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"opsworks:CreateDeployment"&lt;/span&gt;,
                &lt;span class="s2"&gt;"opsworks:DescribeApps"&lt;/span&gt;,
                &lt;span class="s2"&gt;"opsworks:DescribeCommands"&lt;/span&gt;,
                &lt;span class="s2"&gt;"opsworks:DescribeDeployments"&lt;/span&gt;,
                &lt;span class="s2"&gt;"opsworks:DescribeInstances"&lt;/span&gt;,
                &lt;span class="s2"&gt;"opsworks:DescribeStacks"&lt;/span&gt;,
                &lt;span class="s2"&gt;"opsworks:UpdateApp"&lt;/span&gt;,
                &lt;span class="s2"&gt;"opsworks:UpdateStack"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"cloudformation:CreateStack"&lt;/span&gt;,
                &lt;span class="s2"&gt;"cloudformation:DeleteStack"&lt;/span&gt;,
                &lt;span class="s2"&gt;"cloudformation:DescribeStacks"&lt;/span&gt;,
                &lt;span class="s2"&gt;"cloudformation:UpdateStack"&lt;/span&gt;,
                &lt;span class="s2"&gt;"cloudformation:CreateChangeSet"&lt;/span&gt;,
                &lt;span class="s2"&gt;"cloudformation:DeleteChangeSet"&lt;/span&gt;,
                &lt;span class="s2"&gt;"cloudformation:DescribeChangeSet"&lt;/span&gt;,
                &lt;span class="s2"&gt;"cloudformation:ExecuteChangeSet"&lt;/span&gt;,
                &lt;span class="s2"&gt;"cloudformation:SetStackPolicy"&lt;/span&gt;,
                &lt;span class="s2"&gt;"cloudformation:ValidateTemplate"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"codebuild:BatchGetBuilds"&lt;/span&gt;,
                &lt;span class="s2"&gt;"codebuild:StartBuild"&lt;/span&gt;,
                &lt;span class="s2"&gt;"codebuild:BatchGetBuildBatches"&lt;/span&gt;,
                &lt;span class="s2"&gt;"codebuild:StartBuildBatch"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"devicefarm:ListProjects"&lt;/span&gt;,
                &lt;span class="s2"&gt;"devicefarm:ListDevicePools"&lt;/span&gt;,
                &lt;span class="s2"&gt;"devicefarm:GetRun"&lt;/span&gt;,
                &lt;span class="s2"&gt;"devicefarm:GetUpload"&lt;/span&gt;,
                &lt;span class="s2"&gt;"devicefarm:CreateUpload"&lt;/span&gt;,
                &lt;span class="s2"&gt;"devicefarm:ScheduleRun"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"servicecatalog:ListProvisioningArtifacts"&lt;/span&gt;,
                &lt;span class="s2"&gt;"servicecatalog:CreateProvisioningArtifact"&lt;/span&gt;,
                &lt;span class="s2"&gt;"servicecatalog:DescribeProvisioningArtifact"&lt;/span&gt;,
                &lt;span class="s2"&gt;"servicecatalog:DeleteProvisioningArtifact"&lt;/span&gt;,
                &lt;span class="s2"&gt;"servicecatalog:UpdateProduct"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"cloudformation:ValidateTemplate"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"ecr:DescribeImages"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"states:DescribeExecution"&lt;/span&gt;,
                &lt;span class="s2"&gt;"states:DescribeStateMachine"&lt;/span&gt;,
                &lt;span class="s2"&gt;"states:StartExecution"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"appconfig:StartDeployment"&lt;/span&gt;,
                &lt;span class="s2"&gt;"appconfig:StopDeployment"&lt;/span&gt;,
                &lt;span class="s2"&gt;"appconfig:GetDeployment"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"logs:CreateLogGroup"&lt;/span&gt;,
                &lt;span class="s2"&gt;"logs:CreateLogStream"&lt;/span&gt;,
                &lt;span class="s2"&gt;"logs:PutLogEvents"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"arn:aws:logs:us-east-1:xxxx:log-group:/aws/codepipeline/eks-deploy-codepipeline"&lt;/span&gt;,
                &lt;span class="s2"&gt;"arn:aws:logs:us-east-1:xxxxx:log-group:/aws/codepipeline/eks-deploy-codepipeline:log-stream:*"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Sid"&lt;/span&gt;: &lt;span class="s2"&gt;"EksClusterPolicy"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="s2"&gt;"eks:DescribeCluster"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"*"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Sid"&lt;/span&gt;: &lt;span class="s2"&gt;"EksVpcClusterPolicy"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"ec2:DescribeDhcpOptions"&lt;/span&gt;,
                &lt;span class="s2"&gt;"ec2:DescribeNetworkInterfaces"&lt;/span&gt;,
                &lt;span class="s2"&gt;"ec2:DescribeRouteTables"&lt;/span&gt;,
                &lt;span class="s2"&gt;"ec2:DescribeSubnets"&lt;/span&gt;,
                &lt;span class="s2"&gt;"ec2:DescribeSecurityGroups"&lt;/span&gt;,
                &lt;span class="s2"&gt;"ec2:DescribeVpcs"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"*"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="s2"&gt;"ec2:CreateNetworkInterface"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Condition"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"StringEqualsIfExists"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
                    &lt;span class="s2"&gt;"ec2:Subnet"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                        &lt;span class="s2"&gt;"arn:aws:ec2:us-east-1:292170836962:subnet/subnet-example1"&lt;/span&gt;,
                        &lt;span class="s2"&gt;"arn:aws:ec2:us-east-1:292170836962:subnet/subnet-example2"&lt;/span&gt;
                    &lt;span class="o"&gt;]&lt;/span&gt;
                &lt;span class="o"&gt;}&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="s2"&gt;"ec2:CreateNetworkInterfacePermission"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Condition"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"ArnEquals"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
                    &lt;span class="s2"&gt;"ec2:Subnet"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                        &lt;span class="s2"&gt;"arn:aws:ec2:us-east-1:xxxx:subnet/subnet-example1"&lt;/span&gt;,
                        &lt;span class="s2"&gt;"arn:aws:ec2:us-east-1:xxxx:subnet/subnet-example2"&lt;/span&gt;
                    &lt;span class="o"&gt;]&lt;/span&gt;
                &lt;span class="o"&gt;}&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="s2"&gt;"ec2:DeleteNetworkInterface"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Condition"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"StringEqualsIfExists"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
                    &lt;span class="s2"&gt;"ec2:Subnet"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                        &lt;span class="s2"&gt;"arn:aws:ec2:us-east-1:xxxxx:subnet/subnet-example1"&lt;/span&gt;,
                        &lt;span class="s2"&gt;"arn:aws:ec2:us-east-1:xxxx:subnet/subnet-example2"&lt;/span&gt;
                    &lt;span class="o"&gt;]&lt;/span&gt;
                &lt;span class="o"&gt;}&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;]&lt;/span&gt;,
    &lt;span class="s2"&gt;"Version"&lt;/span&gt;: &lt;span class="s2"&gt;"2012-10-17"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Create a access entry in eks cluster with &lt;code&gt;AmazonEKSClusterAdminPolicy&lt;/code&gt; &lt;strong&gt;for the above codepipeline service role.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Run the pipeline
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Case when kubectl manifest is updated
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figmnoqwlpc6xjxi75glk.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%2Figmnoqwlpc6xjxi75glk.png" alt="codepipeline execution" width="800" height="461"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(base) jatin.mehrotra@CK0662-001 codepipeline-eks-deployment-no-github % kubectl get pods
NAME                         READY   STATUS    RESTARTS   AGE
hello-k8s-74fd98b69b-2pwrv   1/1     Running   0          2m37s
hello-k8s-74fd98b69b-g876f   1/1     Running   0          2m37s
hello-k8s-74fd98b69b-phs77   1/1     Running   0          2m37s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Case when helm chart manifest is updated
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjgyi9aayw9dpw4mlheei.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%2Fjgyi9aayw9dpw4mlheei.png" alt="codepipeline execution" width="800" height="470"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(base) jatin.mehrotra@CK0662-001 codepipeline-eks-deployment-no-github % kubectl get pods                             
NAME                    READY   STATUS    RESTARTS   AGE
test-67cbfddc66-2gcvj   1/1     Running   0          10m
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  From Developer, DevOps perspective
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;With this update I don't have to manage codebuild projects or any kind of compute environment and manage complex scripts, permissions and tool installations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;em&gt;Following is the image of the setup which I used to have with codebuild before this update. Such a complex mess.&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&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%2F849t7e7gidei207vtzg8.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%2F849t7e7gidei207vtzg8.png" alt="before this update config" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This is surely a game changer for developers, devops engineers and infra engineers who wants to focus on business problem, their applications and other kubernetes issue like monitoring and scaling.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is not GitOps approach which is followed by Flux/ArgoCD but the best DevOps approach for EKS cluster in my view.&lt;/p&gt;

&lt;p&gt;Will you use this action for your eks clusters? Let me know in the comments!!!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;I share such amazing &lt;strong&gt;AWS updates on DevOps, Kubernetes and GenAI&lt;/strong&gt; daily over &lt;a href="https://www.linkedin.com/in/jatinmehrotra/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;, &lt;a href="https://x.com/imjatinmehrotra" rel="noopener noreferrer"&gt;X&lt;/a&gt;. Follow me over there so that I can make your life more easy.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>aws</category>
      <category>kubernetes</category>
      <category>codepipeline</category>
      <category>eks</category>
    </item>
    <item>
      <title>CodePipeline EC2 Action: Simplify your EC2 application deployment pipeline by 90%!</title>
      <dc:creator>Jatin Mehrotra</dc:creator>
      <pubDate>Mon, 24 Feb 2025 03:48:57 +0000</pubDate>
      <link>https://forem.com/aws-builders/simplify-your-ec2-application-deployment-pipeline-by-90-2mbk</link>
      <guid>https://forem.com/aws-builders/simplify-your-ec2-application-deployment-pipeline-by-90-2mbk</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Amazon Web Services (AWS) CodePipeline Team has simplified Developer, DevOps engineers operational overhead and streamlined the Deployment process to EC2 by &lt;a href="https://aws.amazon.com/about-aws/whats-new/2025/02/aws-codepipeline-native-ec2-deployment-support/" rel="noopener noreferrer"&gt;introducing an CodePipeline action&lt;/a&gt; to deploy directly to your EC2 instances.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Why does it matter to you?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Previously, if you wanted to deploy to EC2 instances, you had to use CodeDeploy with an AppSpec file to configure the deployment.&lt;/em&gt; &lt;strong&gt;After this update NO NEED TO MANAGE CODEDEPLOY RESOURCE AND APPSPEC FILE&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;I tried this out today so let me show you how you can simplify your deployment pipeline by 90% and remove all the complex process and scripts!!!&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&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%2Fzuyhrfx073gp9pbrq0aj.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%2Fzuyhrfx073gp9pbrq0aj.png" alt="architecture diagram" width="800" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;supports only Linux instance types&lt;/li&gt;
&lt;li&gt;maximum fleet size supported is 500 instances.&lt;/li&gt;
&lt;li&gt;Pipeline V2 only supported&lt;/li&gt;
&lt;li&gt;SSM Agent must be installed&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Behind the Scenes
&lt;/h2&gt;

&lt;p&gt;This action performs a &lt;a href="https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ssm/send-command.html" rel="noopener noreferrer"&gt;send-command using SSM&lt;/a&gt; to execute the script in the 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%2F7uth9c71jkm7w13x4jyj.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%2F7uth9c71jkm7w13x4jyj.png" alt="ssm behind the scenes" width="800" height="121"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Create an EC2 instance with Apache
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you are creating an instance then you need to create a role with &lt;code&gt;AmazonSSMManagedInstanceCore&lt;/code&gt;, &lt;code&gt;AmazonS3ReadOnlyAccess&lt;/code&gt; and attach to ec2 instance.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Add ssm agent to the instance manually either using &lt;code&gt;user data&lt;/code&gt; or logging into existing instance and then running the commands.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;If you are using existing instance then you need to reboot the instance after adding the ssm agent.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have created EC2 with Apache web server for the brevity of the blog.&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%2Fs2jlnrxe00ba0uy89h8n.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%2Fs2jlnrxe00ba0uy89h8n.png" alt="shell commands for running apache" width="800" height="149"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;su
yum update &lt;span class="nt"&gt;-y&lt;/span&gt;
yum &lt;span class="nb"&gt;install &lt;/span&gt;httpd &lt;span class="nt"&gt;-y&lt;/span&gt;
service httpd start
chkconfig httpd on
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"codepipeline ec2 deployment action"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /var/www/html/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F3osfju2o1euzvpnmk9my.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%2F3osfju2o1euzvpnmk9my.png" alt="apache webserver output" width="800" height="145"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Create pipeline with Ec2 deployment action
&lt;/h2&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%2Fpmdgilarvpj59fp3gyuf.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%2Fpmdgilarvpj59fp3gyuf.png" alt="pipeline deploy config" width="800" height="569"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Here we need to select instance using tags; I have used name tag to identify my instance. &lt;/li&gt;
&lt;li&gt;Then you need to provide the target directory in ec2 instance where you want to deploy.&lt;/li&gt;
&lt;li&gt;Finally path to the executable script file that runs AFTER the Deploy phase.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Once pipeline is created you need to edit the pipeline service role and add the following permissions to avoid error.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"Effect"&lt;/span&gt;: &lt;span class="s2"&gt;"Allow"&lt;/span&gt;,
            &lt;span class="s2"&gt;"Action"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"ssm:CancelCommand"&lt;/span&gt;,
                &lt;span class="s2"&gt;"ssm:DescribeInstanceInformation"&lt;/span&gt;,
                &lt;span class="s2"&gt;"ssm:ListCommandInvocations"&lt;/span&gt;,
                &lt;span class="s2"&gt;"ssm:SendCommand"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;,
            &lt;span class="s2"&gt;"Resource"&lt;/span&gt;: &lt;span class="s2"&gt;"*"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fzut6pd7mqxkssw9grvn5.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%2Fzut6pd7mqxkssw9grvn5.png" alt="codepipeline service role" width="800" height="261"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Run the pipeline
&lt;/h2&gt;

&lt;p&gt;I am using the source as GitHub using code start connection and code resides in &lt;a href="https://github.com/jatinmehrotra/codepipeline-eks-deployment/blob/master/script.sh" rel="noopener noreferrer"&gt;this repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The &lt;a href="https://docs.aws.amazon.com/codepipeline/latest/userguide/tutorials-ec2-deploy.html" rel="noopener noreferrer"&gt;aws guide&lt;/a&gt; mentioned about adding &lt;code&gt;AWSSystemsManagerDefaultEC2InstanceManagementRoleeployAction&lt;/code&gt; to the ec2 instance role but in my environment I didn't needed that permission&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%2Fni79d1pllbk68a8epwmu.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%2Fni79d1pllbk68a8epwmu.png" alt="Pipeline execution" width="800" height="459"&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%2Fyiu3hnsxb0ifefgrl9r9.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%2Fyiu3hnsxb0ifefgrl9r9.png" alt="Webserver after update" width="800" height="158"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Some advanced options for this action
&lt;/h2&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%2Fgoyw7nxg6lqoubmwpdzo.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%2Fgoyw7nxg6lqoubmwpdzo.png" alt="advanced options for action" width="800" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can specify number of instances in number or percentages to deploy to in parallel.&lt;/li&gt;
&lt;li&gt;You can specify number of instances in number or percentages to stop the task after the task fails.&lt;/li&gt;
&lt;li&gt;You can specify load balancer which will block the traffic Toi the instance when deployment is taking for that instance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  From Developer, DevOps perspective
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;With this update I can have an END-to-END AWS native Continuous deployment on EC2 without managing CodeDeploy resources.&lt;/li&gt;
&lt;li&gt;This is surely a game changer for developers and devops engineers who wants to focus on business problem, their applications and not on their complex deployment process.&lt;/li&gt;
&lt;li&gt;Of course this experience of simplifying can be augmented even further to 100% if AWS can add necessary permissions for the role.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After reading this, do you wish to migrate to this action and simplifying your deployment process? Let me know in the comments!!!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;I share such amazing &lt;strong&gt;AWS updates on DevOps, Kubernetes and GenAI&lt;/strong&gt; daily over &lt;a href="https://www.linkedin.com/in/jatinmehrotra/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;, &lt;a href="https://x.com/imjatinmehrotra" rel="noopener noreferrer"&gt;X&lt;/a&gt;. Follow me over there so that I can make your life more easy.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>aws</category>
      <category>ec2</category>
      <category>codepipeline</category>
      <category>cicd</category>
    </item>
    <item>
      <title>EKS Auto Mode Unlocked for Existing Clusters with Terraform</title>
      <dc:creator>Jatin Mehrotra</dc:creator>
      <pubDate>Fri, 13 Dec 2024 05:59:47 +0000</pubDate>
      <link>https://forem.com/aws-builders/eks-auto-mode-unlocked-for-existing-clusters-with-terraform-545i</link>
      <guid>https://forem.com/aws-builders/eks-auto-mode-unlocked-for-existing-clusters-with-terraform-545i</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;In the &lt;a href="https://dev.to/aws-builders/eks-auto-mode-arrives-in-terraform-simplify-kubernetes-today-bgl"&gt;previous blog&lt;/a&gt;, I explained that EKS Auto mode is now supported by terraform-eks-module and &lt;strong&gt;illustrated how we can create new cluster with EKS Auto Mode&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;In this blog, we’ll learn how to enable EKS Auto Mode on existing clusters and migrate workloads from EKS Managed Node Groups to EKS Auto nodes with ZERO DOWNTIME and continued application availability &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2024/tree/master/eks-auto-mode-existing-cluster-terraform-support" rel="noopener noreferrer"&gt;using my terraform code&lt;/a&gt;.&lt;/em&gt;&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;&lt;em&gt;I have also added a &lt;strong&gt;BONUS section&lt;/strong&gt; which explains &lt;strong&gt;how we can control our pod's deployments&lt;/strong&gt; on EKS Auto Mode nodes or other compute types.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Motivation
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Terraform-provider-aws released a new version &lt;a href="https://github.com/hashicorp/terraform-provider-aws/releases/tag/v5.81.0" rel="noopener noreferrer"&gt;v5.8.1&lt;/a&gt; which &lt;a href="https://github.com/hashicorp/terraform-provider-aws/issues/40411" rel="noopener noreferrer"&gt;allows to enabled EKS Auto with built-in NodePools on existing cluster&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&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%2F6b9869cw4dstobr3nhhb.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%2F6b9869cw4dstobr3nhhb.png" alt="tf Aws 5.81" width="800" height="362"&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%2Fiy9bikforpshn6yx85x8.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%2Fiy9bikforpshn6yx85x8.png" alt="Githhub Issue for bug fix" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Terraform-aws-eks release a new version &lt;a href="https://github.com/terraform-aws-modules/terraform-aws-eks/releases/tag/v20.31.1" rel="noopener noreferrer"&gt;v20.31.1&lt;/a&gt; which allows to use custom NodeClass/NodePools when EKS Auto is enabled without built-in NodePools.&lt;/li&gt;
&lt;/ul&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%2Fl02fp8wsjb062p5z5t9i.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%2Fl02fp8wsjb062p5z5t9i.png" alt="terraform eks module 20.31.1" width="800" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I want this blog to be really short, crisp and efficient so lets jump  into actual steps!&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploy Terraform cluster without EKS Auto Mode
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;We want to create the use case where we have an existing cluster WITHOUT EKS Auto Mode using EKS MNG.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use this &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2024/tree/master/eks-auto-mode-existing-cluster-terraform-support" rel="noopener noreferrer"&gt;repository code&lt;/a&gt; to deploy EKS cluster with Managed node group.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;em&gt;I am attaching policies to the node IAM role for EKS MNG - this is too permissive, better to use EKS Pod Identity (or IRSA, but EKS Pod Identity is preferred). Feel free to send a PR to the repo&lt;/em&gt; :)&lt;/p&gt;

&lt;h3&gt;
  
  
  Deploy  workload or pods
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;We will automate this as well using terraform's &lt;code&gt;kubectl_manifest&lt;/code&gt; resource, we will deploy workload yaml code using terraform&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; During cluster creation, &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2024/blob/master/eks-auto-mode-existing-cluster-terraform-support/sample_app.tf" rel="noopener noreferrer"&gt;test workload(pods)&lt;/a&gt; were not deployed because kubectl context was not set locally. So run the following command to set the &lt;code&gt;kubectl context&lt;/code&gt; and run &lt;code&gt;terraform apply&lt;/code&gt; again once cluster is created.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws eks --region us-east-1 update-kubeconfig --name eks-existing-cluster-tf-test --profile &amp;lt;your-profile-name&amp;gt; ; terraform apply

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  Current state of EKS cluster before EKS Auto Mode
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Let's verify the current state of eks cluster when EKS Auto mode is not enabled.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;EKS Auto mode is disabled. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2F2jbv1ksmsjc0ct1i9tti.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%2F2jbv1ksmsjc0ct1i9tti.png" alt="Diabled Auto Mode" width="800" height="530"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EKS Auto Managed Node group created by me is running. &lt;/li&gt;
&lt;/ul&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%2Ffuolnlkepuqegy0pg4ke.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%2Ffuolnlkepuqegy0pg4ke.png" alt="eks MNG" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pods are running on EKS managed node group&lt;/li&gt;
&lt;/ul&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%2Fbg8fsfm3501crsr5pj2w.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%2Fbg8fsfm3501crsr5pj2w.png" alt="pods" width="800" height="125"&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%2Ff2o04r0pecod2i4wsaxn.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%2Ff2o04r0pecod2i4wsaxn.png" alt="pods_nodes_status" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Enable EKS Auto Mode on Existing Cluster
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Uncomment the following code to the eks.tf and &lt;code&gt;terraform apply&lt;/code&gt; to enable EKS Auto Mode
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bootstrap_self_managed_addons = true

cluster_compute_config = {
   enabled = true
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;bootstrap_self_managed_addons = true&lt;/code&gt; is very important &lt;strong&gt;&lt;em&gt;otherwise you will face error where terraform tries to recreate the cluster again&lt;/em&gt;&lt;/strong&gt;. &lt;em&gt;I literally cried over this&lt;/em&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Current state of EKS cluster after EKS Auto Mode
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flfn4a5e1pat4hcnqi8kh.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%2Flfn4a5e1pat4hcnqi8kh.png" alt="cluster mode enabled on existing cluster " width="800" height="516"&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%2Fbcwyuvhmqzkzv504rtcz.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%2Fbcwyuvhmqzkzv504rtcz.png" alt="Empty built-in NodePools" width="800" height="208"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;As expected built-in NodePools are empty&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Migrate workload(pods) from EKS MNG to EKS Auto Node
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;There are &lt;a href="https://repost.aws/knowledge-center/eks-worker-node-actions" rel="noopener noreferrer"&gt;couple of ways&lt;/a&gt; to smoothly migrate existing workloads from MNG to EKS Auto with minimal disruption while maintaining application’s availability throughout the migration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Copy the EKS MNG node group name.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using eksctl tool
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The following &lt;a href="https://eksctl.io/usage/nodegroups/#deleting-and-draining-nodegroups" rel="noopener noreferrer"&gt;command&lt;/a&gt; &lt;em&gt;will cordon all nodes and all pods are evicted from a nodegroup&lt;/em&gt; and &lt;strong&gt;EKS will provision pods to node managed by EKS Auto.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eksctl drain nodegroup --cluster=&amp;lt;clusterName&amp;gt; --name=&amp;lt;copiedNodegroupName&amp;gt;  --region us-east-1 --profile=&amp;lt;profile&amp;gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;eksctl command evicts pod one at a time which I have tested so application availability is maintained.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;But if you still want to be 100% sure, you can use the best practice of using &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2024/blob/master/eks-auto-mode-existing-cluster-terraform-support/pdb.tf" rel="noopener noreferrer"&gt;pod Disruption budget&lt;/a&gt;. We will automate this using terraform so run &lt;code&gt;terraform apply&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resource "kubectl_manifest" "test_pdb" {
  yaml_body = &amp;lt;&amp;lt;YAML
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: test-pdb
  labels:
    environment: test
spec:
  minAvailable: 1
  selector:
    matchLabels:
      environment: test
YAML
}

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

&lt;/div&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%2F695anksrjzgf0s97txh5.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%2F695anksrjzgf0s97txh5.png" alt="Node during cordon " width="800" height="197"&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%2Fyusl798od2z7lyp6hhtj.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%2Fyusl798od2z7lyp6hhtj.png" alt="Pod Migrated to eks Auto Node" width="800" height="203"&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%2Fgi6kvkyarj3a0ohe55vz.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%2Fgi6kvkyarj3a0ohe55vz.png" alt="pod events " width="800" height="298"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;After migrating; If we want to allow scheduling pods to EKS MNG we need to uncordon the EKS MNG or you can delete the Node group&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eksctl drain nodegroup --cluster=&amp;lt;clusterName&amp;gt; --name=&amp;lt;copiedNodegroupName&amp;gt;  --region us-east-1 --profile=&amp;lt;profile&amp;gt; --undo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fbgo4q05m1rhflughla8t.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%2Fbgo4q05m1rhflughla8t.png" alt="uncordon nodes" width="800" height="171"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Using kubectl
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;we can use the following command to drain the nodes using kubectl
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl drain --ignore-daemonsets &amp;lt;node name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Once it returns (without giving an error), you can delete the node or you want to tell Kubernetes that it can resume scheduling new pods onto the node
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl uncordon &amp;lt;node name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  [ BONUS ] How to schedule Pods always on EKS Auto Nodes?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;There are 2 options to achieve this :&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Either delete The NodeGroup and let EKS Auto handle the scheduling on EKS Auto Nodes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using labels and NodeAffinity &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Control if a workload is deployed on EKS Auto Mode nodes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;There is concept called mix-mode cluster where you’re running both EKS Auto Mode and other compute types, such as self-managed Karpenter provisioners or EKS Managed Node Groups.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In mix mode clusters by default deployment is deployed to EKS MNG nodes and not EKS Auto Nodes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In such case we can use labels and nodeAffinity.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Using NodeSelector label
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Use the label &lt;code&gt;eks.amazonaws.com/compute-type: auto&lt;/code&gt; &lt;strong&gt;when you want a workload is deployed to EKS Auto Node.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;This nodeSelector value is only relevant if you are running a cluster in a mixed mode, node types not managed by EKS Auto Mode
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: apps/v1
kind: Deployment
spec:
      nodeSelector:
        eks.amazonaws.com/compute-type: auto
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;I have an added the above configuration in &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2024/blob/master/eks-auto-mode-existing-cluster-terraform-support/sample_app_on_eks_auto_nodes.tf" rel="noopener noreferrer"&gt;sample_app_on_eks_auto_nodes.tf&lt;/a&gt; file. We are automating using Terraform so uncomment and run `terraform apply.&lt;/li&gt;
&lt;/ul&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%2Fjsmbghsr1xhxl1q7hehh.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%2Fjsmbghsr1xhxl1q7hehh.png" alt="workload on eks auto nodes" width="800" height="491"&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%2Fedt4tp5173cdv1et6nhv.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%2Fedt4tp5173cdv1et6nhv.png" alt="nodeSelector labels" width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Using nodeAffinity
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;You can add this nodeAffinity to Deployments or other workloads to require Kubernetes to not schedule them onto EKS Auto Mode nodes&lt;/li&gt;
&lt;/ul&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%2Fqp6cr8ft5wuepx2hr23p.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%2Fqp6cr8ft5wuepx2hr23p.png" alt="Node Affinity config" width="800" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I have added the workload with nodeAffinity in &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2024/blob/master/eks-auto-mode-existing-cluster-terraform-support/sample_app_not_on_eks_auto_nodes.tf" rel="noopener noreferrer"&gt;sample_app_not_on_eks_auto_nodes.tf&lt;/a&gt; . We are automating using Terraform so uncomment and  run &lt;code&gt;terraform apply&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&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%2Fyz85ge4nm1i3kgykc5lk.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%2Fyz85ge4nm1i3kgykc5lk.png" alt="workload not on auto node" width="800" height="555"&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%2F1mv8nomqy2tm34vk8eak.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%2F1mv8nomqy2tm34vk8eak.png" alt="node affinity" width="800" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  From DevOps, IaC Perspective
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;We saw how we can enable EKS Auto mode for Existing clusters with built-in NodePools using terraform-eks-module &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We also saw how we can migrate our existing workload from EKS Managed Group to EKS Auto Nodes without any down time as EKS Auto node respect PodDisruptionBudget.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We also saw how we can use nodeSelector Labels and nodeAffinity to control deployment of workload in case of mixed-mode EKS clusters. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Currently &lt;strong&gt;EKS Auto deploys EC2 of instance type c6a.large which can be also customized using nodeClass and NodePool&lt;/strong&gt; which we will see in the next blog. Follow me on &lt;a href="https://www.linkedin.com/in/jatinmehrotra/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt; or on &lt;a href="https://dev.to/jatinmehrotra"&gt;dev.to&lt;/a&gt; so that you get timely updates of what I share.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Feel free to reach out to me on &lt;a href="https://www.linkedin.com/in/jatinmehrotra/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;, &lt;a href="https://x.com/imjatinmehrotra" rel="noopener noreferrer"&gt;X&lt;/a&gt; if you face any error migrating your Existing workloads to EKS Auto Mode Nodes using terraform.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>kubernetes</category>
      <category>terraform</category>
      <category>eks</category>
    </item>
    <item>
      <title>EKS Auto Mode Arrives in Terraform – Simplify Kubernetes Today</title>
      <dc:creator>Jatin Mehrotra</dc:creator>
      <pubDate>Thu, 05 Dec 2024 10:14:13 +0000</pubDate>
      <link>https://forem.com/aws-builders/eks-auto-mode-arrives-in-terraform-simplify-kubernetes-today-bgl</link>
      <guid>https://forem.com/aws-builders/eks-auto-mode-arrives-in-terraform-simplify-kubernetes-today-bgl</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;During AWS re:Invent 2024 AWS released a new feature to EKS i.e EKS Auto Mode, which &lt;a href="https://dev.to/aws-builders/run-kubernetes-like-a-pro-without-the-expertise-introducing-eks-auto-mode-5edf"&gt;i have already covered in detail in my previous blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In this blog we will see &lt;strong&gt;how we can create cluster with EKS Auto mode using the OG "terraform-eks-module"&lt;/strong&gt; and how it &lt;strong&gt;simplified&lt;/strong&gt; my &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2024/blob/master/eks-auto-mode-terraform-module-support/eks.tf" rel="noopener noreferrer"&gt;eks.tf code&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I will also talk about the &lt;strong&gt;differences in the terraform code which we used for eks cluster before Auto mode feature v/s the terraform code after using using Auto mode feature&lt;/strong&gt; and how it save a beginner who does not know anything EKS.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Motivation
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Terraform provider for AWS released a new version &lt;a href="https://github.com/hashicorp/terraform-provider-aws/issues/40373" rel="noopener noreferrer"&gt;v5.79.0&lt;/a&gt; which adds the resources (&lt;code&gt;compute_config, storage_config, storage_config and kubernetes_network_config.elastic_load_balancing&lt;/code&gt;) for &lt;strong&gt;EKS Auto Mode&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&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%2Fiassdwwhu2pm8862bzmc.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%2Fiassdwwhu2pm8862bzmc.png" alt="terraform provider aws eks resources" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Terraform eks module released a new version &lt;a href="https://github.com/terraform-aws-modules/terraform-aws-eks/releases/tag/v20.31.0" rel="noopener noreferrer"&gt;v20.31.0&lt;/a&gt; which enables the &lt;strong&gt;support of EKS Auto mode and EKS Hybrid Nodes&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&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%2Fwzyd01c4bkw0tqvnyvg7.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%2Fwzyd01c4bkw0tqvnyvg7.png" alt="Terraform aws eks module support" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's use Terraform AWS EKS module for EKS Auto Mode
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;If you want to follow along use this &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2024/tree/master/eks-auto-mode-terraform-module-support" rel="noopener noreferrer"&gt;repository&lt;/a&gt; for the working code.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Enable EKS Auto mode for new cluster
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqeljqaqcahjg9qcltkqq.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%2Fqeljqaqcahjg9qcltkqq.png" alt="node pool" width="800" height="165"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One node pool (general purpose) created by EKS Auto mode&lt;/li&gt;
&lt;/ul&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%2F2tbxvcfr1jompw7wvm8b.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%2F2tbxvcfr1jompw7wvm8b.png" alt="no nodes" width="800" height="250"&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%2Fuqv70bpaqkrdioid6f4f.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%2Fuqv70bpaqkrdioid6f4f.png" alt="No pods" width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;There are no nodes or pods in the cluster( no workload is running) or can also say &lt;strong&gt;&lt;em&gt;I did not provisioned any nodes so far because that the job of EKS Auto mode now&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The moment I install a sample using this &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2024/blob/master/eks-auto-mode-terraform-module-support/sample_app.tf" rel="noopener noreferrer"&gt;code&lt;/a&gt;, EKS Auto Mode provisions the Ec2 nodes by itself. What a magic zero management for node provisioning from my side.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You need to run kubectl set context command and run terraform apply again to deploy the sample app. Sample app wasn't deployed when you created cluster because context wasn't set.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws eks --region us-east-1 update-kubeconfig --name tf-module-support --profile ck-test

terraform apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F64bgevnbrkgo5iudrz67.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%2F64bgevnbrkgo5iudrz67.png" alt="node proviosning" width="800" height="217"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; kubectl get po
NAME                    READY   STATUS    RESTARTS   AGE
test-65b7dbddd4-j6mbt   1/1     Running   0          104s
test-65b7dbddd4-wdz56   1/1     Running   0          104s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  What is making the difference
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;cluster_compute_config&lt;/code&gt; resource is the difference or resource use to enable or disable EKS auto Mode in the module side.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;At the terraform &lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_cluster#compute_config" rel="noopener noreferrer"&gt;aws provider side &lt;/a&gt; &lt;code&gt;compute_config&lt;/code&gt; is used to enable or disable to the EKS Auto Mode&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2Fvdk3jf5hlxiqeqjpb1j1.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%2Fvdk3jf5hlxiqeqjpb1j1.png" alt="Code difference" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;  &lt;span class="nx"&gt;cluster_compute_config&lt;/span&gt; &lt;span class="err"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;enabled&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
    &lt;span class="nx"&gt;node_pools&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"general-purpose"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Due to &lt;code&gt;cluster_compute_config&lt;/code&gt; option, now I don't have to mention
&lt;code&gt;eks_managed_node_group_defaults&lt;/code&gt;, &lt;code&gt;eks_managed_node_groups&lt;/code&gt;, &lt;code&gt;node_security_group_additional_rules&lt;/code&gt; or even know what are those concepts.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The following code might look small but if someone who does know about EKS and node provisioning has to understand the concepts as well figure out how to write this code. But now due to EKS Auto mode no more management. WOW just so sleek.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# code which is not needed anymore

eks_managed_node_group_defaults = {
    ami_type       = "AL2_x86_64"
    instance_types = ["m5.large"]
    # instance_types = ["t3.small"]
    # vpc_security_group_ids = [aws_security_group.all_worker_mgmt.id]
    iam_role_additional_policies = {
      ebs_policy                                 = "arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy" #IAM rights needed by CSI driver
      auto_scaling_policy                        = "arn:aws:iam::aws:policy/AutoScalingFullAccess"
      cloudwatch_container_insights_agent_policy = "arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy"
      xray_policy                                = "arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess"
    }
  }

  eks_managed_node_groups = {

    node_group = {
      min_size     = 2
      max_size     = 5
      desired_size = local.node_group_desired_size
    }
  }

  node_security_group_additional_rules = {
    http_traffic_node_to_node = {
      description = "Allow inbound HTTP from self"
      from_port   = 80
      to_port     = 80
      protocol    = "tcp"
      self        = true
      type        = "ingress"
    }
  }

# For triggering managed node group desired size

resource "null_resource" "update_desired_size" {
  triggers = {
    desired_size = local.node_group_desired_size
  }

  provisioner "local-exec" {
    interpreter = ["/bin/bash", "-c"]

    command = &amp;lt;&amp;lt;-EOT
      aws eks update-nodegroup-config \
        --cluster-name ${module.eks.cluster_name} \
        --nodegroup-name ${element(split(":", module.eks.eks_managed_node_groups["node_group"].node_group_id), 1)} \
        --scaling-config desiredSize=${local.node_group_desired_size} \
        --region us-east-1 \
        --profile ck-test
    EOT
  }
}

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  What isn't supported
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;For existing EKS cluster where you want to enable eks auto mode utilizing built-in node pool is not possible at the moment using terraform &lt;a href="https://github.com/hashicorp/terraform-provider-aws/issues/40411" rel="noopener noreferrer"&gt;due to bug in terraform aws provider side&lt;/a&gt;.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  From DevOps, IaC perspective
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;We saw how we can use EKS auto mode; a game changer feature for container workloads on a new cluster where we did not had to plan, provision infrastructure (compute) for running our workloads.&lt;/li&gt;
&lt;li&gt;Still some bug fixes are needed on terraform aws provider side as well EKS side to enable eks auto mode for existing cluster till then use console.&lt;/li&gt;
&lt;li&gt;Not only EKS auto mode takes away operations from user but also managed to simplify the IaC(terraform code)&lt;/li&gt;
&lt;li&gt;As a consumer of terraform, terraform-eks-module it is mind blowing to see the speed at which this feature was supported. All thanks to &lt;a href="https://github.com/bryantbiggs" rel="noopener noreferrer"&gt;Bryant Biggs&lt;/a&gt; for supporting this community.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>kubernetes</category>
      <category>terraform</category>
      <category>eks</category>
    </item>
    <item>
      <title>Unlocking Aurora DSQL with AWS Lambda: A Seamless Solution for Serverless, Scalable, and Event-Driven Architectures</title>
      <dc:creator>Jatin Mehrotra</dc:creator>
      <pubDate>Wed, 04 Dec 2024 02:09:39 +0000</pubDate>
      <link>https://forem.com/aws-builders/unlocking-aurora-dsql-with-aws-lambda-a-seamless-solution-for-serverless-scalable-and-3h4o</link>
      <guid>https://forem.com/aws-builders/unlocking-aurora-dsql-with-aws-lambda-a-seamless-solution-for-serverless-scalable-and-3h4o</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;AWS re:Invent has begun and there are tons of &lt;a href="https://aws.amazon.com/about-aws/whats-new/2024/?whats-new-content-all.sort-by=item.additionalFields.postDateTime&amp;amp;whats-new-content-all.sort-order=desc&amp;amp;awsf.whats-new-categories=*all&amp;amp;whats-new-content-all.q=aurora&amp;amp;whats-new-content-all.q_operator=AND" rel="noopener noreferrer"&gt;new service and feature announcement&lt;/a&gt; from the AWS CEO Matt Garman's Keynote ( check my &lt;a href="https://x.com/imjatinmehrotra/status/1863970305791885471" rel="noopener noreferrer"&gt;x&lt;/a&gt;/&lt;a href="https://bsky.app/profile/imjatinmehrotra.bsky.social/post/3lcfxuzf6i22g" rel="noopener noreferrer"&gt;bluesky&lt;/a&gt; thread from the keynote updates)&lt;/p&gt;

&lt;p&gt;In this blog we will investigate about &lt;strong&gt;&lt;em&gt;Amazon Aurora DSQL which is  serverless, distributed SQL database with virtually unlimited scale, high availability, and zero infrastructure management&lt;/em&gt;&lt;/strong&gt; claiming 99.99% single-Region and 99.999% multi-Region availability.&lt;/p&gt;

&lt;p&gt;My intentions for this blog is to make you understand the architecture, innovation and core components and &lt;em&gt;&lt;strong&gt;provide you a completely serverless solution to manage Aurora DSQL using AWS Lambda function with &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2024/tree/master/aurora-dsql" rel="noopener noreferrer"&gt;working code&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt; 🔥&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Motivation
&lt;/h2&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%2Fx8e4bzj80yjbtd15kccg.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%2Fx8e4bzj80yjbtd15kccg.png" alt="Amazon Aurora DSQL" width="800" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;December 4, 2024 4AM (JST) In the Day 2 re:Invent 2024, AWS released an exciting update introducing Amazon Aurora DSQL(Preview)!!!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What does this Update Mean for You?
&lt;/h2&gt;

&lt;p&gt;Here are the key reasons why Amazon Aurora DSQL is a game-changer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unlimited Scalability&lt;/strong&gt;: Effortlessly scale reads, writes, compute, and storage to handle any workload without sharding or instance upgrades.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High Availability&lt;/strong&gt;: Aurora DSQL's active-active serverless design automates failure recovery, ensuring seamless Multi-AZ and multi-Region availability with strong consistency, eliminating concerns about failovers or data loss. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fastest Performance&lt;/strong&gt;: Offers the fastest distributed SQL reads and writes, making it ideal for high-performance applications.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Infrastructure Management&lt;/strong&gt;: Fully serverless design eliminates the need for patching, upgrades, and maintenance downtime, saving time and resources.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strong Data Consistency&lt;/strong&gt;: Aurora DSQL is optimized for transactional workloads that benefit from ACID transactions and a relational data model.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PostgreSQL Compatibility&lt;/strong&gt;: Simplifies development with a familiar and widely-used SQL interface, reducing learning curves.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Developer-Friendly&lt;/strong&gt;: An intuitive experience that enables rapid application development without operational complexities. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cost of Aurora DSQL
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Aurora DSQL is currently available in preview at no charge. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Core Components in Aurora DSQL
&lt;/h2&gt;




&lt;h3&gt;
  
  
  Distributed Architecture
&lt;/h3&gt;

&lt;p&gt;Aurora DSQL is designed as a &lt;strong&gt;distributed database&lt;/strong&gt;, meaning its parts work together across multiple locations (Availability Zones) to ensure high availability and fault tolerance. It has four main components:  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Relay and Connectivity&lt;/strong&gt;: Handles how data moves within the system and connects users to the database.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compute and Databases&lt;/strong&gt;: Manages the actual processing of queries and database logic.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transaction Log and Isolation&lt;/strong&gt;: Ensures safe, consistent handling of multiple simultaneous operations (e.g., no data conflicts).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User Storage&lt;/strong&gt;: Stores the actual data securely.
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A &lt;strong&gt;control plane&lt;/strong&gt; oversees and coordinates these components, which are designed to self-heal and scale automatically if something fails.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Aurora DSQL Clusters
&lt;/h3&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Single-Region Clusters&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your data is synchronized across multiple data centers (AZs) within a single Region.
&lt;/li&gt;
&lt;li&gt;This setup avoids issues like replication delays or database failovers.
&lt;/li&gt;
&lt;li&gt;Strong consistency ensures all users see the same data no matter where they connect.
&lt;/li&gt;
&lt;li&gt;If part of the system fails, requests automatically shift to healthy infrastructure without your intervention.
&lt;/li&gt;
&lt;li&gt;Supports &lt;strong&gt;ACID transactions&lt;/strong&gt; (ensuring reliability, consistency, and durability).
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Multi-Region Linked Clusters&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;These extend the above features across multiple Regions, offering two endpoints (one in each Region) that act as a single database.
&lt;/li&gt;
&lt;li&gt;Both Regions can handle reads and writes simultaneously while ensuring strong consistency.
&lt;/li&gt;
&lt;li&gt;Ideal for global applications where performance and resilience are crucial.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;PostgreSQL Compatibility&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Aurora DSQL is built on &lt;strong&gt;PostgreSQL 16&lt;/strong&gt;, a popular open-source&lt;/p&gt;

&lt;h2&gt;
  
  
  How Data Resiliency and Backup is supported
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Backup and Restore&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Currently, &lt;strong&gt;backup and restore&lt;/strong&gt; is &lt;strong&gt;not supported&lt;/strong&gt; during the preview phase.
&lt;/li&gt;
&lt;li&gt;Aurora DSQL plans to integrate with the &lt;strong&gt;AWS Backup console&lt;/strong&gt;, enabling full backup and restore capabilities for both single-Region and multi-Region clusters.
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Replication&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Transaction Logs&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Aurora DSQL commits all writes to a distributed transaction log and replicates data synchronously across three AZs.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Multi-Region Replication&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Provides cross-Region replication for both read and write Regions.
&lt;/li&gt;
&lt;li&gt;Uses a &lt;strong&gt;witness Region&lt;/strong&gt; for encrypted transaction log storage, requiring no manual configuration or storage overhead.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Data Management&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Automatically splits, merges, and replicates data based on access patterns and primary key ranges.
&lt;/li&gt;
&lt;li&gt;Dynamically scales read replicas based on read demand.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Self-Healing&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Redirects access during AZ impairments and repairs missing data asynchronously.
&lt;/li&gt;
&lt;li&gt;Repaired replicas are added back to the storage quorum automatically.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;High Availability&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Active-Active Design&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Both single-Region and multi-Region clusters are active-active, with fully automated recovery.
&lt;/li&gt;
&lt;li&gt;Eliminates the need for traditional primary-secondary failover processes.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Multi-AZ Replication&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ensures synchronous replication across three AZs, avoiding risks of data loss or lag.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Regional Endpoints&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Single-Region clusters offer a redundant endpoint for consistent reads and writes across three AZs.
&lt;/li&gt;
&lt;li&gt;Multi-Region clusters provide two Regional endpoints for zero-lag, strongly consistent access across Regions.
&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;Amazon Route 53&lt;/strong&gt; for managed global endpoints if needed.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  Using AWS Lambda with Aurora DSQL
&lt;/h2&gt;

&lt;p&gt;Ofcourse its re:Invent and I would explain my readers a innovative way to connect to Aurora DSQL Database and perform Database operations like creating table and inserting some data using AWS Lambda function &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;During preview, you can interact with clusters in us-east-1 – US East (N. Virginia) and us-east-2 – US East (Ohio).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Create Aurora DSQL database
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Search Aurora DSQL in console&lt;/li&gt;
&lt;/ul&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%2Fqxhjbuo1sxhbjn4x0big.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%2Fqxhjbuo1sxhbjn4x0big.png" alt="Aurora DSQL console" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For this blog I am creating single region database and keeping other confgiraution as default. In the preview, name of the cluster is configured using Name Key-Value Tags. &lt;/li&gt;
&lt;li&gt;Select create cluster and after creation copy the endpoint url of DB.&lt;/li&gt;
&lt;/ul&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%2Fipsfhdm8xzc5eowiu6t5.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%2Fipsfhdm8xzc5eowiu6t5.png" alt="Aurora config" width="800" height="403"&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%2Fqx4udop4w7eajfg9pwjp.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%2Fqx4udop4w7eajfg9pwjp.png" alt="Aurora creation" width="800" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;That's it nothing else to manage, provision. That's 1 click deployment of Aurora DSQL for you!!!&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Create Lambda function
&lt;/h2&gt;

&lt;p&gt;This lambda function will connect to Aurora DSQL database, create table, insert some data and then verify that data by reading it back. Yes a truly server less operation using Lambda and Aurora DSQL&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%2Fxr1whyjv4vp9b3vnpoge.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%2Fxr1whyjv4vp9b3vnpoge.png" alt="Create Lambda function" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Authorize your Lambda execution role to connect to your cluster by adding inline policy Admin role as inline Policy to all the resources.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lambda -&amp;gt; Configuration -&amp;gt; Permissions -&amp;gt; add inline policy&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Statement1",
            "Effect": "Allow",
            "Action": ["dsql:DbConnectAdmin"],
            "Resource": ["*"]
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fgh3qodaqfbeqdsizdtev.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%2Fgh3qodaqfbeqdsizdtev.png" alt="LAMBDA EXECUTION ROLE" width="800" height="502"&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%2Ffpc8szw502wnysyqp5c5.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%2Ffpc8szw502wnysyqp5c5.png" alt="Lambda Policy" width="800" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You shouldn't use a admin database role for your production applications, doing this for the blog&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If you have worked with Lambda then you know we need to upload a zip package. I have shared the &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2024/tree/master/aurora-dsql" rel="noopener noreferrer"&gt;lambda code in my repository&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use the following commands after forking and pulling the repository to your local machine&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install. //generates package-lock.json
cd ~/path-to-code
zip -r pkg.zip .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Upload the package &lt;/li&gt;
&lt;/ul&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%2Fciq05jmjiip9do3ostpd.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%2Fciq05jmjiip9do3ostpd.png" alt="uploading Package" width="800" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In your Lambda function’s Test tab, use the following Event JSON modified to specify your cluster’s endpoint.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{"endpoint": "replace_with_your_cluster_endpoint"}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;You can also use Environment Variables then you need to change code and refer endpoint as &lt;code&gt;process.env.ENDPOINT&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Test the truly serverless operations (AWS LAMBDA + Aurora DSQL)
&lt;/h2&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%2F7k4rygtclbo9derkuf6j.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%2F7k4rygtclbo9derkuf6j.png" alt="Test failed" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Implementation worked but it failed &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lets use Amazon Q to diagnose it and fix it for us &lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2Ff6t3jbqn1xy2nshjtjut.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%2Ff6t3jbqn1xy2nshjtjut.png" alt="Iq-to-find-problems" width="800" height="167"&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%2Fp1orw4gt2poleno0oj70.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%2Fp1orw4gt2poleno0oj70.png" alt="Q-suggestions" width="800" height="895"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Increasing Lambda timeout to 10 seconds from default 3 seconds &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Voila it worked !!!&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2Fg68b1v8xg4wdtwkcs6a6.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%2Fg68b1v8xg4wdtwkcs6a6.png" alt="Lambda Success Message" width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;TO verify Data we are using the following code within our Lambda Function&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;        &lt;span class="nx"&gt;assert&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strictEqual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;city&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Anytown&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nx"&gt;assert&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;notStrictEqual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now lets try to fail the lambda by giving wrong endpoint &lt;/li&gt;
&lt;/ul&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%2F5q6icmt6s3ygqq7fba0v.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%2F5q6icmt6s3ygqq7fba0v.png" alt="wrong endpoint test data" width="800" height="299"&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%2F4fnenu4ufzp71lytlfmy.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%2F4fnenu4ufzp71lytlfmy.png" alt="Failure Message" width="800" height="472"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding authentication and authorization for Aurora DSQL
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Aurora DSQL uses IAM roles and policies for cluster authorization and authentication. You associate IAM roles with &lt;a href="https://www.postgresql.org/docs/current/user-manag.html" rel="noopener noreferrer"&gt;PostgreSQL database role&lt;/a&gt;s for database authorization. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you connect, instead of providing a credential, you use a temporary authentication token (valid for 1 hour).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For authentication:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;*&lt;em&gt;If you're using the admin role&lt;/em&gt;:*  IAM identity should have the policy action of  &lt;code&gt;dsql:DbConnectAdmin&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;If you're using the custom database role&lt;/em&gt;:*  IAM identity should have the policy action of  &lt;code&gt;dsql:DbConnect&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Interact with your database using PostgreSQL database roles and IAM roles
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;For Database Authorization&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;PostgreSQL database roles&lt;/strong&gt; for database-level authorization.
&lt;/li&gt;
&lt;li&gt;Aurora DSQL provides two types of roles:
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Admin Role&lt;/strong&gt;: Pre-created by Aurora DSQL, unmodifiable, and used for administrative tasks like creating custom roles.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Roles&lt;/strong&gt;: Created by you and assigned PostgreSQL permissions as needed.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Role Association&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Link &lt;strong&gt;custom database roles&lt;/strong&gt; with &lt;strong&gt;IAM roles&lt;/strong&gt; to allow IAM identities to connect to the database.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Authentication and Authorization&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use the admin role to connect to clusters and manage custom roles.
&lt;/li&gt;
&lt;li&gt;Use the &lt;strong&gt;AWS IAM GRANT&lt;/strong&gt; command to associate IAM identities with custom roles for database access.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;For detailed steps, refer to:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.postgresql.org/docs/current/user-manag.html" rel="noopener noreferrer"&gt;PostgreSQL database roles&lt;/a&gt; and &lt;a href="https://www.postgresql.org/docs/current/ddl-priv.html" rel="noopener noreferrer"&gt;privileges &lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/aurora-dsql/latest/userguide/using-database-and-iam-roles.html#using-database-and-iam-roles-custom-database-roles" rel="noopener noreferrer"&gt;Authorize custom database roles to connect to a cluster&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Exploring Aurora DSQL: Access, Development, and Best Practices
&lt;/h2&gt;

&lt;p&gt;I am very happy and satisfied with the documentation for the Aurora DSQL. It's to the points and really well written.&lt;/p&gt;

&lt;p&gt;When working with aurora there will certain topics which would be of interest like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/aurora-dsql/latest/userguide/accessing.html" rel="noopener noreferrer"&gt;Accessing Aurora DSQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/aurora-dsql/latest/userguide/working-with.html" rel="noopener noreferrer"&gt;Working with Amazon Aurora DSQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/aurora-dsql/latest/userguide/programming-with.html" rel="noopener noreferrer"&gt;Programming with Aurora DSQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/aurora-dsql/latest/userguide/CHAP_tutorials-sample-code.html" rel="noopener noreferrer"&gt;Utilities, tutorials, and sample code in Amazon Aurora DSQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/aurora-dsql/latest/userguide/security.html" rel="noopener noreferrer"&gt;Security&lt;/a&gt; and &lt;a href="https://docs.aws.amazon.com/aurora-dsql/latest/userguide/best-practices-security.html" rel="noopener noreferrer"&gt;its best practices&lt;/a&gt; : It is important to understand both Detective Best practices as well as Preventive security Best Practices&lt;/li&gt;
&lt;li&gt;At the writing of this blog there are unsupported &lt;a href="https://docs.aws.amazon.com/aurora-dsql/latest/userguide/working-with-postgresql-compatibility-unsupported-features.html" rel="noopener noreferrer"&gt;PostgreSQL features in Aurora DSQL&lt;/a&gt; which should be considered too&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  From Solutions Architect Perspective
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;We saw in this blog how we can &lt;strong&gt;&lt;em&gt;create Aurora DSQL cluster with just one click&lt;/em&gt;&lt;/strong&gt;. It is truly serverless.&lt;/li&gt;
&lt;li&gt;We also &lt;strong&gt;&lt;em&gt;saw how an example of a truly serverless solution for managing Aurora DSQL database using AWS Lambda functions&lt;/em&gt;&lt;/strong&gt; making Aurora DSQL is ideal for application patterns of microservice, serverless, and event-driven architectures&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Amazon Aurora is a game changer for developers, offering serverless architecture with automatic scaling, high availability, and resilience. It eliminates the need for manual database management, allowing developers to focus on building applications. With Aurora, developers can innovate faster while ensuring reliability and efficiency&lt;/em&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Aurora DSQL is PostgreSQL compatible, so you can use familiar drivers, object-relational mappings (ORMs), frameworks, and SQL features.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Did you tried the Lambda solution presented in the blog and do you think this will be game changer for serverless event driven and micrservice architectures?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Drop your thoughts in the comments below or connect with me on &lt;a href="https://www.linkedin.com/in/jatinmehrotra/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;, &lt;a href="https://x.com/imjatinmehrotra" rel="noopener noreferrer"&gt;X&lt;/a&gt;!&lt;/em&gt; 🚀&lt;/p&gt;

</description>
      <category>aws</category>
      <category>reinvent2024</category>
      <category>aurora</category>
      <category>serverless</category>
    </item>
    <item>
      <title>Run Kubernetes Like a Pro—Without the Expertise! Introducing EKS Auto Mode</title>
      <dc:creator>Jatin Mehrotra</dc:creator>
      <pubDate>Mon, 02 Dec 2024 04:17:24 +0000</pubDate>
      <link>https://forem.com/aws-builders/run-kubernetes-like-a-pro-without-the-expertise-introducing-eks-auto-mode-5edf</link>
      <guid>https://forem.com/aws-builders/run-kubernetes-like-a-pro-without-the-expertise-introducing-eks-auto-mode-5edf</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;AWS re:Invent hasn't officially begun, yet there is a game changing new feature to EKS to make you run &lt;strong&gt;Kubernetes like a pro!!!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In this blog we will investigate what EKS Auto Mode is all about and &lt;strong&gt;illustrates how to enables EKS Auto Mode on existing cluster and try to migrate to our managed node groups workloads to EKS auto mode of an existing cluster but we will be not able to do that, find out why in the blog!&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;I have also analyzed the price you will pay for EKS Auto v/s the simplicity of operations it provides to help you make an informed decision whether to enable it or not.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I have created a &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2024/tree/master/eks-auto-mode" rel="noopener noreferrer"&gt;terraform repository&lt;/a&gt; to quickly reproduce this blog with just 2 commands, let's conquer EKS Auto Mode.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Motivation
&lt;/h2&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%2Ff8sx9n2gcj7tnwxttouf.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%2Ff8sx9n2gcj7tnwxttouf.png" alt="aws update" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;December 2, 2024 (JST) – Just ahead of re:Invent 2024, AWS released an &lt;a href="https://aws.amazon.com/about-aws/whats-new/2024/12/amazon-eks-auto-mode/" rel="noopener noreferrer"&gt;exciting update&lt;/a&gt; introducing EKS Auto Mode.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does This Update Mean for You?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;It automates all kinds of management for your EKS cluster&lt;/strong&gt; which allow AWS to also set up and manage the infrastructure that enables the smooth operation of your workloads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Cluster infrastructure managed by AWS includes many Kubernetes capabilities as core components, as opposed to add-ons, &lt;strong&gt;such as compute autoscaling, pod and service networking, application load balancing, cluster DNS, block storage, and GPU support&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can deploy a new EKS Auto Mode cluster or enable EKS Auto Mode on an existing cluster&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;a href="https://github.com/terraform-aws-modules/terraform-aws-eks/pull/3225" rel="noopener noreferrer"&gt;Terraform support(still ongoing)&lt;/a&gt; not yet there so for this blog we will use AWS console.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cost considerations of this Update
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;According to &lt;a href="https://aws.amazon.com/eks/pricing/" rel="noopener noreferrer"&gt;https://aws.amazon.com/eks/pricing/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You will stay pay for 2 components :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Amazon EKS cluster pricing:&lt;/strong&gt; *&lt;em&gt;$0.10 per cluster/hour *&lt;/em&gt;($0.60/cluster for extended) &lt;/li&gt;
&lt;li&gt;But if you use auto mode will have to &lt;strong&gt;&lt;em&gt;pay extra&lt;/em&gt;&lt;/strong&gt;!!!&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;You pay for Amazon EKS Auto Mode based on the duration and type of Amazon EC2 instances launched and managed by EKS Auto Mode. The Amazon EKS Auto Mode prices below are in addition to the Amazon EC2 instance price, which covers the EC2 instances themselves.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;In simple words EKS Auto Mode charges a management fee that varies based on the EC2 instance type launched, in addition to your regular EC2 instance costs.&lt;/em&gt;&lt;/strong&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%2F1zdnc8vh030igq3ioz6f.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%2F1zdnc8vh030igq3ioz6f.png" alt="Price of auto mode" width="800" height="536"&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%2Fezjb2tltvsn34rnt0bx7.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%2Fezjb2tltvsn34rnt0bx7.png" alt="EKS total auto mode cost " width="800" height="507"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What does it actually automate
&lt;/h3&gt;

&lt;p&gt;EKS auto mode is designed to automate data plane components so here are the following components being automated along with the &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/automode.html#_features" rel="noopener noreferrer"&gt;features&lt;/a&gt;:&lt;/p&gt;

&lt;h3&gt;
  
  
  Automated Data Plane Components in EKS Auto Mode
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Compute Management:&lt;/strong&gt; Automates key aspects of cluster compute, including node provisioning, scaling, upgrades, and load balancing, for hassle-free Kubernetes operations.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Nodes&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Automatically selects optimized AMIs with essential services.
&lt;/li&gt;
&lt;li&gt;Secures nodes using SELinux, read-only root files, and disallowed SSH/SSM access.
&lt;/li&gt;
&lt;li&gt;Includes GPU support for NVIDIA and Neuron GPUs.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Auto Scaling&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Uses Karpenter to monitor and deploy new nodes for unschedulable Pods.
&lt;/li&gt;
&lt;li&gt;Dynamically terminates unused nodes to optimize resources.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Upgrades&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Applies OS and component updates with minimal workload disruption.
&lt;/li&gt;
&lt;li&gt;Enforces a 21-day maximum node lifetime for security and stability.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Load Balancing&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Integrates with Elastic Load Balancing (ALB &amp;amp; NLB) for automated provisioning and scaling.
&lt;/li&gt;
&lt;li&gt;Provides production-ready load balancing aligned with AWS best practices.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Storage Automation&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configures ephemeral storage with volume settings, encryption, and deletion policies automatically managed for optimal use.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Networking Automation&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Manages Pod and service connectivity with IPv4/IPv6 support and extends IP spaces using secondary CIDR blocks.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Enabling auto mode on Existing Cluster
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In this blog we will see how to enable on an existing cluster as &lt;a href="https://aws.amazon.com/blogs/aws/streamline-kubernetes-cluster-management-with-new-amazon-eks-auto-mode/?trk=d57158fd-77e3-423f-9e1e-005fd2a64d89&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;AWS blog already covered EKS auto mode on new cluster&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To mimic existing cluster, you can deploy &lt;a href="https://github.com/jatinmehrotra/aws-reinvent-2024/tree/master/eks-auto-mode" rel="noopener noreferrer"&gt;EKS cluster with EKS managed node groups using Terraform in my repo&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Migrations Supported
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6wxtknh1dfyxrptpjkeh.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%2F6wxtknh1dfyxrptpjkeh.png" alt="Migration support" width="800" height="574"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;At the writing of this blog EKS support migrating from &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/auto-migrate-karpenter.html" rel="noopener noreferrer"&gt;Karpenter to EKS Auto Mode&lt;/a&gt;, &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/auto-migrate-mng.html" rel="noopener noreferrer"&gt;Migrate from EKS Managed Node Groups to EKS Auto Mode&lt;/a&gt;, Migrating from EKS Fargate to EKS Auto Mode Nodes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;To keep this blog simple I will show how to migrate from EKS managed Node Groups to EKS Auto Mode (hopefully :))&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Also remember to take a look on &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/migrate-auto.html#migration-reference" rel="noopener noreferrer"&gt;how to configure Kubernetes based resource&lt;/a&gt; to be owned by either self-managed controllers or EKS Auto Mode.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Updating IAM permissions and configuring core EKS Auto Mode settings&lt;/li&gt;
&lt;li&gt;Minimum required version of certain Amazon EKS Add-ons
Perspective.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Updating IAM permissions and configuring core EKS Auto Mode settings
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Cluster IAM role of an EKS Cluster cannot be changed after the cluster is created. EKS Auto Mode requires additional permissions on this role. You must attach additional policies to the current role.&lt;/li&gt;
&lt;/ul&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%2F1g0viwachy3pm33h6h8y.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%2F1g0viwachy3pm33h6h8y.png" alt="eks auto cluster" width="800" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Navigate to Cluster IAM role and adding the following policies&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AmazonEKSComputePolicy&lt;/li&gt;
&lt;li&gt;AmazonEKSBlockStoragePolicy&lt;/li&gt;
&lt;li&gt;AmazonEKSLoadBalancingPolicy&lt;/li&gt;
&lt;li&gt;AmazonEKSNetworkingPolicy&lt;/li&gt;
&lt;li&gt;AmazonEKSClusterPolicy ( already exist for me ) &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&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%2Fw603yh9qhvv6s8iim403.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%2Fw603yh9qhvv6s8iim403.png" alt="eks permissions" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Edit the trust Policy and add &lt;code&gt;sts:TagSession&lt;/code&gt; to allow Action.&lt;/li&gt;
&lt;/ul&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%2Fsqnctpdccmhb95bqz6a2.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%2Fsqnctpdccmhb95bqz6a2.png" alt="EKS trust Policy" width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Minimum required version of certain Amazon EKS Add-ons
&lt;/h3&gt;

&lt;p&gt;Perspective.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I have set the terraform code to fetch &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/auto-enable-existing.html#auto-addons-required" rel="noopener noreferrer"&gt;latest versions of add-ons&lt;/a&gt; so you don't have to do anything.&lt;/li&gt;
&lt;/ul&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%2Fe1w7insh54uhspomfzto.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%2Fe1w7insh54uhspomfzto.png" alt="auto mode" width="800" height="307"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Create a Karpenter Node Pool
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;EKS auto uses Karpenter behind the scenes for scaling. &lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Karpenter, a node provisioning tool that helps optimize cluster scaling and resource utilization. With Karpenter’s NodePool resource, you can define specific requirements for your compute resources, including instance types, availability zones, architectures, and capacity types.&lt;/p&gt;
&lt;/blockquote&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%2F9lao9ujex8ps08mzokk3.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%2F9lao9ujex8ps08mzokk3.png" alt="node pool" width="800" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Select Create recommended roles for Node IAM Role&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I am using preconfigured node pool, but you can configure your own using your own yaml file like this &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/create-node-pool.html#_sample_nodepool" rel="noopener noreferrer"&gt;example&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2Fwshbemwofbzd3nge35te.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%2Fwshbemwofbzd3nge35te.png" alt="node pool permissions" width="800" height="626"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select default permissions and create role&lt;/li&gt;
&lt;/ul&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%2Fjdp6kla59cswo9abpvfl.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%2Fjdp6kla59cswo9abpvfl.png" alt="after node pool role created" width="800" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Once the role is created and you select next you can see notifications for auto mode being enabled&lt;/li&gt;
&lt;/ul&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%2F6rtjc2e6dm7zgqezma90.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%2F6rtjc2e6dm7zgqezma90.png" alt="notifications of being enabled" width="800" height="362"&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%2Fodgrclhpk3jfo2mwaxjh.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%2Fodgrclhpk3jfo2mwaxjh.png" alt="EKS Auto Enabled" width="800" height="95"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Once enabled you can confirm the auto mode option using &lt;code&gt;Overview&lt;/code&gt; Tab in the console&lt;/li&gt;
&lt;/ul&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%2F6521op5vxjdj4ysee6g2.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%2F6521op5vxjdj4ysee6g2.png" alt="Node Pool created by EKS Auto" width="800" height="518"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;As enabled during enable step EKS created node pools too.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Disable EKS Auto Modę
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvn1bc22ueafwtvst436q.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%2Fvn1bc22ueafwtvst436q.png" alt="Disabling Auto Mode" width="800" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can disable EKS Auto Mode on an existing EKS Cluster. This is a destructive operation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;EKS will terminate all EC2 instances operated by EKS Auto Mode.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;EKS will delete all Load Balancers operated by EKS Auto Mode.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Migrate from EKS Managed Node Groups to EKS Auto Mode
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;When transitioning your Amazon EKS cluster to use EKS auto mode, you can smoothly migrate your existing workloads from managed node groups using the eksctl CLI tool. &lt;/p&gt;

&lt;p&gt;This process ensures continuous application availability while EKS auto mode optimizes your compute resources. The migration can be performed with minimal disruption to your running applications.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Cluster with EKS Auto Mode enabled&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;eksctl CLI installed and connected to your cluster. For more information, see Set up to use Amazon EKS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Karpenter is not installed on the cluster.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Current state of Pods
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;2 pods are running on managed node groups.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jatin.mehrotra@CK0662-001 eks-auto-mode % kubectl get po &lt;span class="nt"&gt;-o&lt;/span&gt; wide
NAME                    READY   STATUS    RESTARTS   AGE     IP           NODE                         NOMINATED NODE   READINESS GATES
test-65b7dbddd4-jdxhw   1/1     Running   0          2m29s   10.0.2.52    ip-10-0-2-85.ec2.internal    &amp;lt;none&amp;gt;           &amp;lt;none&amp;gt;
test-65b7dbddd4-lzd4r   1/1     Running   0          2m29s   10.0.1.118   ip-10-0-1-128.ec2.internal   &amp;lt;none&amp;gt;           &amp;lt;none&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Ftobwyiez8l93du1syn4n.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%2Ftobwyiez8l93du1syn4n.png" alt="test pods running on internal managed node" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;As per &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/auto-migrate-mng.html#_procedure" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, Use the following eksctl CLI command to initiate draining pods from the existing managed node group instances. EKS Auto Mode will create new nodes to back the displaced pods.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;eksctl update auto-mode-config &lt;span class="nt"&gt;--cluster&lt;/span&gt; eks-auto-test &lt;span class="nt"&gt;--drain-nodegroup&lt;/span&gt;  &lt;span class="nt"&gt;--region&lt;/span&gt; us-east-1 &lt;span class="nt"&gt;--profile&lt;/span&gt; ck-test   
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;I thought it's my eksctl version but looks like my eksctl hasn't got update for this flag so far. &lt;a href="https://github.com/eksctl-io/eksctl/pull/8058" rel="noopener noreferrer"&gt;There is open issue too for the official eksctl repository &lt;/a&gt;
&lt;/li&gt;
&lt;/ul&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%2F0fpjudj46oy5uroihf52.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%2F0fpjudj46oy5uroihf52.png" alt="eksctl command problem" width="800" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;my eksctl version output (its the latest version)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;eksctl info 
eksctl version: 0.194.0

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The other commands for eksctl are running for my cluster so definitely not the connection problem
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;jatin.mehrotra@CK0662-001 eks-auto-mode % eksctl get addons  --cluster eks-auto-test  --region us-east-1 --profile ck-test 
2024-12-02 12:29:41 [ℹ]  Kubernetes version "1.30" in use by cluster "eks-auto-test"
2024-12-02 12:29:41 [ℹ]  getting all addons
2024-12-02 12:29:44 [ℹ]  to see issues for an addon run `eksctl get addon --name &amp;lt;addon-name&amp;gt; --cluster &amp;lt;cluster-name&amp;gt;`
NAME                            VERSION                 STATUS  ISSUES  IAMROLE UPDATE AVAILABLE                                                                     CONFIGURATION VALUES     POD IDENTITY ASSOCIATION ROLES
amazon-cloudwatch-observability v2.5.0-eksbuild.1       ACTIVE  0
aws-ebs-csi-driver              v1.37.0-eksbuild.1      ACTIVE  0
coredns                         v1.11.1-eksbuild.8      ACTIVE  0               v1.11.3-eksbuild.2,v1.11.3-eksbuild.1,v1.11.1-eksbuild.13,v1.11.1-eksbuild.11,v1.11.1-eksbuild.9
kube-proxy                      v1.30.6-eksbuild.3      ACTIVE  0
vpc-cni                         v1.19.0-eksbuild.1      ACTIVE  0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Update: Dec 3, 12:20 AM JST
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Even though AWS team has released a &lt;a href="https://github.com/eksctl-io/eksctl/releases/tag/v0.196.0" rel="noopener noreferrer"&gt;new version of eksctl&lt;/a&gt;, issue still persist as well as documentation is also incorrect. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It needs &lt;code&gt;--drain-all-nodegroups&lt;/code&gt; as well as cluster-config file which is very difficult to generate for existing cluster created by console or terraform.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eksctl update auto-mode-config --drain-all-nodegroups -f eks-config.yaml --profile ck-test  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We need to wait more so that AWS can fix this bug. There is &lt;a href="https://github.com/eksctl-io/eksctl/issues/8068" rel="noopener noreferrer"&gt;new issue &lt;/a&gt;for this bug.&lt;/p&gt;

&lt;h2&gt;
  
  
  Investigating the Update the Kubernetes Version of an EKS Auto Mode cluster
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The compute capability of Amazon EKS Auto Mode controls the Kubernetes version of nodes. After you upgrade the control plane, EKS Auto Mode will begin incrementally updating managed nodes. EKS Auto Mode respects pod disruption budgets.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You do not have to manually upgrade the capabilities of Amazon EKS Auto Mode, including the compute autoscaling, block storage, and load balancing capabilities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Auto Mode simplifies the version update process by handling the coordination of control plane updates with node replacements, while maintaining workload availability through pod disruption budgets.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When upgrading an Auto Mode cluster, many components that traditionally required manual updates are now managed as part of the service.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After you initiate a control plane upgrade, EKS Auto Mode begins replacing nodes in your cluster. The new nodes have the corresponding new Kubernetes version. EKS Auto Mode observes pod disruption budgets when upgrading nodes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CoreDNS&lt;/li&gt;
&lt;li&gt;KubeProxy&lt;/li&gt;
&lt;li&gt;AWS Load Balancer Controller&lt;/li&gt;
&lt;li&gt;Karpenter&lt;/li&gt;
&lt;li&gt;AWS EBS CSI Driver&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;However You are still responsible for updating:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Apps and workloads deployed to your cluster&lt;/li&gt;
&lt;li&gt;Self-managed add-ons and controllers&lt;/li&gt;
&lt;li&gt;Amazon EKS Add-ons&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  From Solutions Architect Perspective
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;In this blog we saw how EKS Auto mode simplifies Kubernetes operations by offloading infrastructure management to AWS. &lt;/li&gt;
&lt;li&gt;It automatically selects the best EC2 instances, optimizes compute costs, and dynamically scales resources based on demand. &lt;/li&gt;
&lt;li&gt;This feature enhances security, performance, and availability while reducing the need for deep expertise, capacity planning, and manual management. &lt;/li&gt;
&lt;li&gt;But as we saw in the blog its still new feature there might be &lt;strong&gt;a need for updates and bug fixes.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;em&gt;Yes, its true the its simplifies operations and allows users to run Kubernetes like a PRO in secure manner but you have to pay a price for it.&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Initially I think this will increase the cost but the real benefits would kick in after a sustained usage to offset the extra price with ease of operations.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Drop your thoughts in the comments below or connect with me on &lt;a href="https://www.linkedin.com/in/jatinmehrotra/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;, &lt;a href="https://x.com/imjatinmehrotra" rel="noopener noreferrer"&gt;X&lt;/a&gt;!&lt;/em&gt; 🚀&lt;/p&gt;

</description>
      <category>aws</category>
      <category>reinvent2024</category>
      <category>eks</category>
      <category>kubernetes</category>
    </item>
  </channel>
</rss>
