<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pravesh Sudha</title>
    <description>The latest articles on DEV Community by Pravesh Sudha (@pravesh_sudha_3c2b0c2b5e0).</description>
    <link>https://dev.to/pravesh_sudha_3c2b0c2b5e0</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%2F1805492%2F62f81727-4167-4aa7-9890-40fa2d850525.png</url>
      <title>DEV Community: Pravesh Sudha</title>
      <link>https://dev.to/pravesh_sudha_3c2b0c2b5e0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pravesh_sudha_3c2b0c2b5e0"/>
    <language>en</language>
    <item>
      <title>🚀 Kubernetes for Beginners: Deploying an Nginx–Node–Redis Application</title>
      <dc:creator>Pravesh Sudha</dc:creator>
      <pubDate>Fri, 03 Apr 2026 12:55:17 +0000</pubDate>
      <link>https://dev.to/aws-builders/kubernetes-for-beginners-deploying-an-nginx-node-redis-application-1o7h</link>
      <guid>https://dev.to/aws-builders/kubernetes-for-beginners-deploying-an-nginx-node-redis-application-1o7h</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Understanding Services, ConfigMaps, Deployments, and health checks with my WAY!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Hola Amigos! 👋&lt;/p&gt;

&lt;p&gt;Today, we are embarking on a brand new series: &lt;strong&gt;K8s with Pravesh&lt;/strong&gt; 🚀 — where we’ll break down Kubernetes, understand what it really is, and more importantly, how you can &lt;em&gt;actually&lt;/em&gt; use it in a practical, no-BS way.&lt;/p&gt;

&lt;p&gt;In today’s blog, we’ll dive into the fundamentals — &lt;strong&gt;Deployments, Services, and ConfigMaps&lt;/strong&gt; — and use them to deploy a &lt;strong&gt;three-tier application on Minikube&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now you might be thinking… &lt;em&gt;“What’s new here? There are already thousands of blogs doing the same thing.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And honestly, you’re not wrong.&lt;/p&gt;

&lt;p&gt;But hold your horses for a second 🐎&lt;/p&gt;

&lt;p&gt;This isn’t just another “apply this YAML and it works” kind of tutorial. We’re going to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Understand &lt;strong&gt;what’s really happening under the hood&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Debug real issues (yes, the ones that &lt;em&gt;actually&lt;/em&gt; happen)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And build intuition so you don’t just run Kubernetes… you &lt;strong&gt;get it&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So let’s dive in. 🔥&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ Pre-Requisites
&lt;/h2&gt;

&lt;p&gt;Before we dive deep, there are a couple of things you need to have set up. Nothing fancy — just the essentials to get your Kubernetes playground up and running.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 Docker / Docker Desktop
&lt;/h3&gt;

&lt;p&gt;We’ll be running Minikube using Docker, so make sure you have Docker installed on your system.&lt;/p&gt;

&lt;p&gt;👉 Install it from here: &lt;a href="https://docs.docker.com/get-started/get-docker/" rel="noopener noreferrer"&gt;https://docs.docker.com/get-started/get-docker/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 Minikube
&lt;/h3&gt;

&lt;p&gt;Think of Minikube as your &lt;strong&gt;personal Kubernetes cluster&lt;/strong&gt; — lightweight, local, and perfect for experimenting and learning all the cool stuff without needing a cloud setup.&lt;/p&gt;

&lt;p&gt;👉 Download it from here: &lt;a href="https://minikube.sigs.k8s.io/docs/start/?arch=%2Fmacos%2Farm64%2Fstable%2Fbinary+download" rel="noopener noreferrer"&gt;https://minikube.sigs.k8s.io/docs/start/?arch=%2Fmacos%2Farm64%2Fstable%2Fbinary+download&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🤔 What is Kubernetes (K8s)?
&lt;/h2&gt;

&lt;p&gt;At its core, &lt;strong&gt;Kubernetes is a container orchestration tool&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now that sounds fancy, but let’s simplify it a bit.&lt;/p&gt;

&lt;p&gt;Think of Kubernetes as a &lt;strong&gt;Head Chef in a restaurant&lt;/strong&gt; 👨‍🍳 It makes sure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Everyone is doing their job properly&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Work is flowing smoothly&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And if something breaks… it steps in and fixes it&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s the &lt;em&gt;layman definition&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Real Meaning
&lt;/h3&gt;

&lt;p&gt;In technical terms, Kubernetes is responsible for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Managing containers&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scaling them&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensuring they are always running&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Handling communication between them&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can think of it as an advanced version of Docker Compose — but built for &lt;strong&gt;production-grade systems&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Smallest Unit: Pod
&lt;/h3&gt;

&lt;p&gt;In Kubernetes, the smallest deployable unit is a &lt;strong&gt;Pod&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;👉 A Pod is basically a wrapper around your container(s)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It can run &lt;strong&gt;one or more containers&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;These containers share:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Network&lt;/li&gt;
&lt;li&gt;  Storage&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;But here’s the thing…&lt;/p&gt;

&lt;p&gt;Managing Pods manually? 😵‍💫 Not a great idea.&lt;/p&gt;

&lt;h3&gt;
  
  
  Enter Deployments
&lt;/h3&gt;

&lt;p&gt;To solve that, we have &lt;strong&gt;Deployments&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A Deployment is like a &lt;strong&gt;blueprint for your Pods&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You define:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Container image&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Number of replicas&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ports&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Volumes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Other configurations&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And Kubernetes takes care of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Creating Pods&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scaling them&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Replacing them if they crash&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💥 Much easier to manage.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Do Pods Talk to Each Other?
&lt;/h3&gt;

&lt;p&gt;Back to our restaurant analogy 🍽️&lt;/p&gt;

&lt;p&gt;The waiter needs to communicate with the chef, right?&lt;/p&gt;

&lt;p&gt;But in Kubernetes… 👉 Pods don’t automatically talk to each other&lt;/p&gt;

&lt;p&gt;We need something in between.&lt;/p&gt;

&lt;h3&gt;
  
  
  Services: The Communication Bridge
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Services&lt;/strong&gt; act as a bridge between Pods.&lt;/p&gt;

&lt;p&gt;They provide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Stable networking&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Internal DNS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Load balancing&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are 3 main types:&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 ClusterIP
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Default type&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Used for &lt;strong&gt;internal communication only&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Not accessible from outside the cluster&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🔹 NodePort
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Exposes the service on a &lt;strong&gt;specific port on the node&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Accessible from outside using:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Node-IP&amp;gt;:&amp;lt;Port&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

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

&lt;h3&gt;
  
  
  🔹 LoadBalancer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Exposes the app to the &lt;strong&gt;outside world&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Commonly used in cloud environments (AWS, GCP, etc.)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ConfigMaps: Handling Custom Configurations
&lt;/h3&gt;

&lt;p&gt;Back to the restaurant…&lt;/p&gt;

&lt;p&gt;Imagine a customer walks in and says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“I want a Caffè macchiato, with a little bit of soy, enough to make me go OH BOY!”&lt;/em&gt; — Kevin Hart fans, you know 😄&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%2F23vp6luxmn3hio126cwt.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F23vp6luxmn3hio126cwt.gif" alt=" " width="286" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Handling custom requests manually can get messy…&lt;/p&gt;

&lt;p&gt;But in Kubernetes, we have &lt;strong&gt;ConfigMaps&lt;/strong&gt; for this.&lt;/p&gt;

&lt;p&gt;👉 ConfigMaps allow you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Store &lt;strong&gt;non-confidential data&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use it inside your applications&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Keep configs separate from your code&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For sensitive data? 👉 Use &lt;strong&gt;Secrets&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  YAML: The Language of Kubernetes
&lt;/h3&gt;

&lt;p&gt;All resources in Kubernetes are defined using &lt;strong&gt;YAML files&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You describe:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;What you want&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And Kubernetes makes it happen&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to explore more, check out the official docs: 👉 &lt;a href="https://kubernetes.io/docs/setup/" rel="noopener noreferrer"&gt;https://kubernetes.io/docs/setup/&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ Practical Demonstration
&lt;/h2&gt;

&lt;p&gt;Enough with the theory — now let’s get our hands dirty 🔥&lt;/p&gt;

&lt;p&gt;So far, we’ve covered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Deployments&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Services&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ConfigMaps&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And to bring all of this together, we’ll deploy a &lt;strong&gt;three-tier application (Nginx–Node–Redis)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I’ve actually used this same app in one of my earlier projects to demonstrate CI/CD workflows with GitHub Actions and Terraform. If you’re curious, check it out here: 👉 &lt;a href="https://blog.praveshsudha.com/cicd-for-terraform-with-github-actions-deploying-a-nodejs-redis-app-on-aws" rel="noopener noreferrer"&gt;https://blog.praveshsudha.com/cicd-for-terraform-with-github-actions-deploying-a-nodejs-redis-app-on-aws&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Clone the Project
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Pravesh-Sudha/nginx-node-redis.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the project in your favorite editor (VS Code works great).&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding the App
&lt;/h3&gt;

&lt;p&gt;This is a simple Node.js application that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Displays a &lt;strong&gt;request counter&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Increments the count on every refresh&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stores data in &lt;strong&gt;Redis&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Uses &lt;strong&gt;Nginx as a reverse proxy&lt;/strong&gt; (serving on port 80 instead of 5000)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 2: Run with Docker Compose
&lt;/h3&gt;

&lt;p&gt;Before jumping into Kubernetes, let’s run it locally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker-compose up &lt;span class="nt"&gt;--build&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%2Fxsm9mddjlvrlcl2bfmzc.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%2Fxsm9mddjlvrlcl2bfmzc.png" alt=" " width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Make sure Docker Desktop is installed and running.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You should see logs in your terminal and the app running in your browser.&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%2Fj3918cxhv9n6dwywn505.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%2Fj3918cxhv9n6dwywn505.png" alt=" " width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once done:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Ctrl + C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step 3: Move to Kubernetes
&lt;/h3&gt;

&lt;p&gt;Now comes the interesting part.&lt;/p&gt;

&lt;p&gt;Inside the project:&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;cd &lt;/span&gt;nginx-node-redis/kube-config/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll find three directories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;nginx/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;node/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;redis/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Deployment YAML&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Service YAML&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📦 Nginx Deployment
&lt;/h3&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;apps/v1&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;Deployment&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;nginx-deployment&lt;/span&gt;
  &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx&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;replicas&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;matchLabels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx&lt;/span&gt;
  &lt;span class="na"&gt;template&lt;/span&gt;&lt;span class="pi"&gt;:&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;labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx&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;containers&lt;/span&gt;&lt;span class="pi"&gt;:&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;nginx&lt;/span&gt;
        &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx:1.14.2&lt;/span&gt;
        &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;containerPort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80&lt;/span&gt;

        &lt;span class="na"&gt;volumeMounts&lt;/span&gt;&lt;span class="pi"&gt;:&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;nginx-config-volume&lt;/span&gt;
          &lt;span class="na"&gt;mountPath&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/etc/nginx/nginx.conf&lt;/span&gt;
          &lt;span class="na"&gt;subPath&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx.conf&lt;/span&gt;

      &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&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;nginx-config-volume&lt;/span&gt;
        &lt;span class="na"&gt;configMap&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;nginx-config&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  A Note on AI &amp;amp; YAML
&lt;/h3&gt;

&lt;p&gt;The best thing about AI? 👉 You can generate YAML files instantly.&lt;/p&gt;

&lt;p&gt;But what happens when things break?&lt;/p&gt;

&lt;p&gt;That’s where &lt;strong&gt;fundamentals matter&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let’s break this down 👇&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding the Deployment
&lt;/h3&gt;

&lt;h3&gt;
  
  
  1. API Version &amp;amp; Kind
&lt;/h3&gt;

&lt;p&gt;Defines what resource we are creating:&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;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deployment&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Labels (IMPORTANT)
&lt;/h3&gt;

&lt;p&gt;Labels appear in three places — and each has a role:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;metadata.labels&lt;/strong&gt; → tagging the Deployment&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;spec.selector.matchLabels&lt;/strong&gt; → tells Deployment which Pods to manage&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;template.metadata.labels&lt;/strong&gt; → applied to Pods (used by Services)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 This is how Kubernetes “connects” resources.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Container Spec
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx:1.14.2&lt;/span&gt;
&lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;containerPort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Defines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Image&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Port&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. ConfigMap Mount
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;volumeMounts&lt;/span&gt;&lt;span class="pi"&gt;:&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;nginx-config-volume&lt;/span&gt;
  &lt;span class="na"&gt;mountPath&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/etc/nginx/nginx.conf&lt;/span&gt;
  &lt;span class="na"&gt;subPath&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx.conf&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 This mounts your custom Nginx config into the container.&lt;/p&gt;

&lt;h3&gt;
  
  
  🌐 Nginx Service
&lt;/h3&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;v1&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;Service&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;nginx-service&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;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ClusterIP&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx&lt;/span&gt;
  &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80&lt;/span&gt;
      &lt;span class="na"&gt;targetPort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;We use &lt;strong&gt;ClusterIP&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Selector matches:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

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

&lt;p&gt;👉 This connects the Service to Pods.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚙️ Nginx ConfigMap
&lt;/h2&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;v1&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;ConfigMap&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;nginx-config&lt;/span&gt;
&lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;nginx.conf&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
    &lt;span class="s"&gt;events {}&lt;/span&gt;

    &lt;span class="s"&gt;http {&lt;/span&gt;
      &lt;span class="s"&gt;upstream loadbalancer {&lt;/span&gt;
        &lt;span class="s"&gt;server node-service:5000;&lt;/span&gt;
      &lt;span class="s"&gt;}&lt;/span&gt;

      &lt;span class="s"&gt;server {&lt;/span&gt;
        &lt;span class="s"&gt;listen 80;&lt;/span&gt;

        &lt;span class="s"&gt;location / {&lt;/span&gt;
          &lt;span class="s"&gt;proxy_pass http://loadbalancer;&lt;/span&gt;
          &lt;span class="s"&gt;proxy_set_header Host $host;&lt;/span&gt;
          &lt;span class="s"&gt;proxy_set_header X-Real-IP $remote_addr;&lt;/span&gt;
          &lt;span class="s"&gt;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&lt;/span&gt;
        &lt;span class="s"&gt;}&lt;/span&gt;

        &lt;span class="s"&gt;location = /favicon.ico {&lt;/span&gt;
          &lt;span class="s"&gt;log_not_found off;&lt;/span&gt;
          &lt;span class="s"&gt;access_log off;&lt;/span&gt;
        &lt;span class="s"&gt;}&lt;/span&gt;
      &lt;span class="s"&gt;}&lt;/span&gt;
    &lt;span class="s"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Here we:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Override default Nginx config&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Route traffic to:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node-service:5000
&lt;/code&gt;&lt;/pre&gt;

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

&lt;h3&gt;
  
  
  Step 4: Deploy to Minikube
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Start Minikube&lt;/span&gt;
minikube start

&lt;span class="c"&gt;# Go to config directory&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;nginx-node-redis/kube-config/

&lt;span class="c"&gt;# Deploy Redis&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;redis/ &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; deploy.yml &lt;span class="nt"&gt;-f&lt;/span&gt; svc.yml
&lt;span class="nb"&gt;cd&lt;/span&gt; ..

&lt;span class="c"&gt;# Deploy Node&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;node/ &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; deploy.yaml &lt;span class="nt"&gt;-f&lt;/span&gt; svc.yml
&lt;span class="nb"&gt;cd&lt;/span&gt; ..

&lt;span class="c"&gt;# Deploy Nginx&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;nginx/ &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; deploy.yml &lt;span class="nt"&gt;-f&lt;/span&gt; svc.yml &lt;span class="nt"&gt;-f&lt;/span&gt; configmap.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%2Fv8pe8ao9b1l8pbcru895.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%2Fv8pe8ao9b1l8pbcru895.png" alt=" " width="800" height="570"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Wait for Pods
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pods &lt;span class="nt"&gt;-w&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wait until all pods are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Running
&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%2Fqorxloe9ja22cxz2n8rt.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%2Fqorxloe9ja22cxz2n8rt.png" alt=" " width="800" height="206"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Access the App
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;minikube service nginx-service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 This opens your app in the browser — now running on Kubernetes 🎉&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%2Fu8rot9k6vz8dwj9znubz.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%2Fu8rot9k6vz8dwj9znubz.png" alt=" " width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Self-Healing in Action
&lt;/h3&gt;

&lt;p&gt;Here’s where Kubernetes shines.&lt;/p&gt;

&lt;p&gt;Let’s break something 😈&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl delete pod &amp;lt;pod-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now check:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 You’ll see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  A new pod automatically created&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%2F9qzapaw42qkdif28k127.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%2F9qzapaw42qkdif28k127.png" alt=" " width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🧠 What just happened?
&lt;/h3&gt;

&lt;p&gt;Kubernetes ensures:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Actual state = Desired state”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Even if you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Delete a pod&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Crash a container&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Kubernetes will bring it back&lt;/p&gt;




&lt;h2&gt;
  
  
  🔍 What’s Happening Under the Hood?
&lt;/h2&gt;

&lt;p&gt;Now that everything is up and running, let’s take a step back and understand &lt;strong&gt;how things are actually working behind the scenes&lt;/strong&gt; 👇&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Accessing the Application
&lt;/h3&gt;

&lt;p&gt;When you run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;minikube service nginx-service
&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%2Fho6psep81sfzatt6z1qn.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%2Fho6psep81sfzatt6z1qn.png" alt=" " width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👉 Minikube exposes your service and gives you a &lt;strong&gt;URL with a port&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Request Hits Nginx Service
&lt;/h3&gt;

&lt;p&gt;Once you hit that URL:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;Nginx Service&lt;/strong&gt; receives the request&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It looks at its selector:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And forwards the request to all matching &lt;strong&gt;Nginx Pods&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Inside the Nginx Pod
&lt;/h3&gt;

&lt;p&gt;Inside the pod:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Nginx uses the &lt;strong&gt;custom config (via ConfigMap)&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The request is proxied to:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node-service:5000
&lt;/code&gt;&lt;/pre&gt;

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

&lt;h3&gt;
  
  
  4. Node Service Load Balancing
&lt;/h3&gt;

&lt;p&gt;Now the interesting part 👀&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;node-service&lt;/code&gt; is a &lt;strong&gt;ClusterIP Service&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It has multiple pods (replicas = 3)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Kubernetes automatically distributes traffic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node-service
   ↓
 ┌──────────┬──────────┬──────────┐
 │ node-pod1│ node-pod2│ node-pod3│
 └──────────┴──────────┴──────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Node App Talks to Redis
&lt;/h3&gt;

&lt;p&gt;Inside your Node app:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;It connects to:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;redis-service
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Stores:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Request count&lt;/li&gt;
&lt;li&gt;  Cache data&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. Response Flow
&lt;/h3&gt;

&lt;p&gt;Finally, the response travels back:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Redis → Node → Nginx → Browser
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🎉 And you see the updated request count&lt;/p&gt;

&lt;h3&gt;
  
  
  🧠 Key Insight
&lt;/h3&gt;

&lt;p&gt;Notice something important here…&lt;/p&gt;

&lt;p&gt;👉 We never used a single IP address.&lt;/p&gt;

&lt;p&gt;Everything works using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Service names&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Internal DNS&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Labels &amp;amp; selectors&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is called &lt;strong&gt;Service Discovery&lt;/strong&gt; — one of the most powerful features of Kubernetes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scaling Made Easy
&lt;/h3&gt;

&lt;p&gt;Want more traffic handling capacity?&lt;/p&gt;

&lt;p&gt;Just update:&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;replicas&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Increase or decrease as needed&lt;/p&gt;

&lt;p&gt;👉 No changes required anywhere else&lt;/p&gt;

&lt;p&gt;Kubernetes handles the rest&lt;/p&gt;

&lt;h3&gt;
  
  
  Cleanup
&lt;/h3&gt;

&lt;p&gt;Once you’re done experimenting, you can delete the cluster:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;minikube delete
&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%2Fec5ugnbwvij1eyyg8kwk.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%2Fec5ugnbwvij1eyyg8kwk.png" alt=" " width="800" height="125"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Conclusion
&lt;/h2&gt;

&lt;p&gt;And that’s a wrap for this one! 🚀&lt;/p&gt;

&lt;p&gt;In this blog, we didn’t just deploy an application on Kubernetes — we actually &lt;strong&gt;understood what’s happening behind the scenes&lt;/strong&gt;. From Deployments and Services to ConfigMaps and internal service discovery, you now have a solid foundation to start building real-world K8s projects.&lt;/p&gt;

&lt;p&gt;More importantly, you saw how:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Kubernetes replaces static setups like Docker Compose with &lt;strong&gt;dynamic, scalable systems&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Services enable seamless communication without worrying about IPs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And how the system &lt;strong&gt;self-heals&lt;/strong&gt; to match the desired state&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is just the beginning of the &lt;strong&gt;K8s with Pravesh&lt;/strong&gt; series. In the upcoming blogs, we’ll go deeper into more advanced concepts and build even more powerful systems 💥&lt;/p&gt;

&lt;h3&gt;
  
  
  🔗 Let’s Connect
&lt;/h3&gt;

&lt;p&gt;If you found this helpful, feel free to connect with me and follow along for more DevOps and Kubernetes content:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;💼 LinkedIn: &lt;a href="https://www.linkedin.com/in/pravesh-sudha" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/pravesh-sudha&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;📝 Blog: &lt;a href="https://blog.praveshsudha.com" rel="noopener noreferrer"&gt;https://blog.praveshsudha.com&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;💻 GitHub: &lt;a href="https://github.com/Pravesh-Sudha" rel="noopener noreferrer"&gt;https://github.com/Pravesh-Sudha&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have any questions, got stuck somewhere, or just want to discuss ideas — my DMs are always open 🙌&lt;/p&gt;

&lt;p&gt;Until next time… Keep building, keep learning, and keep shipping 🚀&lt;/p&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>docker</category>
      <category>beginners</category>
    </item>
    <item>
      <title>🔥 𝗜 𝗮𝗺 𝗻𝗼𝘄 𝗮𝗻 𝗜𝗕𝗠 𝗖𝗵𝗮𝗺𝗽𝗶𝗼𝗻 / 𝗛𝗮𝘀𝗵𝗶𝗰𝗼𝗿𝗽 𝗔𝗺𝗯𝗮𝘀𝘀𝗮𝗱𝗼𝗿 𝗕𝗔𝗕𝗬!!! 🔥

Excited to announce that I am officially recognised as an IBM Champion earlier known as Hashicorp Ambassador this year.</title>
      <dc:creator>Pravesh Sudha</dc:creator>
      <pubDate>Thu, 26 Feb 2026 04:58:00 +0000</pubDate>
      <link>https://dev.to/pravesh_sudha_3c2b0c2b5e0/-excited-to-announce-that-i-am-2a7l</link>
      <guid>https://dev.to/pravesh_sudha_3c2b0c2b5e0/-excited-to-announce-that-i-am-2a7l</guid>
      <description></description>
    </item>
    <item>
      <title>🚀 Building an AI-Powered CI/CD Copilot with Jenkins and AWS Lambda</title>
      <dc:creator>Pravesh Sudha</dc:creator>
      <pubDate>Tue, 24 Feb 2026 18:15:10 +0000</pubDate>
      <link>https://dev.to/aws-builders/building-an-ai-powered-cicd-copilot-with-jenkins-and-aws-lambda-4k8l</link>
      <guid>https://dev.to/aws-builders/building-an-ai-powered-cicd-copilot-with-jenkins-and-aws-lambda-4k8l</guid>
      <description>&lt;h2&gt;
  
  
  💡 Introduction
&lt;/h2&gt;

&lt;p&gt;Hey folks, welcome to the world of Agentic Tools and DevOps.&lt;/p&gt;

&lt;p&gt;Today, we’re diving into CI/CD pipelines and exploring how we can debug them efficiently and almost instantly using AI. In this project, we’ll build an AI-powered CI/CD Copilot where &lt;strong&gt;AWS Lambda&lt;/strong&gt; serves as the core logic layer. This Lambda function will interact with the Google Gemini API to analyze pipeline failures and help us debug them intelligently.&lt;/p&gt;

&lt;p&gt;The goal of this project is not just to integrate AI into a CI/CD workflow, but to help you understand how to build your own AI agent from scratch — one that can assist in real-world DevOps scenarios.&lt;/p&gt;

&lt;p&gt;So, without further ado, let’s get started.&lt;/p&gt;




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

&lt;p&gt;Before we begin, make sure you have the following requirements in place:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Docker &amp;amp; Docker Hub account&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
We will run parts of this project inside Docker containers. Later, we’ll push our custom image to Docker Hub, so make sure you have both Docker installed and a Docker Hub account ready.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Jenkins (Our CI/CD Tool)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
We’ll use Jenkins for demonstration purposes. You can either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Run Jenkins as a Docker container, or&lt;/li&gt;
&lt;li&gt;  Install it directly from the official website.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Terraform&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
We will provision our infrastructure — including the Gemini API key (stored securely) and the AWS Lambda function — using Terraform.&lt;/p&gt;

&lt;p&gt;Make sure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Terraform CLI is installed&lt;/li&gt;
&lt;li&gt;  Your AWS credentials are configured&lt;/li&gt;
&lt;li&gt;  The IAM user has permissions for &lt;strong&gt;AWS Lambda&lt;/strong&gt; and &lt;strong&gt;AWS Secrets Manager&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’re new to Terraform setup, you can follow this guide:&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://blog.praveshsudha.com/getting-started-with-terraform-a-beginners-guide#heading-step-1-install-the-aws-cli" rel="noopener noreferrer"&gt;https://blog.praveshsudha.com/getting-started-with-terraform-a-beginners-guide#heading-step-1-install-the-aws-cli&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  🎥 Youtube Demonstration
&lt;/h3&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/b7_k_auDUEo"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 How It Works
&lt;/h2&gt;

&lt;p&gt;The complete source code for this project is available in this GitHub repository:&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://github.com/Pravesh-Sudha/ai-devops-agent" rel="noopener noreferrer"&gt;https://github.com/Pravesh-Sudha/ai-devops-agent&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Navigate to the &lt;code&gt;cicd-copilot&lt;/code&gt; directory to follow along.&lt;/p&gt;

&lt;p&gt;If you’ve been following my work, you might recognize this project. I originally used this same &lt;strong&gt;Node.js Book Reader application&lt;/strong&gt; to demonstrate how Docker works with Node.js. For this AI-powered CI/CD Copilot, I’ve made specific modifications — particularly in the &lt;strong&gt;Jenkinsfile&lt;/strong&gt; and the &lt;code&gt;terra-config&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;Inside the &lt;code&gt;terra-config&lt;/code&gt; directory, you’ll find:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;main.tf&lt;/strong&gt; – Provisions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  AWS Lambda function&lt;/li&gt;
&lt;li&gt;  AWS Secrets Manager secret (to securely store the Gemini API key)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;lambda.zip&lt;/strong&gt; – The packaged Lambda deployment artifact (zipped &lt;code&gt;lambda_function.py&lt;/code&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;lambda_function.py&lt;/strong&gt; – The core of this project.&lt;br&gt;&lt;br&gt;
This file contains the AI agent logic and the structured prompt sent to the Gemini API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;iam.tf&lt;/strong&gt; – Defines the IAM roles and permissions required for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  AWS Lambda&lt;/li&gt;
&lt;li&gt;  AWS Secrets Manager&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Architecture Overview
&lt;/h3&gt;

&lt;p&gt;The core idea behind this project is simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Jenkins detects a pipeline failure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It collects contextual information (stage name, build ID, logs).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It sends that data to AWS Lambda.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lambda calls the Gemini API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gemini analyzes the logs and returns structured debugging insights.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  Payload Sent to Lambda
&lt;/h3&gt;

&lt;p&gt;The Lambda function expects a JSON payload in the following format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="n"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;        &lt;span class="c1"&gt;# Name of the stage where the pipeline failed
&lt;/span&gt;   &lt;span class="n"&gt;job&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;job&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;            &lt;span class="c1"&gt;# Job name (e.g., cicd-copilot)
&lt;/span&gt;   &lt;span class="n"&gt;build_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;build_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# Build ID number (e.g., 1, 2, 3)
&lt;/span&gt;   &lt;span class="n"&gt;logs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;logs&lt;/span&gt;           &lt;span class="c1"&gt;# Last 200 lines of failure logs
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This structured input allows the AI agent to understand the pipeline context before analyzing the logs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prompt Sent to Gemini API
&lt;/h3&gt;

&lt;p&gt;Inside the Lambda function, we make a POST request to the Gemini API with the following structured prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;are&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;senior&lt;/span&gt; &lt;span class="n"&gt;CI&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;CD&lt;/span&gt; &lt;span class="n"&gt;Copilot&lt;/span&gt; &lt;span class="n"&gt;specialized&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;Jenkins&lt;/span&gt; &lt;span class="n"&gt;pipelines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="n"&gt;Pipeline&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;Stage&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;Expected&lt;/span&gt; &lt;span class="n"&gt;outcome&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Build&lt;/span&gt; &lt;span class="n"&gt;an&lt;/span&gt; &lt;span class="n"&gt;artifact&lt;/span&gt; &lt;span class="n"&gt;usable&lt;/span&gt; &lt;span class="n"&gt;by&lt;/span&gt; &lt;span class="n"&gt;later&lt;/span&gt; &lt;span class="n"&gt;stages&lt;/span&gt;

&lt;span class="n"&gt;Your&lt;/span&gt; &lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="mf"&gt;1.&lt;/span&gt; &lt;span class="n"&gt;Identify&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;failure&lt;/span&gt; &lt;span class="nf"&gt;category &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;build&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;runtime&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;infra&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;dependency&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;auth&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;unknown&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="mf"&gt;2.&lt;/span&gt; &lt;span class="n"&gt;Identify&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;most&lt;/span&gt; &lt;span class="n"&gt;likely&lt;/span&gt; &lt;span class="n"&gt;root&lt;/span&gt; &lt;span class="n"&gt;cause&lt;/span&gt;
&lt;span class="mf"&gt;3.&lt;/span&gt; &lt;span class="n"&gt;Provide&lt;/span&gt; &lt;span class="n"&gt;actionable&lt;/span&gt; &lt;span class="n"&gt;fixes&lt;/span&gt;
&lt;span class="mf"&gt;4.&lt;/span&gt; &lt;span class="n"&gt;Suggest&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;patch&lt;/span&gt; &lt;span class="n"&gt;ONLY&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;clearly&lt;/span&gt; &lt;span class="n"&gt;inferable&lt;/span&gt;

&lt;span class="n"&gt;Respond&lt;/span&gt; &lt;span class="n"&gt;ONLY&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;valid&lt;/span&gt; &lt;span class="n"&gt;JSON&lt;/span&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;this&lt;/span&gt; &lt;span class="n"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="p"&gt;{{&lt;/span&gt;
  &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;failure_category&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;root_cause&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;actionable_fixes&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
  &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;suggested_patch&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;file&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;line&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fix&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;
  &lt;span class="p"&gt;}}&lt;/span&gt;
&lt;span class="p"&gt;}}&lt;/span&gt;

