<?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: Atul Vishwakarma</title>
    <description>The latest articles on DEV Community by Atul Vishwakarma (@vatul16).</description>
    <link>https://dev.to/vatul16</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F530617%2F3e6b3efc-a674-477c-be19-95c2214adbf3.jpg</url>
      <title>DEV Community: Atul Vishwakarma</title>
      <link>https://dev.to/vatul16</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vatul16"/>
    <language>en</language>
    <item>
      <title>Building a Production-Grade 3-Tier AWS Architecture with Terraform: Design Decisions, Trade-offs, and Lessons Learned</title>
      <dc:creator>Atul Vishwakarma</dc:creator>
      <pubDate>Fri, 19 Jun 2026 02:30:00 +0000</pubDate>
      <link>https://dev.to/vatul16/building-a-production-grade-3-tier-aws-architecture-with-terraform-design-decisions-trade-offs-370f</link>
      <guid>https://dev.to/vatul16/building-a-production-grade-3-tier-aws-architecture-with-terraform-design-decisions-trade-offs-370f</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/vatul16/terratier" rel="noopener noreferrer"&gt;https://github.com/vatul16/terratier&lt;/a&gt; — full Terraform source, module docs, and architecture diagram.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When I set out to build this project, I didn't want another "deploy a VM and call it infrastructure" tutorial repo. I wanted something that would force me to think through the same questions a platform team actually argues about: how many subnet tiers do you really need, where do secrets live, how do you let engineers SSH in without handing out keys forever, and what's the cheapest way to stay highly available without going broke on NAT Gateway bills.&lt;/p&gt;