&lt;span class="n"&gt;Logs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;logs&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The prompt dynamically injects two key variables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;{stage}&lt;/code&gt; – The pipeline stage name&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;{logs}&lt;/code&gt; – The failure logs&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’d like to explore the full Lambda implementation, you can view it here:&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://github.com/Pravesh-Sudha/ai-devops-agent/blob/main/cicd-copilot/terra-config/lambda_function.py" rel="noopener noreferrer"&gt;https://github.com/Pravesh-Sudha/ai-devops-agent/blob/main/cicd-copilot/terra-config/lambda_function.py&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  How It Integrates with Jenkins
&lt;/h3&gt;

&lt;p&gt;You might be wondering — how exactly does this connect with Jenkins?&lt;/p&gt;

&lt;p&gt;Inside the &lt;code&gt;Jenkinsfile&lt;/code&gt;, each stage:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Sets an environment variable for the stage name.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Redirects command output (in case of failure) into a &lt;code&gt;LOG_FILE&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If any stage fails:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The &lt;code&gt;post { failure { ... } }&lt;/code&gt; block is triggered.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Jenkins constructs the JSON payload.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It invokes the AWS Lambda function.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The AI-generated failure analysis is printed directly into the Jenkins console output.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This gives you instant, structured debugging assistance right inside your CI/CD pipeline.&lt;/p&gt;
&lt;h3&gt;
  
  
  How to Integrate This in Your Own Workspace
&lt;/h3&gt;

&lt;p&gt;To replicate this approach in your own pipeline:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Append log redirection to each command:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;LOG_FILE&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt; 2&amp;gt;&amp;amp;1
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Define an environment variable for the stage name.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Provision:&lt;/p&gt;&lt;/li&gt;

&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*   AWS Lambda

*   IAM roles

*   Secrets Manager (for the Gemini API key)  
    using Terraform.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt; Add a &lt;code&gt;post failure&lt;/code&gt; block in your Jenkinsfile to invoke the Lambda function with the structured JSON payload.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once configured, your CI/CD pipeline becomes AI-assisted — capable of analyzing its own failures and suggesting actionable fixes.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 Practical Demonstration
&lt;/h2&gt;

&lt;p&gt;Enough with the theory — let’s see this in action.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Fork and Clone the Repository
&lt;/h3&gt;

&lt;p&gt;First, head over to the GitHub repository and &lt;strong&gt;fork it under your own username&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
You’ll be intentionally modifying the code later to trigger pipeline failures, so forking is important.&lt;/p&gt;

&lt;p&gt;After forking:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/your-username/ai-devops-agent.git
&lt;span class="nb"&gt;cd &lt;/span&gt;ai-devops-agent/cicd-copilot/terra-config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Initialize Terraform
&lt;/h3&gt;

&lt;p&gt;Inside the &lt;code&gt;terra-config&lt;/code&gt; directory, initialize Terraform:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Generate Your Gemini API Key
&lt;/h3&gt;

&lt;p&gt;To provision the infrastructure, you’ll need a &lt;strong&gt;GEMINI_API_KEY&lt;/strong&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Go to &lt;strong&gt;Google AI Studio&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Log in with your Google account&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate to the &lt;strong&gt;API&lt;/strong&gt; section&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click &lt;strong&gt;Create API Key&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Give it a name and generate the key&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Store it securely&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, apply the Terraform configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform apply &lt;span class="nt"&gt;-var&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"gemini_api_key=&amp;lt;Paste-your-key-here&amp;gt;"&lt;/span&gt; &lt;span class="nt"&gt;--auto-approve&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%2Ftbi7vwz8dy1h7g26lolh.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%2Ftbi7vwz8dy1h7g26lolh.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ Make sure the configured AWS IAM user has the required permissions (Lambda and Secrets Manager access), as mentioned in the prerequisites section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once completed, your infrastructure (Lambda function + IAM roles + Secret) will be up and running.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Configure Jenkins Pipeline
&lt;/h3&gt;

&lt;p&gt;Open your Jenkins dashboard (usually running on &lt;code&gt;http://localhost:8080&lt;/code&gt;).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Click &lt;strong&gt;Create New Item&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select &lt;strong&gt;Pipeline&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Name it: &lt;code&gt;cicd-copilot&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose &lt;strong&gt;Pipeline script from SCM&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;SCM:&lt;/strong&gt; Git&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Repository URL:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;https://github.com/your-username/ai-devops-agent&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Branch Specifier:&lt;/strong&gt; &lt;code&gt;main&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Script Path:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;cicd-copilot/Jenkinsfile&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Click &lt;strong&gt;Save&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%2Fkp6mo53plbgxpl6jal9x.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%2Fkp6mo53plbgxpl6jal9x.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Install Required Jenkins Plugins
&lt;/h3&gt;

&lt;p&gt;Navigate to:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Manage Jenkins → Plugins&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Install the following plugins:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Docker&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker Pipeline&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker Commons&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 6: Add Docker to Jenkins PATH
&lt;/h3&gt;

&lt;p&gt;Ensure Docker is accessible inside Jenkins.&lt;/p&gt;

&lt;p&gt;In your terminal, run:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Copy the output path.&lt;/p&gt;

&lt;p&gt;Now go to:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Manage Jenkins → System → Global Properties&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Append the copied path to the existing PATH variable using &lt;code&gt;:&lt;/code&gt; as a separator. Save the configuration.&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%2F33ilfvp62i8gxowi1p35.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%2F33ilfvp62i8gxowi1p35.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 7: Add Docker Hub Credentials
&lt;/h3&gt;

&lt;p&gt;Navigate to:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Manage Jenkins → Credentials&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Add a new credential:&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*   Kind: **Username with password**

*   Username: Your Docker Hub username

*   Password: Your Docker Hub password

*   ID: `docker-cred`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Save it.&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%2Fdi2nn48p3s3yavskgyit.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%2Fdi2nn48p3s3yavskgyit.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 8: Trigger the Pipeline
&lt;/h3&gt;

&lt;p&gt;Now go back to your &lt;code&gt;cicd-copilot&lt;/code&gt; project and click &lt;strong&gt;Build Now&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Open &lt;strong&gt;Console Output&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You will notice that the pipeline fails — this is intentional.&lt;/p&gt;

&lt;p&gt;The logs are automatically captured and sent to the AI Agent, which returns structured debugging analysis inside the Jenkins console.&lt;/p&gt;

&lt;p&gt;In the first failure, the AI identifies a typo in the &lt;code&gt;Dockerfile&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apine
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It should be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alpine
&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%2F7x8kfvio401a3e7js9f9.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%2F7x8kfvio401a3e7js9f9.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fix the typo in your forked repository and commit the changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 9: Second Failure (Version Mismatch)
&lt;/h3&gt;

&lt;p&gt;Rebuild the pipeline.&lt;/p&gt;

&lt;p&gt;This time, the pipeline fails again — but for a different reason. There is a Docker image version mismatch.&lt;/p&gt;

&lt;p&gt;The AI analysis might suggest that the image is private or unavailable. However, the real issue is in the &lt;code&gt;Jenkinsfile&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%2Febqz4we61kdwcryd23im.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%2Febqz4we61kdwcryd23im.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Inside the &lt;strong&gt;Run Container&lt;/strong&gt; stage, change the image version from:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v1
&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%2Fvk58wuca063hl439ayyc.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%2Fvk58wuca063hl439ayyc.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Commit the change and rebuild the pipeline.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 10: Successful Pipeline Run
&lt;/h3&gt;

&lt;p&gt;Now, when you trigger the pipeline again:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The build succeeds&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Docker image is pushed to your Docker Hub account&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The container starts successfully&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Visit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:3000
&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%2F2pv69etz5eff4fq4n07m.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%2F2pv69etz5eff4fq4n07m.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should see the Book Reader application running.&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%2Fj02s0pswmjum51a49154.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%2Fj02s0pswmjum51a49154.png" alt=" "&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%2F5fj73w6v0folxas2x8vs.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%2F5fj73w6v0folxas2x8vs.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Stop the Application
&lt;/h3&gt;

&lt;p&gt;To stop the running container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker &lt;span class="nb"&gt;kill &lt;/span&gt;cicd-copilot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Clean Up Infrastructure
&lt;/h3&gt;

&lt;p&gt;To avoid unnecessary AWS charges, destroy the infrastructure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform destroy &lt;span class="nt"&gt;-var&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"gemini_api_key=&amp;lt;Paste-your-key-here&amp;gt;"&lt;/span&gt; &lt;span class="nt"&gt;--auto-approve&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What We Achieved
&lt;/h3&gt;

&lt;p&gt;In this project, we built an AI-powered CI/CD Copilot using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Jenkins for pipeline orchestration&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS Lambda for AI agent logic&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS Secrets Manager for secure API storage&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Google Gemini API for log analysis&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The agent receives contextual pipeline information and failure logs, analyzes them intelligently, and provides structured debugging insights directly inside the CI/CD workflow.&lt;/p&gt;

&lt;p&gt;Instead of manually scanning logs, you now have an AI assistant that understands context, categorizes failures, identifies root causes, and suggests actionable fixes — making debugging faster, smarter, and more efficient.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 Conclusion
&lt;/h2&gt;

&lt;p&gt;Modern CI/CD pipelines are powerful — but when they fail, debugging can quickly become time-consuming and frustrating. In this project, we went a step further by integrating AI directly into the pipeline workflow.&lt;/p&gt;

&lt;p&gt;By combining:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Jenkins&lt;/strong&gt; for orchestration&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AWS Lambda&lt;/strong&gt; for serverless execution&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AWS Secrets Manager&lt;/strong&gt; for secure API handling&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Google Gemini API&lt;/strong&gt; for intelligent log analysis&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;we built an AI-powered CI/CD Copilot capable of understanding pipeline context, analyzing failure logs, identifying root causes, and suggesting actionable fixes — all automatically.&lt;/p&gt;

&lt;p&gt;This isn’t just about log analysis. It’s about shifting from reactive debugging to intelligent, context-aware automation.&lt;/p&gt;

&lt;p&gt;As AI continues to evolve, integrating agentic systems into DevOps workflows will become increasingly common. Building projects like this not only strengthens your cloud and automation skills but also prepares you for the next wave of AI-driven infrastructure.&lt;/p&gt;

&lt;p&gt;If you found this project helpful, feel free to connect with me and follow my work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;🌐 &lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="https://praveshsudha.com" rel="noopener noreferrer"&gt;https://praveshsudha.com&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;📝 &lt;strong&gt;Blog:&lt;/strong&gt; &lt;a href="https://blog.praveshsudha.com" rel="noopener noreferrer"&gt;https://blog.praveshsudha.com&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;💼 &lt;strong&gt;LinkedIn:&lt;/strong&gt; &lt;a href="https://www.linkedin.com/in/pravesh-sudha" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/pravesh-sudha&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🐙 &lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/Pravesh-Sudha" rel="noopener noreferrer"&gt;https://github.com/Pravesh-Sudha&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🐦 &lt;strong&gt;Twitter/X:&lt;/strong&gt; &lt;a href="https://x.com/praveshstwt" rel="noopener noreferrer"&gt;https://x.com/praveshstwt&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🎥 Youtube&lt;/strong&gt;: &lt;a href="https://youtube.com/@pravesh-sudha" rel="noopener noreferrer"&gt;https://youtube.com/@pravesh-sudha&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I regularly share content on DevOps, AWS, Terraform, CI/CD, and building real-world cloud projects from scratch.&lt;/p&gt;

&lt;p&gt;If you build your own version of this AI CI/CD Copilot, tag me — I’d love to see what you create.&lt;/p&gt;

&lt;p&gt;Happy Building 🚀&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>jenkins</category>
      <category>cicd</category>
    </item>
    <item>
      <title>🚀 I Built SkillDebt.ai to Understand My Own Skill Gaps</title>
      <dc:creator>Pravesh Sudha</dc:creator>
      <pubDate>Thu, 05 Feb 2026 19:10:46 +0000</pubDate>
      <link>https://dev.to/pravesh_sudha_3c2b0c2b5e0/i-built-skilldebtai-to-understand-my-own-skill-gaps-3729</link>
      <guid>https://dev.to/pravesh_sudha_3c2b0c2b5e0/i-built-skilldebtai-to-understand-my-own-skill-gaps-3729</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;A hands-on look at skill decay, generative UI, and turning career anxiety into actionable insights&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  🌟 Introduction
&lt;/h2&gt;

&lt;p&gt;Hola amigos 👋&lt;br&gt;&lt;br&gt;
Welcome to the world of &lt;strong&gt;AI and DevOps&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this blog, I want to share my experience building &lt;a href="http://my-repo-8k7lhiaxb-pravesh-sudhas-projects.vercel.app/" rel="noopener noreferrer"&gt;&lt;strong&gt;SkillDebt.ai&lt;/strong&gt;&lt;/a&gt; as part of the &lt;strong&gt;UI Strikes Back Challenge&lt;/strong&gt;, hosted by the &lt;strong&gt;WEMakeDevs community&lt;/strong&gt; in collaboration with &lt;strong&gt;Tambo AI&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The idea behind &lt;strong&gt;SkillDebt.ai&lt;/strong&gt; is simple:&lt;br&gt;&lt;br&gt;
as developers, we often talk about &lt;em&gt;technical debt&lt;/em&gt; in our code — but we rarely think about the &lt;strong&gt;technical debt in our careers&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SkillDebt.ai&lt;/strong&gt; takes your &lt;strong&gt;resume or tech stack&lt;/strong&gt;, analyzes it using &lt;a href="https://tambo.co/" rel="noopener noreferrer"&gt;&lt;strong&gt;Tambo&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;AI and Gemini&lt;/strong&gt;, and turns that data into &lt;strong&gt;beautiful, interactive visual insights&lt;/strong&gt; about your skills. Instead of long paragraphs or generic advice, you get a clear picture of where you stand in your field.&lt;/p&gt;

&lt;p&gt;Beyond skill visualization, it also highlights:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Skill decay&lt;/strong&gt; — tools and technologies you haven’t touched in a while&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Risk audits&lt;/strong&gt; — warning signs when core skills are becoming outdated&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Upgrade suggestions&lt;/strong&gt; — practical recommendations on what skills to add next to boost your career growth&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This project isn’t just about AI or UI — it’s about giving developers clarity, direction, and a better way to plan their learning journey.&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/ItTKixXJF2I"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 Practical Demo
&lt;/h2&gt;

&lt;p&gt;Let’s see &lt;strong&gt;SkillDebt.ai&lt;/strong&gt; in action.&lt;/p&gt;

&lt;p&gt;There’s no heavy setup or complex prerequisites. All you need is your &lt;strong&gt;resume in PDF format&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Head over to the live demo here:&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://my-repo-8k7lhiaxb-pravesh-sudhas-projects.vercel.app/" rel="noopener noreferrer"&gt;https://my-repo-8k7lhiaxb-pravesh-sudhas-projects.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;𝗧𝗵𝗲 𝗣𝗿𝗼𝗷𝗲𝗰𝘁 𝗵𝗮𝘀 𝗯𝗲𝗲𝗻 𝘁𝗮𝗸𝗲𝗻 𝗱𝗼𝘄𝗻 𝗯𝘆 𝟮𝟱 𝗙𝗲𝗯 𝟮𝟬𝟮𝟲, 𝘆𝗼𝘂 𝗰𝗮𝗻 𝗳𝗼𝗹𝗹𝗼𝘄 𝘁𝗵𝗲 𝗚𝗶𝘁𝗛𝘂𝗯 𝗚𝘂𝗶𝗱𝗲 𝘁𝗼 𝗶𝗹𝗹𝘂𝘀𝘁𝗿𝗮𝘁𝗲 𝗶𝗻 𝘆𝗼𝘂𝗿 𝗼𝘄𝗻 𝗹𝗼𝗰𝗮𝗹 𝘀𝘆𝘀𝘁𝗲𝗺&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once you’re on the site, click on &lt;strong&gt;“Upload Resume”&lt;/strong&gt;, select your PDF, and hit &lt;strong&gt;Analyze&lt;/strong&gt;. That’s it.&lt;/p&gt;

&lt;p&gt;From there, SkillDebt.ai walks you through a complete breakdown of your profile:&lt;/p&gt;

&lt;p&gt;First, you’ll see a &lt;strong&gt;visual skill analysis chart&lt;/strong&gt; that gives a quick overview of your strengths and gaps across different areas in your field.&lt;/p&gt;

&lt;p&gt;Next comes the &lt;strong&gt;Skill Decay graph&lt;/strong&gt;, which highlights technologies you haven’t actively used in a while and flags them based on risk. This part is especially useful because it surfaces skills you might be unknowingly neglecting.&lt;/p&gt;

&lt;p&gt;After that, the &lt;strong&gt;Risk Audit&lt;/strong&gt; section kicks in. It acts like a warning system, pointing out areas in your resume that could become problematic if left unaddressed.&lt;/p&gt;

&lt;p&gt;Finally, you get &lt;strong&gt;career-focused upgrade suggestions&lt;/strong&gt; — specific skills you should consider adding or improving to stay relevant and boost long-term growth.&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%2Felr7q8j2b50kr2k455k0.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%2Felr7q8j2b50kr2k455k0.png" alt=" "&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%2F64bdpzccoh5tf3scuvtc.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%2F64bdpzccoh5tf3scuvtc.png" alt=" "&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%2Fg1po77ym0gtoaglze6gv.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%2Fg1po77ym0gtoaglze6gv.png" alt=" "&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%2Fp3ac2carreo54iesgors.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%2Fp3ac2carreo54iesgors.png" alt=" "&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%2Fwbgmwfvfxhtcx6ghzw3q.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%2Fwbgmwfvfxhtcx6ghzw3q.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’re curious about how everything works under the hood, the complete source code is open-source and available here: &lt;/p&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Pravesh-Sudha" rel="noopener noreferrer"&gt;
        Pravesh-Sudha
      &lt;/a&gt; / &lt;a href="https://github.com/Pravesh-Sudha/ui-strikes-back" rel="noopener noreferrer"&gt;
        ui-strikes-back
      &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;🚀 SkillDebt.ai (UI Strikes Back)&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Analyze your technical skill debt, visualize decay, and find your optimal upgrade path. Built for developers who want to stay ahead of the curve.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/Pravesh-Sudha/UI-Strikes-Back.git" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/388c06c124ed80860cf040777bd56d8bd6abf5fa500734889602462164983b80/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5265706f7369746f72792d4769744875622d626c75653f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562" alt="Repo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;✨ Features&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;📊 Skill Visualization&lt;/strong&gt;: Map out your current technical stack and see the balance across different domains.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📉 Decay Timeline&lt;/strong&gt;: Understand how your skills might be losing relevance over time and plan ahead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⚠️ Risk Audit&lt;/strong&gt;: Identify critical gaps or "debt" in your career path based on industry trends.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🚀 Upgrade Path&lt;/strong&gt;: Get personalized, high-impact suggestions for your next skill upgrade.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📂 Resume Parsing&lt;/strong&gt;: Upload your resume (PDF/Text) to start the analysis instantly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🤖 Generative UI&lt;/strong&gt;: Experience a dynamic AI-driven interface powered by the Tambo SDK.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🛠️ Tech Stack&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Framework&lt;/strong&gt;: &lt;a href="https://reactjs.org/" rel="nofollow noopener noreferrer"&gt;React&lt;/a&gt; + &lt;a href="https://vitejs.dev/" rel="nofollow noopener noreferrer"&gt;Vite&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Language&lt;/strong&gt;: &lt;a href="https://www.typescriptlang.org/" rel="nofollow noopener noreferrer"&gt;TypeScript&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Styling&lt;/strong&gt;: &lt;a href="https://tailwindcss.com/" rel="nofollow noopener noreferrer"&gt;Tailwind CSS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Icons&lt;/strong&gt;: &lt;a href="https://lucide.dev/" rel="nofollow noopener noreferrer"&gt;Lucide React&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Integration&lt;/strong&gt;: &lt;a href="https://tambo.ai" rel="nofollow noopener noreferrer"&gt;Tambo SDK&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Markdown&lt;/strong&gt;: &lt;code&gt;react-markdown&lt;/code&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/Pravesh-Sudha/ui-strikes-back" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;







&lt;h2&gt;
  
  
  🌟 How I Built It
&lt;/h2&gt;

&lt;p&gt;Going into the hackathon, I had one clear goal:&lt;br&gt;&lt;br&gt;
I didn’t want to build something flashy but forgettable. I wanted to build something &lt;strong&gt;novel and actually useful&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The AI agent space is already crowded. Everywhere you look, there’s another code debugger, another productivity hack, another “AI assistant” doing roughly the same thing. At the same time, with the rapid rise of AI — especially tools like &lt;strong&gt;Claude Code and autonomous agents&lt;/strong&gt; — AI engineering has gone through the roof.&lt;/p&gt;

&lt;p&gt;That’s when I paused and thought:&lt;br&gt;&lt;br&gt;
instead of building yet another tool to &lt;em&gt;replace&lt;/em&gt; engineers, why not build something that helps engineers &lt;strong&gt;upskill&lt;/strong&gt; and stay ahead of the curve?&lt;/p&gt;

&lt;p&gt;That idea became &lt;a href="https://my-repo-8k7lhiaxb-pravesh-sudhas-projects.vercel.app/" rel="noopener noreferrer"&gt;&lt;strong&gt;SkillDebt.ai&lt;/strong&gt;&lt;/a&gt; — a system focused on helping developers understand where they stand today, what they’re falling behind on, and how they can adapt to this AI-driven future instead of getting left behind.&lt;/p&gt;

&lt;p&gt;From an implementation perspective, the most challenging part for me was configuring the &lt;strong&gt;Tambo Generative UI components&lt;/strong&gt;. Getting the components to behave correctly, respond to the data, and render meaningful insights wasn’t straightforward at first. I ran into plenty of invalid input errors along the way.&lt;/p&gt;

&lt;p&gt;But once I understood how the pieces fit together, things started clicking. The &lt;strong&gt;documentation played a huge role&lt;/strong&gt; here — it turned what initially felt overwhelming into a structured learning process. After a lot of trial and error (mostly invalid configuration for components), I finally got all &lt;strong&gt;four core components&lt;/strong&gt; working together smoothly.&lt;/p&gt;

&lt;p&gt;It wasn’t easy at the start, but that struggle is exactly what made the project so rewarding.&lt;/p&gt;

&lt;p&gt;The main heart of the Project is the &lt;code&gt;tambo.config.ts&lt;/code&gt; file inside the &lt;code&gt;src/tambo&lt;/code&gt; directory, it handles the prompt for the generative UI components. Have a look at it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SkillRadarChart&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../components/adaptive/SkillRadarChart&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SkillDecayTimeline&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../components/adaptive/SkillDecayTimeline&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;RiskWarningCard&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../components/adaptive/RiskWarningCard&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;UpgradeSuggestionCard&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../components/adaptive/UpgradeSuggestionCard&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ExplanationToggle&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../components/adaptive/ExplanationToggle&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tamboConfig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;skill_radar_chart&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Visualizes the balance between depth and breadth of skills, or compares multiple skill categories.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SkillRadarChart&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;propsSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
                &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Title of the chart, e.g., 'Frontend Skill Balance'&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Skill Analysis&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
                    &lt;span class="na"&gt;skill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Name of the skill, e.g., 'React'&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Unknown Skill&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                    &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;number&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;min&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="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Skill level from 0 to 100&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                    &lt;span class="na"&gt;fullMark&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;number&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;optional&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
                &lt;span class="p"&gt;})).&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Array of 3-6 skills to visualize.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;([]),&lt;/span&gt;
            &lt;span class="p"&gt;}),&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;skill_decay_timeline&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Shows a timeline of skills and their freshness/decay status based on last usage.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SkillDecayTimeline&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;propsSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
                &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
                    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Name of the skill, e.g. 'jQuery'&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Unknown Skill&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                    &lt;span class="na"&gt;lastUsed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Year or timeframe like '2023', 'Current'&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Unknown&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                    &lt;span class="na"&gt;decayLevel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Decay level: 'low', 'medium', 'high', 'critical'&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;medium&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                &lt;span class="p"&gt;})).&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;List of data points regarding skill usage and decay for the timeline.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;([]),&lt;/span&gt;
            &lt;span class="p"&gt;}),&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;risk_warning_card&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Displays a warning about a specific career risk or skill obsolescence.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;RiskWarningCard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;propsSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
                &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Short warning title, e.g. 'Legacy Stack Risk'&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Risk Warning&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Detailed explanation of the risk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Potential risk detected.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                &lt;span class="na"&gt;riskLevel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Risk level: 'moderate', 'high', 'critical'&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;moderate&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="p"&gt;}),&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;upgrade_suggestion_card&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Suggests a specific skill upgrade or learning path with potential impact.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;UpgradeSuggestionCard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;propsSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
                &lt;span class="na"&gt;skill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;The recommended skill to learn&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;New Skill&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                &lt;span class="na"&gt;recommendation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Why this skill is recommended&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Recommended for career growth.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                &lt;span class="na"&gt;impact&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Impact: 'career_pivot', 'salary_bump', 'stability'&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;stability&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="p"&gt;}),&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;explanation_toggle&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Can be used to provide deeper context or reasoning for a specific insight, hidden by default behind a toggle.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ExplanationToggle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;propsSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
                &lt;span class="na"&gt;reasoning&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;The detailed reasoning or explanation to be hidden.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;No additional details provided.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                &lt;span class="na"&gt;context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Optional context or source data reference.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;optional&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
            &lt;span class="p"&gt;}),&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It wasn’t easy at the start, but that struggle is exactly what made the project so rewarding.&lt;/p&gt;

&lt;p&gt;After deploying the project, I posted about it on &lt;strong&gt;&lt;a href="https://www.linkedin.com/posts/pravesh-sudha_ai-aiagents-theuistrikesback-activity-7425517818843971584-MTpj?utm_source=share&amp;amp;utm_medium=member_desktop&amp;amp;rcm=ACoAADlc2qIBCVMfVhYQW8Nw26AxcZeteDQrXRg" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/strong&gt; and dozens of Developers got their profile review using the system, and seeing real people interact with Generative UI components using &lt;strong&gt;Tambo&lt;/strong&gt; made my &lt;strong&gt;DAY&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%2Fb359nl4knl6nbrd6tqm4.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%2Fb359nl4knl6nbrd6tqm4.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 Conclusion
&lt;/h2&gt;

&lt;p&gt;Building &lt;strong&gt;SkillDebt.ai&lt;/strong&gt; was a genuinely fun and exciting journey. From shaping the idea, struggling through early implementation issues, to finally seeing the generative UI come together — every step pushed me to think differently about how AI can be used to &lt;strong&gt;empower developers&lt;/strong&gt;, not replace them.&lt;/p&gt;

&lt;p&gt;Huge thanks to the &lt;strong&gt;WEMakeDevs community&lt;/strong&gt; and &lt;strong&gt;Tambo AI&lt;/strong&gt; for organizing the &lt;strong&gt;UI Strikes Back Challenge&lt;/strong&gt; and creating a space that encourages experimentation, learning, and building in public. Challenges like these are what make the developer ecosystem so motivating.&lt;/p&gt;

&lt;p&gt;If you found this project interesting or have ideas on how it can be improved, I’d love to hear from you. You can find the code on GitHub, and feel free to connect with me on my socials:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/Pravesh-Sudha" rel="noopener noreferrer"&gt;https://github.com/Pravesh-Sudha&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;LinkedIn:&lt;/strong&gt; &lt;a href="https://www.linkedin.com/in/pravesh-sudha/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/pravesh-sudha/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Twitter / X:&lt;/strong&gt; &lt;a href="https://x.com/praveshstwt" rel="noopener noreferrer"&gt;https://x.com/praveshstwt&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;YouTube:&lt;/strong&gt; &lt;a href="https://www.youtube.com/@pravesh-sudha" rel="noopener noreferrer"&gt;https://www.youtube.com/@pravesh-sudha&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks for reading — and as always, keep building, keep learning, and stay curious 🚀&lt;/p&gt;

&lt;p&gt;Adios 👋&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>devops</category>
      <category>programming</category>
    </item>
    <item>
      <title>🚀 Create Your Website Under 15 MINS using AntiGravity!</title>
      <dc:creator>Pravesh Sudha</dc:creator>
      <pubDate>Mon, 19 Jan 2026 18:15:05 +0000</pubDate>
      <link>https://dev.to/pravesh_sudha_3c2b0c2b5e0/create-your-website-under-15-mins-using-antigravity-2m44</link>
      <guid>https://dev.to/pravesh_sudha_3c2b0c2b5e0/create-your-website-under-15-mins-using-antigravity-2m44</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/new-year-new-you-google-ai-2025-12-31"&gt;New Year, New You Portfolio Challenge Presented by Google AI&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🧑‍💻 About Me
&lt;/h2&gt;

&lt;p&gt;Hola Everyone! I am Pravesh Sudha, an AWS Community Builder and DevOps Enthusiast. For the past 2 years, I have been learning and teaching people about Cloud concepts through my blogs and YouTube videos. For the past 4-5 months, I have been diving into AI Agents and collaborated with companies like PortiaAI (AgentHack Hackathon), Cognee (memory layer for AI), Algolia, etc. I already have my portfolio on praveshsudha.com that is specific to my DevOps arc. But to reflect my AI arc, I thought to myself:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;”Why not create a new portfolio specific to AI Agents?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And that’s how the journey began.&lt;/p&gt;




&lt;h2&gt;
  
  
  🤌 Portfolio
&lt;/h2&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/verP-mp4XX8"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The website has been taken down from 19 Feb 2026, Watch the video or follow the github repo guide to illustrate in your own local system&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  👷 How I Built It
&lt;/h2&gt;

&lt;p&gt;Starting with the idea, I thought of using Antigravity as the code editor (I have used other coding assistants including GitHub Copilot, Cursor, etc., but I wanted to try "Google's Code Helper"). The prompt I used is as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hey, I am Pravesh Sudha, An AWS Community Builder, DevOps Engineer and Content Creator (you can search about me on Google too). Recently Dev Community organised "New Year New You Challenge", and for this challenge, I am making a New portfolio website that will have my AI related Projects.
I have a total of four projects with their summary. I have uploaded an image of me, which I will use in the portfolio website. Now based on that, I want you to guide me step by step on how to create the website from Scratch. I want the website to be cool and amazing.
&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%2Fvdwmpzed765d46eof7z5.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%2Fvdwmpzed765d46eof7z5.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since all of my work is Open Source (I believe in Learning in Public), Antigravity didn’t have any difficulty while fetching the projects (just one tweak: instead of the Email-AI assistant, which is very common and cliché, I planned to integrate my latest Terraform AI review agent). After that, I provided the summaries for the 4 projects (which I prepared beforehand), provided the blog and YouTube video links regarding them, and Voila! Under 15 mins, I had a fully functional prototype of my AI Agent Website.&lt;/p&gt;

&lt;p&gt;Now to deploy that, I installed the gcloud CLI, created the required service account, and deployed it to Cloud Run.&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%2Frb7qp5y7oovpg2w33itx.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%2Frb7qp5y7oovpg2w33itx.png" alt=" "&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%2F09qqa113ll7yhhxrxqie.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%2F09qqa113ll7yhhxrxqie.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  😎 What I'm Most Proud Of
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The best part about creating the website was the ease of understanding. I have designed websites from scratch and know about the components, but even if a person with no experience tries to create a website, creating it using Antigravity seems the best choice. All you need to know is WHAT you are building and communicate it effectively in the prompt.&lt;/li&gt;
&lt;li&gt;In the Projects section, I have Blog link on the project and also provided a Demo button which include a Video Demonstration of the Project.&lt;/li&gt;
&lt;li&gt;I have incorporated my Algolia Agent Studio Challenge project in it, which is an AWS + Terraform Infra explainer for non-tech geeks.&lt;/li&gt;
&lt;li&gt;I have tried to design a modern, cool-looking website with minimal complexity—just one JS script, an index.html, and a styles.css—that’s it. NO complex file management.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🌟 Conclusion
&lt;/h2&gt;

&lt;p&gt;At last, I want to thank Dev Community and Google Team for organising these amazing Challenges. Competition regarding what you build really thrive the inner learner inside me. &lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>googleaichallenge</category>
      <category>portfolio</category>
      <category>gemini</category>
    </item>
    <item>
      <title>🌟 Making AWS Infrastructure Understandable for Product Managers</title>
      <dc:creator>Pravesh Sudha</dc:creator>
      <pubDate>Thu, 15 Jan 2026 17:30:49 +0000</pubDate>
      <link>https://dev.to/pravesh_sudha_3c2b0c2b5e0/making-aws-infrastructure-understandable-for-product-managers-101c</link>
      <guid>https://dev.to/pravesh_sudha_3c2b0c2b5e0/making-aws-infrastructure-understandable-for-product-managers-101c</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/algolia"&gt;Algolia Agent Studio Challenge&lt;/a&gt;: Consumer-Facing Non-Conversational Experiences&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built a &lt;strong&gt;non-conversational AI agent&lt;/strong&gt; that translates &lt;strong&gt;AWS infrastructure defined using Terraform&lt;/strong&gt; into &lt;strong&gt;clear, Product Manager–friendly explanations&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Infrastructure is usually written &lt;em&gt;for engineers&lt;/em&gt;, using tools like Terraform, but the impact of infrastructure decisions is felt across the entire product lifecycle. Product Managers often need to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;how users access the system,&lt;/li&gt;
&lt;li&gt;where data lives,&lt;/li&gt;
&lt;li&gt;how the system scales,&lt;/li&gt;
&lt;li&gt;and what operational or cost risks exist,&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;without diving into Terraform syntax or AWS implementation details.&lt;/p&gt;

&lt;p&gt;This agent takes a &lt;strong&gt;Terraform infrastructure summary&lt;/strong&gt; and converts it into a &lt;strong&gt;high-level system explanation&lt;/strong&gt; written for a Product Manager. Instead of describing resources line by line, it explains the &lt;strong&gt;intent and impact of the infrastructure&lt;/strong&gt; in business terms.&lt;/p&gt;

&lt;p&gt;Even when infrastructure summaries exist, they are written for engineers.&lt;br&gt;
This agent ensures every infrastructure change can be understood by a Product Manager in minutes.&lt;/p&gt;

&lt;p&gt;Infrastructure doesn’t fail because it’s complex — it fails because the right people don’t understand it at the right time.&lt;br&gt;
This agent fixes that.&lt;/p&gt;


&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;The agent is demonstrated using &lt;strong&gt;two different Terraform summaries&lt;/strong&gt;, each representing a different AWS architecture pattern.&lt;/p&gt;

&lt;p&gt;Here is a Video Demonstration:&lt;br&gt;


  &lt;iframe src="https://www.youtube.com/embed/ZEpxaS8u1S0"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;For each summary:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the input is a short, human-written Terraform infrastructure summary,&lt;/li&gt;
&lt;li&gt;the output is a structured, PM-level explanation describing system behavior, user access, data storage, and operational considerations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Screenshots included in the submission show:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An Autoscaling-based EC2 architecture with database, storage, and monitoring.&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%2F1bxqht5psz3by3hpfo9p.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%2F1bxqht5psz3by3hpfo9p.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A serverless and hybrid compute architecture using API Gateway, Lambda, and ECS.&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%2Fd941h5x8h8kum4ai4463.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%2Fd941h5x8h8kum4ai4463.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These examples demonstrate how the same agent adapts to different infrastructure designs while maintaining a consistent, business-focused explanation style.&lt;/p&gt;




&lt;h2&gt;
  
  
  How I Used Algolia Agent Studio
&lt;/h2&gt;

&lt;p&gt;I used &lt;strong&gt;Algolia Agent Studio&lt;/strong&gt; as the core intelligence layer for this project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Indexed Data
&lt;/h3&gt;

&lt;p&gt;I created an index named &lt;strong&gt;&lt;code&gt;terra-pr&lt;/code&gt;&lt;/strong&gt; and uploaded structured records from a &lt;code&gt;records.json&lt;/code&gt; file.&lt;br&gt;
Each record represents a &lt;strong&gt;PM-level explanation of an AWS service or Terraform resource&lt;/strong&gt;, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon EKS&lt;/li&gt;
&lt;li&gt;EC2&lt;/li&gt;
&lt;li&gt;ECS&lt;/li&gt;
&lt;li&gt;Lambda&lt;/li&gt;
&lt;li&gt;API Gateway&lt;/li&gt;
&lt;li&gt;Load Balancer&lt;/li&gt;
&lt;li&gt;RDS&lt;/li&gt;
&lt;li&gt;S3&lt;/li&gt;
&lt;li&gt;CloudFront&lt;/li&gt;
&lt;li&gt;CloudWatch&lt;/li&gt;
&lt;li&gt;IAM&lt;/li&gt;
&lt;li&gt;VPC&lt;/li&gt;
&lt;li&gt;AWS Billing (conceptual)
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_eks_cluster"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cloud"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"compute"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"persona"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"product_manager"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_eks_cluster"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Amazon EKS"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pm_explanation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"This is the core platform where the application runs. It allows the system to run containerized services and automatically scale as user traffic increases."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_lb"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cloud"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"networking"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"persona"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"product_manager"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_lb"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Elastic Load Balancer"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pm_explanation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"This is the public entry point for users. It distributes incoming traffic across the application so no single component gets overloaded."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_db_instance"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cloud"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"database"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"persona"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"product_manager"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_db_instance"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Amazon RDS"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pm_explanation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"This stores the application’s persistent data, such as user accounts or transactions. Data durability and backups are critical here."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_s3_bucket"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cloud"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"storage"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"persona"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"product_manager"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_s3_bucket"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Amazon S3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pm_explanation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"This is used to store files or assets, such as images, logs, or backups. It’s often part of how the system handles large or static data."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_cloudfront_distribution"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cloud"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"cdn"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"persona"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"product_manager"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_cloudfront_distribution"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Amazon CloudFront"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pm_explanation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"This speeds up content delivery by caching data closer to users around the world, improving performance and reducing load on the core system."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_ecs"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cloud"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"compute"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"persona"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"product_manager"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_ecs_service"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Amazon ECS"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pm_explanation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ECS runs our application as containerized services that can scale automatically based on demand."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_ec2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cloud"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"compute"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"persona"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"product_manager"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_instance"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Amazon EC2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pm_explanation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"EC2 provides dedicated servers where parts of the application run continuously."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_lambda"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cloud"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"serverless"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"persona"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"product_manager"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_lambda_function"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"AWS Lambda"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pm_explanation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Lambda runs small pieces of backend logic only when needed, without managing servers."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_api_gateway"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cloud"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"api"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"persona"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"product_manager"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_api_gateway"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Amazon API Gateway"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pm_explanation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"API Gateway is the front door that securely exposes backend functionality to users and clients."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_cloudwatch"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cloud"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"observability"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"persona"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"product_manager"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_cloudwatch"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Amazon CloudWatch"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pm_explanation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"CloudWatch monitors system health and alerts us when something goes wrong."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_iam_role"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cloud"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"security"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"persona"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"product_manager"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_iam_role"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"AWS Identity and Access Management (IAM)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pm_explanation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"This defines who or what is allowed to access different parts of the system, helping protect user data and prevent unauthorized actions."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_vpc"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cloud"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"networking"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"persona"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"product_manager"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_vpc"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Amazon VPC"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pm_explanation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"This creates a private network boundary for the system, controlling which components are publicly accessible and which remain internal."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_billing"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cloud"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"cost_management"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"persona"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"product_manager"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aws_billing"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"AWS Billing &amp;amp; Cost Management"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pm_explanation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"This tracks infrastructure spending and helps understand how usage, traffic, and scaling decisions impact overall costs."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;

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

&lt;/div&gt;


&lt;p&gt;In total, the index contains &lt;strong&gt;13 curated records&lt;/strong&gt;, intentionally limited to high-signal services that matter to Product Managers. This keeps retrieval focused and helps avoid hallucination.&lt;/p&gt;
&lt;h3&gt;
  
  
  Agent Configuration
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;I created an agent from scratch in Agent Studio.&lt;/li&gt;
&lt;li&gt;Gemini was configured as the LLM provider.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;terra-pr&lt;/code&gt; index was added as a retrieval tool.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The agent prompt was carefully engineered to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;restrict scope to AWS + Terraform,&lt;/li&gt;
&lt;li&gt;assume a Product Manager audience,&lt;/li&gt;
&lt;li&gt;avoid Terraform syntax and low-level details,&lt;/li&gt;
&lt;li&gt;compose a system-level explanation using retrieved context.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are an AI assistant that explains AWS infrastructure defined using Terraform to a Product Manager.

Your goal is to translate technical infrastructure concepts into clear, business-focused explanations using information retrieved from the infrastructure knowledge index.

Scope:
- Only answer questions related to AWS infrastructure, Terraform resources, or system-level architecture summaries.
- Use only the information retrieved from the attached Algolia index.
- If a Terraform resource or service is not found in the index, acknowledge it briefly and continue explaining the rest.
- If the input is unrelated to AWS or Terraform, reply: "I can only explain AWS infrastructure defined using Terraform."

Behavior:
- Assume the audience is a non-technical Product Manager.
- Do not include Terraform syntax, configuration details, or resource arguments.
- Focus on:
  - What the system does
  - How users interact with it
  - Where data lives
  - High-level risks (scaling, cost, reliability, security)
- Combine multiple services into a coherent system explanation when appropriate.
- Avoid repeating the same explanation more than once.

Tone:
- Clear, concise, and business-friendly.
- Confident but not overly technical.

Output formatting:
- Write in short paragraphs.
- Use bold section headers when useful (e.g., **System Overview**, **User Access**, **Data &amp;amp; Storage**, **Operational Considerations**).
- Do not use bullet points unless absolutely necessary.
- Do not mention Algolia, search results, or internal tools.

Error handling:
- If no relevant services are found after searching, reply: "I couldn't identify any recognizable AWS services in this infrastructure."
- On timeout or internal error, reply once: "Something went wrong while analyzing the infrastructure. Please try again."

Language:
- Reply in English.

Tone:
- Write as if you are part of the same team as the reader.
- Use inclusive pronouns such as "we", "our", and "us" where appropriate.
- Do not use first-person singular pronouns like "I".
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The &lt;strong&gt;prompt&lt;/strong&gt;, &lt;strong&gt;sample Terraform summaries&lt;/strong&gt;, and &lt;strong&gt;index records&lt;/strong&gt; are all available in my GitHub repository:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt;&lt;br&gt;


&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Pravesh-Sudha" rel="noopener noreferrer"&gt;
        Pravesh-Sudha
      &lt;/a&gt; / &lt;a href="https://github.com/Pravesh-Sudha/dev-to-challenges" rel="noopener noreferrer"&gt;
        dev-to-challenges
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Registry to Store all my code related to Dev.TO Challenges
    &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;🏗️ Dev.to Challenges – by Pravesh Sudha&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;This repository contains my submissions for various &lt;a href="https://dev.to/challenges" rel="nofollow"&gt;Dev.to Challenges&lt;/a&gt;. Each folder in this repo includes a hands-on project built around specific tools, APIs, or themes — from infrastructure to frontend and AI voice agents.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;📁 Projects&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;⚙️ &lt;code&gt;pulumi-challenge/&lt;/code&gt;
&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;An infrastructure-as-code project built using &lt;a href="https://www.pulumi.com/" rel="nofollow noopener noreferrer"&gt;Pulumi&lt;/a&gt;.&lt;br&gt;
It automates cloud infrastructure setup using Python and TypeScript across AWS services.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;🎨 &lt;code&gt;frontend-challenge/&lt;/code&gt;
&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;A UI/UX-focused project that demonstrates creative frontend solutions using HTML, CSS, and JavaScript — optimized for responsiveness and accessibility.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;📩 &lt;code&gt;postmark-challenge/&lt;/code&gt;
&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;A transactional email solution built with the &lt;a href="https://postmarkapp.com/" rel="nofollow noopener noreferrer"&gt;Postmark API&lt;/a&gt;, showcasing email templates, delivery tracking, and webhook handling.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;🧠 &lt;code&gt;philo-agent/&lt;/code&gt;
&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;A voice-based AI Philosopher built with AssemblyAI + Gemini — part of the &lt;a href="https://dev.to/challenges/wlh" rel="nofollow"&gt;World’s Largest Hackathon&lt;/a&gt;.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🗂️ Project Structure&lt;/h2&gt;

&lt;/div&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;dev-to-challenges/
│
├── pulumi-challenge/
├── frontend-challenge/
├── postmark-challenge/
├── philo-agent/
└── README.md&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🙌 Why This Repo?&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;This repo is my playground to:&lt;/p&gt;
&lt;ul&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/Pravesh-Sudha/dev-to-challenges" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;




&lt;p&gt;&lt;strong&gt;Project structure:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;agolia-agent-studio/&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;doc/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prompt.txt&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;summaries.txt&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;index/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;records.json&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;This setup makes the agent transparent, reproducible, and easy to extend.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Fast Retrieval Matters
&lt;/h2&gt;