&lt;p&gt;The result is &lt;strong&gt;TerraTier&lt;/strong&gt; — a small Go/Node.js goal-tracking app, deployed across a fully isolated, auto-scaling, four-tier network on AWS, provisioned entirely through modular Terraform. The app itself is deliberately boring (it's a CRUD list of goals). The infrastructure underneath it is the actual point of the project, and this article walks through why it looks the way it does.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with most "3-tier Terraform" examples
&lt;/h2&gt;

&lt;p&gt;Search for AWS 3-tier Terraform examples and you'll find a lot of repositories that split a VPC into public, private, and database subnets, drop a web server in private, and call it done. That's a reasonable starting point, but it collapses two very different concerns into one "private" tier: the stateless web/API layer that talks to the internet (indirectly, via a load balancer) and the application layer that's allowed to talk to the database. If your web tier gets compromised, in that model, it's sitting in the same subnet — and often the same security group — as anything that can reach your data.&lt;/p&gt;

&lt;p&gt;I wanted the network topology itself to enforce a stricter rule: nothing can reach the database except the backend tier, and nothing can reach the backend tier except the frontend tier and the internal load balancer. So the VPC here has four subnet tiers instead of three, each duplicated across two Availability Zones:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Public&lt;/strong&gt; — Internet Gateway route, NAT Gateways, the public-facing ALB, and the bastion host.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend private&lt;/strong&gt; — the Node.js Express tier, reachable only from the public ALB.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend private&lt;/strong&gt; — the Go API tier, reachable only from an &lt;em&gt;internal&lt;/em&gt; ALB that the frontend talks to.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database isolated&lt;/strong&gt; — RDS PostgreSQL, with no route to the internet at all, reachable only from the backend's security group.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That extra split is a small addition in Terraform — one more &lt;code&gt;aws_subnet&lt;/code&gt; resource block, one more security group, one more ALB — but it changes the blast radius of a compromised frontend instance from "can reach the database" to "can reach exactly one internal load balancer on one port."&lt;/p&gt;

&lt;h2&gt;
  
  
  Two ALBs instead of one
&lt;/h2&gt;

&lt;p&gt;This is probably the single decision in the repo that most resembles a real production pattern rather than a tutorial shortcut. The public ALB load-balances browser traffic across the frontend Auto Scaling Group on port 3000. The frontend, in turn, doesn't call backend instances directly — it calls a &lt;em&gt;second&lt;/em&gt;, internal-only ALB, which load-balances across the backend Auto Scaling Group on port 8080.&lt;/p&gt;

&lt;p&gt;The alternative — having the frontend call backend instances directly via private IPs, or through a Cloud Map service registry — would save the cost of a second ALB (roughly $16–20/month plus LCU charges). I chose the internal ALB anyway, for a few reasons that matter more once you have more than one backend instance: it gives the backend tier the same health-checked, load-balanced semantics as the frontend tier; it means backend instances can scale, fail, and get replaced without the frontend needing to know anything about individual instance IPs; and it gives me a single, consistent mental model — "every tier that has more than one instance sits behind an ALB" — instead of two different patterns for two tiers that conceptually do the same kind of horizontal scaling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Secrets Manager, not environment variables baked into an AMI
&lt;/h2&gt;

&lt;p&gt;The RDS master password is generated once, at apply time, with Terraform's &lt;code&gt;random_password&lt;/code&gt; resource — 16 characters, with a curated set of special characters that won't break a Postgres connection string. It's written to a single Secrets Manager secret (&lt;code&gt;{environment}-{project}-db-credentials&lt;/code&gt;) as a JSON blob containing the username, password, host, port, and database name together, so the backend only ever needs one secret ARN, not five separate values to wire through.&lt;/p&gt;

&lt;p&gt;At boot, the backend's user-data script calls &lt;code&gt;aws secretsmanager get-secret-value&lt;/code&gt;, parses the result with &lt;code&gt;jq&lt;/code&gt;, and passes the individual fields into the Docker container as environment variables. The instance's IAM role grants exactly one Secrets Manager permission — &lt;code&gt;GetSecretValue&lt;/code&gt; and &lt;code&gt;DescribeSecret&lt;/code&gt;, scoped to that one secret's ARN, nothing else. No password ever gets written to a Dockerfile, a Docker image layer, or a &lt;code&gt;.env&lt;/code&gt; file checked into git.&lt;/p&gt;

&lt;p&gt;I'll be upfront about the limitation here, because it's the kind of thing an interviewer will probe and you should be ready to discuss it honestly: the password still flows through a Terraform &lt;em&gt;variable&lt;/em&gt; (&lt;code&gt;var.db_password&lt;/code&gt;), which means it exists in plan output and state, even though the variable itself is marked &lt;code&gt;sensitive = true&lt;/code&gt;. The cleaner pattern is to have RDS generate and manage its own master password natively (&lt;code&gt;manage_master_user_password = true&lt;/code&gt;, an RDS feature that creates and rotates the secret for you, with Terraform never touching the plaintext at all). I built it the way I did first because I wanted to understand the full credential lifecycle by hand before reaching for the feature that hides it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bastion host &lt;em&gt;and&lt;/em&gt; SSM, deliberately redundant
&lt;/h2&gt;

&lt;p&gt;Every EC2 instance in this stack — bastion, frontend, backend — gets the same IAM instance profile, which includes the &lt;code&gt;AmazonSSMManagedInstanceCore&lt;/code&gt; managed policy. That alone is enough to &lt;code&gt;aws ssm start-session --target &amp;lt;instance-id&amp;gt;&lt;/code&gt; into any instance with no SSH key, no open port 22 from the internet, and a full audit trail in CloudTrail of who connected and when.&lt;/p&gt;

&lt;p&gt;So why keep the bastion at all? Two reasons. First, pragmatically: SSM Session Manager occasionally has friction in CI environments, narrow corporate proxy setups, or when you specifically need to forward a local port (&lt;code&gt;aws ssm start-session ... --document-name AWS-StartPortForwardingSession&lt;/code&gt;) and just want a plain &lt;code&gt;ssh -L&lt;/code&gt; tunnel instead of remembering the SSM syntax. Second, for this project specifically: a bastion host is the pattern most reviewers and interviewers will recognize immediately, and I wanted the repo to demonstrate both the "traditional" approach and the modern, keyless approach side by side, with the security trade-offs of each visible in the Terraform itself (the bastion's security group only allows SSH from &lt;code&gt;var.allowed_ssh_cidrs&lt;/code&gt;, which defaults to "change this" rather than &lt;code&gt;0.0.0.0/0&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Picking the cheaper failure mode: single NAT Gateway
&lt;/h2&gt;

&lt;p&gt;NAT Gateways are billed per-hour &lt;em&gt;and&lt;/em&gt; per-GB processed, and they're one of the easiest places for a demo environment's AWS bill to quietly balloon. The VPC module supports both &lt;code&gt;single_nat_gateway = true&lt;/code&gt; (one NAT Gateway, shared by both AZs' private subnets) and &lt;code&gt;false&lt;/code&gt; (one NAT Gateway per AZ, fully redundant). The dev environment defaults to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That default is an explicit cost/availability trade-off, not an oversight: if the AZ hosting the single NAT Gateway has an outage, outbound internet access from the &lt;em&gt;other&lt;/em&gt; AZ's private subnets breaks too — even though those subnets' EC2 instances are otherwise healthy. For a portfolio project that's torn down between demos, that's an acceptable risk for roughly half the NAT cost. For an actual production workload, flipping the flag to &lt;code&gt;false&lt;/code&gt; is a one-line &lt;code&gt;terraform.tfvars&lt;/code&gt; change, because the module was written to support both from day one rather than hardcoding the cheap option.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happens when an instance boots
&lt;/h2&gt;

&lt;p&gt;The launch templates for both ASGs run a user-data script that does the same rough sequence of things, and getting this script right was where I spent most of my actual debugging time on this project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install Docker and the AWS CLI v2.&lt;/li&gt;
&lt;li&gt;(Backend only) Pull database credentials from Secrets Manager, with retry logic — because the very first time an ASG instance boots, RDS and the backend's DNS record might genuinely not be resolvable yet, and a script that fails fast on a transient DNS hiccup will throw the instance into a boot-loop of CrashLoopBackOff-style ASG churn.&lt;/li&gt;
&lt;li&gt;(Frontend only) Poll the internal ALB's hostname and port with &lt;code&gt;nc -z&lt;/code&gt; in a retry loop before starting the frontend container, so the frontend doesn't come up, fail its first few requests to a backend that isn't ready yet, and confuse anyone watching the ALB's health checks.&lt;/li&gt;
&lt;li&gt;Pull the application's Docker image and run it with &lt;code&gt;docker run --restart unless-stopped&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Install and configure the CloudWatch Agent to ship the user-data log and basic CPU/memory metrics.&lt;/li&gt;
&lt;li&gt;Drop a cron entry that independently re-checks the container's health every 5 minutes and restarts Docker/the container if it's unhealthy — a cheap, ASG-independent self-healing layer on top of the ALB's own health checks.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The retry loops in steps 2 and 3 are the unglamorous but important part. The first version of this script didn't have them, and the very first &lt;code&gt;terraform apply&lt;/code&gt; after a from-scratch deploy failed about a third of the time, simply because RDS or the internal ALB's DNS hadn't fully propagated by the time the EC2 instances finished booting — a classic race condition in any "spin up dependent infrastructure simultaneously" deployment. Adding bounded retry loops (with logging at every attempt, so you can actually see what happened in CloudWatch Logs afterward) turned that into a non-issue.&lt;/p&gt;

&lt;h2&gt;
  
  
  Observability: metrics, logs, and three layers of health checking
&lt;/h2&gt;

&lt;p&gt;The Go backend exposes Prometheus-format metrics at &lt;code&gt;/metrics&lt;/code&gt; — request counters labeled by path, and dedicated counters for goal-add and goal-remove operations — using the official &lt;code&gt;prometheus/client_golang&lt;/code&gt; library. That's not wired up to a Prometheus server in this repo (there's no managed Prometheus or Grafana here yet), but the endpoint exists and is ready to be scraped, which matters more than it sounds: instrumenting an application for metrics is a decision you make in the application's code, and it's far easier to do it from the start than to retrofit it later.&lt;/p&gt;

&lt;p&gt;Health checking happens at three independent layers, deliberately overlapping rather than relying on a single mechanism: the ALB target group's own health check (&lt;code&gt;GET /health&lt;/code&gt;, every 30 seconds, 2 successes to mark healthy / 3 failures to mark unhealthy); a cron-based self-check on each instance every 5 minutes that restarts the container if it's failing locally; and CloudWatch Alarms watching aggregate CPU utilization and unhealthy target counts, wired to an &lt;code&gt;alarm_actions&lt;/code&gt; list that's empty by default but ready to point at an SNS topic.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd build next
&lt;/h2&gt;

&lt;p&gt;A few things didn't make it into v1, on purpose — I'd rather ship something complete at a smaller scope than something half-finished at a larger one. In rough priority order:&lt;/p&gt;

&lt;p&gt;A CI/CD pipeline is the most obvious gap. Right now, deploying a new image means running &lt;code&gt;build_and_push.sh&lt;/code&gt; and then manually triggering (or waiting for) an ASG instance refresh. A GitHub Actions workflow that runs &lt;code&gt;terraform plan&lt;/code&gt; on every pull request, builds and pushes images on merge, and triggers a rolling instance refresh would turn this from "infrastructure I deploy by hand" into "infrastructure that deploys itself," which is really the whole point of the discipline.&lt;/p&gt;

&lt;p&gt;Moving from Docker Hub to Amazon ECR removes both the anonymous-pull rate limiting that public Docker Hub images are subject to and the need to pass Docker Hub credentials into instance user-data at all — ECR authentication can ride entirely on the existing IAM instance profile.&lt;/p&gt;

&lt;p&gt;And finally, remote state. The S3 backend block is already scaffolded and commented out in &lt;code&gt;provider.tf&lt;/code&gt;, because local state is fine for solo development but becomes a real liability the moment more than one person — or one CI pipeline plus one person — needs to run &lt;code&gt;terraform apply&lt;/code&gt; against the same environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing thoughts
&lt;/h2&gt;

&lt;p&gt;None of the individual pieces here are exotic — VPCs, ALBs, ASGs, RDS, Secrets Manager, and IAM are about as standard an AWS toolkit as exists. What I think is actually worth showing in an interview isn't any single resource block; it's the reasoning behind where the boundaries are drawn — which tier can talk to which, where a secret lives versus where it's read, what happens in the 90 seconds between "instance is running" and "instance is actually ready to serve traffic" — and being able to articulate the trade-off in each decision rather than just the decision itself.&lt;/p&gt;

&lt;p&gt;The full code is on GitHub at &lt;a href="https://github.com/vatul16/terratier" rel="noopener noreferrer"&gt;https://github.com/vatul16/terratier&lt;/a&gt;, along with a deeper architectural breakdown in &lt;code&gt;ARCHITECTURE.md&lt;/code&gt; and auto-generated input/output documentation for every Terraform module. I'm currently looking for Cloud/DevOps Engineer roles — feel free to reach out on &lt;a href="https://linkedin.com/in/vatul16" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; if you'd like to talk through any part of this in more depth.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>terraform</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Stop Deploying Manually: How to Build Your First CI/CD Pipeline with GitHub Actions</title>
      <dc:creator>Atul Vishwakarma</dc:creator>
      <pubDate>Mon, 15 Jun 2026 09:00:00 +0000</pubDate>
      <link>https://dev.to/vatul16/stop-deploying-manually-how-to-build-your-first-cicd-pipeline-with-github-actions-80c</link>
      <guid>https://dev.to/vatul16/stop-deploying-manually-how-to-build-your-first-cicd-pipeline-with-github-actions-80c</guid>
      <description>&lt;p&gt;If you are still manually running tests and deploying your code from your local terminal, you are wasting valuable time.&lt;/p&gt;

&lt;p&gt;When I first started diving into DevOps and Cloud engineering, the concept of CI/CD (Continuous Integration / Continuous Deployment) felt incredibly intimidating. I thought I needed a complex Jenkins server or a massive AWS architecture just to automate my workflows.&lt;/p&gt;

&lt;p&gt;It turns out, if your code is already on GitHub, you can build your first automated pipeline in under 10 minutes using GitHub Actions.&lt;/p&gt;

&lt;p&gt;Today, I’ll show you exactly how to set up a basic workflow that automatically tests your code every time you push to your repository.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;A GitHub account&lt;/li&gt;
&lt;li&gt;A basic understanding of Git (git add, git commit, git push)&lt;/li&gt;
&lt;li&gt;A sample project (we will use a simple Node.js project for this example, but the concepts apply to any language).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Create Your Workflow File&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;GitHub Actions looks for a very specific folder structure in your repository to know what to run.&lt;/p&gt;

&lt;p&gt;In the root directory of your project, create a new folder called &lt;code&gt;.github&lt;/code&gt;, and inside that, create a folder called &lt;code&gt;workflows&lt;/code&gt;. Finally, create a YAML file inside it. You can name it whatever you want, but &lt;code&gt;ci.yml&lt;/code&gt; is standard.&lt;/p&gt;

&lt;p&gt;Your path should look like this: &lt;code&gt;.github/workflows/ci.yml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Write the YAML Configuration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;YAML is the language of DevOps. It relies heavily on indentation, so make sure your spacing is exact!&lt;/p&gt;

&lt;p&gt;Open your &lt;code&gt;ci.yml&lt;/code&gt; file and paste the following code:&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;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Node.js CI Pipeline&lt;/span&gt;

&lt;span class="c1"&gt;# 1. When should this workflow run?&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;main"&lt;/span&gt; &lt;span class="pi"&gt;]&lt;/span&gt;
  &lt;span class="na"&gt;pull_request&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;main"&lt;/span&gt; &lt;span class="pi"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;# 2. What jobs should it execute?&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;build-and-test&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# We need a virtual machine to run our code&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;

    &lt;span class="c1"&gt;# 3. What are the exact steps?&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# Step A: Check out the code from our repository&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;Checkout code&lt;/span&gt;
      &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v3&lt;/span&gt;

    &lt;span class="c1"&gt;# Step B: Set up the Node.js environment&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;Setup Node.js&lt;/span&gt;
      &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-node@v3&lt;/span&gt;
      &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;node-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;18.x'&lt;/span&gt;

    &lt;span class="c1"&gt;# Step C: Install dependencies&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;Install Dependencies&lt;/span&gt;
      &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm ci&lt;/span&gt;

    &lt;span class="c1"&gt;# Step D: Run our tests&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;Run Tests&lt;/span&gt;
      &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Breaking Down the Code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;on&lt;/code&gt;: This tells GitHub exactly when to trigger the pipeline. In our case, it runs every time someone pushes code or opens a pull request to the main branch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;runs-on&lt;/code&gt;: GitHub provisions a fresh, temporary Ubuntu server (a runner) specifically to execute your commands.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;steps&lt;/code&gt;: This is the chronological list of commands. We check out the code, install Node.js, install our npm packages, and finally, run the tests.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Push and Watch the Magic&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Save your file, commit it, and push it to GitHub:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add .github/workflows/ci.yml
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"chore: add github actions CI pipeline"&lt;/span&gt;
git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, navigate to your repository on GitHub and click the &lt;strong&gt;"Actions"&lt;/strong&gt; tab at the top.&lt;/p&gt;

&lt;p&gt;You will see your workflow running in real-time! If your tests pass, you will get a satisfying green checkmark ✅. If they fail, you will get a red X and a log detailing exactly what broke, preventing bad code from making it to production.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Takeaway
&lt;/h3&gt;

&lt;p&gt;Congratulations! You just implemented Continuous Integration.&lt;/p&gt;

&lt;p&gt;This is the foundational building block of modern DevOps. From here, you can expand this exact same file to automatically push Docker images to AWS, trigger serverless deployments, or send a Slack message when a build fails.&lt;/p&gt;

&lt;p&gt;Automation is about letting the machines do the repetitive work so you can focus on building cool things.&lt;/p&gt;

&lt;p&gt;I'll be sharing more DevOps and Cloud tutorials here as I build and learn. If this tutorial saved you some time, you can &lt;a href="https://buymeacoffee.com/vatul16" rel="noopener noreferrer"&gt;☕ buy me a coffee here&lt;/a&gt; to support my work!&lt;/p&gt;

</description>
      <category>devops</category>
      <category>githubactions</category>
      <category>cloud</category>
      <category>cicd</category>
    </item>
    <item>
      <title>From Zero to Infrastructure-as-Code Hero: My 30-Day Terraform Journey</title>
      <dc:creator>Atul Vishwakarma</dc:creator>
      <pubDate>Wed, 29 Apr 2026 07:18:55 +0000</pubDate>
      <link>https://dev.to/vatul16/from-zero-to-infrastructure-as-code-hero-my-30-day-terraform-journey-526k</link>
      <guid>https://dev.to/vatul16/from-zero-to-infrastructure-as-code-hero-my-30-day-terraform-journey-526k</guid>
      <description>&lt;p&gt;After 30 days of consistent learning, building, breaking, and debugging… I’ve officially completed the &lt;strong&gt;30 Days of AWS Terraform Challenge&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;What started as a curiosity about Infrastructure as Code (IaC) has evolved into a deep, hands-on understanding of how modern cloud systems are designed, automated, and maintained.&lt;/p&gt;

&lt;p&gt;This isn’t just a completion post—it’s a reflection on what it really takes to go from &lt;strong&gt;beginner to confident practitioner in Terraform and DevOps&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🌍 &lt;strong&gt;Why Terraform?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In today’s cloud-first world, managing infrastructure manually is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❌ Error-prone&lt;/li&gt;
&lt;li&gt;❌ Hard to scale&lt;/li&gt;
&lt;li&gt;❌ Nearly impossible to audit&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Terraform changes that by enabling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Declarative infrastructure&lt;/li&gt;
&lt;li&gt;✅ Version-controlled environments&lt;/li&gt;
&lt;li&gt;✅ Repeatable deployments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But more importantly, it introduces a &lt;strong&gt;mindset shift&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Treat infrastructure like application code.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  📈 &lt;strong&gt;The Journey: From Basics to Production-Grade Systems&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🔹 &lt;strong&gt;Phase 1: Foundations (Days 1–10)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I started with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Providers &amp;amp; resources&lt;/li&gt;
&lt;li&gt;State files&lt;/li&gt;
&lt;li&gt;Basic AWS services (EC2, S3, IAM)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💡 Key realization:&lt;br&gt;
Terraform isn’t just about creating resources—it’s about managing their lifecycle.&lt;/p&gt;


&lt;h3&gt;
  
  
  🔹 &lt;strong&gt;Phase 2: Scaling &amp;amp; Logic (Days 11–20)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This is where things got interesting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Expressions &amp;amp; Functions&lt;/strong&gt; → dynamic configurations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Meta-arguments (count, for_each)&lt;/strong&gt; → scalable infrastructure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modules&lt;/strong&gt; → reusable and clean architecture&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provisioners&lt;/strong&gt; → bootstrapping resources&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💡 Key realization:&lt;br&gt;
Clean, modular code is the difference between a demo and production-ready infrastructure.&lt;/p&gt;


&lt;h3&gt;
  
  
  🔹 &lt;strong&gt;Phase 3: Real-World Architectures (Days 21–28)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Here’s where theory met reality:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🏗️ 2-tier &amp;amp; 3-tier architectures&lt;/li&gt;
&lt;li&gt;🌐 VPC design with public/private subnets&lt;/li&gt;
&lt;li&gt;⚖️ Load Balancers + Auto Scaling&lt;/li&gt;
&lt;li&gt;🔐 IAM policies &amp;amp; governance&lt;/li&gt;
&lt;li&gt;📊 Observability with CloudWatch&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💡 Key realization:&lt;br&gt;
Infrastructure is not about individual services—it’s about &lt;strong&gt;how they work together&lt;/strong&gt;.&lt;/p&gt;


&lt;h3&gt;
  
  
  🔹 &lt;strong&gt;Phase 4: DevOps Maturity (Days 29–30)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The final stretch focused on automation and reliability:&lt;/p&gt;
&lt;h4&gt;
  
  
  🔁 GitOps with ArgoCD
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Self-healing Kubernetes deployments&lt;/li&gt;
&lt;li&gt;Git as single source of truth&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  🔍 Drift Detection (Final Milestone)
&lt;/h4&gt;

&lt;p&gt;Using:&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;-detailed-exitcode&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I built a pipeline that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Detects infrastructure drift&lt;/li&gt;
&lt;li&gt;Automatically remediates it&lt;/li&gt;
&lt;li&gt;Notifies the team&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💡 This was the biggest “aha” moment:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Infrastructure that fixes itself is the end goal.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🧠 &lt;strong&gt;Key Skills I Gained&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ✅ Infrastructure Design
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;High availability architectures&lt;/li&gt;
&lt;li&gt;Secure networking (NAT, private subnets)&lt;/li&gt;
&lt;li&gt;Scalable systems (ASG + ALB)&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  ✅ Terraform Mastery
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Modules &amp;amp; reusability&lt;/li&gt;
&lt;li&gt;Remote state management (S3 + DynamoDB)&lt;/li&gt;
&lt;li&gt;Data sources &amp;amp; dynamic blocks&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  ✅ DevOps Automation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;CI/CD with GitHub Actions&lt;/li&gt;
&lt;li&gt;GitOps workflows&lt;/li&gt;
&lt;li&gt;Drift detection pipelines&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  ✅ Security &amp;amp; Governance
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;IAM best practices&lt;/li&gt;
&lt;li&gt;Policy enforcement&lt;/li&gt;
&lt;li&gt;Secrets management awareness&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⚠️ &lt;strong&gt;Challenges Along the Way&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This journey wasn’t smooth—and that’s the point.&lt;/p&gt;

&lt;p&gt;Some real struggles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Debugging Terraform state issues&lt;/li&gt;
&lt;li&gt;Handling provider deprecations&lt;/li&gt;
&lt;li&gt;Fixing networking misconfigurations&lt;/li&gt;
&lt;li&gt;Understanding IAM policy conflicts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💡 Lesson learned:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Debugging is where real learning happens.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🔄 &lt;strong&gt;What Changed for Me&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before this challenge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I knew &lt;em&gt;how&lt;/em&gt; to create resources&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;I understand &lt;em&gt;how to design systems&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I deployed manually&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;I automate everything&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I fixed issues manually&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;I build systems that prevent them&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚀 &lt;strong&gt;What’s Next?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This is just the beginning.&lt;/p&gt;

&lt;p&gt;Next steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔹 Advanced Kubernetes (EKS deep dive)&lt;/li&gt;
&lt;li&gt;🔹 Multi-cloud Terraform deployments&lt;/li&gt;
&lt;li&gt;🔹 Policy-as-Code (OPA, Sentinel)&lt;/li&gt;
&lt;li&gt;🔹 Production-grade CI/CD pipelines&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💭 &lt;strong&gt;Final Thoughts&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This challenge taught me something beyond Terraform:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Consistency beats intensity.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Showing up every day—even when debugging for hours—made all the difference.&lt;/p&gt;

&lt;p&gt;If you’re starting your DevOps journey:&lt;br&gt;
👉 Don’t just watch tutorials&lt;br&gt;
👉 Build projects&lt;br&gt;
👉 Break things&lt;br&gt;
👉 Fix them with code&lt;/p&gt;

&lt;p&gt;That’s how you grow.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>beginners</category>
      <category>devops</category>
      <category>terraform</category>
    </item>
    <item>
      <title>Mastering GitOps: Bridging Infrastructure and Application Delivery with Terraform &amp; ArgoCD</title>
      <dc:creator>Atul Vishwakarma</dc:creator>
      <pubDate>Tue, 28 Apr 2026 06:07:55 +0000</pubDate>
      <link>https://dev.to/vatul16/mastering-gitops-bridging-infrastructure-and-application-delivery-with-terraform-argocd-4385</link>
      <guid>https://dev.to/vatul16/mastering-gitops-bridging-infrastructure-and-application-delivery-with-terraform-argocd-4385</guid>
      <description>&lt;p&gt;After an intense journey through the &lt;strong&gt;#30DaysOfAWSTerraform challenge&lt;/strong&gt;, Day 29 stands out as one of the most transformative milestones so far.&lt;/p&gt;

&lt;p&gt;This wasn’t just about provisioning infrastructure anymore—it was about building a &lt;strong&gt;self-healing, automated, and production-grade GitOps workflow&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If Infrastructure as Code (IaC) is the foundation, &lt;strong&gt;GitOps is the operating system&lt;/strong&gt; that keeps everything running smoothly.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔄 &lt;strong&gt;From IaC to GitOps: What Changed?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Until now, Terraform allowed me to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Define infrastructure declaratively&lt;/li&gt;
&lt;li&gt;Provision resources consistently&lt;/li&gt;
&lt;li&gt;Avoid manual “ClickOps”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But GitOps takes it a step further:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Git becomes the &lt;strong&gt;single source of truth&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Systems automatically &lt;strong&gt;reconcile drift&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Deployments become &lt;strong&gt;continuous and auditable&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 In short:&lt;br&gt;
&lt;strong&gt;IaC provisions infrastructure. GitOps keeps it correct.&lt;/strong&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🏗️ &lt;strong&gt;Architecture Overview&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This project bridges &lt;strong&gt;infrastructure provisioning&lt;/strong&gt; and &lt;strong&gt;application deployment&lt;/strong&gt; into one cohesive system.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;1. Infrastructure Repository (Terraform)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Responsible for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provisioning an &lt;strong&gt;Amazon EKS cluster&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Setting up networking (VPC, subnets)&lt;/li&gt;
&lt;li&gt;Installing &lt;strong&gt;ArgoCD via Helm&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Configuring storage (EBS CSI driver)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;2. Application Repository (Kubernetes Manifests)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frontend (UI layer)&lt;/li&gt;
&lt;li&gt;Backend (API layer)&lt;/li&gt;
&lt;li&gt;PostgreSQL database&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  ⚙️ &lt;strong&gt;How the Workflow Operates&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Terraform provisions the infrastructure (EKS + ArgoCD)&lt;/li&gt;
&lt;li&gt;ArgoCD connects to the application Git repository&lt;/li&gt;
&lt;li&gt;Kubernetes manifests define the desired application state&lt;/li&gt;
&lt;li&gt;ArgoCD continuously monitors and syncs changes&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  💡 The Magic:
&lt;/h3&gt;

&lt;p&gt;If anything changes outside Git (manual kubectl edits, scaling, etc.),&lt;br&gt;
&lt;strong&gt;ArgoCD automatically reverts it back to the desired state.&lt;/strong&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🔍 &lt;strong&gt;Key Concepts I Mastered&lt;/strong&gt;
&lt;/h2&gt;
&lt;h3&gt;
  
  
  🔹 &lt;strong&gt;1. Terraform Helm Provider&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Instead of manually installing ArgoCD:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"helm_release"&lt;/span&gt; &lt;span class="s2"&gt;"argocd"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt;       &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"argocd"&lt;/span&gt;
  &lt;span class="nx"&gt;repository&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://argoproj.github.io/argo-helm"&lt;/span&gt;
  &lt;span class="nx"&gt;chart&lt;/span&gt;      &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"argo-cd"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 This ensures ArgoCD itself is &lt;strong&gt;version-controlled and reproducible&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 &lt;strong&gt;2. The “App of Apps” Pattern&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Rather than deploying each service manually:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;parent ArgoCD application&lt;/strong&gt; manages multiple child apps&lt;/li&gt;
&lt;li&gt;Each microservice is defined independently&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;✅ Result:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scalable architecture&lt;/li&gt;
&lt;li&gt;Clean separation of concerns&lt;/li&gt;
&lt;li&gt;Easier multi-service management&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🔹 &lt;strong&gt;3. Drift Detection &amp;amp; Self-Healing&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This was the biggest “aha!” moment.&lt;/p&gt;

&lt;p&gt;I tested:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Manually modifying a deployment&lt;/li&gt;
&lt;li&gt;Changing image versions outside Git&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📌 Result:&lt;br&gt;
ArgoCD instantly detected the drift and &lt;strong&gt;reconciled it automatically&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;👉 No manual rollback. No panic fixes. Just automation.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 &lt;strong&gt;What This Means in Real-World DevOps&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This project reflects how modern teams operate:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Traditional Approach&lt;/th&gt;
&lt;th&gt;GitOps Approach&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Manual deployments&lt;/td&gt;
&lt;td&gt;Automated sync&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Human error risk&lt;/td&gt;
&lt;td&gt;Self-healing systems&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Drift goes unnoticed&lt;/td&gt;
&lt;td&gt;Drift auto-corrected&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Config scattered&lt;/td&gt;
&lt;td&gt;Git as single truth&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🔐 &lt;strong&gt;Challenges &amp;amp; Lessons Learned&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ⚠️ Secrets Management
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Kubernetes secrets are base64 encoded—not secure enough&lt;/li&gt;
&lt;li&gt;Next step: integrate &lt;strong&gt;AWS Secrets Manager&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  ⚠️ State Management
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Local Terraform state is risky&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Plan: move to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;S3 backend&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DynamoDB locking&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  ⚠️ Complexity Growth
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;GitOps introduces more moving parts&lt;/li&gt;
&lt;li&gt;But the trade-off is worth it for &lt;strong&gt;automation + reliability&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚀 &lt;strong&gt;What’s Next? (Final Stretch)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before wrapping up the challenge, I plan to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Implement remote state management&lt;/li&gt;
&lt;li&gt;✅ Secure secrets with AWS Secrets Manager&lt;/li&gt;
&lt;li&gt;✅ Enhance CI/CD integration&lt;/li&gt;
&lt;li&gt;✅ Explore advanced GitOps patterns&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💭 &lt;strong&gt;Final Thoughts&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Day 29 changed how I think about infrastructure.&lt;/p&gt;

&lt;p&gt;This isn’t just about provisioning resources anymore—it’s about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Building &lt;strong&gt;autonomous systems&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Reducing &lt;strong&gt;human intervention&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Creating &lt;strong&gt;resilient platforms&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 The goal is no longer just &lt;em&gt;“infrastructure that works”&lt;/em&gt;&lt;br&gt;
👉 It’s &lt;strong&gt;“infrastructure that fixes itself.”&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>automation</category>
      <category>aws</category>
      <category>devops</category>
      <category>terraform</category>
    </item>
    <item>
      <title>Scaling Cloud Proficiency: Building a Production-Ready 3-Tier Architecture with Terraform</title>
      <dc:creator>Atul Vishwakarma</dc:creator>
      <pubDate>Mon, 27 Apr 2026 07:19:35 +0000</pubDate>
      <link>https://dev.to/vatul16/scaling-cloud-proficiency-building-a-production-ready-3-tier-architecture-with-terraform-11f6</link>
      <guid>https://dev.to/vatul16/scaling-cloud-proficiency-building-a-production-ready-3-tier-architecture-with-terraform-11f6</guid>
      <description>&lt;p&gt;As part of my &lt;em&gt;30 Days of AWS Terraform Challenge&lt;/em&gt;, Day 28 marked a significant milestone in my cloud engineering journey—designing and deploying a &lt;strong&gt;fully automated, production-grade 3-tier architecture on AWS using Terraform&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This project wasn’t just about provisioning resources. It was about &lt;strong&gt;thinking like a systems designer&lt;/strong&gt;—balancing scalability, security, and reliability.&lt;/p&gt;




&lt;h2&gt;
  
  
  🌍 Why 3-Tier Architecture Matters
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;3-tier architecture&lt;/strong&gt; is a foundational pattern in modern cloud systems because it separates concerns into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Presentation Layer (Web Tier)&lt;/strong&gt; → Handles user requests&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Application Layer (App Tier)&lt;/strong&gt; → Processes business logic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Layer (DB Tier)&lt;/strong&gt; → Stores and manages data&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✅ Benefits:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Improved &lt;strong&gt;security&lt;/strong&gt; through isolation&lt;/li&gt;
&lt;li&gt;Better &lt;strong&gt;scalability&lt;/strong&gt; per tier&lt;/li&gt;
&lt;li&gt;Increased &lt;strong&gt;fault tolerance&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Easier &lt;strong&gt;maintenance &amp;amp; updates&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🏗️ Architecture Overview
&lt;/h2&gt;

&lt;p&gt;Here’s how I implemented the architecture on AWS:&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 1. Custom VPC &amp;amp; Networking
&lt;/h3&gt;

&lt;p&gt;I created a &lt;strong&gt;custom Virtual Private Cloud (VPC)&lt;/strong&gt; with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Public subnets → For Load Balancer&lt;/li&gt;
&lt;li&gt;Private subnets → For App + DB tiers&lt;/li&gt;
&lt;li&gt;Internet Gateway → Public access&lt;/li&gt;
&lt;li&gt;NAT Gateway → Secure outbound access&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 This ensures:&lt;br&gt;
✔ Public entry is controlled&lt;br&gt;
✔ Backend remains private&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 2. High Availability Across AZs
&lt;/h3&gt;

&lt;p&gt;To eliminate single points of failure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deployed resources across &lt;strong&gt;2 Availability Zones&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Distributed compute and networking components&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Result:&lt;br&gt;
✔ Application remains available even during AZ failures&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 3. Web Tier (Presentation Layer)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Application Load Balancer (ALB)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Handles incoming traffic&lt;/li&gt;
&lt;li&gt;Routes requests to application servers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Acts as the &lt;strong&gt;only public entry point&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 4. Application Tier (Logic Layer)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;EC2 instances inside &lt;strong&gt;private subnets&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Managed using &lt;strong&gt;Auto Scaling Groups (ASG)&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Features:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Horizontal scaling based on demand&lt;/li&gt;
&lt;li&gt;High availability&lt;/li&gt;
&lt;li&gt;Fault tolerance&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🔹 5. Database Tier (Data Layer)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Amazon RDS (MySQL/PostgreSQL)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Placed in &lt;strong&gt;private subnet group&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Accessible only from application tier&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Ensures:&lt;br&gt;
✔ No public exposure&lt;br&gt;
✔ Strong data security&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ Terraform Implementation
&lt;/h2&gt;

&lt;p&gt;Everything was provisioned using &lt;strong&gt;Terraform&lt;/strong&gt;, following a &lt;strong&gt;modular approach&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  📦 Modules Created:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;VPC Module&lt;/li&gt;
&lt;li&gt;Security Groups Module&lt;/li&gt;
&lt;li&gt;Compute (EC2 + ASG) Module&lt;/li&gt;
&lt;li&gt;RDS Module&lt;/li&gt;
&lt;li&gt;Load Balancer Module&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  💡 Why Modular Terraform?
&lt;/h3&gt;

&lt;p&gt;✔ Reusable across environments&lt;br&gt;
✔ Cleaner codebase&lt;br&gt;
✔ Easier debugging&lt;br&gt;
✔ Faster deployments&lt;/p&gt;

&lt;p&gt;👉 Write once → reuse everywhere&lt;/p&gt;




&lt;h2&gt;
  
  
  🔐 Security Best Practices Implemented
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Private subnets for app &amp;amp; DB&lt;/li&gt;
&lt;li&gt;Security group restrictions (least privilege)&lt;/li&gt;
&lt;li&gt;No direct DB exposure&lt;/li&gt;
&lt;li&gt;NAT for controlled outbound traffic&lt;/li&gt;
&lt;li&gt;Secrets managed via AWS Secrets Manager&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚧 Challenges &amp;amp; Troubleshooting
&lt;/h2&gt;

&lt;p&gt;This project wasn’t without hurdles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RDS parameter group configuration issues&lt;/li&gt;
&lt;li&gt;Terraform provider inconsistencies&lt;/li&gt;
&lt;li&gt;Networking misconfigurations&lt;/li&gt;
&lt;li&gt;Security group debugging&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 These challenges were the &lt;strong&gt;real learning moments&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 Key Learnings
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🔹 1. Design &amp;gt; Deployment
&lt;/h3&gt;

&lt;p&gt;Provisioning is easy. Designing a resilient system is the real skill.&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 2. Security by Default 🔐
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Never expose databases publicly&lt;/li&gt;
&lt;li&gt;Always isolate layers&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🔹 3. Modularity is Power
&lt;/h3&gt;

&lt;p&gt;Terraform modules turn complex systems into manageable components.&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 4. Hands-On &amp;gt; Theory
&lt;/h3&gt;

&lt;p&gt;Breaking things and fixing them teaches more than tutorials ever can.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Day 28 felt like a &lt;strong&gt;turning point&lt;/strong&gt; in my journey.&lt;/p&gt;

&lt;p&gt;I moved from:&lt;br&gt;
➡️ Writing Terraform code&lt;br&gt;
➡️ To designing &lt;strong&gt;real-world cloud architectures&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This project reflects how modern systems are built:&lt;br&gt;
✔ Scalable&lt;br&gt;
✔ Secure&lt;br&gt;
✔ Fault-tolerant&lt;br&gt;
✔ Automated&lt;/p&gt;




&lt;h2&gt;
  
  
  🔮 What’s Next?
&lt;/h2&gt;

&lt;p&gt;Only 2 days left in this challenge! Up next:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Final optimizations&lt;/li&gt;
&lt;li&gt;Advanced patterns&lt;/li&gt;
&lt;li&gt;Wrapping up the journey&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>terraform</category>
      <category>cloudcomputing</category>
      <category>devops</category>
    </item>
    <item>
      <title>Building a Highly Available Web Architecture with Terraform</title>
      <dc:creator>Atul Vishwakarma</dc:creator>
      <pubDate>Mon, 20 Apr 2026 09:01:59 +0000</pubDate>
      <link>https://dev.to/vatul16/building-a-highly-available-web-architecture-with-terraform-38h1</link>
      <guid>https://dev.to/vatul16/building-a-highly-available-web-architecture-with-terraform-38h1</guid>
      <description>&lt;p&gt;As part of my &lt;em&gt;30 Days of AWS Terraform Challenge&lt;/em&gt;, Day 24 marked a major milestone in my journey—from provisioning basic infrastructure to designing a &lt;strong&gt;highly available, fault-tolerant, and scalable web architecture&lt;/strong&gt; using Terraform.&lt;/p&gt;

&lt;p&gt;This project pushed me to think like a &lt;strong&gt;Cloud Engineer&lt;/strong&gt;, not just a Terraform user.&lt;/p&gt;




&lt;h2&gt;
  
  
  🌍 Why High Availability Matters
&lt;/h2&gt;

&lt;p&gt;In real-world production systems, downtime is not an option.&lt;/p&gt;

&lt;p&gt;A resilient architecture must:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Handle failures gracefully&lt;/li&gt;
&lt;li&gt;Scale automatically with demand&lt;/li&gt;
&lt;li&gt;Maintain security best practices&lt;/li&gt;
&lt;li&gt;Ensure consistent performance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This project brought all of these principles together.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏗️ Architecture Overview
&lt;/h2&gt;

&lt;p&gt;The infrastructure I built follows a &lt;strong&gt;multi-tier, production-grade design&lt;/strong&gt; on AWS:&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 1. Application Load Balancer (ALB)
&lt;/h3&gt;

&lt;p&gt;The ALB acts as the &lt;strong&gt;entry point&lt;/strong&gt; for all incoming traffic.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Distributes traffic across multiple EC2 instances&lt;/li&gt;
&lt;li&gt;Spans multiple Availability Zones&lt;/li&gt;
&lt;li&gt;Ensures fault tolerance if one AZ fails&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Result: Improved uptime and reliability&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 2. Auto Scaling Group (ASG)
&lt;/h3&gt;

&lt;p&gt;To make the system &lt;strong&gt;elastic&lt;/strong&gt;, I configured an Auto Scaling Group:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Defined &lt;strong&gt;min, max, and desired capacity&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Integrated &lt;strong&gt;CloudWatch metrics (CPU utilization)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automatically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scales &lt;strong&gt;out&lt;/strong&gt; during high traffic&lt;/li&gt;
&lt;li&gt;Scales &lt;strong&gt;in&lt;/strong&gt; during low usage&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Result: Performance + cost optimization&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 3. Private Subnet Architecture 🔐
&lt;/h3&gt;

&lt;p&gt;Instead of exposing servers directly to the internet:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EC2 instances are deployed in &lt;strong&gt;private subnets&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Only the ALB resides in &lt;strong&gt;public subnets&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Result: Strong security posture (Zero direct public access)&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 4. NAT Gateway for Outbound Access
&lt;/h3&gt;

&lt;p&gt;Since private instances need internet access:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;NAT Gateways were deployed in each AZ&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OS updates&lt;/li&gt;
&lt;li&gt;Pulling Docker images&lt;/li&gt;
&lt;li&gt;External API calls&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Result: Secure outbound connectivity without compromising isolation&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ Terraform Implementation
&lt;/h2&gt;

&lt;p&gt;The entire infrastructure was built using &lt;strong&gt;Infrastructure as Code (IaC)&lt;/strong&gt; with Terraform.&lt;/p&gt;

&lt;h3&gt;
  
  
  📦 Key Components:
&lt;/h3&gt;

&lt;h4&gt;
  
  
  🔸 Launch Templates
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Defined EC2 configuration&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automated:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker installation&lt;/li&gt;
&lt;li&gt;Application deployment (Django app)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  🔸 Auto Scaling Policies
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Connected with CloudWatch alarms&lt;/li&gt;
&lt;li&gt;Triggered scaling actions automatically&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  🔸 Modular Design
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Separated:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Networking&lt;/li&gt;
&lt;li&gt;Compute&lt;/li&gt;
&lt;li&gt;Security&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improved readability and reusability&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Result: Clean, scalable, production-ready codebase&lt;/p&gt;




&lt;h2&gt;
  
  
  📊 Key Learnings
&lt;/h2&gt;

&lt;h3&gt;
  
  
  💡 1. Fault Tolerance is Essential
&lt;/h3&gt;

&lt;p&gt;Deploying across multiple Availability Zones ensures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No single point of failure&lt;/li&gt;
&lt;li&gt;Continuous availability&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  💡 2. Automation Eliminates Drift
&lt;/h3&gt;

&lt;p&gt;Manually building this setup would:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Be error-prone&lt;/li&gt;
&lt;li&gt;Lead to inconsistencies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With 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 apply
terraform destroy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything becomes:&lt;br&gt;
✔ Repeatable&lt;br&gt;
✔ Version-controlled&lt;br&gt;
✔ Reliable&lt;/p&gt;




&lt;h3&gt;
  
  
  💡 3. Security First Mindset 🔐
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Private subnets for compute&lt;/li&gt;
&lt;li&gt;ALB as the only public entry&lt;/li&gt;
&lt;li&gt;NAT for controlled outbound access&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 This is how real-world systems are designed&lt;/p&gt;




&lt;h3&gt;
  
  
  💡 4. Scalability is a Design Principle
&lt;/h3&gt;

&lt;p&gt;Instead of guessing capacity:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Let metrics drive scaling decisions&lt;/li&gt;
&lt;li&gt;Build systems that adapt automatically&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚧 Challenges Faced
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Understanding ASG + ALB integration&lt;/li&gt;
&lt;li&gt;Debugging health checks&lt;/li&gt;
&lt;li&gt;Configuring correct security group rules&lt;/li&gt;
&lt;li&gt;Ensuring proper routing between subnets&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Each issue improved my troubleshooting skills significantly&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This project was a &lt;strong&gt;turning point&lt;/strong&gt; in my Terraform journey.&lt;/p&gt;

&lt;p&gt;I moved from:&lt;br&gt;
➡️ Creating resources&lt;br&gt;
➡️ To designing &lt;strong&gt;resilient cloud systems&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is what real DevOps engineering looks like.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔮 What’s Next?
&lt;/h2&gt;

&lt;p&gt;As I approach the final stretch of this challenge, I’m excited to explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Advanced deployment strategies&lt;/li&gt;
&lt;li&gt;CI/CD integrations&lt;/li&gt;
&lt;li&gt;Multi-account architectures&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>architecture</category>
      <category>aws</category>
      <category>devops</category>
      <category>terraform</category>
    </item>
    <item>
      <title>Building Production-Grade Observability with Terraform</title>
      <dc:creator>Atul Vishwakarma</dc:creator>
      <pubDate>Mon, 20 Apr 2026 06:23:24 +0000</pubDate>
      <link>https://dev.to/vatul16/building-production-grade-observability-with-terraform-2i3e</link>
      <guid>https://dev.to/vatul16/building-production-grade-observability-with-terraform-2i3e</guid>
      <description>&lt;h2&gt;
  
  
  From Deployment to Visibility: Observability in Action 🚀
&lt;/h2&gt;

&lt;p&gt;As part of my &lt;strong&gt;30 Days of AWS Terraform challenge&lt;/strong&gt;, Day 23 marked a crucial milestone — shifting focus from simply deploying infrastructure to &lt;strong&gt;monitoring, analyzing, and ensuring its reliability&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Today’s project was all about &lt;strong&gt;End-to-End Observability&lt;/strong&gt;, a critical pillar of any production-grade system.&lt;/p&gt;

&lt;p&gt;Because in real-world systems, success is not just about launching applications — it’s about understanding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How they behave 📊&lt;/li&gt;
&lt;li&gt;When they fail ⚠️&lt;/li&gt;
&lt;li&gt;Why they fail 🔍&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔎 Why Observability Matters
&lt;/h2&gt;

&lt;p&gt;In modern cloud environments:&lt;/p&gt;

&lt;p&gt;❌ Failures are inevitable&lt;br&gt;
❌ Traffic patterns are unpredictable&lt;br&gt;
❌ Systems are distributed&lt;/p&gt;

&lt;p&gt;Without observability, debugging becomes guesswork.&lt;/p&gt;

&lt;p&gt;👉 Observability enables teams to &lt;strong&gt;detect, diagnose, and resolve issues proactively&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;By using &lt;strong&gt;Terraform&lt;/strong&gt;, we can:&lt;/p&gt;

&lt;p&gt;✔️ Automate monitoring setup&lt;br&gt;
✔️ Ensure consistency across environments&lt;br&gt;
✔️ Treat observability as code&lt;/p&gt;




&lt;h2&gt;
  
  
  🏗️ Project Architecture Overview
&lt;/h2&gt;

&lt;p&gt;For this project, I built an observability layer around a &lt;strong&gt;serverless image-processing pipeline&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Core Architecture:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Amazon S3&lt;/strong&gt; → Image upload trigger&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AWS Lambda&lt;/strong&gt; → Image processing function&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CloudWatch&lt;/strong&gt; → Logs, metrics, dashboards, alarms&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SNS&lt;/strong&gt; → Alert notifications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This architecture demonstrates a real-world &lt;strong&gt;event-driven system&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  📊 Deep Dive into Observability Components
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. CloudWatch Log Groups 🪵
&lt;/h3&gt;

&lt;p&gt;Every Lambda execution generates logs.&lt;/p&gt;

&lt;p&gt;I provisioned log groups using Terraform to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Centralize logs&lt;/li&gt;
&lt;li&gt;Retain execution history&lt;/li&gt;
&lt;li&gt;Enable debugging&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  2. Metric Filters 📈
&lt;/h3&gt;

&lt;p&gt;Logs alone aren’t enough — we need structured metrics.&lt;/p&gt;

&lt;p&gt;Using &lt;strong&gt;CloudWatch Metric Filters&lt;/strong&gt;, I extracted:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Processing success rates&lt;/li&gt;
&lt;li&gt;Error counts&lt;/li&gt;
&lt;li&gt;Latency metrics (P99)&lt;/li&gt;
&lt;li&gt;Image size distributions&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why This Matters:
&lt;/h3&gt;

&lt;p&gt;✔️ Converts raw logs into actionable insights&lt;br&gt;
✔️ Enables performance tracking&lt;br&gt;
✔️ Supports alerting systems&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Custom Dashboards 📊
&lt;/h3&gt;

&lt;p&gt;I created a &lt;strong&gt;CloudWatch Dashboard using Terraform&lt;/strong&gt; to visualize system health.&lt;/p&gt;

&lt;h3&gt;
  
  
  Included Widgets:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Request count&lt;/li&gt;
&lt;li&gt;Error rates&lt;/li&gt;
&lt;li&gt;Latency trends&lt;/li&gt;
&lt;li&gt;Throughput metrics&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Benefit:
&lt;/h3&gt;

&lt;p&gt;👉 Real-time visibility into application performance&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Automated Alerts with SNS 🚨
&lt;/h3&gt;

&lt;p&gt;Monitoring without alerting is incomplete.&lt;/p&gt;

&lt;p&gt;I configured &lt;strong&gt;12 CloudWatch alarms&lt;/strong&gt; to detect anomalies such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;High error rates&lt;/li&gt;
&lt;li&gt;Increased latency&lt;/li&gt;
&lt;li&gt;High concurrency spikes&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Alert Workflow:
&lt;/h3&gt;

&lt;p&gt;CloudWatch Alarm → SNS Topic → Email Notification&lt;/p&gt;

&lt;h3&gt;
  
  
  Result:
&lt;/h3&gt;

&lt;p&gt;✔️ Proactive incident response&lt;br&gt;
✔️ Reduced downtime&lt;br&gt;
✔️ Faster debugging&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ Terraform Implementation Highlights
&lt;/h2&gt;

&lt;p&gt;Using Terraform, I automated:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Log group creation&lt;/li&gt;
&lt;li&gt;Metric filters&lt;/li&gt;
&lt;li&gt;Dashboard definitions&lt;/li&gt;
&lt;li&gt;Alarm configurations&lt;/li&gt;
&lt;li&gt;SNS topic setup&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why This is Powerful:
&lt;/h3&gt;

&lt;p&gt;👉 Observability is deployed alongside infrastructure — not as an afterthought.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧪 Testing &amp;amp; Troubleshooting
&lt;/h2&gt;

&lt;p&gt;One of the most valuable parts of this project was testing the system.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scenarios I Simulated:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Uploading invalid files → Trigger errors&lt;/li&gt;
&lt;li&gt;Increasing load → Test concurrency alarms&lt;/li&gt;
&lt;li&gt;Delayed processing → Validate latency thresholds&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Learnings:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Metric filters must match log patterns precisely&lt;/li&gt;
&lt;li&gt;Alarm thresholds require fine-tuning&lt;/li&gt;
&lt;li&gt;Evaluation periods impact alert accuracy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This hands-on debugging made the learning much more practical.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 Key Takeaways from Day 23
&lt;/h2&gt;

&lt;p&gt;✔️ Observability is essential for production systems&lt;br&gt;
✔️ Terraform can fully automate monitoring stacks&lt;br&gt;
✔️ Metrics + logs = complete visibility&lt;br&gt;
✔️ Alerts enable proactive operations&lt;br&gt;
✔️ Testing monitoring systems is as important as building them&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Why This Matters in Real-World DevOps
&lt;/h2&gt;

&lt;p&gt;In production environments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You won’t always see failures immediately&lt;/li&gt;
&lt;li&gt;Users will experience issues before you do (if no monitoring exists)&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;✔️ Faster incident detection&lt;br&gt;
✔️ Better system reliability&lt;br&gt;
✔️ Improved user experience&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 What’s Next?
&lt;/h2&gt;

&lt;p&gt;With just a few days left in this challenge, I’m excited to explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Advanced monitoring tools&lt;/li&gt;
&lt;li&gt;Distributed tracing&lt;/li&gt;
&lt;li&gt;CI/CD observability integration&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🎯 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Day 23 was a turning point in my Terraform journey.&lt;/p&gt;

&lt;p&gt;It reinforced that:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Deploying infrastructure is only half the job — monitoring it is the other half.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you're learning DevOps or Terraform, don’t skip observability — it’s what makes systems truly production-ready.&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>cloud</category>
      <category>devops</category>
      <category>aws</category>
    </item>
    <item>
      <title>Building a Production-Ready 2-Tier Architecture on AWS with Terraform</title>
      <dc:creator>Atul Vishwakarma</dc:creator>
      <pubDate>Fri, 17 Apr 2026 09:16:42 +0000</pubDate>
      <link>https://dev.to/vatul16/building-a-production-ready-2-tier-architecture-on-aws-with-terraform-3m8f</link>
      <guid>https://dev.to/vatul16/building-a-production-ready-2-tier-architecture-on-aws-with-terraform-3m8f</guid>
      <description>&lt;h2&gt;
  
  
  From Theory to Real-World Infrastructure 🚀
&lt;/h2&gt;

&lt;p&gt;As part of my &lt;strong&gt;30 Days of AWS Terraform challenge&lt;/strong&gt;, Day 22 was a major milestone where I moved beyond individual resources and built a &lt;strong&gt;production-style 2-tier architecture&lt;/strong&gt; using Terraform.&lt;/p&gt;

&lt;p&gt;This project was all about combining networking, security, compute, and database layers into a cohesive and secure system — just like real-world applications.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏗️ The Goal: Build a Secure 2-Tier Architecture
&lt;/h2&gt;

&lt;p&gt;The objective of this project was to design and deploy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Web Tier (Public Layer)&lt;/strong&gt; → EC2 instances running a Flask application&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database Tier (Private Layer)&lt;/strong&gt; → MySQL RDS instance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These two layers communicate securely while maintaining strict isolation from public access.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔐 Architecture Overview
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Web Tier (Public Subnet)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;EC2 instance running Flask app&lt;/li&gt;
&lt;li&gt;Accessible via Internet Gateway&lt;/li&gt;
&lt;li&gt;Uses User Data for automated setup&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Database Tier (Private Subnet)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Amazon RDS (MySQL)&lt;/li&gt;
&lt;li&gt;No public access&lt;/li&gt;
&lt;li&gt;Only accessible from Web Tier via Security Groups&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⚙️ Core Infrastructure Components
&lt;/h2&gt;

&lt;p&gt;To support this architecture, I provisioned:&lt;/p&gt;

&lt;h3&gt;
  
  
  🌐 Networking
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Custom VPC&lt;/li&gt;
&lt;li&gt;Public &amp;amp; Private subnets&lt;/li&gt;
&lt;li&gt;Internet Gateway (for web tier)&lt;/li&gt;
&lt;li&gt;NAT Gateway (for private subnet outbound access)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🔒 Security
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Security Groups with strict rules&lt;/li&gt;
&lt;li&gt;Principle of Least Privilege enforced&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🔑 Secrets Management
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;AWS Secrets Manager for DB credentials&lt;/li&gt;
&lt;li&gt;No hardcoded sensitive data&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🖥️ Compute
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;EC2 instance with Flask app&lt;/li&gt;
&lt;li&gt;Automated setup via User Data&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🗄️ Database
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;RDS MySQL instance in private subnet&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧩 Modular Terraform Architecture
&lt;/h2&gt;

&lt;p&gt;One of the biggest highlights of Day 22 was applying &lt;strong&gt;Terraform Modules in a real project&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of one large configuration file, I structured my code into reusable modules:&lt;/p&gt;

&lt;h3&gt;
  
  
  Module Structure:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;VPC Module&lt;/strong&gt; → Networking setup&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security Group Module&lt;/strong&gt; → Access control&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RDS Module&lt;/strong&gt; → Database provisioning&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secrets Module&lt;/strong&gt; → Credential management&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EC2 Module&lt;/strong&gt; → Web server deployment&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔄 Data Flow Between Modules
&lt;/h2&gt;

&lt;p&gt;Terraform modules don’t communicate directly — so I used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;outputs.tf&lt;/code&gt; → to expose values&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;variables.tf&lt;/code&gt; → to pass inputs&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;VPC module outputs subnet IDs&lt;/li&gt;
&lt;li&gt;Root module passes them to EC2 &amp;amp; RDS modules&lt;/li&gt;
&lt;li&gt;Secrets module outputs credentials used by EC2&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;✔️ Loose coupling&lt;br&gt;
✔️ High reusability&lt;br&gt;
✔️ Clean architecture&lt;/p&gt;




&lt;h2&gt;
  
  
  🧪 Testing the Application
&lt;/h2&gt;

&lt;p&gt;After deployment, I validated the setup by hitting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/health&lt;/code&gt; → Application health check&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/db/info&lt;/code&gt; → Database connectivity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Seeing the Flask app successfully connect to the RDS instance was a huge win! 🎉&lt;/p&gt;




&lt;h2&gt;
  
  
  🔐 Security Best Practices Implemented
&lt;/h2&gt;

&lt;p&gt;This project reinforced critical security principles:&lt;/p&gt;

&lt;h3&gt;
  
  
  ✔️ Private Database
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;RDS placed in private subnet&lt;/li&gt;
&lt;li&gt;No direct internet exposure&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✔️ Controlled Access
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Only EC2 security group can access DB&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✔️ Secrets Management
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Credentials stored in AWS Secrets Manager&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✔️ Least Privilege
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Minimal permissions across components&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💡 Key Learnings from Day 22
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Modules are essential for scalable Terraform projects&lt;/li&gt;
&lt;li&gt;Networking design is critical for security&lt;/li&gt;
&lt;li&gt;Secrets should never be hardcoded&lt;/li&gt;
&lt;li&gt;Private subnets protect sensitive resources&lt;/li&gt;
&lt;li&gt;Testing validates real-world readiness&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧠 Why This Project Matters
&lt;/h2&gt;

&lt;p&gt;This was not just another Terraform lab — it was a &lt;strong&gt;real-world architecture simulation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It taught me how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Design secure systems&lt;/li&gt;
&lt;li&gt;Structure modular IaC&lt;/li&gt;
&lt;li&gt;Connect application &amp;amp; database layers&lt;/li&gt;
&lt;li&gt;Apply DevOps best practices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the kind of project that bridges the gap between learning and real engineering.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 What’s Next?
&lt;/h2&gt;

&lt;p&gt;With only 8 days remaining, I’m excited to explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CI/CD integration&lt;/li&gt;
&lt;li&gt;Advanced security practices&lt;/li&gt;
&lt;li&gt;Multi-environment deployments&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🎯 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Day 22 was one of the most practical and rewarding days of this challenge.&lt;/p&gt;

&lt;p&gt;It reinforced that:&lt;/p&gt;

&lt;p&gt;👉 Good infrastructure is not just functional — it’s secure, modular, and scalable.&lt;/p&gt;

&lt;p&gt;If you're learning Terraform, I highly recommend building projects like this to truly understand how cloud systems work.&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>cloud</category>
      <category>devops</category>
      <category>aws</category>
    </item>
    <item>
      <title>Mastering Cloud Policy &amp; Governance with Terraform</title>
      <dc:creator>Atul Vishwakarma</dc:creator>
      <pubDate>Fri, 17 Apr 2026 05:56:46 +0000</pubDate>
      <link>https://dev.to/vatul16/mastering-cloud-policy-governance-with-terraform-cl4</link>
      <guid>https://dev.to/vatul16/mastering-cloud-policy-governance-with-terraform-cl4</guid>
      <description>&lt;h2&gt;
  
  
  Building Secure &amp;amp; Compliant Cloud Infrastructure with IaC 🚀
&lt;/h2&gt;

&lt;p&gt;As part of my &lt;strong&gt;30 Days of AWS Terraform challenge&lt;/strong&gt;, Day 21 marked a major shift in perspective — from simply provisioning infrastructure to &lt;strong&gt;governing and securing it at scale&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Today’s focus was on &lt;strong&gt;AWS Policy and Governance using Terraform&lt;/strong&gt;, and it was one of the most practical and impactful lessons so far.&lt;/p&gt;

&lt;p&gt;Because in real-world cloud environments, success isn’t just about deploying resources — it’s about ensuring they are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Secure 🔐&lt;/li&gt;
&lt;li&gt;Compliant 📋&lt;/li&gt;
&lt;li&gt;Auditable 🔍&lt;/li&gt;
&lt;li&gt;Consistent ⚙️&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why Policy &amp;amp; Governance Matter
&lt;/h2&gt;

&lt;p&gt;When infrastructure grows across teams, regions, and environments, manual management becomes:&lt;/p&gt;

&lt;p&gt;❌ Error-prone&lt;br&gt;
❌ Inconsistent&lt;br&gt;
❌ Difficult to audit&lt;br&gt;
❌ A major security risk&lt;/p&gt;

&lt;p&gt;This is where &lt;strong&gt;Infrastructure as Code (IaC)&lt;/strong&gt; combined with governance tools becomes critical.&lt;/p&gt;

&lt;p&gt;👉 Terraform allows us to &lt;strong&gt;codify guardrails&lt;/strong&gt;, ensuring that every deployment automatically follows best practices.&lt;/p&gt;




&lt;h2&gt;
  
  
  Core Concepts I Explored
&lt;/h2&gt;

&lt;p&gt;Today’s lab focused on three essential pillars of cloud governance:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Preventive Controls with IAM Policies 🔐
&lt;/h3&gt;

&lt;p&gt;IAM acts as the &lt;strong&gt;first line of defense&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of reacting to issues, we can prevent them entirely by defining strict policies.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I Implemented:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Denied S3 bucket deletion without MFA&lt;/li&gt;
&lt;li&gt;Enforced encrypted uploads (HTTPS only)&lt;/li&gt;
&lt;li&gt;Restricted unsafe operations based on conditions&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why It Matters:
&lt;/h3&gt;

&lt;p&gt;✔️ Stops misconfigurations before they happen&lt;br&gt;
✔️ Enforces least privilege&lt;br&gt;
✔️ Protects critical infrastructure&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Continuous Monitoring with AWS Config 📊
&lt;/h3&gt;

&lt;p&gt;IAM prevents bad actions — but what about changes over time?&lt;/p&gt;

&lt;p&gt;That’s where &lt;strong&gt;AWS Config&lt;/strong&gt; comes in.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I Built:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Enabled AWS Config recorder&lt;/li&gt;
&lt;li&gt;Configured managed rules&lt;/li&gt;
&lt;li&gt;Monitored compliance continuously&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Checks:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Unencrypted EBS volumes&lt;/li&gt;
&lt;li&gt;Missing resource tags&lt;/li&gt;
&lt;li&gt;Non-compliant S3 buckets&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why It Matters:
&lt;/h3&gt;

&lt;p&gt;✔️ Detects drift in infrastructure&lt;br&gt;
✔️ Ensures continuous compliance&lt;br&gt;
✔️ Provides audit visibility&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Secure Logging &amp;amp; Audit Trails 🪵
&lt;/h3&gt;

&lt;p&gt;Governance is incomplete without proper logging.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I Implemented:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Centralized S3 bucket for logs&lt;/li&gt;
&lt;li&gt;Enabled versioning&lt;/li&gt;
&lt;li&gt;Enforced encryption&lt;/li&gt;
&lt;li&gt;Restricted public access&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why It Matters:
&lt;/h3&gt;

&lt;p&gt;✔️ Enables audits &amp;amp; investigations&lt;br&gt;
✔️ Preserves historical data&lt;br&gt;
✔️ Strengthens security posture&lt;/p&gt;




&lt;h2&gt;
  
  
  Hands-On Implementation Highlights ⚙️
&lt;/h2&gt;

&lt;p&gt;Today’s project involved building governance controls using Terraform:&lt;/p&gt;

&lt;h3&gt;
  
  
  ✔️ AWS Config Setup
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Config recorder automation&lt;/li&gt;
&lt;li&gt;Managed rule definitions&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✔️ Tagging Enforcement
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Standardized tags across all resources&lt;/li&gt;
&lt;li&gt;Improved cost tracking &amp;amp; ownership&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✔️ IAM Guardrails
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Attached policies to roles&lt;/li&gt;
&lt;li&gt;Controlled access behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This made the entire infrastructure:&lt;/p&gt;

&lt;p&gt;👉 Self-governing&lt;br&gt;
👉 Consistent&lt;br&gt;
👉 Production-ready&lt;/p&gt;




&lt;h2&gt;
  
  
  The Real Challenge: IAM Policy Evaluation 🧠
&lt;/h2&gt;

&lt;p&gt;One of the most valuable learnings today was understanding &lt;strong&gt;how IAM policies are evaluated&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It’s not just about writing policies — it’s about understanding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Explicit Deny vs Allow&lt;/li&gt;
&lt;li&gt;Policy precedence&lt;/li&gt;
&lt;li&gt;Conditional logic behavior&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;👉 &lt;strong&gt;An explicit deny always overrides an allow.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This concept is critical when designing secure systems.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Matters in Real Organizations 🏢
&lt;/h2&gt;

&lt;p&gt;In enterprise environments, governance ensures:&lt;/p&gt;

&lt;p&gt;✔️ Compliance with regulations&lt;br&gt;
✔️ Security at scale&lt;br&gt;
✔️ Standardized deployments&lt;br&gt;
✔️ Reduced human error&lt;/p&gt;

&lt;p&gt;Without governance, cloud infrastructure quickly becomes chaotic.&lt;/p&gt;

&lt;p&gt;With Terraform + AWS Config + IAM → you get &lt;strong&gt;automated compliance&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaways from Day 21 💡
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Terraform can enforce governance, not just provisioning&lt;/li&gt;
&lt;li&gt;IAM policies act as preventive controls&lt;/li&gt;
&lt;li&gt;AWS Config enables continuous monitoring&lt;/li&gt;
&lt;li&gt;Logging is critical for auditing&lt;/li&gt;
&lt;li&gt;Understanding policy evaluation is essential&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What’s Next? 🔥
&lt;/h2&gt;

&lt;p&gt;As I move forward in this journey, I’m excited to explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Policy as Code (OPA, Sentinel)&lt;/li&gt;
&lt;li&gt;Advanced compliance automation&lt;/li&gt;
&lt;li&gt;Security frameworks integration&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Day 21 was a turning point.&lt;/p&gt;

&lt;p&gt;It changed my mindset from:&lt;/p&gt;

&lt;p&gt;➡️ “How do I deploy infrastructure?”&lt;br&gt;
➡️ To “How do I secure and govern infrastructure at scale?”&lt;/p&gt;

&lt;p&gt;That’s the real difference between writing Terraform and &lt;strong&gt;engineering cloud systems&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you’re learning Terraform, don’t skip governance — it’s what makes your infrastructure production-ready.&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>aws</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Mastering Custom Terraform Modules for Scalable AWS Infrastructure</title>
      <dc:creator>Atul Vishwakarma</dc:creator>
      <pubDate>Thu, 16 Apr 2026 10:48:58 +0000</pubDate>
      <link>https://dev.to/vatul16/mastering-custom-terraform-modules-for-scalable-aws-infrastructure-5cop</link>
      <guid>https://dev.to/vatul16/mastering-custom-terraform-modules-for-scalable-aws-infrastructure-5cop</guid>
      <description>&lt;h2&gt;
  
  
  Building Production-Ready Infrastructure with Reusable Terraform Modules 🚀
&lt;/h2&gt;

&lt;p&gt;As part of my &lt;strong&gt;30 Days of AWS Terraform challenge&lt;/strong&gt;, Day 20 was a major milestone in my Infrastructure as Code journey.&lt;/p&gt;

&lt;p&gt;Today’s focus was on one of the most important Terraform concepts for real-world DevOps: &lt;strong&gt;Custom Terraform Modules&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Until now, most of my learning revolved around creating and managing AWS resources directly. But Day 20 introduced the concept that truly separates beginner Terraform projects from production-grade cloud systems:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Modularity and reusability.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This project gave me hands-on experience building an &lt;strong&gt;Amazon EKS cluster&lt;/strong&gt; using a modular Terraform architecture — and it completely changed how I think about writing infrastructure code.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Terraform Modules Matter
&lt;/h2&gt;

&lt;p&gt;When starting with Terraform, it’s common to place everything in a single &lt;code&gt;main.tf&lt;/code&gt; file:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VPC&lt;/li&gt;
&lt;li&gt;Subnets&lt;/li&gt;
&lt;li&gt;Security groups&lt;/li&gt;
&lt;li&gt;IAM roles&lt;/li&gt;
&lt;li&gt;EKS cluster&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This works for simple labs.&lt;/p&gt;

&lt;p&gt;But in real-world environments, this quickly becomes:&lt;/p&gt;

&lt;p&gt;❌ Hard to manage&lt;br&gt;
❌ Difficult to debug&lt;br&gt;
❌ Impossible to scale&lt;br&gt;
❌ Error-prone for teams&lt;/p&gt;

&lt;p&gt;Terraform modules solve this problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Benefits of Modules:
&lt;/h3&gt;

&lt;p&gt;✅ Code reusability&lt;br&gt;
✅ Better readability&lt;br&gt;
✅ Easier collaboration&lt;br&gt;
✅ Standardized deployments&lt;br&gt;
✅ Simplified maintenance&lt;/p&gt;

&lt;p&gt;Modules help transform Terraform from a scripting tool into a proper infrastructure framework.&lt;/p&gt;




&lt;h2&gt;
  
  
  Types of Terraform Modules I Explored
&lt;/h2&gt;

&lt;p&gt;Today, I explored the three main types of modules:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Public Modules
&lt;/h3&gt;

&lt;p&gt;Modules published in the Terraform Registry by providers like HashiCorp.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS VPC module&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Partner Modules
&lt;/h3&gt;

&lt;p&gt;Modules maintained jointly by HashiCorp and cloud vendors / partners.&lt;/p&gt;

&lt;p&gt;Useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enterprise integrations&lt;/li&gt;
&lt;li&gt;Verified architectures&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Custom Modules (Main Focus Today)
&lt;/h3&gt;

&lt;p&gt;Custom modules are built by your own team to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Match internal standards&lt;/li&gt;
&lt;li&gt;Enforce security controls&lt;/li&gt;
&lt;li&gt;Improve reusability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This was the core focus of Day 20.&lt;/p&gt;




&lt;h2&gt;
  
  
  Project Goal: Build an EKS Cluster with Custom Modules 🎯
&lt;/h2&gt;

&lt;p&gt;For today’s hands-on project, I built an &lt;strong&gt;Amazon EKS (Elastic Kubernetes Service) cluster&lt;/strong&gt; using modular Terraform code.&lt;/p&gt;

&lt;p&gt;Instead of writing one large configuration file, I split the infrastructure into reusable child modules:&lt;/p&gt;

&lt;h3&gt;
  
  
  Module Breakdown:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;VPC Module&lt;/strong&gt; → Networking, subnets, routing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IAM Module&lt;/strong&gt; → Roles, policies, permissions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EKS Module&lt;/strong&gt; → Cluster and worker node setup&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This approach felt much closer to how real production systems are designed.&lt;/p&gt;




&lt;h2&gt;
  
  
  Understanding Root Module vs Child Modules 🧠
&lt;/h2&gt;

&lt;p&gt;One of the biggest learnings today was understanding how Terraform structures module relationships.&lt;/p&gt;

&lt;h3&gt;
  
  
  Root Module
&lt;/h3&gt;

&lt;p&gt;The root module acts as the main entry point.&lt;/p&gt;

&lt;p&gt;Responsibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Calling child modules&lt;/li&gt;
&lt;li&gt;Passing variables&lt;/li&gt;
&lt;li&gt;Managing overall orchestration&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Child Modules
&lt;/h3&gt;

&lt;p&gt;Child modules are reusable building blocks.&lt;/p&gt;

&lt;p&gt;Each child module:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Handles one responsibility&lt;/li&gt;
&lt;li&gt;Has its own variables&lt;/li&gt;
&lt;li&gt;Exposes outputs&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why This Matters
&lt;/h3&gt;

&lt;p&gt;This separation improves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Team ownership&lt;/li&gt;
&lt;li&gt;Maintainability&lt;/li&gt;
&lt;li&gt;Debugging&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This was a huge mindset shift for me.&lt;/p&gt;




&lt;h2&gt;
  
  
  Passing Data Between Modules 🔄
&lt;/h2&gt;

&lt;p&gt;Today’s most important concept was learning how to pass information between modules.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Challenge:
&lt;/h3&gt;

&lt;p&gt;Terraform child modules cannot directly communicate with each other.&lt;/p&gt;

&lt;p&gt;So if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VPC module creates subnets&lt;/li&gt;
&lt;li&gt;IAM module creates roles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The EKS module still needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Subnet IDs&lt;/li&gt;
&lt;li&gt;IAM Role ARN&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Solution:
&lt;/h3&gt;

&lt;p&gt;Using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;variables.tf&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;outputs.tf&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Flow:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;VPC module outputs subnet IDs&lt;/li&gt;
&lt;li&gt;Root module receives outputs&lt;/li&gt;
&lt;li&gt;Root passes them into EKS module&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why This Matters
&lt;/h3&gt;

&lt;p&gt;This teaches clean architecture principles:&lt;/p&gt;

&lt;p&gt;👉 Modules should stay independent, but data should flow intentionally.&lt;/p&gt;

&lt;p&gt;This was the biggest technical takeaway from Day 20.&lt;/p&gt;




&lt;h2&gt;
  
  
  Encapsulation = Cleaner Infrastructure 🧩
&lt;/h2&gt;

&lt;p&gt;Another major lesson was the power of encapsulation.&lt;/p&gt;

&lt;p&gt;Instead of exposing all resource complexity in the root module:&lt;/p&gt;

&lt;p&gt;I wrapped:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;IAM roles&lt;/li&gt;
&lt;li&gt;Node groups&lt;/li&gt;
&lt;li&gt;Networking logic&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Inside modules.&lt;/p&gt;

&lt;h3&gt;
  
  
  Result:
&lt;/h3&gt;

&lt;p&gt;My root configuration became:&lt;/p&gt;

&lt;p&gt;✔️ Cleaner&lt;br&gt;
✔️ Easier to understand&lt;br&gt;
✔️ Faster to extend&lt;/p&gt;

&lt;p&gt;This makes future projects much easier to maintain.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Matters in Real Organizations 🏢
&lt;/h2&gt;

&lt;p&gt;Custom modules are essential for enterprise DevOps because they help enforce standards.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Secure default VPC rules&lt;/li&gt;
&lt;li&gt;Required resource tags&lt;/li&gt;
&lt;li&gt;Approved IAM policies&lt;/li&gt;
&lt;li&gt;Logging standards&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Benefits for Teams:
&lt;/h3&gt;

&lt;p&gt;✔️ Consistency across environments&lt;br&gt;
✔️ Better compliance&lt;br&gt;
✔️ Faster deployments&lt;br&gt;
✔️ Reduced human error&lt;/p&gt;

&lt;p&gt;Today made me realize that writing reusable Terraform is as important as writing correct Terraform.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Learnings from Day 20 💡
&lt;/h2&gt;

&lt;p&gt;Today’s biggest takeaways:&lt;/p&gt;

&lt;p&gt;✔️ Terraform modules improve scalability&lt;br&gt;
✔️ Root / child architecture is powerful&lt;br&gt;
✔️ Variables &amp;amp; outputs are the backbone of modularity&lt;br&gt;
✔️ Encapsulation makes code production-ready&lt;br&gt;
✔️ Reusability saves time and reduces errors&lt;/p&gt;

&lt;p&gt;This felt like a major step toward thinking like a professional cloud engineer.&lt;/p&gt;




&lt;h2&gt;
  
  
  Advice for Beginners
&lt;/h2&gt;

&lt;p&gt;If you’re learning Terraform:&lt;/p&gt;

&lt;p&gt;Start small.&lt;/p&gt;

&lt;p&gt;Try creating modules for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VPC&lt;/li&gt;
&lt;li&gt;EC2 instance&lt;/li&gt;
&lt;li&gt;Security groups&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before moving to advanced services like EKS.&lt;/p&gt;

&lt;p&gt;The sooner you understand modules, the easier Terraform becomes.&lt;/p&gt;




&lt;h2&gt;
  
  
  What’s Next? 🔥
&lt;/h2&gt;

&lt;p&gt;Looking ahead, I’m excited to explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Module versioning&lt;/li&gt;
&lt;li&gt;Remote module sources&lt;/li&gt;
&lt;li&gt;CI/CD integration&lt;/li&gt;
&lt;li&gt;Multi-environment deployments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Still 10 days to go — excited to keep building.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Day 20 was one of the most impactful milestones in this Terraform challenge.&lt;/p&gt;

&lt;p&gt;It taught me that great Infrastructure as Code is not just about provisioning resources — it’s about building systems that are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reusable&lt;/li&gt;
&lt;li&gt;Scalable&lt;/li&gt;
&lt;li&gt;Maintainable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Custom Terraform modules are a game-changer for anyone serious about cloud engineering.&lt;/p&gt;

&lt;p&gt;If you’re on your own Terraform journey, I highly recommend spending time mastering modules — they unlock the real power of IaC.&lt;/p&gt;

&lt;p&gt;How are you using Terraform modules in your projects? I’d love to hear your best practices.&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>aws</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
    <item>
      <title>Building a Serverless Image Processing Pipeline with Terraform</title>
      <dc:creator>Atul Vishwakarma</dc:creator>
      <pubDate>Wed, 15 Apr 2026 10:02:43 +0000</pubDate>
      <link>https://dev.to/vatul16/building-a-serverless-image-processing-pipeline-with-terraform-i6g</link>
      <guid>https://dev.to/vatul16/building-a-serverless-image-processing-pipeline-with-terraform-i6g</guid>
      <description>&lt;h2&gt;
  
  
  Automating Image Workflows with AWS Lambda, S3, and Terraform 🚀
&lt;/h2&gt;

&lt;p&gt;As part of my &lt;strong&gt;30 Days of AWS Terraform challenge&lt;/strong&gt;, Day 18 was one of the most exciting and practical projects so far.&lt;/p&gt;

&lt;p&gt;Today, I moved beyond basic infrastructure provisioning and built a &lt;strong&gt;fully automated serverless image processing pipeline&lt;/strong&gt; using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS S3&lt;/li&gt;
&lt;li&gt;AWS Lambda&lt;/li&gt;
&lt;li&gt;IAM Roles &amp;amp; Policies&lt;/li&gt;
&lt;li&gt;Terraform&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This project was a major step toward understanding how real-world event-driven cloud systems are designed and automated.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Project Goal 🎯
&lt;/h2&gt;

&lt;p&gt;The goal was simple but powerful:&lt;/p&gt;

&lt;p&gt;👉 Whenever an image is uploaded to a source S3 bucket, AWS should automatically process it and store multiple optimized versions in a destination bucket.&lt;/p&gt;

&lt;h3&gt;
  
  
  Output Variants Included:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Compressed versions&lt;/li&gt;
&lt;li&gt;Different file formats&lt;/li&gt;
&lt;li&gt;Thumbnail image&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This type of architecture is highly relevant for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Media platforms&lt;/li&gt;
&lt;li&gt;E-commerce websites&lt;/li&gt;
&lt;li&gt;User profile image optimization&lt;/li&gt;
&lt;li&gt;Content delivery systems&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why Serverless Architecture Matters
&lt;/h2&gt;

&lt;p&gt;Traditional image processing systems often require:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dedicated servers&lt;/li&gt;
&lt;li&gt;Manual scaling&lt;/li&gt;
&lt;li&gt;Ongoing maintenance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That creates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Higher cost&lt;/li&gt;
&lt;li&gt;Operational complexity&lt;/li&gt;
&lt;li&gt;Slower deployments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Serverless changes everything.&lt;/p&gt;

&lt;h3&gt;
  
  
  Benefits of Serverless:
&lt;/h3&gt;

&lt;p&gt;✅ Event-driven execution&lt;br&gt;
✅ No server management&lt;br&gt;
✅ Auto scaling&lt;br&gt;
✅ Pay only for usage&lt;br&gt;
✅ Faster deployment cycles&lt;/p&gt;

&lt;p&gt;This project showed me exactly why serverless is such a powerful cloud pattern.&lt;/p&gt;




&lt;h2&gt;
  
  
  Architecture Overview 🏗️
&lt;/h2&gt;

&lt;p&gt;The architecture for today’s project looked like this:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step-by-Step Flow:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;User uploads image to Source S3 bucket&lt;/li&gt;
&lt;li&gt;S3 event notification triggers Lambda&lt;/li&gt;
&lt;li&gt;Lambda processes image using Pillow library&lt;/li&gt;
&lt;li&gt;Lambda generates multiple variants&lt;/li&gt;
&lt;li&gt;Processed images are uploaded to Destination bucket&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This entire workflow runs automatically without any manual intervention.&lt;/p&gt;




&lt;h2&gt;
  
  
  Terraform Resources Used ⚙️
&lt;/h2&gt;

&lt;p&gt;This project was a great demonstration of how Terraform can automate complex serverless stacks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Resources Provisioned:
&lt;/h3&gt;

&lt;h3&gt;
  
  
  1. S3 Buckets 📦
&lt;/h3&gt;

&lt;p&gt;Terraform created:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Source bucket (incoming uploads)&lt;/li&gt;
&lt;li&gt;Destination bucket (processed images)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bucket setup included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Event notification configuration&lt;/li&gt;
&lt;li&gt;Permissions for Lambda access&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  2. AWS Lambda Function 🧠
&lt;/h3&gt;

&lt;p&gt;The core logic was implemented inside a Lambda function.&lt;/p&gt;

&lt;p&gt;Responsibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read uploaded image&lt;/li&gt;
&lt;li&gt;Process and compress variants&lt;/li&gt;
&lt;li&gt;Generate thumbnail&lt;/li&gt;
&lt;li&gt;Upload outputs&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why Lambda?
&lt;/h3&gt;

&lt;p&gt;Lambda is ideal because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No server maintenance&lt;/li&gt;
&lt;li&gt;Automatic scaling&lt;/li&gt;
&lt;li&gt;Fast event response&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  3. IAM Roles &amp;amp; Least Privilege Security 🔐
&lt;/h3&gt;

&lt;p&gt;A key learning today was implementing secure IAM access.&lt;/p&gt;

&lt;p&gt;Terraform provisioned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lambda execution role&lt;/li&gt;
&lt;li&gt;Scoped IAM policies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Permissions included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;s3:GetObject&lt;/code&gt; from source bucket&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;s3:PutObject&lt;/code&gt; to destination bucket&lt;/li&gt;
&lt;li&gt;CloudWatch logs access&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why This Matters
&lt;/h3&gt;

&lt;p&gt;Security in automation is critical.&lt;/p&gt;

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

&lt;p&gt;👉 Always grant only the permissions required.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. CloudWatch Logging 📊
&lt;/h3&gt;

&lt;p&gt;Terraform also provisioned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Log groups&lt;/li&gt;
&lt;li&gt;Monitoring support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This helped with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Debugging failures&lt;/li&gt;
&lt;li&gt;Monitoring execution&lt;/li&gt;
&lt;li&gt;Troubleshooting events&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CloudWatch visibility was extremely useful during testing.&lt;/p&gt;




&lt;h2&gt;
  
  
  Biggest Challenge: Dependency Management 🐳
&lt;/h2&gt;

&lt;p&gt;One of the most valuable lessons today came from troubleshooting Python dependencies.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem:
&lt;/h3&gt;

&lt;p&gt;Libraries like:&lt;/p&gt;

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

&lt;p&gt;Often fail when packaged locally because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Local machine OS differs from AWS Lambda runtime&lt;/li&gt;
&lt;li&gt;Binary dependencies break&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Solution:
&lt;/h3&gt;

&lt;p&gt;I used Docker to build Lambda Layers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Docker Helped:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Matched AWS Linux environment&lt;/li&gt;
&lt;li&gt;Prevented runtime compatibility issues&lt;/li&gt;
&lt;li&gt;Ensured consistent builds&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Lesson:
&lt;/h3&gt;

&lt;p&gt;👉 “It works on my machine” is not enough in cloud engineering.&lt;/p&gt;

&lt;p&gt;Environment consistency matters.&lt;/p&gt;

&lt;p&gt;This was one of the most important practical takeaways so far.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Learnings from Day 18 💡
&lt;/h2&gt;

&lt;p&gt;Today’s project taught me:&lt;/p&gt;

&lt;p&gt;✔️ How event-driven serverless systems work&lt;br&gt;
✔️ How S3 triggers Lambda in real workflows&lt;br&gt;
✔️ Why least privilege IAM matters&lt;br&gt;
✔️ How Terraform simplifies complex deployments&lt;br&gt;
✔️ Why dependency packaging is critical&lt;/p&gt;

&lt;p&gt;This was one of the clearest examples yet of Terraform enabling repeatable, scalable cloud systems.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Terraform Made This Easier
&lt;/h2&gt;

&lt;p&gt;Without Terraform, setting this up manually would involve:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating buckets&lt;/li&gt;
&lt;li&gt;Uploading Lambda code&lt;/li&gt;
&lt;li&gt;Configuring IAM roles&lt;/li&gt;
&lt;li&gt;Setting triggers&lt;/li&gt;
&lt;li&gt;Setting logs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This would be:&lt;/p&gt;

&lt;p&gt;❌ Time-consuming&lt;br&gt;
❌ Error-prone&lt;br&gt;
❌ Hard to reproduce&lt;/p&gt;

&lt;p&gt;Terraform made the entire setup:&lt;/p&gt;

&lt;p&gt;✅ Repeatable&lt;br&gt;
✅ Version-controlled&lt;br&gt;
✅ Easy to destroy / recreate&lt;/p&gt;

&lt;p&gt;This is exactly why IaC is such a game changer.&lt;/p&gt;




&lt;h2&gt;
  
  
  What’s Next? 🔥
&lt;/h2&gt;

&lt;p&gt;Future improvements I’d like to explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding image watermarking&lt;/li&gt;
&lt;li&gt;Using Step Functions for complex workflows&lt;/li&gt;
&lt;li&gt;Integrating API Gateway for direct uploads&lt;/li&gt;
&lt;li&gt;Setting lifecycle rules on processed images&lt;/li&gt;
&lt;li&gt;Adding alerts for failed Lambda runs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Excited to keep building.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Day 18 was one of the most practical and rewarding milestones in this challenge so far.&lt;/p&gt;

&lt;p&gt;This project showed me how Terraform can be used not just to provision resources, but to automate intelligent business workflows.&lt;/p&gt;

&lt;p&gt;Serverless architectures are efficient, scalable, and increasingly relevant in modern cloud systems — and building one from scratch was a huge confidence boost.&lt;/p&gt;

&lt;p&gt;If you’re learning Terraform, I highly recommend exploring serverless projects like this. They teach infrastructure, automation, debugging, and cloud design all at once.&lt;/p&gt;

&lt;p&gt;Have you built event-driven serverless workflows with Terraform? I’d love to hear your experiences.&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>aws</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
    <item>
      <title>Mastering Blue-Green Deployments with Terraform &amp; AWS Elastic Beanstalk</title>
      <dc:creator>Atul Vishwakarma</dc:creator>
      <pubDate>Tue, 14 Apr 2026 10:33:51 +0000</pubDate>
      <link>https://dev.to/vatul16/mastering-blue-green-deployments-with-terraform-aws-elastic-beanstalk-3gpm</link>
      <guid>https://dev.to/vatul16/mastering-blue-green-deployments-with-terraform-aws-elastic-beanstalk-3gpm</guid>
      <description>&lt;h2&gt;
  
  
  Achieving Zero-Downtime Deployments with Infrastructure as Code 🚀
&lt;/h2&gt;

&lt;p&gt;As part of my &lt;strong&gt;30 Days of AWS Terraform challenge&lt;/strong&gt;, Day 17 was one of the most exciting milestones so far: implementing a &lt;strong&gt;Blue-Green Deployment strategy using Terraform and AWS Elastic Beanstalk&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This project took my Terraform journey beyond provisioning infrastructure into the world of &lt;strong&gt;release engineering, deployment safety, and production reliability&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Until now, I had focused on building resources and automating cloud workflows. But today’s challenge taught me something even more valuable:&lt;/p&gt;

&lt;p&gt;👉 How to deploy application updates without downtime and with instant rollback capability.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Blue-Green Deployment Matters
&lt;/h2&gt;

&lt;p&gt;In production systems, every deployment introduces risk.&lt;/p&gt;

&lt;p&gt;Common challenges with traditional deployments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Temporary downtime during updates&lt;/li&gt;
&lt;li&gt;Risk of failed releases affecting users&lt;/li&gt;
&lt;li&gt;Difficult rollbacks&lt;/li&gt;
&lt;li&gt;Limited testing in production-like conditions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is where &lt;strong&gt;Blue-Green Deployment&lt;/strong&gt; becomes a game-changer.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Blue-Green Deployment?
&lt;/h3&gt;

&lt;p&gt;Blue-Green is a deployment strategy where you maintain &lt;strong&gt;two identical production environments&lt;/strong&gt;:&lt;/p&gt;

&lt;h3&gt;
  
  
  🔵 Blue Environment
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Current live production version&lt;/li&gt;
&lt;li&gt;Serving real users&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🟢 Green Environment
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;New version deployment&lt;/li&gt;
&lt;li&gt;Used for testing and validation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once Green is validated:&lt;/p&gt;

&lt;p&gt;👉 Traffic is switched from Blue to Green instantly.&lt;/p&gt;

&lt;p&gt;If something breaks:&lt;/p&gt;

&lt;p&gt;👉 Rollback is as simple as switching traffic back.&lt;/p&gt;




&lt;h2&gt;
  
  
  Project Goal 🎯
&lt;/h2&gt;

&lt;p&gt;The goal for today’s project was to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploy two versions of an application (v1 and v2)&lt;/li&gt;
&lt;li&gt;Host them in separate Elastic Beanstalk environments&lt;/li&gt;
&lt;li&gt;Manage infrastructure using Terraform&lt;/li&gt;
&lt;li&gt;Perform a zero-downtime DNS cutover&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This project was a perfect mix of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Terraform provisioning&lt;/li&gt;
&lt;li&gt;AWS application hosting&lt;/li&gt;
&lt;li&gt;Deployment strategy&lt;/li&gt;
&lt;li&gt;Risk mitigation&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Architecture Overview 🏗️
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Key AWS Components Used
&lt;/h3&gt;

&lt;h3&gt;
  
  
  1. Amazon S3 for Application Packaging 📦
&lt;/h3&gt;

&lt;p&gt;I first packaged:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Application version v1.0&lt;/li&gt;
&lt;li&gt;Application version v2.0&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As ZIP archives.&lt;/p&gt;

&lt;p&gt;These were uploaded to an S3 bucket, which served as the source for Elastic Beanstalk deployments.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why This Matters
&lt;/h3&gt;

&lt;p&gt;S3 acts as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Central artifact storage&lt;/li&gt;
&lt;li&gt;Version-controlled release source&lt;/li&gt;
&lt;li&gt;Secure deployment package repository&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  2. AWS Elastic Beanstalk Environments 🌱
&lt;/h3&gt;

&lt;p&gt;Terraform was used to provision:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Elastic Beanstalk Application&lt;/li&gt;
&lt;li&gt;Blue environment (live)&lt;/li&gt;
&lt;li&gt;Green environment (candidate release)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Elastic Beanstalk simplified:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EC2 provisioning&lt;/li&gt;
&lt;li&gt;Load balancing&lt;/li&gt;
&lt;li&gt;Auto scaling&lt;/li&gt;
&lt;li&gt;Health monitoring&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This allowed me to focus more on deployment logic than server management.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. IAM Roles &amp;amp; Instance Profiles 🔐
&lt;/h3&gt;

&lt;p&gt;To make the environments work securely, Terraform also provisioned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EC2 IAM roles&lt;/li&gt;
&lt;li&gt;Instance profiles&lt;/li&gt;
&lt;li&gt;Required permissions&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;S3 access for artifacts&lt;/li&gt;
&lt;li&gt;Elastic Beanstalk environment operations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A good reminder that security is always part of automation.&lt;/p&gt;




&lt;h2&gt;
  
  
  Terraform in Action ⚙️
&lt;/h2&gt;

&lt;p&gt;This project helped me apply Terraform in a real deployment workflow.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Terraform Concepts Used:
&lt;/h3&gt;

&lt;p&gt;✔️ Resource provisioning for Elastic Beanstalk&lt;br&gt;
✔️ S3 object uploads for artifacts&lt;br&gt;
✔️ IAM role automation&lt;br&gt;
✔️ Environment lifecycle management&lt;br&gt;
✔️ Infrastructure consistency between Blue &amp;amp; Green&lt;/p&gt;

&lt;h3&gt;
  
  
  Biggest Benefit
&lt;/h3&gt;

&lt;p&gt;Because both environments were managed as code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configuration stayed consistent&lt;/li&gt;
&lt;li&gt;Drift was minimized&lt;/li&gt;
&lt;li&gt;Deployment became repeatable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is exactly why IaC matters.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Best Part: Zero-Downtime DNS Swap 🔄
&lt;/h2&gt;

&lt;p&gt;The highlight of today’s project was performing the actual traffic cutover.&lt;/p&gt;

&lt;p&gt;Once Green was deployed and tested:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I validated the new version&lt;/li&gt;
&lt;li&gt;Confirmed health checks&lt;/li&gt;
&lt;li&gt;Swapped the CNAME / DNS routing&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Result:
&lt;/h3&gt;

&lt;p&gt;✅ Users experienced zero downtime&lt;br&gt;
✅ Traffic shifted instantly&lt;br&gt;
✅ No service interruption&lt;/p&gt;

&lt;p&gt;This was one of the most satisfying hands-on moments in this challenge so far.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Learnings from Day 17 💡
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Downtime Can Be Avoided
&lt;/h3&gt;

&lt;p&gt;Production deployments don’t have to impact users.&lt;/p&gt;

&lt;p&gt;Blue-Green strategies provide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Safer releases&lt;/li&gt;
&lt;li&gt;Better customer experience&lt;/li&gt;
&lt;li&gt;Lower operational risk&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  2. Rollbacks Should Be Simple
&lt;/h3&gt;

&lt;p&gt;One of the strongest lessons:&lt;/p&gt;

&lt;p&gt;👉 Good systems are not just deployable — they are recoverable.&lt;/p&gt;

&lt;p&gt;If Green fails:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Switch traffic back to Blue&lt;/li&gt;
&lt;li&gt;Restore production quickly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This kind of safety net is essential in real systems.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Testing Matters
&lt;/h3&gt;

&lt;p&gt;Green environments allow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Smoke tests&lt;/li&gt;
&lt;li&gt;Health checks&lt;/li&gt;
&lt;li&gt;Validation before release&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This reduces bad deployments significantly.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real-World Extensions 🔥
&lt;/h2&gt;

&lt;p&gt;To make this production-grade, future improvements could include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Route 53 weighted routing&lt;/li&gt;
&lt;li&gt;Automated DNS cutover via Terraform / CLI&lt;/li&gt;
&lt;li&gt;CI/CD integration with GitHub Actions / Jenkins&lt;/li&gt;
&lt;li&gt;Canary deployments&lt;/li&gt;
&lt;li&gt;Monitoring with CloudWatch&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are areas I’m excited to explore next.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Day 17 was a major mindset shift.&lt;/p&gt;

&lt;p&gt;This project showed me that DevOps is not just about creating infrastructure — it’s about designing systems that are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reliable&lt;/li&gt;
&lt;li&gt;Recoverable&lt;/li&gt;
&lt;li&gt;Safe to change&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Blue-Green deployment is one of the clearest examples of how cloud engineering directly improves user experience.&lt;/p&gt;

&lt;p&gt;If you’re learning Terraform or AWS, I highly recommend trying a project like this. It teaches both technical depth and deployment discipline.&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>aws</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