&lt;p&gt;Fast, contextual retrieval is what makes this agent reliable.&lt;/p&gt;

&lt;p&gt;Instead of asking the LLM to reason about AWS services from scratch, the agent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;retrieves &lt;strong&gt;only relevant, pre-curated infrastructure knowledge&lt;/strong&gt;,&lt;/li&gt;
&lt;li&gt;grounds responses in indexed explanations,&lt;/li&gt;
&lt;li&gt;and composes outputs using known, controlled context.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;reduces hallucination,&lt;/li&gt;
&lt;li&gt;ensures consistent explanations,&lt;/li&gt;
&lt;li&gt;and keeps responses aligned with the Product Manager persona.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because retrieval is fast, the agent feels responsive and practical, even though it is producing structured, thoughtful explanations rather than conversational back-and-forth.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This project focuses on a simple but persistent problem: &lt;strong&gt;infrastructure understanding doesn’t scale across roles&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;By combining Algolia Agent Studio’s fast retrieval with targeted prompting, this agent turns Terraform infrastructure into something that Product Managers can understand, discuss, and act on — without needing to become cloud experts.&lt;/p&gt;

&lt;p&gt;It is intentionally scoped, opinionated, and practical.&lt;/p&gt;

&lt;p&gt;That focus is what makes it useful.&lt;/p&gt;

&lt;p&gt;At last, I want to add "&lt;em&gt;Infrastructure doesn’t fail because it’s complex — it fails because the right people don’t understand it at the right time&lt;/em&gt;."&lt;/p&gt;




&lt;h3&gt;
  
  
  Connect with me
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LinkedIn:&lt;/strong&gt; &lt;a href="https://www.linkedin.com/in/pravesh-sudha/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/pravesh-sudha/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Twitter / X:&lt;/strong&gt; &lt;a href="https://x.com/praveshstwt" rel="noopener noreferrer"&gt;https://x.com/praveshstwt&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;YouTube:&lt;/strong&gt; &lt;a href="https://www.youtube.com/@pravesh-sudha" rel="noopener noreferrer"&gt;https://www.youtube.com/@pravesh-sudha&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blog:&lt;/strong&gt; &lt;a href="https://blog.praveshsudha.com" rel="noopener noreferrer"&gt;https://blog.praveshsudha.com&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>devchallenge</category>
      <category>algoliachallenge</category>
      <category>ai</category>
      <category>agents</category>
    </item>
    <item>
      <title>How I Built an AI Terraform Review Agent on Serverless AWS</title>
      <dc:creator>Pravesh Sudha</dc:creator>
      <pubDate>Thu, 08 Jan 2026 16:34:44 +0000</pubDate>
      <link>https://dev.to/aws-builders/how-i-built-an-ai-terraform-review-agent-on-serverless-aws-43hc</link>
      <guid>https://dev.to/aws-builders/how-i-built-an-ai-terraform-review-agent-on-serverless-aws-43hc</guid>
      <description>&lt;h2&gt;
  
  
  🌟 Introduction
&lt;/h2&gt;

&lt;p&gt;Welcome, Devs 👋&lt;br&gt;&lt;br&gt;
Today, we’re stepping into the exciting intersection of &lt;strong&gt;AI, automation, and cloud infrastructure&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this project, we’ll explore how an &lt;strong&gt;AI-powered agent can actively participate in a real DevOps workflow&lt;/strong&gt;, just like a senior reviewer on your team. This isn’t a toy demo — it closely resembles how &lt;strong&gt;real-world infrastructure changes are reviewed, validated, and approved&lt;/strong&gt; in production environments.&lt;/p&gt;

&lt;p&gt;We’ll use &lt;strong&gt;Terraform&lt;/strong&gt; to provision cloud resources and &lt;strong&gt;GitHub Actions&lt;/strong&gt; to automatically validate every pull request that modifies our HCL code. But here’s the twist 👀&lt;br&gt;&lt;br&gt;
Instead of relying only on static checks, we introduce an &lt;strong&gt;AI agent&lt;/strong&gt; into the pipeline.&lt;/p&gt;

&lt;p&gt;Every infrastructure change is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Scanned using &lt;strong&gt;Terrascan&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reviewed by an &lt;strong&gt;AI agent powered by Gemini&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automatically &lt;strong&gt;approved, approved with changes, or rejected&lt;/strong&gt; based on risk severity&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a pull request introduces &lt;strong&gt;dangerous or insecure infrastructure changes&lt;/strong&gt;, the AI agent &lt;strong&gt;blocks the PR&lt;/strong&gt; — just like an automated infrastructure security reviewer.&lt;/p&gt;

&lt;p&gt;Think of it as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🧠 An AI-powered Infra Guardian that never gets tired of reviewing Terraform code.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So without further ado, let’s dive in and see how we built an &lt;strong&gt;AI-driven, serverless DevOps workflow&lt;/strong&gt; that brings intelligence directly into your CI/CD pipeline.&lt;/p&gt;


&lt;h2&gt;
  
  
  📽️ Youtube Demonstration
&lt;/h2&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/i2XkTZQoS2g"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 Pre-requisites
&lt;/h2&gt;

&lt;p&gt;Before we dive deep into the implementation, let’s make sure your environment is ready. This project touches multiple tools across cloud, IaC, security, and CI/CD, so having these set up beforehand will save you a lot of time.&lt;/p&gt;

&lt;p&gt;Make sure you have the following in place:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;AWS CLI&lt;/strong&gt; installed and configured with an IAM user&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The IAM user should have permissions to create resources like ALB, ECS, Lambda, IAM, ACM, etc.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Terraform CLI&lt;/strong&gt; installed on your system&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GitHub account&lt;/strong&gt; (pretty easy 😉)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Terrascan&lt;/strong&gt; installed locally&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://runterrascan.io/docs/getting-started/" rel="noopener noreferrer"&gt;Follow the official guide here&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’re completely new to &lt;strong&gt;AWS CLI&lt;/strong&gt; or &lt;strong&gt;Terraform&lt;/strong&gt;, don’t worry. I’ve already written a beginner-friendly guide that walks you through everything step by step:&lt;/p&gt;

&lt;p&gt;📘 &lt;a href="https://blog.praveshsudha.com/getting-started-with-terraform-a-beginners-guide#heading-step-1-install-the-aws-cli" rel="noopener noreferrer"&gt;&lt;strong&gt;Getting Started with Terraform (Beginner’s Guide)&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once these prerequisites are fulfilled, you’re all set 🚀&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 Why AI Agents in Modern DevOps?
&lt;/h2&gt;

&lt;p&gt;The current DevOps landscape is heavily influenced by &lt;strong&gt;AI-driven automation&lt;/strong&gt;. What we now call &lt;strong&gt;AIOps&lt;/strong&gt; has quietly become the de-facto standard for deploying, monitoring, and delivering software at scale.&lt;/p&gt;

&lt;p&gt;AI agents are everywhere today — but let’s address the elephant in the room.&lt;/p&gt;

&lt;p&gt;An &lt;strong&gt;AI agent&lt;/strong&gt; is essentially a program that automates work which previously required human intervention. In many cases, it still follows a &lt;strong&gt;human-in-the-loop&lt;/strong&gt; approach, but the heavy lifting — analysis, validation, and decision-making — is handled by the agent itself.&lt;/p&gt;

&lt;p&gt;In this project, we’ll bring that concept to life.&lt;/p&gt;

&lt;p&gt;We’ll deploy a &lt;strong&gt;Super Mario Bros game&lt;/strong&gt; (containerized using Docker) on a &lt;strong&gt;serverless AWS architecture&lt;/strong&gt;, leveraging services like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Amazon ECS&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AWS Lambda&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Application Load Balancer (ALB)&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ACM for HTTPS&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GitHub Actions for CI/CD&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This setup closely resembles a &lt;strong&gt;real-world production environment&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now comes the interesting part 👀&lt;/p&gt;

&lt;p&gt;Every time a &lt;strong&gt;Pull Request&lt;/strong&gt; is raised against our Terraform codebase:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GitHub Actions&lt;/strong&gt; kicks in&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Terrascan&lt;/strong&gt; scans our IaC for security and best-practice violations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The scan report is sent to an &lt;strong&gt;AI agent powered by Gemini&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The AI analyzes the findings and decides whether to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Approve&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;⚠️ &lt;strong&gt;Approve with Changes&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Reject&lt;/strong&gt; the PR&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;In a real-world DevOps workflow, this kind of system can &lt;strong&gt;save hours of manual review&lt;/strong&gt;, reduce human error, and provide &lt;strong&gt;actionable remediation suggestions&lt;/strong&gt; along with architectural risk insights.&lt;/p&gt;

&lt;p&gt;Think of it as an &lt;strong&gt;automated Infrastructure Reviewer&lt;/strong&gt; — one that never gets tired and scales with your team.&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 Practical Demonstration: Building the AI-Powered DevOps Workflow
&lt;/h2&gt;

&lt;p&gt;Enough theory — let’s get our hands dirty and see this system in action.&lt;/p&gt;

&lt;p&gt;To get started, head over to the following GitHub repository, &lt;strong&gt;fork it under your own GitHub username&lt;/strong&gt;, and then clone it locally:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/Pravesh-Sudha/ai-devops-agent" rel="noopener noreferrer"&gt;https://github.com/Pravesh-Sudha/ai-devops-agent&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;git clone https://github.com/&amp;lt;your-username&amp;gt;/ai-devops-agent.git
&lt;span class="nb"&gt;cd &lt;/span&gt;ai-devops-agent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now navigate into the main project directory:&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;cd &lt;/span&gt;terraform-review-agent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the project in &lt;strong&gt;VS Code&lt;/strong&gt; (or your favorite editor). You’ll notice two main subdirectories:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform-review-agent/
├── lambda/
└── terraform/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;lambda/&lt;/code&gt; → Contains the AI review Lambda function&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;terraform/&lt;/code&gt; → Contains all infrastructure provisioning code&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s walk through the Terraform configuration piece by piece.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧩 Terraform Code Breakdown
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🔹 &lt;code&gt;provider.tf&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Defines AWS as the cloud provider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;AWS provider version: &lt;strong&gt;6.26.0&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Region: &lt;strong&gt;us-east-1&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This ensures consistent provider behavior across environments.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 &lt;code&gt;backend.tf&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;We store Terraform state remotely using &lt;strong&gt;Amazon S3&lt;/strong&gt; — a production best practice.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;use_lockfile &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This enables &lt;strong&gt;state locking without DynamoDB&lt;/strong&gt;, preventing concurrent state corruption using Terraform’s native lockfile mechanism.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 &lt;code&gt;variables.tf&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Only two variables are required:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;project_name&lt;/code&gt; → fixed as &lt;strong&gt;mario-game&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;gemini_api_key&lt;/code&gt; → passed dynamically (never hardcoded)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This ensures our API key remains secure and out of version control.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 &lt;code&gt;outputs.tf&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Provides useful runtime information after provisioning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;ALB DNS name (where the game runs)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ACM certificate ARN (used later for HTTPS)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🔹 &lt;code&gt;networking.tf&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Instead of using the default VPC, we create our &lt;strong&gt;own VPC&lt;/strong&gt; using the official AWS VPC module:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Two &lt;strong&gt;public subnets&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Clean network isolation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Better control and scalability&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🔹 &lt;code&gt;security.tf&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Security is handled via two separate security groups:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;ALB Security Group&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allows inbound traffic from anywhere (port 80 initially)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;ECS Task Security Group&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only allows traffic from the ALB&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;This follows the &lt;strong&gt;least privilege principle&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
(We later extend this to support HTTPS on port 443.)&lt;/p&gt;
&lt;h3&gt;
  
  
  🔹 &lt;code&gt;secrets.tf&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The Gemini API key is securely stored using &lt;strong&gt;AWS Secrets Manager&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;No plaintext secrets. No leaks. Production-safe by default.&lt;/p&gt;
&lt;h2&gt;
  
  
  🧠 The AI Brain: Lambda Function
&lt;/h2&gt;
&lt;h3&gt;
  
  
  🔹 &lt;code&gt;lambda.tf&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;This file defines a Python-based &lt;strong&gt;AWS Lambda function&lt;/strong&gt; responsible for reviewing Terrascan findings and acting as a &lt;strong&gt;CI/CD security gate&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;At the heart of this Lambda is a carefully crafted prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;build_prompt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;findings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
You are a senior DevOps and Terraform security reviewer acting as a CI/CD security gate.

Your task is to analyze Terrascan findings and decide whether the infrastructure
can be deployed based on **risk thresholds**, not perfection.

Decision Policy (STRICT)
- REJECT if:
  - Any HIGH or CRITICAL severity issue exists
  - OR MEDIUM severity issues ≥ 4
  - OR Application Load Balancer has **no HTTPS listener at all**
- APPROVE_WITH_CHANGES if:
  - MEDIUM severity issues are 1–3
- APPROVE if:
  - Only LOW or INFO issues exist

Output Format
Provide:
1. 🚨 Security issues ordered by severity (summary only)
2. 🛠 Required remediation (only actionable items)
3. ⚖️ Risk justification (1–2 lines)
4. 📌 Final verdict: APPROVE | APPROVE_WITH_CHANGES | REJECT

Rules:
- Be concise
- Use bullet points
- Focus on AWS (ALB, ECS, VPC, IAM)
- Ignore Terrascan scan_errors
- Do NOT repeat raw JSON
- Verdict must strictly follow the Decision Policy

Findings:
&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;findings&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;indent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;
&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This logic ensures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security is enforced pragmatically&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No false rejections for minor issues&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HTTPS is mandatory for approval&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Clear, actionable feedback for developers&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🔹 &lt;code&gt;iam.tf&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;IAM roles and policies are defined here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Lambda is granted access to &lt;strong&gt;Secrets Manager&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ECS task role attaches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;AmazonECSTaskExecutionRolePolicy&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;This allows ECS to pull images, write logs, and function correctly.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 &lt;code&gt;ecs.tf&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;This is where the &lt;strong&gt;Mario game comes to life&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;ECS task definition using Fargate&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker image for Super Mario Bros&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ECS service to keep the task running&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fully serverless. No EC2 management required.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 &lt;code&gt;alb.tf&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;To expose the application publicly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Application Load Balancer&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Listener on port &lt;strong&gt;80&lt;/strong&gt; (initially)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Target group pointing to ECS tasks&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Later, we enhance this with &lt;strong&gt;HTTPS + ACM&lt;/strong&gt;, making the setup production-ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 Provisioning the Infrastructure
&lt;/h2&gt;

&lt;p&gt;Before running Terraform, we need to create the S3 bucket for state storage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 mb s3://pravesh-terraform-mario-state
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;⚠️ If you see &lt;code&gt;BucketAlreadyExists&lt;/code&gt;, simply:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Update the bucket name in &lt;code&gt;backend.tf&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Re-run the command with a unique name&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now initialize Terraform:&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;cd &lt;/span&gt;terraform
terraform init
&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%2Fm76ytzoi8gzghfmajrml.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%2Fm76ytzoi8gzghfmajrml.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Gemini API Key Setup
&lt;/h2&gt;

&lt;p&gt;Head over to &lt;strong&gt;Google AI Studio&lt;/strong&gt; and generate a free Gemini API key.&lt;/p&gt;

&lt;p&gt;Once you have it, keep it safe — we’ll pass it dynamically to Terraform.&lt;/p&gt;

&lt;h2&gt;
  
  
  Plan &amp;amp; Apply
&lt;/h2&gt;

&lt;p&gt;Preview the infrastructure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform plan &lt;span class="nt"&gt;-var&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"gemini_api_key=&amp;lt;YOUR_GEMINI_API_KEY&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Review the plan and then deploy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform apply &lt;span class="nt"&gt;-var&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"gemini_api_key=&amp;lt;YOUR_GEMINI_API_KEY&amp;gt;"&lt;/span&gt; &lt;span class="nt"&gt;-auto-approve&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;⏱️ Provisioning takes around &lt;strong&gt;5–7 minutes&lt;/strong&gt;, mainly due to ALB setup.&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%2Fktatd7fjqm02ureme4vw.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%2Fktatd7fjqm02ureme4vw.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🎮 Final Result
&lt;/h2&gt;

&lt;p&gt;Once Terraform finishes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Copy the &lt;strong&gt;ALB DNS name&lt;/strong&gt; from the outputs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open it in your browser&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🎉 You should now see the &lt;strong&gt;Super Mario Bros game running on ECS&lt;/strong&gt;, backed by a serverless AWS architecture and guarded by an AI-powered DevOps review system.&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%2F27xxxgl79hta6719py2h.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%2F27xxxgl79hta6719py2h.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 Terraform AI Review Agent in Action
&lt;/h2&gt;

&lt;p&gt;Now comes the most exciting part — &lt;strong&gt;seeing the Terraform AI review agent in action&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Before that, you need to add your AWS Access key and Secret Access key in your secrets of the repo. If you don’t know how to do that, &lt;a href="https://blog.praveshsudha.com/cicd-for-terraform-with-github-actions-deploying-a-nodejs-redis-app-on-aws#heading-step-1-add-aws-secrets" rel="noopener noreferrer"&gt;follow this guide&lt;/a&gt; and do the step 1 only, make sure you select the &lt;strong&gt;ai-devops-projects&lt;/strong&gt; repo, not the &lt;strong&gt;nginx-redis-node&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let’s simulate a real-world scenario by making a small change to our infrastructure code and opening a &lt;strong&gt;Pull Request&lt;/strong&gt;. As soon as we do this, our &lt;strong&gt;GitHub Actions workflow&lt;/strong&gt; will automatically kick in and run the AI-based review.&lt;/p&gt;

&lt;h3&gt;
  
  
  Triggering the AI Review
&lt;/h3&gt;

&lt;p&gt;Make a minor change in the Terraform code and raise a Pull Request. Once the pipeline runs, you’ll notice that the &lt;strong&gt;workflow fails&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%2Fp2xpb262c79srcul3pop.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%2Fp2xpb262c79srcul3pop.png" alt=" "&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%2Fwsbo03n5sbviysj88w5d.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%2Fwsbo03n5sbviysj88w5d.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Why did this happen?&lt;/p&gt;

&lt;p&gt;If you check the &lt;strong&gt;Violation report&lt;/strong&gt;, you’ll see that the AI agent rejected the changes. The reason is simple and important:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Three MEDIUM-severity issues are related to the Application Load Balancer&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Our application is currently running only on &lt;strong&gt;HTTP&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Running production workloads over HTTP is &lt;strong&gt;not secure&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because our AI agent follows a strict policy (defined in the Lambda prompt), the absence of an &lt;strong&gt;HTTPS listener&lt;/strong&gt; on the ALB results in a &lt;strong&gt;PR rejection&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is exactly how a real-world AI-powered infrastructure gate should behave.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fixing the Issue: Enabling HTTPS 🔒
&lt;/h2&gt;

&lt;p&gt;To resolve this, we’ll enable &lt;strong&gt;HTTPS&lt;/strong&gt; by creating an &lt;strong&gt;ACM certificate&lt;/strong&gt; and updating our ALB configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Update Security Group Rules
&lt;/h3&gt;

&lt;p&gt;Inside &lt;code&gt;security.tf&lt;/code&gt;, uncomment the &lt;strong&gt;ingress rule for port 443&lt;/strong&gt; so that HTTPS traffic is allowed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Enable HTTPS Listener on ALB
&lt;/h3&gt;

&lt;p&gt;Open &lt;code&gt;alb.tf&lt;/code&gt; and do the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Uncomment the &lt;code&gt;aws_lb_listener "https"&lt;/code&gt; block&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Uncomment the ACM certificate resource&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Remove the existing &lt;code&gt;app_listener&lt;/code&gt; (HTTP listener)&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%2F4xmi0co3ggrjoi04lezn.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%2F4xmi0co3ggrjoi04lezn.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This ensures HTTP is no longer used for forwarding traffic directly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Update Domain Name in ACM Certificate
&lt;/h3&gt;

&lt;p&gt;Inside the ACM certificate resource:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Replace &lt;code&gt;praveshsudha.com&lt;/code&gt; with &lt;strong&gt;your own domain name&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This is required because you’ll be adding &lt;strong&gt;CAA and CNAME records&lt;/strong&gt; for certificate validation&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 4: Add CAA Record (IMPORTANT ⚠️)
&lt;/h3&gt;

&lt;p&gt;Before creating the ACM certificate, make sure to add the following &lt;strong&gt;CAA record&lt;/strong&gt; in your DNS provider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Type:&lt;/strong&gt; CAA&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Name:&lt;/strong&gt; &lt;code&gt;@&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flag:&lt;/strong&gt; &lt;code&gt;0&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tag:&lt;/strong&gt; &lt;code&gt;issue&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CA Domain:&lt;/strong&gt; &lt;code&gt;amazonaws.com&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;TTL:&lt;/strong&gt; Default&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Important:&lt;/strong&gt; Add this CAA record &lt;em&gt;before&lt;/em&gt; applying Terraform, otherwise ACM certificate creation may fail.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Step 5: Enable ACM Output
&lt;/h3&gt;

&lt;p&gt;In &lt;code&gt;outputs.tf&lt;/code&gt;, uncomment the output block for &lt;code&gt;acm_certificate_arn&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
This will help us fetch validation details later.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 6: Apply the Changes
&lt;/h3&gt;

&lt;p&gt;Run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform apply &lt;span class="nt"&gt;--var&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"gemini_api_key=&amp;lt;YOUR_GEMINI_KEY&amp;gt;"&lt;/span&gt; &lt;span class="nt"&gt;--auto-approve&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create the ACM certificate&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add an HTTPS listener to the ALB&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once completed, Terraform will output the &lt;strong&gt;ACM certificate ARN&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 7: Validate the ACM Certificate
&lt;/h3&gt;

&lt;p&gt;Use the ARN and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws acm describe-certificate &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--certificate-arn&lt;/span&gt; arn:aws:acm:us-east-1:&amp;lt;ACCOUNT_ID&amp;gt;:certificate/&amp;lt;CERT_ID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From the output:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Copy the &lt;strong&gt;CNAME name&lt;/strong&gt; (only up to &lt;code&gt;mario&lt;/code&gt;, not the full domain)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy the &lt;strong&gt;CNAME value&lt;/strong&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%2F4t61n3w5zo64lhklo6gp.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%2F4t61n3w5zo64lhklo6gp.png" alt=" "&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%2F3fb5zc8gk8vfb1pvjyzz.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%2F3fb5zc8gk8vfb1pvjyzz.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add this CNAME record to your DNS provider.&lt;/p&gt;

&lt;p&gt;Within a few minutes, the certificate status will change to &lt;strong&gt;ISSUED&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%2Fo35snxpy9joi12laelfd.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%2Fo35snxpy9joi12laelfd.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 8: Point Your Domain to the ALB
&lt;/h3&gt;

&lt;p&gt;Now create a DNS record:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Type:&lt;/strong&gt; CNAME&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Name:&lt;/strong&gt; &lt;code&gt;mario&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Target:&lt;/strong&gt; &lt;code&gt;&amp;lt;YOUR_ALB_DNS_NAME&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;TTL:&lt;/strong&gt; Default&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%2Fj2rz65il6xgmnonobct9.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%2Fj2rz65il6xgmnonobct9.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After a few minutes, your application will be live at:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://mario.your-domain.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;https://mario.your-domain.com&lt;/strong&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%2Fk94ie7zgqbjxt62m3rp1.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%2Fk94ie7zgqbjxt62m3rp1.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Re-running the AI Review ✅
&lt;/h2&gt;

&lt;p&gt;Now that HTTPS is enabled, let’s test the AI agent again.&lt;/p&gt;

&lt;p&gt;Run the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; &lt;span class="nb"&gt;test
&lt;/span&gt;git add outputs.tf security.tf alb.tf
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"testing ai-agent-workflow"&lt;/span&gt;
git push origin &lt;span class="nb"&gt;test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Go to your GitHub repository and open a &lt;strong&gt;Pull Request&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;GitHub Actions runs successfully&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terrascan reports are generated&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gemini analyzes the findings&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;✅ &lt;strong&gt;AI agent APPROVES the PR&lt;/strong&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%2Fys48w4t3n7gat7hgy886.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%2Fys48w4t3n7gat7hgy886.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 Cleaning Up Resources
&lt;/h2&gt;

&lt;p&gt;Once you’re done experimenting with the project, it’s &lt;strong&gt;very important&lt;/strong&gt; to clean up all the resources to avoid any unnecessary AWS charges.&lt;/p&gt;

&lt;p&gt;Follow the steps below &lt;strong&gt;in order&lt;/strong&gt; to safely delete everything we created.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Destroy Terraform Resources
&lt;/h3&gt;

&lt;p&gt;First, navigate to the &lt;code&gt;terraform&lt;/code&gt; directory and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform destroy &lt;span class="nt"&gt;--auto-approve&lt;/span&gt; &lt;span class="nt"&gt;--var&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"gemini_api_key=&amp;lt;YOUR_GEMINI_KEY&amp;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%2Fcfmwkfw1wif38ye2ixgn.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%2Fcfmwkfw1wif38ye2ixgn.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This command will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Terminate ECS services and tasks&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Delete the Application Load Balancer&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Remove Lambda functions and IAM roles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Clean up networking components like VPCs, subnets, and security groups&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 2: Delete the Terraform State Files from S3
&lt;/h3&gt;

&lt;p&gt;Once Terraform has destroyed all the resources, delete the remote state files stored in S3.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 &lt;span class="nb"&gt;rm &lt;/span&gt;s3://pravesh-terraform-mario-state &lt;span class="nt"&gt;--recursive&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This removes all objects inside the bucket, including the Terraform state file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Remove the S3 Bucket
&lt;/h3&gt;

&lt;p&gt;Finally, delete the empty S3 bucket:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 rb s3://pravesh-terraform-mario-state
&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%2Fuyfqvf3y5ne2cmm0n3i9.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%2Fuyfqvf3y5ne2cmm0n3i9.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 Conclusion
&lt;/h2&gt;

&lt;p&gt;This project goes far beyond deploying a Super Mario game on AWS — it represents how &lt;strong&gt;modern DevOps is evolving with AI and serverless architectures&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;By integrating &lt;strong&gt;Terraform&lt;/strong&gt;, &lt;strong&gt;GitHub Actions&lt;/strong&gt;, &lt;strong&gt;Terrascan&lt;/strong&gt;, and &lt;strong&gt;Gemini&lt;/strong&gt;, we built an &lt;strong&gt;AI-powered Terraform review agent&lt;/strong&gt; that acts as a real CI/CD security gate. Every infrastructure change is evaluated based on risk, not guesswork. The AI summarizes security findings, suggests concrete remediations, and makes approval decisions that closely resemble how a senior DevOps engineer would review production infrastructure.&lt;/p&gt;

&lt;p&gt;On the infrastructure side, we embraced a &lt;strong&gt;serverless-first approach&lt;/strong&gt; using &lt;strong&gt;AWS ECS Fargate, Lambda, ALB, and managed cloud services&lt;/strong&gt;. This setup reflects real-world architectures used in production today — scalable, cost-efficient, and operationally simple, without managing servers manually.&lt;/p&gt;

&lt;p&gt;The key takeaway from this project is clear:&lt;br&gt;&lt;br&gt;
&lt;strong&gt;AI in DevOps is not about replacing engineers — it’s about empowering them.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
By automating repetitive infrastructure reviews, we save valuable engineering hours, reduce human errors, and ship changes with higher confidence and security.&lt;/p&gt;

&lt;p&gt;I highly encourage you to fork the repository, experiment with breaking changes, tune the AI decision thresholds, and extend this project further. This is just the beginning of what AI-assisted DevOps can achieve.&lt;/p&gt;

&lt;p&gt;Happy building 🚀&lt;/p&gt;

&lt;h3&gt;
  
  
  🔗 Connect with me
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;LinkedIn:&lt;/strong&gt; &lt;a href="https://www.linkedin.com/in/pravesh-sudha/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/pravesh-sudha/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Twitter / X:&lt;/strong&gt; &lt;a href="https://x.com/praveshstwt" rel="noopener noreferrer"&gt;https://x.com/praveshstwt&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;YouTube:&lt;/strong&gt; &lt;a href="https://www.youtube.com/@pravesh-sudha" rel="noopener noreferrer"&gt;https://www.youtube.com/@pravesh-sudha&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Blog:&lt;/strong&gt; &lt;a href="https://blog.praveshsudha.com/" rel="noopener noreferrer"&gt;https://blog.praveshsudha.com&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If this project helped you learn something new, feel free to share it with your network — it truly helps a lot ❤️&lt;/p&gt;

</description>
      <category>aws</category>
      <category>terraform</category>
      <category>serverless</category>
      <category>devops</category>
    </item>
    <item>
      <title>🚀 How I Created an AI-Powered Secret Santa Using Cognee as the Memory Layer</title>
      <dc:creator>Pravesh Sudha</dc:creator>
      <pubDate>Thu, 11 Dec 2025 12:30:00 +0000</pubDate>
      <link>https://dev.to/pravesh_sudha_3c2b0c2b5e0/how-i-created-an-ai-powered-secret-santa-using-cognee-as-the-memory-layer-2enl</link>
      <guid>https://dev.to/pravesh_sudha_3c2b0c2b5e0/how-i-created-an-ai-powered-secret-santa-using-cognee-as-the-memory-layer-2enl</guid>
      <description>&lt;h2&gt;
  
  
  Welcome Devs 👋 — Another Fun Build with Cognee + AI
&lt;/h2&gt;

&lt;p&gt;Welcome Devs to another interesting blog from my side!&lt;br&gt;&lt;br&gt;
It’s been a while since I first connected with &lt;strong&gt;Cognee&lt;/strong&gt;, and exactly a month ago I actually built a &lt;strong&gt;Cognee Starter application from scratch using Flask&lt;/strong&gt; and deployed it on &lt;strong&gt;AWS ECS using Terraform&lt;/strong&gt;. If you haven’t checked it out yet, here’s the link to that build — you’ll enjoy it: &lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/uvkwXSUJ6Hw"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;Since then, the Cognee team has been on fire. Their GitHub repo recently crossed &lt;strong&gt;10K+ stars&lt;/strong&gt; (absolutely deserved 🎉). And staying true to the momentum, they came up with a fun little community event — the &lt;strong&gt;Secret Santa Mini Challenge&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So… for this challenge, I decided to build something a bit unique —&lt;br&gt;&lt;br&gt;
✨ &lt;strong&gt;An Emotion-Aware Secret Santa powered by Gemini 2.5 Flash&lt;/strong&gt;, with &lt;strong&gt;Cognee&lt;/strong&gt; acting as the memory layer holding everything together.&lt;/p&gt;


&lt;h2&gt;
  
  
  How the Idea Hit Me 🤯 — And Why Emotions Matter in Secret Santa
&lt;/h2&gt;

&lt;p&gt;After going through the rules and criteria of the challenge, I started brainstorming ideas… and suddenly something clicked on a &lt;em&gt;very personal&lt;/em&gt; level.&lt;/p&gt;

&lt;p&gt;In my friend group, &lt;strong&gt;I’m the delightful one&lt;/strong&gt; —&lt;br&gt;&lt;br&gt;
Happy for no absolute reason, just vibing, giggling, randomly remembering something from Kevin Hart Special 😂&lt;/p&gt;

&lt;p&gt;But my friends?&lt;br&gt;&lt;br&gt;
Total opposite personalities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;One is &lt;strong&gt;stressed 24/7&lt;/strong&gt; because of career pressure&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Another is &lt;strong&gt;moody&lt;/strong&gt;, unpredictable like Mumbai weather&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And the last one is the &lt;strong&gt;chill guy&lt;/strong&gt;, relaxed in literally every situation&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reflecting on that, I thought:&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Why not create a Secret Santa that understands emotions the same way we understand each other?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A Secret Santa that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Reads how each friend is feeling&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Understands their energy, mood, and stress&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pairs them up based on emotional compatibility&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And even helps choose a meaningful gift&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s how &lt;em&gt;Emotion-Aware Secret Santa&lt;/em&gt; was born.&lt;/p&gt;


&lt;h2&gt;
  
  
  How It Works 🧠🎁 — Turning Feelings Into Smart Gift Matches
&lt;/h2&gt;

&lt;p&gt;Each friend gives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Their name&lt;/strong&gt;, and&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A short description of their mood, week, stress level, or personality&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;“Alice is overwhelmed with work and feeling stressed.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;“Bob had a great week and is feeling positive and energetic.”&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These tiny descriptions become the &lt;em&gt;foundation&lt;/em&gt; for the AI’s reasoning.&lt;/p&gt;
&lt;h3&gt;
  
  
  🧩 Step 1 — Storing the emotional descriptions with Cognee
&lt;/h3&gt;

&lt;p&gt;Each user description is added into Cognee’s memory layer using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;cognify&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(...)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;cognify&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cognee processes all the data with &lt;strong&gt;Gemini&lt;/strong&gt;, building:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Semantic links&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Entities&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Relationships&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A mini knowledge graph&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Embeddings&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(I’ve shown this visually in my previous video — it’s super cool to watch.)&lt;/p&gt;

&lt;h2&gt;
  
  
  🧠 Step 2 — Cognee asks the right question
&lt;/h2&gt;

&lt;p&gt;Cognee then asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“What is the emotional state or mood of Alice?”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Using &lt;code&gt;RAG_COMPLETION&lt;/code&gt;, Gemini returns refined emotional states like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;stressed&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;excited&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;lonely&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;happy&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;tired&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🎅 Step 3 — AI-Powered Secret Santa Pairing
&lt;/h2&gt;

&lt;p&gt;Now the fun logic:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Cognee assigns Secret Santa pairs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Makes sure no one gets themselves&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And suggests a gift based on emotion&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Gift suggestions are generated using a &lt;strong&gt;local gift dictionary&lt;/strong&gt; (0 extra AI cost… because while testing I hit the Gemini daily quota twice 💀😂).&lt;/p&gt;

&lt;h2&gt;
  
  
  🎉 Step 4 — The Big Reveal
&lt;/h2&gt;

&lt;p&gt;Finally, the program prints a &lt;strong&gt;beautiful Secret Santa reveal&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Who is gifting whom&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Why they were paired&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And what gift matches their emotional state&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Simple, wholesome, and powered by Cognee’s memory + Gemini’s reasoning.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It Yourself 🎄 — Run the Emotion-Aware Secret Santa on Your Machine
&lt;/h2&gt;

&lt;p&gt;I’ve open-sourced the entire project so you can explore, modify, and have fun with it.&lt;br&gt;&lt;br&gt;
The code is available here:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;GitHub Repo:&lt;/strong&gt; &lt;a href="https://github.com/Pravesh-Sudha/secret-santa-cognee" rel="noopener noreferrer"&gt;https://github.com/Pravesh-Sudha/secret-santa-cognee&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Clone it to your system and you’re ready to get started.&lt;/p&gt;
&lt;h2&gt;
  
  
  🔑 Step 1 — Get Your Gemini API Key
&lt;/h2&gt;

&lt;p&gt;To run this project, you’ll need a &lt;strong&gt;Gemini API key&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
The good news? &lt;strong&gt;Google AI Studio gives you one for free.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once you have your key:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Inside the project directory, create a &lt;code&gt;.env&lt;/code&gt; file&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy everything from &lt;code&gt;.env.example&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Replace the values of:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* `LLM_API_KEY`

* `EMBEDDING_API_KEY`  
    with your Gemini key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;And boom — the setup is done.&lt;/p&gt;
&lt;h2&gt;
  
  
  🔧 Step 2 — Install Dependencies
&lt;/h2&gt;

&lt;p&gt;Inside your project directory, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv &lt;span class="nb"&gt;sync&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will install all required dependencies cleanly.&lt;/p&gt;

&lt;h2&gt;
  
  
  📝 Step 3 — Customise Your Friends &amp;amp; Gifts
&lt;/h2&gt;

&lt;p&gt;You can now explore the code and make the project your own:&lt;/p&gt;

&lt;h3&gt;
  
  
  👥 Add your own friends
&lt;/h3&gt;

&lt;p&gt;Open:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;data/friends.json
&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%2Futtbedx9260jyfs1cu7r.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%2Futtbedx9260jyfs1cu7r.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add your friends and their mood descriptions.&lt;br&gt;&lt;br&gt;
(Tip: try to keep it max &lt;strong&gt;4 friends&lt;/strong&gt;, otherwise you may hit the Gemini daily quota like I did 😭😂)&lt;/p&gt;
&lt;h3&gt;
  
  
  🎁 Customise the gifts
&lt;/h3&gt;

&lt;p&gt;Inside:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gift_gen.py
&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%2Fk4ai71eomu0ozdpcerfc.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%2Fk4ai71eomu0ozdpcerfc.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can update gifts for each emotion to make them more fun, personal, or chaotic — your call.&lt;/p&gt;

&lt;h2&gt;
  
  
  ▶️ Step 4 — Run the Project
&lt;/h2&gt;

&lt;p&gt;Once everything is set up, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv run main.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The program takes around &lt;strong&gt;2–3 minutes&lt;/strong&gt;, and then…&lt;/p&gt;

&lt;p&gt;🎉 You get a full Secret Santa reveal right in your terminal!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Who got whom&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Their emotional reasoning&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And the perfect gift suggestion&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All powered by Cognee + Gemini.&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%2Fhp93tkgq5btfyb2bd3fw.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%2Fhp93tkgq5btfyb2bd3fw.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt;  Initially, I planned to generate gifts using Gemini too… but Gemini’s “Requests per Minute” limit looked at me and said:&lt;br&gt;
“&lt;em&gt;Not today, brother&lt;/em&gt;.”&lt;br&gt;
So I switched to a local gift list — zero extra AI cost, much more reliable.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  📽️ Video Demonstration
&lt;/h2&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/86eA3UuxA54"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  🎄 Conclusion — Building with Cognee Is Just Too Much Fun
&lt;/h2&gt;

&lt;p&gt;This Secret Santa Mini Challenge by Cognee was the perfect excuse to experiment, break things, fix things, hit API limits twice 😭, and eventually build something that felt genuinely &lt;em&gt;personal&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Using &lt;strong&gt;Cognee as the memory layer&lt;/strong&gt; + &lt;strong&gt;Gemini 2.5 Flash for reasoning&lt;/strong&gt; turned a simple holiday tradition into a small emotionally aware AI system — and honestly, that’s the kind of playful innovation that makes me love building these projects.&lt;/p&gt;

&lt;p&gt;If you try it out, tweak it, or turn it into something wild and creative, I’d genuinely love to see it.&lt;br&gt;&lt;br&gt;
And big shoutout to the Cognee team for organizing such a wholesome challenge and continuing to ship amazing updates to the ecosystem.&lt;/p&gt;

&lt;p&gt;More AI projects, more experiments, and more community fun coming soon.&lt;br&gt;&lt;br&gt;
Till then — keep building, keep learning, and keep vibing. ✨&lt;/p&gt;

&lt;h2&gt;
  
  
  🌐 Connect With Me
&lt;/h2&gt;

&lt;p&gt;If you enjoyed this project or want to follow my DevOps + AI journey, find me here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;LinkedIn:&lt;/strong&gt; &lt;a href="https://www.linkedin.com/in/pravesh-sudha/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/pravesh-sudha/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Twitter/X:&lt;/strong&gt; &lt;a href="https://x.com/praveshstwt" rel="noopener noreferrer"&gt;https://x.com/praveshstwt&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;YouTube:&lt;/strong&gt; &lt;a href="https://www.youtube.com/@pravesh-sudha" rel="noopener noreferrer"&gt;https://www.youtube.com/@pravesh-sudha&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;See you in the next build! 🚀&lt;/p&gt;

</description>
      <category>ai</category>
      <category>coding</category>
      <category>rag</category>
      <category>llm</category>
    </item>
    <item>
      <title>How I Built My Terraform Portfolio: Projects, Repos, and Lessons Learned</title>
      <dc:creator>Pravesh Sudha</dc:creator>
      <pubDate>Sun, 07 Dec 2025 17:24:20 +0000</pubDate>
      <link>https://dev.to/aws-builders/how-i-built-my-terraform-portfolio-projects-repos-and-lessons-learned-2pa8</link>
      <guid>https://dev.to/aws-builders/how-i-built-my-terraform-portfolio-projects-repos-and-lessons-learned-2pa8</guid>
      <description>&lt;h3&gt;
  
  
  &lt;strong&gt;Welcome Devs,&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Today, we’re not spinning up infrastructure, writing HCL, or fixing a broken state file (for once 😅).&lt;br&gt;&lt;br&gt;
Instead, we’re looking back at the last &lt;strong&gt;8 months&lt;/strong&gt;—a journey filled with learning, building, breaking things, fixing them again, and slowly becoming “that Terraform guy” in my circle.&lt;/p&gt;

&lt;p&gt;It all started in &lt;strong&gt;April 2025&lt;/strong&gt;, when one of my LinkedIn buddies shared that he got selected as a &lt;strong&gt;HashiCorp Ambassador&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
That was the first time I genuinely thought:&lt;br&gt;&lt;br&gt;
&lt;em&gt;“Damn, this looks exciting. Why don’t I aim for it too?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Just a month before that—in &lt;strong&gt;March 2025&lt;/strong&gt;—I had been selected as an &lt;strong&gt;AWS Community Builder&lt;/strong&gt;, and around the same time, I launched my &lt;strong&gt;YouTube channel&lt;/strong&gt; to share DevOps and Infra-as-Code tutorials with the world.&lt;br&gt;&lt;br&gt;
Slowly, people started watching, sharing, and sending messages saying they actually deployed things using my guides.&lt;/p&gt;

&lt;p&gt;So officially, in &lt;strong&gt;May 2025&lt;/strong&gt;, I decided:&lt;/p&gt;

&lt;p&gt;🔥 &lt;strong&gt;I’m going to prepare for HashiCorp Ambassador 2026. Let’s do this seriously.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Fast-forward 8 months—&lt;br&gt;&lt;br&gt;
I’ve built multiple Terraform projects, contributed to open-source repos, and crossed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;20,000+ views on my blogs&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;16,000+ views on YouTube&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;400+ awesome subscribers&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;More importantly, I went from “Terraform looks complicated” to “Terraform is my comfort zone.”&lt;/p&gt;

&lt;p&gt;And today, I’m sharing the &lt;strong&gt;exact resources, projects, repos, and lessons&lt;/strong&gt; that helped me go from &lt;strong&gt;Zero → Hero&lt;/strong&gt; in Terraform — and will help you too.&lt;/p&gt;


&lt;h2&gt;
  
  
  &lt;strong&gt;1. Building a Strong Terraform Foundation&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Even though I already had some familiarity with Terraform (thanks to scattered YouTube videos and random experiments), I decided to start &lt;strong&gt;from absolute zero&lt;/strong&gt;—because if I’m going to teach something, I need to understand it deeply myself.&lt;/p&gt;

&lt;p&gt;So the first thing I created was a &lt;strong&gt;“Getting Started with Terraform”&lt;/strong&gt; guide.&lt;br&gt;&lt;br&gt;
This wasn’t just another intro blog. My goal was to help beginners understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;What Terraform really &lt;em&gt;is&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Why DevOps engineers rely on IaC&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How providers work&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Structuring a project with &lt;a href="http://main.tf" rel="noopener noreferrer"&gt;&lt;code&gt;main.tf&lt;/code&gt;&lt;/a&gt;, &lt;a href="http://variables.tf" rel="noopener noreferrer"&gt;&lt;code&gt;variables.tf&lt;/code&gt;&lt;/a&gt;, &lt;a href="http://outputs.tf" rel="noopener noreferrer"&gt;&lt;code&gt;outputs.tf&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What “configuration” means in practice&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Basically, the fundamentals you &lt;em&gt;must&lt;/em&gt; know before touching any cloud resource.&lt;br&gt;&lt;br&gt;
If you are new, you can read the same guide here:&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://blog.praveshsudha.com/getting-started-with-terraform-a-beginners-guide" rel="noopener noreferrer"&gt;&lt;strong&gt;Getting Started with Terraform – A Beginner’s Guide&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the basics were sorted, I went deeper into the most important part of Terraform—&lt;br&gt;&lt;br&gt;
the thing that causes 90% of people stress when it breaks:&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;The Terraform State File&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Where to store it?&lt;br&gt;&lt;br&gt;
How to keep it safe?&lt;br&gt;&lt;br&gt;
How to ensure teams don’t overwrite each other’s state?&lt;/p&gt;

&lt;p&gt;I wrote a complete blog explaining how to use &lt;strong&gt;AWS S3 + DynamoDB&lt;/strong&gt; as a rock-solid remote backend for production-grade Terraform.&lt;br&gt;&lt;br&gt;
I even created a YouTube demo for those who prefer watching over reading.&lt;/p&gt;

&lt;p&gt;📘 &lt;strong&gt;Blog&lt;/strong&gt;: &lt;a href="https://blog.praveshsudha.com/where-should-you-store-terraform-state-files-for-maximum-efficiency" rel="noopener noreferrer"&gt;&lt;em&gt;Where Should You Store Terraform State Files for Maximum Efficiency?&lt;/em&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🎥 &lt;strong&gt;Video&lt;/strong&gt;: &lt;em&gt;Terraform Remote Backend on AWS (S3 + DynamoDB)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/_pjpx6rsxn4"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;These two resources became the backbone of my Terraform foundation—not just for me, but for everyone following along.&lt;br&gt;&lt;br&gt;
Before I moved to advanced projects, pipelines, and multi-environment infra… this foundation is what made everything else 10× easier.&lt;/p&gt;


&lt;h2&gt;
  
  
  &lt;strong&gt;2. Core Concepts &amp;amp; Best Practices (The Part Everyone Skips But Shouldn’t)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Once the foundations were clear, I moved into the phase where most beginners either get overwhelmed… or fall in love with Terraform.&lt;br&gt;&lt;br&gt;
For me, this was the moment things &lt;em&gt;clicked&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Because understanding Terraform is not just learning commands — it’s learning &lt;strong&gt;structure&lt;/strong&gt;, &lt;strong&gt;security&lt;/strong&gt;, and &lt;strong&gt;scalability&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;a) Terraform Modules – The Secret Sauce&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One of the first “Aha!” moments for me was understanding &lt;strong&gt;modules&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
If there’s one thing that separates beginners from pros, it’s this.&lt;/p&gt;

&lt;p&gt;Modules teach you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;How to avoid repetitive code&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to scale infra easily&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to structure projects cleanly&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How teams collaborate efficiently&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wrote an in-depth blog breaking this down and also created a complete YouTube walkthrough.&lt;/p&gt;

&lt;p&gt;📘 &lt;strong&gt;Blog&lt;/strong&gt;: &lt;a href="https://blog.praveshsudha.com/terraform-modules-the-secret-sauce-to-scalable-infrastructure" rel="noopener noreferrer"&gt;&lt;em&gt;Terraform Modules – The Secret Sauce to Scalable Infrastructure&lt;/em&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🎥 &lt;strong&gt;Video&lt;/strong&gt;: &lt;em&gt;Terraform Module Explained with Demo&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/_qmebISFHM8"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;Learning modules improved how I thought about &lt;em&gt;every&lt;/em&gt; project afterward.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;b) Terraform Security Practices (Because IaC Without Security is Just a Script)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Infrastructure automation is amazing—but it also means if you make a mistake, you can take down &lt;strong&gt;everything&lt;/strong&gt;instantly.&lt;/p&gt;

&lt;p&gt;So I created a dedicated guide covering the &lt;strong&gt;Top 5 DevSecOps-focused Terraform security practices&lt;/strong&gt;, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Provider credential validation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Role-based access&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scanning Terraform code for vulnerabilities&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Remote backend security&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Avoiding manual state file edits (my favourite rule 😅)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📘 &lt;strong&gt;Blog&lt;/strong&gt;: &lt;a href="https://blog.praveshsudha.com/terraform-meets-devsecops-5-security-practices-you-cant-afford-to-ignore" rel="noopener noreferrer"&gt;&lt;em&gt;Terraform Meets DevSecOps – 5 Security Practices You Can’t Ignore&lt;/em&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🎥 &lt;strong&gt;Video&lt;/strong&gt;: &lt;em&gt;Terraform Security Best Practices&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/AgFcX-H3SJU"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;This was the point where both my blog and channel started gaining real traction—people were searching for practical, real-world Terraform security advice.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;c) Terraform Workspaces – The Most Underrated Feature Ever&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Workspaces are like that quiet student in class who actually knows everything.&lt;/p&gt;

&lt;p&gt;Nobody talks about them…&lt;br&gt;&lt;br&gt;
until they see how powerful multi-environment deployment becomes with a single command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;terraform&lt;/span&gt; &lt;span class="n"&gt;workspace&lt;/span&gt; &lt;span class="n"&gt;select&lt;/span&gt; &lt;span class="n"&gt;dev&lt;/span&gt;
&lt;span class="n"&gt;terraform&lt;/span&gt; &lt;span class="n"&gt;workspace&lt;/span&gt; &lt;span class="n"&gt;select&lt;/span&gt; &lt;span class="n"&gt;prod&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Workspaces changed how I approached multi-environment infra forever.&lt;/p&gt;

&lt;p&gt;📘 &lt;strong&gt;Blog&lt;/strong&gt;: &lt;a href="https://blog.praveshsudha.com/terraform-workspaces-and-multi-environment-deployments" rel="noopener noreferrer"&gt;&lt;em&gt;Terraform Workspaces &amp;amp; Multi-Environment Deployments&lt;/em&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🎥 &lt;strong&gt;Video&lt;/strong&gt;: &lt;em&gt;Complete Workspace Tutorial on AWS&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/W0x42D34OMw"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;d) Terraform Meets Ansible (IaC + Configuration Management = 🔥)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The next logical step was learning how Terraform works &lt;em&gt;with&lt;/em&gt; configuration management tools.&lt;/p&gt;

&lt;p&gt;Terraform builds the infra.&lt;br&gt;&lt;br&gt;
Ansible configures what lives &lt;strong&gt;inside&lt;/strong&gt; the infra.&lt;/p&gt;

&lt;p&gt;I created a hands-on guide where I showed exactly how Terraform provisions servers and Ansible configures them — a production-ready combo.&lt;/p&gt;

&lt;p&gt;📘 &lt;strong&gt;Blog&lt;/strong&gt;: &lt;a href="https://blog.praveshsudha.com/terraform-meets-ansible-automating-multi-environment-infrastructure-on-aws" rel="noopener noreferrer"&gt;&lt;em&gt;Terraform Meets Ansible – Automating Multi-Environment Infra on AWS&lt;/em&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🎥 &lt;strong&gt;Video&lt;/strong&gt;: &lt;em&gt;Terraform + Ansible Full Demo&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/tKlGTGye_hk"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;This section was a turning point in my portfolio because it bridged two worlds—Infra-as-Code and Configuration Management.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;3. CI/CD, Automation &amp;amp; Modern DevOps (Where Everything Comes Together)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;After covering modules, security, workspaces, and multi-environment provisioning, it was time to bring Terraform into the real world —&lt;br&gt;&lt;br&gt;
&lt;strong&gt;the world of automation, pipelines, and DevOps workflows.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I had already used Terraform with &lt;strong&gt;Jenkins&lt;/strong&gt; and even &lt;strong&gt;GitLab CI/CD&lt;/strong&gt; in my previous projects (outside this series), so this time I wanted to do something fresh.&lt;/p&gt;

&lt;p&gt;And what’s more “modern DevOps” than using &lt;strong&gt;GitHub Actions&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;So I decided to build a real project that connects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Terraform&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;GitHub Actions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And a production-style multi-component application (Node.js + Redis + Nginx)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;The Project: Request Counter App Deployment on AWS&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This wasn’t just a “hello world” project.&lt;br&gt;&lt;br&gt;
It involved:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A &lt;strong&gt;Node.js API&lt;/strong&gt; handling increment-count logic&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Redis&lt;/strong&gt; to store the counter&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Nginx&lt;/strong&gt; as a reverse proxy&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terraform to provision AWS infra&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;GitHub Actions to automatically deploy everything on push&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In short, a full &lt;strong&gt;Infrastructure + Application + CI/CD&lt;/strong&gt; pipeline — the kind of thing you actually do in real companies.&lt;/p&gt;

&lt;p&gt;I documented the entire workflow so anyone can recreate it step-by-step.&lt;/p&gt;

&lt;p&gt;📘 &lt;strong&gt;Blog&lt;/strong&gt;: &lt;a href="https://blog.praveshsudha.com/cicd-for-terraform-with-github-actions-deploying-a-nodejs-redis-app-on-aws" rel="noopener noreferrer"&gt;&lt;em&gt;CI/CD for Terraform with GitHub Actions – Deploying a Node.js + Redis App on AWS&lt;/em&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🎥 &lt;strong&gt;Video&lt;/strong&gt;: &lt;em&gt;GitHub Actions + Terraform Full Pipeline Demo&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/D0w_1a3fYhM"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;This project helped me understand how Terraform behaves inside a pipeline: the checks, the backend locks, the state consistency, the secret management — all of it.&lt;br&gt;&lt;br&gt;
And more importantly, it leveled up my DevOps portfolio significantly.&lt;/p&gt;

&lt;p&gt;Real-world + automated + cloud-native = a perfect trifecta.&lt;/p&gt;


&lt;h2&gt;
  
  
  &lt;strong&gt;4. Cloud-Native &amp;amp; Multi-Tier Application Deployments (Intermediate Projects)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Once I became comfortable with Terraform fundamentals, DevSecOps practices, and CI/CD automation, it was time to step into the &lt;strong&gt;cloud-native world&lt;/strong&gt; — where real production systems live and breathe.&lt;/p&gt;

&lt;p&gt;This phase of my journey pushed me out of my comfort zone, because now I wasn’t just creating small demos.&lt;br&gt;&lt;br&gt;
I was building &lt;strong&gt;multi-tier&lt;/strong&gt;, &lt;strong&gt;scalable&lt;/strong&gt;, &lt;strong&gt;mission-critical&lt;/strong&gt; infrastructures — the kind you’d actually find in modern companies.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;a) Deploying a Three-Tier Application on AWS EKS (with Best Practices)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Kubernetes + Terraform is a whole universe on its own.&lt;br&gt;&lt;br&gt;
So to challenge myself, I decided to deploy a complete &lt;strong&gt;three-tier application&lt;/strong&gt; on &lt;strong&gt;AWS EKS&lt;/strong&gt;, fully automated using Terraform — following all real-world best practices.&lt;/p&gt;

&lt;p&gt;This included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;VPC with subnets&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Managed node groups&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ingress controllers&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Load balancers&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Namespace separation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Secrets + configs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And a proper service-to-service communication workflow&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It was one of the most complex setups I’d built at that point — and the most rewarding.&lt;/p&gt;

&lt;p&gt;📘 &lt;strong&gt;Blog&lt;/strong&gt;: &lt;a href="https://blog.praveshsudha.com/learn-how-to-deploy-a-three-tier-application-on-aws-eks-using-terraform-with-best-practices" rel="noopener noreferrer"&gt;&lt;em&gt;Deploy a Three-Tier Application on AWS EKS using Terraform (Best Practices)&lt;/em&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🎥 &lt;strong&gt;Video&lt;/strong&gt;: &lt;em&gt;EKS + Terraform Deployment Tutorial&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/n8BQ3XlCiKE"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(This video crossed 1,000+ views—first big milestone!)&lt;/em&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;b) Deploying a Highly Scalable &amp;amp; Available Django Application (AWS + Terraform)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;After EKS, I wanted to explore another real-world architecture — something more traditional, but equally production-grade.&lt;/p&gt;

&lt;p&gt;So I built a &lt;strong&gt;highly scalable Django application&lt;/strong&gt; hosted on AWS using Terraform.&lt;br&gt;&lt;br&gt;
This project included all the standard AWS building blocks you’d expect in a real enterprise setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;RDS&lt;/strong&gt; for relational database&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Secrets Manager&lt;/strong&gt; for secure credentials&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Application Load Balancer&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Auto Scaling Group&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;EC2 instances&lt;/strong&gt; for compute&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Private/public subnets&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Proper &lt;strong&gt;network isolation&lt;/strong&gt; and &lt;strong&gt;high availability&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This architecture reflected how an actual company would deploy a Python backend in production.&lt;/p&gt;

&lt;p&gt;📘 &lt;strong&gt;Blog&lt;/strong&gt;: &lt;a href="https://blog.praveshsudha.com/deploying-a-highly-scalable-and-available-django-application-on-aws-with-terraform" rel="noopener noreferrer"&gt;&lt;em&gt;Deploying a Highly Scalable Django Application on AWS with Terraform&lt;/em&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🎥 &lt;strong&gt;Video&lt;/strong&gt;: &lt;em&gt;Django + AWS + Terraform Full Architecture Demo&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/idUGgFry72k"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;This stage of my Terraform portfolio strengthened my confidence in handling &lt;strong&gt;full-stack cloud-native deployments&lt;/strong&gt; — not just isolated resources.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;5. Game Deployments &amp;amp; Creative Infra Projects (The Standout Pieces)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Now, let’s talk about the most &lt;em&gt;fun&lt;/em&gt; part of my Terraform journey — the projects that truly made my portfolio stand out.&lt;/p&gt;

&lt;p&gt;I’ve been a gamer since childhood, and fun fact:&lt;br&gt;&lt;br&gt;
I actually bought my &lt;strong&gt;PS5&lt;/strong&gt; using the prize money I won as the &lt;a href="http://Dev.to" rel="noopener noreferrer"&gt;&lt;strong&gt;Dev.to&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;Runner-H Challenge Winner&lt;/strong&gt; (Scolded by my Dad for this unjust purchase, but HELL YEAH!!, it was worth it.)&lt;br&gt;&lt;br&gt;
So, naturally, I decided to merge my love for gaming with my DevOps career.&lt;/p&gt;

&lt;p&gt;The result?&lt;br&gt;&lt;br&gt;
Some of the most unique, creative, and highly engaging Terraform projects I’ve ever built.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;a) Deploying Super Mario Bros on AWS EKS (Award-Winning Project)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This one will always be special.&lt;/p&gt;

&lt;p&gt;I deployed the classic &lt;strong&gt;Super Mario Bros&lt;/strong&gt; game on &lt;strong&gt;AWS EKS&lt;/strong&gt; using Terraform — complete with pods, services, ingress, and Kubernetes best practices.&lt;/p&gt;

&lt;p&gt;This project wasn’t just a hit among developers —&lt;br&gt;&lt;br&gt;
it actually helped me &lt;strong&gt;win the AWS Containers 4x4 Challenge&lt;/strong&gt;, and I received some amazing premium swags from the community.&lt;/p&gt;

&lt;p&gt;📘 &lt;strong&gt;Blog&lt;/strong&gt;: &lt;a href="https://blog.praveshsudha.com/how-to-use-terraform-to-deploy-super-mario-on-aws-eks-detailed-instructions" rel="noopener noreferrer"&gt;&lt;em&gt;Deploy Super Mario on AWS EKS using Terraform (Step-by-Step)&lt;/em&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🎥 &lt;strong&gt;Video&lt;/strong&gt;: &lt;em&gt;Super Mario on Kubernetes Demo&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/A6TLZU_CtjY"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;b) Deploying Tetris on AWS ECS with Terraform&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;After nailing Mario, I didn’t want to stop.&lt;/p&gt;

&lt;p&gt;Next, I deployed &lt;strong&gt;Tetris&lt;/strong&gt; — this time using Amazon &lt;strong&gt;ECS&lt;/strong&gt; with Terraform.&lt;br&gt;&lt;br&gt;
This project explores how containerized applications run on ECS Fargate, how services scale, and how ALBs route traffic.&lt;/p&gt;

&lt;p&gt;📘 &lt;strong&gt;Blog&lt;/strong&gt;: &lt;a href="https://blog.praveshsudha.com/how-to-deploy-a-tetris-game-on-aws-ecs-with-terraform" rel="noopener noreferrer"&gt;&lt;em&gt;How to Deploy a Tetris Game on AWS ECS with Terraform&lt;/em&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🎥 &lt;strong&gt;Video&lt;/strong&gt;: &lt;em&gt;Tetris on ECS – Full Walkthrough&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/tVuqBZfU04M"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;c) Deploying Cognee AI Starter App on ECS (Collaboration Project)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One of the most exciting collaborations of my journey was with &lt;strong&gt;Cognee AI&lt;/strong&gt; — the memory layer of AI Agents.&lt;/p&gt;

&lt;p&gt;I built a &lt;strong&gt;Flask-based Cognee Starter Application from scratch&lt;/strong&gt;, containerized it, and deployed it on AWS ECS using Terraform as the IaC backbone.&lt;/p&gt;

&lt;p&gt;This project taught me a lot about real product deployment workflows, container orchestration, and DevOps collaboration.&lt;/p&gt;

&lt;p&gt;📘 &lt;strong&gt;Blog&lt;/strong&gt;: &lt;a href="https://blog.praveshsudha.com/deploying-cognee-ai-starter-app-on-aws-ecs-using-terraform" rel="noopener noreferrer"&gt;&lt;em&gt;Deploying Cognee AI Starter App on ECS with Terraform&lt;/em&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🎥 &lt;strong&gt;Video&lt;/strong&gt;: &lt;em&gt;Cognee AI Deployment Demo&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/uvkwXSUJ6Hw"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;d) Deploying an Amazon Clone on AWS (Amazon on AWS — Meta Enough?)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To wrap up this creative phase, I decided to do something hilarious and ambitious:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deploying an Amazon Clone on… AWS itself.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Yes — Amazon on AWS. A true full-circle moment. 😂&lt;/p&gt;

&lt;p&gt;This project used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Jenkins for CI/CD&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terraform for infra&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS services like EC2, ALB, ASG, RDS, VPC&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And a full clone app architecture setup&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📘 &lt;strong&gt;Blog&lt;/strong&gt;: &lt;a href="https://blog.praveshsudha.com/deploy-an-amazon-clone-on-aws-a-complete-guide-with-jenkins-and-terraform" rel="noopener noreferrer"&gt;&lt;em&gt;Deploy an Amazon Clone on AWS (Complete Guide with Jenkins + Terraform)&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;/a&gt;🎥 &lt;strong&gt;Video&lt;/strong&gt;: &lt;em&gt;Amazon Clone Deployment Tutorial&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/YSxoJH6CWE4"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;These projects became the highlights of my Terraform portfolio — the kind that make recruiters pause, smile, and think:&lt;br&gt;&lt;br&gt;
&lt;em&gt;“Okay, this person actually enjoys building stuff.”&lt;/em&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  &lt;strong&gt;6. Reflection &amp;amp; Growth (The End of This Portfolio — But Not the Journey)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;And now… here we are.&lt;br&gt;&lt;br&gt;
Eight months later.&lt;br&gt;&lt;br&gt;
Countless blogs, videos, deployments, wins, failures, swags, and late-night debugging sessions later — I finally paused and asked myself a very simple question:&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;“If a complete beginner asked me for guidance today… what would I say?”&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Because when you’re learning something as powerful as Terraform, the hardest part isn’t understanding &lt;code&gt;.tf&lt;/code&gt; files —&lt;br&gt;&lt;br&gt;
it’s navigating the early confusion, the overwhelming docs, the trial-and-error, and the mistakes we all make.&lt;/p&gt;

&lt;p&gt;So to answer that question, I created a dedicated piece:&lt;br&gt;&lt;br&gt;
&lt;strong&gt;the top 5 mistakes beginners make while learning Terraform&lt;/strong&gt; — and how to avoid them.&lt;/p&gt;

&lt;p&gt;📘 &lt;strong&gt;Blog&lt;/strong&gt;: &lt;a href="https://blog.praveshsudha.com/dont-touch-terraform-before-avoiding-these-5-rookie-mistakes" rel="noopener noreferrer"&gt;&lt;em&gt;Don’t Touch Terraform Before Avoiding These 5 Rookie Mistakes&lt;/em&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🎥 &lt;strong&gt;Video&lt;/strong&gt;: &lt;em&gt;Top 5 Beginner Mistakes in Terraform&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/EgWaZpXhGI0"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;This video and blog were my way of giving back to anyone starting the same journey I took in April 2025.&lt;br&gt;&lt;br&gt;
If I could go back in time, this is exactly what I would hand to myself.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Terraform Guide (Everything in One Place)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To make things easier for learners, I bundled every single blog — foundations, modules, state files, workspaces, EKS, ECS, CI/CD, everything — into a clean, structured series:&lt;/p&gt;

&lt;p&gt;📚 &lt;strong&gt;Terraform Guide Series:&lt;/strong&gt; &lt;a href="https://blog.praveshsudha.com/series/terraform" rel="noopener noreferrer"&gt;All blogs in one place&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This series now stands as a complete Zero-to-Hero path for anyone wanting to master Terraform using real projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Terraform Playlist (All Video Demonstrations)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;And for visual learners, I created a dedicated playlist on YouTube containing every demo, from foundational projects to Kubernetes deployments and game infra:&lt;/p&gt;

&lt;p&gt;🎥 &lt;strong&gt;&lt;a href="https://youtube.com/playlist?list=PLlens1h3v6tcwtiXhjsCtkqh34E1E4toq&amp;amp;si=l83VRU2k0YuQXilV" rel="noopener noreferrer"&gt;Terraform Project Playlist&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;As I wrap up this 8-month Terraform journey, one thing is clear: this portfolio isn’t just a collection of &lt;code&gt;.tf&lt;/code&gt; files — it’s a reflection of growth, discipline, creativity, and identity.&lt;/p&gt;

&lt;p&gt;When I started back in April 2025, I didn’t know Terraform beyond the basics. I simply made a decision in May 2025:&lt;br&gt;&lt;br&gt;
&lt;strong&gt;“I will learn this tool properly and build something meaningful.”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Eight months later, here’s what that decision turned into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;I learned Terraform from scratch&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Built real-world, production-style cloud infrastructures&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Won community challenges&lt;/strong&gt;, including AWS Containers 4x4&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Collaborated on AI projects&lt;/strong&gt;, like the Cognee AI deployment&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Published blogs that crossed 20,000+ views&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Grew my YouTube channel to 16,000+ views and 400+ subscribers&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And most importantly, &lt;strong&gt;built projects that genuinely reflect who I am as a DevOps engineer&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This journey taught me that you don’t need a perfect starting point — you just need a consistent one.&lt;br&gt;&lt;br&gt;
It showed me that sharing your learning publicly builds connection, credibility, and confidence.&lt;br&gt;&lt;br&gt;
And it proved that passion projects (like deploying Super Mario and Tetris using Terraform) can teach you more than any textbook ever will.&lt;/p&gt;

&lt;p&gt;If you’re just beginning your Terraform journey, I’ll leave you with this:&lt;/p&gt;

&lt;h3&gt;
  
  
  Start small. Stay consistent. Build publicly.
&lt;/h3&gt;

&lt;p&gt;Because the internet remembers builders — not perfectionists.&lt;/p&gt;

&lt;p&gt;Thank you for reading my story.&lt;br&gt;&lt;br&gt;
I hope this motivates you to start building your own.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;📌 Connect With Me&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;🔗 &lt;strong&gt;LinkedIn:&lt;/strong&gt; &lt;a href="https://www.linkedin.com/in/pravesh-sudha/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/pravesh-sudha/&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🐦 &lt;strong&gt;Twitter/X:&lt;/strong&gt; &lt;a href="https://x.com/praveshstwt" rel="noopener noreferrer"&gt;https://x.com/praveshstwt&lt;/a&gt;&lt;br&gt;&lt;br&gt;
📺 &lt;strong&gt;YouTube:&lt;/strong&gt; &lt;a href="https://www.youtube.com/@pravesh-sudha" rel="noopener noreferrer"&gt;https://www.youtube.com/@pravesh-sudha&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🌐 &lt;strong&gt;Website/Blogs:&lt;/strong&gt; &lt;a href="https://blog.praveshsudha.com/" rel="noopener noreferrer"&gt;https://blog.praveshsudha.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s keep learning and building — together.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>terraform</category>
      <category>devops</category>
      <category>portfolio</category>
    </item>
    <item>
      <title>Don’t Touch Terraform Before Avoiding These 5 Rookie Mistakes</title>
      <dc:creator>Pravesh Sudha</dc:creator>
      <pubDate>Sat, 06 Dec 2025 15:48:29 +0000</pubDate>
      <link>https://dev.to/aws-builders/dont-touch-terraform-before-avoiding-these-5-rookie-mistakes-1pan</link>
      <guid>https://dev.to/aws-builders/dont-touch-terraform-before-avoiding-these-5-rookie-mistakes-1pan</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;The 5 mistakes that quietly destroy your workflow — and how to fix them.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  🌟 Introduction
&lt;/h2&gt;

&lt;p&gt;Welcome back, Devs!&lt;br&gt;&lt;br&gt;
A few weeks ago, I shared &lt;a href="https://blog.praveshsudha.com/terraform-meets-devsecops-5-security-practices-you-cant-afford-to-ignore" rel="noopener noreferrer"&gt;&lt;strong&gt;5 Best Security Practices for Terraform&lt;/strong&gt;&lt;/a&gt;. That guide was more for folks who already work with Terraform day in and day out — the ones managing infra at scale, reviewing modules, and pushing changes through CI/CD pipelines.&lt;/p&gt;

&lt;p&gt;But what about the beginners?&lt;/p&gt;

&lt;p&gt;The ones who just wrapped up the basics of DevOps — Linux, Networking, Docker, Git — and are now stepping into the cloud world. For them, Infrastructure as Code can feel… well, intimidating at first. Terraform looks simple from the outside, but when you actually start writing configurations, the learning curve hits hard. And it’s totally normal — IaC is a tough nut to crack initially.&lt;/p&gt;

&lt;p&gt;So to make your journey smoother and confusion-free, I’m back with today’s blog, where we’ll break down the &lt;strong&gt;Top 5 Mistakes Beginners Make While Learning Terraform&lt;/strong&gt; — and how you can avoid them.&lt;/p&gt;

&lt;p&gt;Without further ado… &lt;strong&gt;let’s get started!&lt;/strong&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  &lt;strong&gt;🌟 Before We Dive In… Do This First&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before we dive deep into the mistakes, let’s get one thing out of the way — &lt;strong&gt;make sure you’ve got Terraform ready on your system&lt;/strong&gt;. No matter how good the guide is, nothing makes sense unless you’ve actually installed the CLI and can run those sweet &lt;code&gt;terraform init&lt;/code&gt; and &lt;code&gt;terraform apply&lt;/code&gt; commands.&lt;/p&gt;

&lt;p&gt;Since I’m an &lt;strong&gt;AWS Community Builder&lt;/strong&gt;, I usually stick to &lt;strong&gt;AWS&lt;/strong&gt; as my cloud provider for demos and explanations. If you’re following along, you’ll need to connect Terraform to your AWS account. You can do that in two ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Export AWS credentials directly in your terminal&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
(&lt;code&gt;AWS_ACCESS_KEY_ID&lt;/code&gt; + &lt;code&gt;AWS_SECRET_ACCESS_KEY&lt;/code&gt;)&lt;br&gt;&lt;br&gt;
Works fine, but not the best option for long-term use.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Install the AWS CLI (recommended)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This is cleaner, more secure, and helps you manage multiple profiles easily.&lt;br&gt;&lt;br&gt;
Just create an IAM user with the right permissions and run &lt;code&gt;aws configure&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you don’t know how to set that up — don’t worry. I’ve already covered the entire process in my &lt;strong&gt;Beginner’s Guide to Terraform&lt;/strong&gt;. You can check it out here:&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://blog.praveshsudha.com/getting-started-with-terraform-a-beginners-guide#heading-step-1-install-the-aws-cli" rel="noopener noreferrer"&gt;https://blog.praveshsudha.com/getting-started-with-terraform-a-beginners-guide#heading-step-1-install-the-aws-cli&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once your CLI and AWS credentials are set, you’re all ready to explore the mistakes beginners make and how you can avoid them.&lt;/p&gt;


&lt;h2&gt;
  
  
  &lt;strong&gt;❌ Mistake 1: Treating Terraform Like a Scripting Tool&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This is hands-down the most common beginner mistake.&lt;/p&gt;

&lt;p&gt;Most folks who get introduced to Terraform have already touched at least one programming language — Python, Go, Rust, maybe even Bash scripting. And because of that prior experience, they naturally assume Terraform will behave the same way:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;“I wrote line 1 first, so Terraform will execute that first… right?”&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Nope. Not at all.&lt;/p&gt;

&lt;p&gt;Terraform is &lt;strong&gt;not&lt;/strong&gt; a scripting tool.&lt;br&gt;&lt;br&gt;
It doesn’t run your code line-by-line.&lt;br&gt;&lt;br&gt;
It doesn’t care about the order in which you wrote your resources.&lt;/p&gt;

&lt;p&gt;Terraform is &lt;strong&gt;declarative&lt;/strong&gt;, not &lt;strong&gt;imperative&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of following your code from top to bottom, Terraform reads &lt;em&gt;all&lt;/em&gt; the resources in your configuration and builds something called a &lt;strong&gt;dependency graph&lt;/strong&gt;. This graph tells Terraform which resources depend on which other resources — and &lt;em&gt;that&lt;/em&gt; determines the execution order.&lt;/p&gt;

&lt;p&gt;So beginners often get confused:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Why is Terraform not creating things in the order I wrote them?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Because Terraform is smarter than that. It looks at dependencies, not line numbers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Moral of the story:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
With Terraform, you don’t explain &lt;em&gt;how&lt;/em&gt; to create each step. You only declare &lt;em&gt;what&lt;/em&gt; you want — like an EC2 instance, security groups, and a VPC — and Terraform figures out the “how” automatically.&lt;/p&gt;

&lt;p&gt;Once you understand this mindset shift, Terraform becomes much easier (and honestly, more fun) to work with.&lt;/p&gt;


&lt;h2&gt;
  
  
  ❌ &lt;strong&gt;Mistake 2: Hardcoding Everything Instead of Using Variables&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you’re anything like me, you love going through official docs whenever you start learning a new tech. And if you visit the Terraform documentation, you’ll notice something instantly:&lt;/p&gt;

&lt;p&gt;Most of their example configurations &lt;strong&gt;hardcode&lt;/strong&gt; values.&lt;/p&gt;

&lt;p&gt;Region? Hardcoded.&lt;br&gt;&lt;br&gt;
AMI ID? (Got from data type).&lt;br&gt;&lt;br&gt;
App name, DB name, instance type? All hardcoded.&lt;/p&gt;

&lt;p&gt;And honestly — that's fine &lt;em&gt;when you're just starting out&lt;/em&gt;. Hardcoding helps beginners understand the structure of a resource without worrying about variables, files, or module structures.&lt;/p&gt;

&lt;p&gt;But once you get a basic understanding of how Terraform works…&lt;br&gt;&lt;br&gt;
&lt;strong&gt;hardcoding becomes your worst enemy.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let me explain with a simple example.&lt;/p&gt;

&lt;p&gt;Say you’ve deployed a two-tier application on AWS — your VPC, ALB, EC2, RDS, security groups, everything. Now there’s a new feature request, and you don’t want to deploy the changes in the same environment.&lt;/p&gt;

&lt;p&gt;So you decide to replicate the environment.&lt;/p&gt;

&lt;p&gt;If everything is hardcoded, you’re now stuck manually changing names and identifiers for every single resource.&lt;br&gt;&lt;br&gt;
Painful.&lt;br&gt;&lt;br&gt;
Time-consuming.&lt;br&gt;&lt;br&gt;
Highly prone to breaking things.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;The Fix: Use Variables Like a Pro&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Store all your important attributes inside a &lt;code&gt;variables.tf&lt;/code&gt; file.&lt;br&gt;&lt;br&gt;
This gives you a clean, centralized location for every configuration value your entire project depends on.&lt;/p&gt;

&lt;p&gt;In the above scenario, if your resources use variables, all you need to do is change a value in one place — and Terraform will automatically reflect it everywhere.&lt;/p&gt;

&lt;p&gt;Here’s how you define a variable in Terraform:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;variable &lt;span class="s2"&gt;"instance_type"&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  default &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;  &lt;span class="c"&gt;# EC2 Instance Type&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Clean, reusable, scalable — and exactly how real-world Terraform is written.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;❌ Mistake 3: Mixing Manual Changes Through the AWS Console&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This one is a classic beginner trap.&lt;/p&gt;

&lt;p&gt;When you provision infrastructure using Terraform, it stores a full blueprint of your resources inside the &lt;strong&gt;terraform.tfstate&lt;/strong&gt; file. This file represents the &lt;em&gt;current state&lt;/em&gt; of your infrastructure — basically Terraform’s memory of what exists.&lt;/p&gt;

&lt;p&gt;Now imagine you want to update something small, like renaming an EC2 instance.&lt;br&gt;&lt;br&gt;
You open the AWS Console, click on the instance, change the name, hit save, and boom — done.&lt;/p&gt;

&lt;p&gt;Simple, right?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Yes. But also… very wrong.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Making manual console changes creates something called &lt;strong&gt;drift&lt;/strong&gt; — a mismatch between:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;what actually exists in AWS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;what Terraform &lt;em&gt;thinks&lt;/em&gt; exists (according to the state file)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This drift becomes a huge headache because Terraform will now get confused about what's changed, what needs to be replaced, or what should not exist at all. For beginners, handling drift is even more overwhelming because it's not always obvious where things went wrong.&lt;/p&gt;

&lt;p&gt;Here’s the golden rule:&lt;/p&gt;

&lt;p&gt;If you provision resources using Terraform,&lt;br&gt;&lt;br&gt;
&lt;strong&gt;update or delete them using Terraform only.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Avoid the temptation of "quick fixes" in the AWS Console. A few clicks today can cause hours of debugging tomorrow.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Moral of the story:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Treat Terraform as your &lt;strong&gt;single source of truth&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
No ClickOps. No shortcuts.&lt;/p&gt;


&lt;h2&gt;
  
  
  ❌ &lt;strong&gt;Mistake 4: Ignoring Terraform Resource Dependencies&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Terraform is pretty smart when it comes to understanding relationships between resources. It automatically builds a &lt;strong&gt;dependency graph&lt;/strong&gt; to figure out what needs to be created first and what depends on what.&lt;br&gt;&lt;br&gt;
Most of the time, this works beautifully.&lt;/p&gt;

&lt;p&gt;But sometimes… Terraform needs a little help.&lt;/p&gt;

&lt;p&gt;There are scenarios where Terraform &lt;em&gt;cannot&lt;/em&gt; infer dependencies on its own — especially when two resources don’t have an obvious reference to each other. That’s where beginners get stuck.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Applying an &lt;strong&gt;S3 Bucket Policy&lt;/strong&gt; before the bucket is actually created&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Applying &lt;strong&gt;IAM role attachments&lt;/strong&gt; before the IAM role itself exists&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Creating a &lt;strong&gt;Lambda permission&lt;/strong&gt; before the Lambda function is ready&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In such cases, Terraform might try to create things in the wrong order, leading to errors.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;The Fix: Use&lt;/strong&gt; &lt;code&gt;depends_on&lt;/code&gt; Smartly
&lt;/h3&gt;

&lt;p&gt;Terraform gives us an escape hatch — the &lt;code&gt;depends_on&lt;/code&gt; meta-argument.&lt;/p&gt;

&lt;p&gt;With &lt;code&gt;depends_on&lt;/code&gt;, you can explicitly tell Terraform:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Hey, this resource should only be created &lt;em&gt;after&lt;/em&gt; this other resource is fully ready.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It ensures the correct and predictable order of execution.&lt;/p&gt;

&lt;p&gt;Example use case:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;resource &lt;span class="s2"&gt;"aws_s3_bucket_policy"&lt;/span&gt; &lt;span class="s2"&gt;"bucket_policy"&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  bucket &lt;span class="o"&gt;=&lt;/span&gt; aws_s3_bucket.my_bucket.id

  policy &lt;span class="o"&gt;=&lt;/span&gt; data.aws_iam_policy_document.example.json

  depends_on &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;
    aws_s3_bucket.my_bucket
  &lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now Terraform knows for sure: &lt;strong&gt;Bucket first → Policy second.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Moral of the story:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Understand how Terraform creates its dependency graph, and use &lt;code&gt;depends_on&lt;/code&gt; wisely when Terraform can’t figure things out on its own.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;❌ Mistake 5: Thinking Terraform Is Only About&lt;/strong&gt; &lt;code&gt;init&lt;/code&gt;, &lt;code&gt;plan&lt;/code&gt;, and &lt;code&gt;apply&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;I still remember when I started learning Terraform.&lt;br&gt;&lt;br&gt;
I watched a bunch of YouTube tutorials, and almost every single one followed the exact same pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Write config in &lt;code&gt;main.tf&lt;/code&gt;, provider in &lt;code&gt;provider.tf&lt;/code&gt;, vars in &lt;code&gt;variables.tf&lt;/code&gt;, outputs in &lt;code&gt;outputs.tf&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run &lt;code&gt;terraform init&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run &lt;code&gt;terraform plan&lt;/code&gt; (and let’s be honest, most beginners skip this 😅)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run &lt;code&gt;terraform apply --auto-approve&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And at the end, &lt;code&gt;terraform destroy&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And that’s it.&lt;br&gt;&lt;br&gt;
End of tutorial.&lt;br&gt;&lt;br&gt;
Done.&lt;br&gt;&lt;br&gt;
“You now know Terraform.” 🙃&lt;/p&gt;

&lt;p&gt;Except… that’s not the full story.&lt;/p&gt;

&lt;p&gt;Terraform is &lt;strong&gt;not&lt;/strong&gt; just about those three commands. There are many other commands that help you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;write cleaner, more readable code&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;avoid silly mistakes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;prevent accidental deployments&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;stick to best practices from day one&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But beginners (including me back in the day) completely ignore them.&lt;/p&gt;

&lt;p&gt;Here are a few essential ones:&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;🔹&lt;/strong&gt; &lt;code&gt;terraform plan&lt;/code&gt; (Seriously, use it)
&lt;/h3&gt;

&lt;p&gt;Before applying, &lt;em&gt;always&lt;/em&gt; check the plan.&lt;br&gt;&lt;br&gt;
It shows you what Terraform will create, modify, or delete.&lt;br&gt;&lt;br&gt;
Skipping this step is how disasters happen — and trust me, I’ve been guilty of this too. 😅&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;🔹&lt;/strong&gt; &lt;code&gt;terraform fmt&lt;/code&gt; (Fix your code automatically)
&lt;/h3&gt;

&lt;p&gt;Your code may work, but if it looks like a messy bowl of noodles, nobody wants to maintain it.&lt;br&gt;&lt;br&gt;
&lt;code&gt;terraform fmt&lt;/code&gt; formats your HCL beautifully and keeps your files consistent.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;🔹&lt;/strong&gt; &lt;code&gt;terraform validate&lt;/code&gt; (Catch misconfigurations early)
&lt;/h3&gt;

&lt;p&gt;Sometimes your code “looks” right but contains subtle mistakes — wrong types, bad arguments, misplaced blocks, etc.&lt;br&gt;&lt;br&gt;
&lt;code&gt;terraform validate&lt;/code&gt; helps detect these before you even think about applying them.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Moral of the story:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Make &lt;code&gt;fmt&lt;/code&gt;, &lt;code&gt;validate&lt;/code&gt;, and &lt;code&gt;plan&lt;/code&gt; a daily habit.&lt;br&gt;&lt;br&gt;
They will save you from so many unnecessary headaches.&lt;/p&gt;


&lt;h2&gt;
  
  
  &lt;strong&gt;🌟 Hands-On: Deploying a Static Portfolio Website on an S3 Bucket&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Alright, that’s enough theory — now let’s actually get our hands dirty.&lt;br&gt;&lt;br&gt;
To make everything we discussed more practical, we’ll deploy a &lt;strong&gt;static portfolio website&lt;/strong&gt; on an S3 bucket using Terraform.&lt;/p&gt;

&lt;p&gt;The complete code is available here:&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://github.com/Pravesh-Sudha/terra-projects" rel="noopener noreferrer"&gt;&lt;strong&gt;https://github.com/Pravesh-Sudha/terra-projects&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you open the repo, navigate to the &lt;code&gt;terra-mistakes&lt;/code&gt; directory. Inside it, you’ll find multiple Terraform files and a &lt;code&gt;static/&lt;/code&gt; folder. The &lt;code&gt;static&lt;/code&gt; directory contains two HTML files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;index.html&lt;/strong&gt; — your main portfolio page&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;error.html&lt;/strong&gt; — fallback page for unexpected errors&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Inside the &lt;code&gt;main.tf&lt;/code&gt;, we’re:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;creating an S3 bucket&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;enabling static website hosting&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;uploading both HTML files&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;attaching a bucket policy to allow public access&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You’ll also notice something important:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;We &lt;strong&gt;didn’t hardcode&lt;/strong&gt; values; even in this small project, the bucket name is stored in &lt;code&gt;variables.tf&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We used &lt;code&gt;depends_on&lt;/code&gt; so Terraform knows to create the Public Access Block before applying the bucket policy&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are the exact practices that prevent the mistakes we discussed earlier.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Run These Commands to See Everything in Action&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Open your terminal inside the &lt;code&gt;terra-mistakes&lt;/code&gt; directory and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform init          &lt;span class="c"&gt;# Initialize provider plugins&lt;/span&gt;
terraform &lt;span class="nb"&gt;fmt&lt;/span&gt;           &lt;span class="c"&gt;# Fix indentation, syntax, and formatting&lt;/span&gt;
terraform validate      &lt;span class="c"&gt;# Detect any surface-level misconfigurations&lt;/span&gt;
terraform plan          &lt;span class="c"&gt;# Preview what Terraform will provision&lt;/span&gt;
terraform apply &lt;span class="nt"&gt;--auto-approve&lt;/span&gt;   &lt;span class="c"&gt;# Deploy the S3 website&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the resources are created, Terraform will output the &lt;strong&gt;Website URL&lt;/strong&gt; from the &lt;code&gt;output.tf&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This project is deployed in &lt;strong&gt;us-east-1&lt;/strong&gt;, and the S3 website endpoint URL is hardcoded for that region.&lt;br&gt;&lt;br&gt;
If you want to deploy in another region, update both the &lt;strong&gt;provider&lt;/strong&gt; and &lt;strong&gt;output.tf&lt;/strong&gt; accordingly.&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%2Few983rbomh2r3s9ttbsz.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%2Few983rbomh2r3s9ttbsz.png" alt=" " width="800" height="476"&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%2Fr1dy2b0bjelnzc2hpx5s.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%2Fr1dy2b0bjelnzc2hpx5s.png" alt=" " width="800" height="383"&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%2Fx5lm32jh5396gab5izj9.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%2Fx5lm32jh5396gab5izj9.png" alt=" " width="800" height="956"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, open the URL in your browser — and boom! 🎉&lt;br&gt;&lt;br&gt;
Your portfolio website is live on S3.&lt;/p&gt;


&lt;h3&gt;
  
  
  &lt;strong&gt;Updating the Policy the Right Way&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Let’s say you want to add &lt;strong&gt;delete object&lt;/strong&gt; permission to the bucket policy.&lt;br&gt;&lt;br&gt;
The beginner instinct?&lt;br&gt;&lt;br&gt;
Head straight to the AWS Console → IAM → update the policy manually.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But we don’t do ClickOps here.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Remember: Terraform is your single source of truth.&lt;/p&gt;

&lt;p&gt;So instead, update your HCL code inside the bucket policy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Statement &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;
  &lt;span class="o"&gt;{&lt;/span&gt;
    Sid       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"PublicReadGetObject"&lt;/span&gt;
    Effect    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Allow"&lt;/span&gt;
    Principal &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"*"&lt;/span&gt;
    Action    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"s3:GetObject"&lt;/span&gt;, &lt;span class="s2"&gt;"s3:DeleteObject"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;  &lt;span class="c"&gt;# Added delete permission&lt;/span&gt;
    Resource  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;aws_s3_bucket&lt;/span&gt;&lt;span class="p"&gt;.site_bucket.arn&lt;/span&gt;&lt;span class="k"&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;/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%2F1bz0x3djr97tsxryc8jk.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%2F1bz0x3djr97tsxryc8jk.png" alt=" " width="800" height="671"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then apply the changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform apply &lt;span class="nt"&gt;--auto-approve&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Terraform will detect the change, update only the policy, and keep everything consistent — no drift, no confusion.&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%2Fkg7y71hrxqaazcwmg0ha.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%2Fkg7y71hrxqaazcwmg0ha.png" alt=" " width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To cross check the changes, go to S3 Console → Navigate to the bucket and click on Permissions tab and See the Bucket Policy.&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%2Fiuvg30a0s5s2z8yf6suf.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%2Fiuvg30a0s5s2z8yf6suf.png" alt=" " width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Cleaning Up&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When you're done experimenting, don’t forget to delete everything:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform destroy &lt;span class="nt"&gt;--auto-approve&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This removes all AWS resources cleanly so you don’t get billed unnecessarily.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🌟 Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Learning Terraform as a beginner can feel overwhelming — not because the tool is hard, but because Infrastructure as Code requires a different mindset. The mistakes we covered today are extremely common, and almost every Terraform practitioner (including me 😅) has made them at some point.&lt;/p&gt;

&lt;p&gt;But the good news?&lt;/p&gt;

&lt;p&gt;Once you start writing declarative code, using variables wisely, avoiding ClickOps, understanding dependencies, and making &lt;code&gt;fmt&lt;/code&gt;, &lt;code&gt;validate&lt;/code&gt;, and &lt;code&gt;plan&lt;/code&gt; part of your workflow — Terraform becomes a powerful, predictable, and enjoyable tool to work with.&lt;/p&gt;

&lt;p&gt;Take your time, practice often, and break things safely.&lt;br&gt;&lt;br&gt;
Every small experiment makes you a better DevOps engineer.&lt;/p&gt;

&lt;p&gt;If you followed along with the hands-on demo, you now have a static website deployed on AWS using clean, beginner-friendly Terraform. That’s a solid milestone — great job, Dev! 🚀&lt;/p&gt;

&lt;p&gt;Feel free to explore more projects, improve your configurations, or even contribute to the repo. And if you ever get stuck, you know where to find me.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Connect With Me&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you enjoyed this blog or learned something new, let’s connect:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;🌐 &lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="https://praveshsudha.com" rel="noopener noreferrer"&gt;https://praveshsudha.com&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🐦 &lt;strong&gt;Twitter/X:&lt;/strong&gt; &lt;a href="https://x.com/praveshstwt" rel="noopener noreferrer"&gt;https://x.com/praveshstwt&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;💼 &lt;strong&gt;LinkedIn:&lt;/strong&gt; &lt;a href="https://www.linkedin.com/in/pravesh-sudha" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/pravesh-sudha&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;📺 &lt;strong&gt;YouTube:&lt;/strong&gt; &lt;a href="https://www.youtube.com/@pravesh-sudha" rel="noopener noreferrer"&gt;https://www.youtube.com/@pravesh-sudha&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s keep building, learning, and automating together! 🚀&lt;/p&gt;

</description>
      <category>aws</category>
      <category>terraform</category>
      <category>devops</category>
      <category>infrastructureascode</category>
    </item>
    <item>
      <title>🚀 5 Terraform Hacks to Cut Your Deployment Time by 90%</title>
      <dc:creator>Pravesh Sudha</dc:creator>
      <pubDate>Fri, 28 Nov 2025 16:43:07 +0000</pubDate>
      <link>https://dev.to/aws-builders/5-terraform-hacks-to-cut-your-deployment-time-by-90-5dp5</link>
      <guid>https://dev.to/aws-builders/5-terraform-hacks-to-cut-your-deployment-time-by-90-5dp5</guid>
      <description>&lt;h2&gt;
  
  
  🌟 Introduction
&lt;/h2&gt;

&lt;p&gt;Welcome, Devs, to the exciting world of Infrastructure and Cloud computing!&lt;/p&gt;

&lt;p&gt;If you have been navigating the cloud landscape recently, you have undoubtedly encountered the industry buzzword: &lt;strong&gt;Infrastructure as Code (IaC)&lt;/strong&gt;. Simply put, IaC is the practice of specifying your infrastructure requirements in a code format rather than manually configuring servers and networks. This approach is the bedrock of modern DevOps, ensuring &lt;strong&gt;reliability&lt;/strong&gt; and &lt;strong&gt;consistency&lt;/strong&gt; across all your environments.&lt;/p&gt;

&lt;p&gt;While there is a robust ecosystem of tools offering IaC capabilities—including Pulumi, Chef, Puppet, and AWS CloudFormation—today we are zeroing in on the undisputed heavyweight of this segment: &lt;strong&gt;Terraform&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you are just starting out or want to dive deeper into the core concepts, I have covered a lot of ground regarding Terraform in my previous posts. I highly recommend checking out the full series here to get up to speed:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://blog.praveshsudha.com/series/terraform" rel="noopener noreferrer"&gt;&lt;strong&gt;Terraform Series&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In today's guide, we are shifting our focus to &lt;strong&gt;Optimisation&lt;/strong&gt;. As your infrastructure grows, so does the complexity and the time required for deployments. We will dive into the best practices to improve the performance of your Terraform configurations, ensuring your infrastructure remains efficient, fast, and secure.&lt;/p&gt;

&lt;p&gt;So, without further ado, let’s get started!&lt;/p&gt;




&lt;h2&gt;
  
  
  📽️ Youtube Demonstration
&lt;/h2&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/JorEMXgqHWk"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 Pre-Requisites
&lt;/h2&gt;

&lt;p&gt;Before we jump into the optimisation techniques, let's ensure you have the necessary tools ready to roll.&lt;/p&gt;

&lt;p&gt;As usual, for this guide, you will need the following set up on your machine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AWS CLI&lt;/strong&gt; (Configured with an appropriate IAM user)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Terraform CLI&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Docker and Docker-compose&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you don't have these installed yet or aren't sure how to configure them, don’t worry! I have walked through the entire process step-by-step in my previous guide. Just follow the instructions there, and you will be good to go:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://blog.praveshsudha.com/getting-started-with-terraform-a-beginners-guide#heading-step-1-install-the-aws-cli" rel="noopener noreferrer"&gt;&lt;strong&gt;How to Install AWS CLI and Terraform&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you are all set up, proceed to the next section where we start optimizing!&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 How to Optimise Terraform
&lt;/h2&gt;

&lt;p&gt;Now that we are set up, let's get into the meat of the matter. Here are &lt;strong&gt;5 Best Practices&lt;/strong&gt; to turbocharge your Terraform performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Use Remote Backends for State Management
&lt;/h3&gt;

&lt;p&gt;By default, Terraform stores its "state" (the file that maps your code to real-world resources) locally on your machine (&lt;code&gt;terraform.tfstate&lt;/code&gt;). While this works for solo side projects, it kills performance and collaboration in real teams.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Fix:&lt;/strong&gt; Store your Terraform State file in a remote location, preferably &lt;strong&gt;AWS S3&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Why?&lt;/strong&gt; It prevents conflicts when multiple team members (Dev, Stage, Prod) try to apply changes at the same time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Performance Boost:&lt;/strong&gt; Moving to a remote backend can improve I/O performance by &lt;strong&gt;10-30%&lt;/strong&gt; for large state files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;State Locking:&lt;/strong&gt; When configured correctly with State Lock enabled, you ensure that no two people can write to the state simultaneously. (Note: While traditionally done with DynamoDB, ensuring your backend supports locking is key to preventing corruption).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How to do it:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You simply need to create an S3 bucket and reference it in your configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform &lt;span class="o"&gt;{&lt;/span&gt;
  backend &lt;span class="s2"&gt;"s3"&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    bucket       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"my-terraform-state-bucket"&lt;/span&gt;
    key          &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"prod/terraform.tfstate"&lt;/span&gt;
    region       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"us-east-1"&lt;/span&gt;
    use_lockfile &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It’s that simple!&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Modularise Your Code
&lt;/h3&gt;

&lt;p&gt;Writing one giant &lt;a href="http://main.tf" rel="noopener noreferrer"&gt;&lt;code&gt;main.tf&lt;/code&gt;&lt;/a&gt; file is a common rookie mistake. If you are defining a secure EC2 instance, you likely also need a VPC, Security Groups, Subnets, etc. Lumping this all together makes Terraform work harder to calculate dependencies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Fix:&lt;/strong&gt; Break your code down into &lt;strong&gt;Modules&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of rewriting the same sub-components for every service, use the &lt;strong&gt;DRY (Don't Repeat Yourself)&lt;/strong&gt; principle. Create a module for your network stack, a module for your compute stack, etc.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Benefit:&lt;/strong&gt; This reduces complex dependency graphs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Speed:&lt;/strong&gt; It enables better parallel execution because Terraform can process distinct modules concurrently.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Unlock True Parallelism
&lt;/h3&gt;

&lt;p&gt;Terraform is capable of walking through the dependency graph and creating non-dependent resources at the same time. However, the default setting is often too conservative.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Fix:&lt;/strong&gt; Adjust the &lt;code&gt;-parallelism&lt;/code&gt; flag.&lt;/p&gt;

&lt;p&gt;By default, Terraform limits concurrent operations to &lt;strong&gt;10&lt;/strong&gt;. For modern systems, this is quite low.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Guideline:&lt;/strong&gt; You can safely increase this to &lt;strong&gt;30-100&lt;/strong&gt; for normal development changes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Constraint:&lt;/strong&gt; Don't go &lt;em&gt;too&lt;/em&gt; high, or you might hit AWS API rate limits (throttling). Aim for roughly 512MB of system memory per 1,000 resources.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Result:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using this flag can cut down plan and apply times significantly—potentially dropping a 3-5 minute operation down to just 30-60 seconds.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform apply &lt;span class="nt"&gt;-parallelism&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;30
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Optimise Provider Configuration
&lt;/h3&gt;

&lt;p&gt;Sometimes, Terraform performs checks that aren't strictly necessary for every single run, especially in non-production environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Fix:&lt;/strong&gt; Tune your AWS Provider.&lt;/p&gt;

&lt;p&gt;In your Testing, Staging, or Dev environments, you can tell the provider to skip certain validations to save time on API calls. You can also configure retry behaviors to handle network blips gracefully without failing the whole run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example Configuration:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;provider &lt;span class="s2"&gt;"aws"&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  region                      &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"us-east-1"&lt;/span&gt;
  skip_credentials_validation &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;true
  &lt;/span&gt;skip_metadata_api_check     &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;true
  &lt;/span&gt;max_retries                 &lt;span class="o"&gt;=&lt;/span&gt; 5
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; While this is a great time-saver for Dev/Test environments, check your organization's policy before using strict validation skipping in Production.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  5. Use Resource Targeting
&lt;/h3&gt;

&lt;p&gt;When managing large infrastructure, Terraform's default behavior is to analyze the entire configuration graph. For routine, independent updates (e.g., adding a new, isolated logging bucket), you might want to limit the scope of the operation to save time.&lt;/p&gt;

&lt;p&gt;The Use Case: Use the -target flag when dealing with literally independent resources that are not connected to other resources that are changing. This allows you to apply changes only to specific resources, acting like a surgical strike rather than a full deployment.&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="c"&gt;# Only apply changes to the specific bucket, ignoring the rest&lt;/span&gt;
terraform apply &lt;span class="nt"&gt;-target&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;aws_s3_bucket.my_website_bucket
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🌟 Practical Demonstration
&lt;/h2&gt;

&lt;p&gt;Enough with the theory! Let's get our hands dirty with some real Terraform code and the AWS Console.&lt;/p&gt;

&lt;p&gt;To demonstrate these optimizations, we are going to deploy a &lt;strong&gt;Request Counter Application&lt;/strong&gt; on &lt;strong&gt;AWS Elastic Beanstalk&lt;/strong&gt;. This isn't just a "Hello World"; it is a multi-container setup running on an ECS Cluster involving:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Nginx:&lt;/strong&gt; As a reverse proxy and load balancer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Node.js:&lt;/strong&gt; The application server (running two instances).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Redis:&lt;/strong&gt; To store the request count data persistently.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 1: Create Your ECR Repositories
&lt;/h3&gt;

&lt;p&gt;First, we need a place to store our Docker images. We will create two Public Repositories in AWS Elastic Container Registry (ECR)—one for our web app and one for our custom Nginx image.&lt;/p&gt;

&lt;p&gt;Run the following commands in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws ecr-public create-repository &lt;span class="nt"&gt;--repository-name&lt;/span&gt; nginx-node-redis-web
aws ecr-public create-repository &lt;span class="nt"&gt;--repository-name&lt;/span&gt; nginx-node-redis-nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Get the Code
&lt;/h3&gt;

&lt;p&gt;The complete source code for this project is available on my GitHub.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fork&lt;/strong&gt; the repo.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clone&lt;/strong&gt; it to your local system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open it in your code editor (like VS Code).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/Pravesh-Sudha/nginx-node-redis.git" rel="noopener noreferrer"&gt;&lt;strong&gt;GitHub Repo: Nginx-Node-Redis Project&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Test Locally (Get the Vibe)
&lt;/h3&gt;

&lt;p&gt;Before we deploy to the cloud, let’s make sure it works on your machine. Inside the project directory, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker-compose up &lt;span class="nt"&gt;--build&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will spin up the Nginx, Redis, and two Web containers. Open your browser and go to &lt;code&gt;http://localhost:8080&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%2Fz9faxqhxtvsrbptpem0t.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%2Fz9faxqhxtvsrbptpem0t.png" alt=" "&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%2Fir9hjgi99fwgovoyki5p.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%2Fir9hjgi99fwgovoyki5p.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should see a nice Request Counter app. Every time you refresh, the counter increments, and you will see the server ID toggle between &lt;code&gt;web1&lt;/code&gt; and &lt;code&gt;web2&lt;/code&gt; as Nginx load-balances the traffic.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Once you are satisfied, press&lt;/em&gt; &lt;code&gt;CTRL+C&lt;/code&gt; in your terminal to stop the application.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Build and Push to Cloud
&lt;/h3&gt;

&lt;p&gt;Now, let's move these images to AWS.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Navigate to the &lt;code&gt;web&lt;/code&gt; directory in your terminal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to &lt;strong&gt;AWS Console → ECR → Public Repositories&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select &lt;code&gt;nginx-node-redis-web&lt;/code&gt; and click the &lt;strong&gt;"View Push Commands"&lt;/strong&gt; button.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Execute those commands one by one to build and push your web image.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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%2Fc8ef6ut0vvffupwatc6a.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%2Fc8ef6ut0vvffupwatc6a.png" alt=" "&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%2Frnixslimgpuvo2aios69.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%2Frnixslimgpuvo2aios69.png" alt=" "&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%2Feuxcbbmyp6z5fv7dktf7.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%2Feuxcbbmyp6z5fv7dktf7.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repeat for Nginx:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Navigate to the &lt;code&gt;nginx&lt;/code&gt; directory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the AWS Console, select &lt;code&gt;nginx-node-redis-nginx&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click &lt;strong&gt;"View Push Commands"&lt;/strong&gt; and execute them to push your Nginx image.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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%2F7nuepr4rgedh8fphy3wl.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%2F7nuepr4rgedh8fphy3wl.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: The Terraform Configuration
&lt;/h3&gt;

&lt;p&gt;Navigate to the &lt;code&gt;terra-performance-config&lt;/code&gt; directory. This is where we have applied all the optimizations we discussed earlier:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;provider.tf&lt;/code&gt;: We are skipping unnecessary validation checks (&lt;code&gt;skip_metadata_api_check&lt;/code&gt;, etc.) to speed up the provider.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;backend.tf&lt;/code&gt;: We are using an &lt;strong&gt;S3 bucket&lt;/strong&gt; to host our state file remotely and enabling &lt;code&gt;lock_file&lt;/code&gt; to prevent write conflicts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;main.tf&lt;/code&gt;: We are using a Terraform Module for Elastic Beanstalk. It utilizes a &lt;code&gt;Dockerrun.aws.json&lt;/code&gt; file (similar to &lt;code&gt;docker-compose&lt;/code&gt; but for ECS) which is uploaded to S3 and referenced in the module.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;dockerrun.aws.json&lt;/code&gt;: Skelton of your Docker containers, &lt;strong&gt;make sure to replace the image URI of web1, web2 and Nginx, you can find it in your ECR public Repo.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;variables.tf&lt;/code&gt;: Contains our standard configuration using the default VPC and subnets in &lt;code&gt;us-east-1&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;⚠️ CRITICAL: Architecture Check (ARM vs AMD)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I built the default Docker images on a &lt;strong&gt;MacBook Air M3 (ARM64 architecture)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you are using &lt;strong&gt;Windows or Linux (Intel/AMD)&lt;/strong&gt;, your architecture is likely &lt;strong&gt;AMD64&lt;/strong&gt;. You &lt;strong&gt;must&lt;/strong&gt; make these two small changes in the code before proceeding, or the deployment will fail:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;In&lt;/strong&gt; &lt;code&gt;variables.tf&lt;/code&gt;: Change the instance type from &lt;code&gt;t4g.micro&lt;/code&gt; (ARM-based) to &lt;code&gt;t3.micro&lt;/code&gt; or &lt;code&gt;t3.small&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&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%2Fdf4i2v0hot0gkx7kqi5y.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%2Fdf4i2v0hot0gkx7kqi5y.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;In&lt;/strong&gt; &lt;code&gt;Dockerrun.aws.json&lt;/code&gt;: Locate the Redis container definition. Change the image from the specific ARM tag to generic: &lt;code&gt;"image": "redis:alpine"&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&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%2Frm1pl02fmn084klhc621.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%2Frm1pl02fmn084klhc621.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Step 6: Testing Parallelism
&lt;/h3&gt;

&lt;p&gt;Now for the moment of truth. Let's see how fast we can provision this stack using the &lt;strong&gt;Parallelism&lt;/strong&gt; optimization.&lt;/p&gt;

&lt;p&gt;Run the following commands:&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;cd &lt;/span&gt;terra-performance-config

&lt;span class="c"&gt;# Create the S3 bucket for our artifacts&lt;/span&gt;
aws s3 mb s3://pravesh-ebs-terra-performance-bucket

&lt;span class="c"&gt;# Initialize Terraform&lt;/span&gt;
terraform init

&lt;span class="c"&gt;# Apply with high parallelism&lt;/span&gt;
&lt;span class="nb"&gt;time &lt;/span&gt;terraform apply &lt;span class="nt"&gt;--auto-approve&lt;/span&gt; &lt;span class="nt"&gt;-parallelism&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;30
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The Result:&lt;/strong&gt; Usually, a multi-container Elastic Beanstalk environment takes &lt;strong&gt;10-30 minutes&lt;/strong&gt; to provision. With &lt;code&gt;-parallelism=30&lt;/code&gt;, you will likely see this drop to &lt;strong&gt;3-8 minutes&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%2Fg3hv3ux99hi01zkbsd1z.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%2Fg3hv3ux99hi01zkbsd1z.png" alt=" "&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%2Fnio858a63ca4j75xd7aw.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%2Fnio858a63ca4j75xd7aw.png" alt=" "&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%2Fng4a3873s9kzwn8xlkk5.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%2Fng4a3873s9kzwn8xlkk5.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once finished, Terraform will output the Elastic Beanstalk URL. Click it to see your live app!&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 7: Testing Resource Targeting
&lt;/h3&gt;

&lt;p&gt;Finally, let's look at the power of &lt;strong&gt;Resource Targeting&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We have made a small change to the &lt;code&gt;Dockerrun.aws.json&lt;/code&gt; file (e.g., adding an Environment Variable).&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%2Fjbd7cevjqtgv1x3nevzt.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%2Fjbd7cevjqtgv1x3nevzt.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we ran a normal apply, Terraform might check every single resource. Instead, we will target &lt;em&gt;only&lt;/em&gt; the specific components we are updating:&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;time &lt;/span&gt;terraform apply &lt;span class="nt"&gt;-parallelism&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;30 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-target&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;aws_s3_object.dockerrun &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-target&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;aws_elastic_beanstalk_application_version.v1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-target&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;module.elastic-beanstalk-environment &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-auto-approve&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The Result:&lt;/strong&gt; Without targeting, Terraform might attempt to refresh the state of the entire VPC and Security Group structure. With targeting, this update happens in &lt;strong&gt;under a minute&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%2F0q3i6f9jltkd9t43xyqh.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%2F0q3i6f9jltkd9t43xyqh.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Cleanup
&lt;/h3&gt;

&lt;p&gt;Don't forget to tear down your infrastructure to avoid unexpected AWS bills!&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="c"&gt;# Destroy Terraform resources&lt;/span&gt;
terraform destroy &lt;span class="nt"&gt;--auto-approve&lt;/span&gt;

&lt;span class="c"&gt;# Clean up S3&lt;/span&gt;
aws s3 &lt;span class="nb"&gt;rm &lt;/span&gt;s3://pravesh-ebs-terra-performance-bucket &lt;span class="nt"&gt;--recursive&lt;/span&gt;
aws s3 rb s3://pravesh-ebs-terra-performance-bucket

&lt;span class="c"&gt;# Delete ECR Repositories&lt;/span&gt;
aws ecr-public delete-repository &lt;span class="nt"&gt;--repository-name&lt;/span&gt; nginx-node-redis-web &lt;span class="nt"&gt;--force&lt;/span&gt;
aws ecr-public delete-repository &lt;span class="nt"&gt;--repository-name&lt;/span&gt; nginx-node-redis-nginx &lt;span class="nt"&gt;--force&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🌟 Conclusion
&lt;/h2&gt;

&lt;p&gt;And that’s a wrap, folks!&lt;/p&gt;

&lt;p&gt;We have successfully journeyed through the landscape of &lt;strong&gt;Terraform Optimization&lt;/strong&gt;. We didn't just learn how to write Infrastructure as Code; we learned how to make it &lt;strong&gt;efficient&lt;/strong&gt;, &lt;strong&gt;scalable&lt;/strong&gt;, and &lt;strong&gt;blazing fast&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;From moving our state to a &lt;strong&gt;Remote Backend&lt;/strong&gt; to unlocking the speed of &lt;strong&gt;Parallelism&lt;/strong&gt;, and from &lt;strong&gt;Modularising&lt;/strong&gt; our logic to performing surgical strikes with &lt;strong&gt;Resource Targeting&lt;/strong&gt;—you now possess the toolkit to take your DevOps game to the next level.&lt;/p&gt;

&lt;p&gt;Remember, optimization isn't just about saving a few minutes here and there. It's about creating a developer experience where feedback loops are short, deployments are reliable, and your infrastructure can scale without becoming a bottleneck.&lt;/p&gt;

&lt;p&gt;I hope you enjoyed this deep dive and the hands-on project. Go ahead and apply these techniques to your own infrastructure, and let me know how much time you saved on your next deployment!&lt;/p&gt;

&lt;p&gt;If you found this guide helpful or have any questions, feel free to connect with me. I talk about Cloud, DevOps, and everything in between.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🚀 Let's Connect:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;💼 &lt;strong&gt;LinkedIn:&lt;/strong&gt; &lt;a href="https://linkedin.com/in/pravesh-sudha" rel="noopener noreferrer"&gt;linkedin.com/in/pravesh-sudha&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;🐦 &lt;strong&gt;Twitter/X:&lt;/strong&gt; &lt;a href="https://x.com/praveshstwt" rel="noopener noreferrer"&gt;x.com/praveshstwt&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;📹 &lt;strong&gt;YouTube:&lt;/strong&gt; &lt;a href="https://youtube.com/@pravesh-sudha" rel="noopener noreferrer"&gt;youtube.com/@pravesh-sudha&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;🌐 &lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="https://blog.praveshsudha.com/" rel="noopener noreferrer"&gt;blog.praveshsudha.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy Coding and Happy Clouding! ☁️🚀&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>terraform</category>
      <category>docker</category>
    </item>
    <item>
      <title>🚀 Terraform Workspaces and Multi-Environment Deployments</title>
      <dc:creator>Pravesh Sudha</dc:creator>
      <pubDate>Thu, 06 Nov 2025 07:58:51 +0000</pubDate>
      <link>https://dev.to/aws-builders/terraform-workspaces-and-multi-environment-deployments-12gb</link>
      <guid>https://dev.to/aws-builders/terraform-workspaces-and-multi-environment-deployments-12gb</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Learn How to manage Terraform Workspace and configure Multi-Environment Deployment.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  💡 Introduction
&lt;/h2&gt;

&lt;p&gt;Welcome to the world of &lt;strong&gt;Cloud and Automation&lt;/strong&gt;, Devs!&lt;br&gt;&lt;br&gt;
Today, we’re going to explore one of the most powerful and widely used Infrastructure-as-Code (IaC) tools — &lt;strong&gt;Terraform&lt;/strong&gt;. In this guide, we’ll learn how to use Terraform &lt;strong&gt;workspaces&lt;/strong&gt; to manage multiple environments seamlessly — from &lt;strong&gt;Development&lt;/strong&gt; to &lt;strong&gt;Staging&lt;/strong&gt; and finally &lt;strong&gt;Production&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;By the end of this blog, you’ll not only understand how Terraform organizes infrastructure across environments but also see it in action through a &lt;strong&gt;hands-on demonstration&lt;/strong&gt; — deploying a static website on &lt;strong&gt;Amazon S3&lt;/strong&gt; with three isolated environments.&lt;/p&gt;

&lt;p&gt;So, without further ado, let’s dive in and uncover how Terraform simplifies multi-environment deployments in the cloud.&lt;/p&gt;


&lt;h2&gt;
  
  
  📽️ Youtube Demonstration
&lt;/h2&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/W0x42D34OMw"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;




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

&lt;p&gt;Before we jump into the implementation, let’s make sure your setup is ready. You’ll need the following tools installed and configured on your system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AWS CLI&lt;/strong&gt; – Installed and configured with an IAM user that has full access to &lt;strong&gt;Amazon S3&lt;/strong&gt;. If you don’t know how to do that, Follow &lt;a href="https://blog.praveshsudha.com/getting-started-with-terraform-a-beginners-guide#heading-step-1-install-the-aws-cli" rel="noopener noreferrer"&gt;these steps 1-3 from my Terraform Starter blog.&lt;/a&gt; (Just change the Permissions from EC2 to S3FullAccess)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Terraform CLI&lt;/strong&gt; – Installed and ready to execute Terraform commands.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once these are in place, you’ll have everything you need to follow along with the tutorial and deploy your multi-environment infrastructure.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 What is Terraform Workspace?
&lt;/h2&gt;

&lt;p&gt;When managing infrastructure with &lt;strong&gt;Terraform&lt;/strong&gt;, it’s common to work with multiple environments such as &lt;strong&gt;Development&lt;/strong&gt;, &lt;strong&gt;Staging&lt;/strong&gt;, and &lt;strong&gt;Production&lt;/strong&gt;. Each of these environments often requires its own set of resources and configurations. To keep things organized and maintain a clean infrastructure codebase, Terraform provides a powerful feature called &lt;strong&gt;Workspaces&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;Terraform Workspace&lt;/strong&gt; allows you to create and manage &lt;strong&gt;separate environments within a single Terraform configuration&lt;/strong&gt;. Each workspace is associated with its own &lt;strong&gt;state file&lt;/strong&gt;, which means the resources for one environment are isolated from another, even though they share the same configuration files. This makes it much easier to manage multiple deployments — all from a single codebase.&lt;/p&gt;

&lt;p&gt;When you initialize Terraform for the first time, a default workspace named &lt;strong&gt;“default”&lt;/strong&gt; is automatically created. Any infrastructure you create without explicitly switching workspaces will live in this default environment. You can then create new workspaces for different environments as needed.&lt;/p&gt;

&lt;p&gt;Here are the available Terraform workspace commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform workspace &lt;span class="nt"&gt;--help&lt;/span&gt;

Usage: terraform &lt;span class="o"&gt;[&lt;/span&gt;global options] workspace
  new, list, show, &lt;span class="k"&gt;select &lt;/span&gt;and delete Terraform workspaces.

Subcommands:
    delete    Delete a workspace
    list      List workspaces
    new       Create a new workspace
    &lt;span class="k"&gt;select    &lt;/span&gt;Select a workspace
    show      Show the name of the current workspace
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each workspace must have a &lt;strong&gt;unique name&lt;/strong&gt;. When you switch between them, Terraform automatically updates the &lt;strong&gt;state file&lt;/strong&gt; to match the selected workspace — ensuring your deployments remain consistent and isolated per environment.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 Pros and Cons of Using Terraform Workspaces
&lt;/h2&gt;

&lt;p&gt;Before deciding to use Terraform Workspaces for managing your environments, it’s important to understand both their advantages and limitations. While they provide a convenient way to organize infrastructure, they may not always be the best fit for every use case — especially in large-scale or complex deployments.&lt;/p&gt;

&lt;h4&gt;
  
  
  ✅ Pros
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Single Configuration for Multiple Environments&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
You can manage multiple environments — like &lt;strong&gt;Dev&lt;/strong&gt;, &lt;strong&gt;Stage&lt;/strong&gt;, and &lt;strong&gt;Prod&lt;/strong&gt; — using a single Terraform configuration. This reduces code duplication and keeps your setup clean and maintainable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Easy Environment Switching&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Workspaces come with a simple built-in command to switch between environments:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform workspace &lt;span class="k"&gt;select&lt;/span&gt; &amp;lt;name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;This makes moving between environments effortless and consistent.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simplifies Non-Production Environment Creation&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
You can easily spin up &lt;strong&gt;non-production environments&lt;/strong&gt; such as &lt;strong&gt;Development&lt;/strong&gt;, &lt;strong&gt;QA&lt;/strong&gt;, &lt;strong&gt;Beta&lt;/strong&gt;, or &lt;strong&gt;UAT&lt;/strong&gt; that mirror your production setup — often as smaller, scaled-down versions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Resource and Variable Isolation&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Each workspace maintains its own &lt;strong&gt;state file&lt;/strong&gt; and can have environment-specific &lt;strong&gt;variables&lt;/strong&gt;, reducing the chance of misconfigurations or accidental resource overlap.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ideal for Small to Medium Projects&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
For small teams or projects where environments share similar configurations, workspaces provide just the right balance of simplicity and control.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  ⚠️ Cons
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Added Complexity for Large-Scale Infrastructure&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
As projects grow, managing multiple environments and configurations through workspaces can become cumbersome and harder to maintain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Not Fully Isolated&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
While each workspace has its own state file, they still share the same backend configuration. Without proper management, this can lead to &lt;strong&gt;state conflicts or accidental cross-environment changes&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Limited for Advanced Use Cases&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Workspaces aren’t ideal for &lt;strong&gt;multi-provider&lt;/strong&gt; setups or situations where resources need to be shared across environments. In those cases, using &lt;strong&gt;separate directories or repositories&lt;/strong&gt; for each environment is often a better approach.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💡 Practical Demonstration
&lt;/h2&gt;

&lt;p&gt;Now that we’ve covered the theory, it’s time to get our hands dirty with a real-world example.&lt;br&gt;&lt;br&gt;
The project we’ll be working on demonstrates how to use &lt;strong&gt;Terraform Workspaces&lt;/strong&gt; to deploy a &lt;strong&gt;static website&lt;/strong&gt; on &lt;strong&gt;AWS S3&lt;/strong&gt;for multiple environments — Dev, Stage, and Prod.&lt;/p&gt;

&lt;p&gt;You can find the complete code for this project on my GitHub repository:&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://github.com/Pravesh-Sudha/terra-projects/" rel="noopener noreferrer"&gt;GitHub – terraform-workspace-s3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Navigate to the &lt;code&gt;terraform-workspace-s3&lt;/code&gt; directory, and you’ll see the following files and folders:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;provider.tf&lt;/code&gt; – Defines AWS as the cloud provider and specifies the region (&lt;code&gt;us-east-1&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;output.tf&lt;/code&gt; – Prints the website URL once deployment is complete. The output changes based on the environment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;main.tf&lt;/code&gt; – The core of the project. It:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creates an S3 bucket named &lt;code&gt;pravesh-{env}-terraform-workspace-site&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Configures it as a &lt;strong&gt;static website&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Uploads two HTML objects: &lt;code&gt;index.html&lt;/code&gt; and &lt;code&gt;error.html&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Includes configurations for &lt;strong&gt;ownership controls&lt;/strong&gt;, &lt;strong&gt;public access&lt;/strong&gt;, and &lt;strong&gt;bucket policies&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;index/&lt;/code&gt; – Contains three subdirectories: &lt;code&gt;dev&lt;/code&gt;, &lt;code&gt;stage&lt;/code&gt;, and &lt;code&gt;prod&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
Each folder has its own &lt;code&gt;index.html&lt;/code&gt; file with environment-specific content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;create.sh&lt;/code&gt; – A shell script that automates workspace creation and resource deployment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;delete.sh&lt;/code&gt; – A cleanup script that destroys all created resources to prevent unnecessary AWS charges.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Inside the &lt;code&gt;main.tf&lt;/code&gt;, we’ve set &lt;code&gt;locals.env&lt;/code&gt; equal to the current workspace name. This dynamic link ensures Terraform automatically detects the environment (Dev, Stage, or Prod) and applies the corresponding configuration.&lt;/p&gt;

&lt;p&gt;Once you’ve cloned the repository locally, open your terminal and run the following commands:&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;cd &lt;/span&gt;terra-projects/terraform-workspace-s3
&lt;span class="nb"&gt;chmod &lt;/span&gt;u+x create.sh
./create.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This script will:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create all the required Terraform workspaces.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Apply the configuration and deploy the static website for each environment.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you prefer, you can also run the Terraform commands manually instead of using the script.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(I ran it manually while testing, Here are some Screenshots)&lt;/em&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%2Ftwyr4u2o88r9viox0qcm.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%2Ftwyr4u2o88r9viox0qcm.png" alt=" "&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%2F0k19gc0pgnb7a29pykzg.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%2F0k19gc0pgnb7a29pykzg.png" alt=" "&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%2Ftcbygzlv1aeda3nfjii7.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%2Ftcbygzlv1aeda3nfjii7.png" alt=" "&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%2F3jjut2lipv03co6wz0q5.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%2F3jjut2lipv03co6wz0q5.png" alt=" "&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%2Fagjcanma74jt3dw8u3ro.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%2Fagjcanma74jt3dw8u3ro.png" alt=" "&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%2Fkim7mc2vjeeg5ryzdff9.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%2Fkim7mc2vjeeg5ryzdff9.png" alt=" "&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%2Fzysj3cmw0yle9w4uy3fp.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%2Fzysj3cmw0yle9w4uy3fp.png" alt=" "&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%2Fwimqwnsk2azjjrmql9r3.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%2Fwimqwnsk2azjjrmql9r3.png" alt=" "&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%2F9iqce19jwjwjghd2d6kp.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%2F9iqce19jwjwjghd2d6kp.png" alt=" "&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%2Fzfd0w8mn3dly2utka2eo.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%2Fzfd0w8mn3dly2utka2eo.png" alt=" "&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%2Fxqesvv4clfawybc7m7ar.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%2Fxqesvv4clfawybc7m7ar.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the deployment completes successfully, Terraform will output a &lt;strong&gt;website URL&lt;/strong&gt; for each environment.&lt;br&gt;&lt;br&gt;
Open the URL in your browser — and you’ll see your static website live, hosted directly from your S3 bucket!&lt;/p&gt;

&lt;p&gt;When you’re done testing, make sure to delete the resources to avoid unwanted charges.&lt;br&gt;&lt;br&gt;
You can do this easily by running the cleanup script:&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;cd &lt;/span&gt;terra-projects/terraform-workspace-s3
&lt;span class="nb"&gt;chmod &lt;/span&gt;u+x delete.sh
./delete.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will remove all S3 buckets, associated objects, and delete the Terraform workspaces you created.&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%2F9ys2mf04xap5onjg508t.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%2F9ys2mf04xap5onjg508t.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🧩 &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;As we wrap up this project, we’ve seen how &lt;strong&gt;Terraform Workspaces&lt;/strong&gt; simplify managing multiple environments like &lt;strong&gt;Dev&lt;/strong&gt;, &lt;strong&gt;Stage&lt;/strong&gt;, and &lt;strong&gt;Prod&lt;/strong&gt; — all from a single configuration.&lt;br&gt;&lt;br&gt;
Instead of maintaining separate folders or repos, workspaces help isolate state files while keeping the infrastructure code consistent and scalable.&lt;/p&gt;

&lt;p&gt;We also explored how to host a static website on &lt;strong&gt;AWS S3&lt;/strong&gt; using Terraform, learned about configuring ownership, access policies, and automating deployment across environments.&lt;/p&gt;

&lt;p&gt;While Workspaces are great for small to medium-sized projects, they do have some limitations for larger infrastructure setups. Still, they’re a great way to get started with multi-environment IaC and understand how Terraform handles isolation through state management.&lt;/p&gt;

&lt;p&gt;If you’ve followed along till the end, congratulations — you’ve just taken a big step toward mastering &lt;strong&gt;Infrastructure as Code&lt;/strong&gt; with Terraform!&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;🌐 Connect with Me&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you enjoyed this guide, share it with your DevOps buddies and stay tuned for more such projects!&lt;br&gt;&lt;br&gt;
You can also find me sharing tech content, tutorials, and behind-the-scenes DevOps experiments here 👇&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;💼 &lt;strong&gt;LinkedIn:&lt;/strong&gt; &lt;a href="https://www.linkedin.com/in/pravesh-sudha" rel="noopener noreferrer"&gt;&lt;strong&gt;linkedin.com/in/pravesh-sudha&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🐦 &lt;strong&gt;Twitter/X:&lt;/strong&gt; &lt;a href="https://x.com/praveshstwt" rel="noopener noreferrer"&gt;&lt;strong&gt;x.com/praveshstwt&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;📹 &lt;strong&gt;YouTube:&lt;/strong&gt; &lt;a href="https://www.youtube.com/@pravesh-sudha" rel="noopener noreferrer"&gt;&lt;strong&gt;youtube.com/@pravesh-sudha&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🌐 &lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="https://blog.praveshsudha.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;blog.praveshsudha.com&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>terraform</category>
      <category>devops</category>
      <category>coding</category>
    </item>
  </channel>
</rss>
