<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Anandh</title>
    <description>The latest articles on Forem by Anandh (@anandh_a_73d986de2f2e0c58).</description>
    <link>https://forem.com/anandh_a_73d986de2f2e0c58</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3708917%2F5be924ed-3620-49b9-8773-e9581db6adb8.png</url>
      <title>Forem: Anandh</title>
      <link>https://forem.com/anandh_a_73d986de2f2e0c58</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/anandh_a_73d986de2f2e0c58"/>
    <language>en</language>
    <item>
      <title>The Case of the Zombie Code: Why my EC2 refused to update 🕵️‍♂️</title>
      <dc:creator>Anandh</dc:creator>
      <pubDate>Thu, 15 Jan 2026 03:07:39 +0000</pubDate>
      <link>https://forem.com/anandh_a_73d986de2f2e0c58/the-case-of-the-zombie-code-why-my-ec2-refused-to-update-3f1h</link>
      <guid>https://forem.com/anandh_a_73d986de2f2e0c58/the-case-of-the-zombie-code-why-my-ec2-refused-to-update-3f1h</guid>
      <description>&lt;p&gt;You know that feeling when you push a brilliant bug fix, the CI/CD pipeline gives you a "thumbs up," and you go to grab a celebratory coffee?&lt;/p&gt;

&lt;p&gt;Then you open your app and realize... nothing changed. The code in your browser is the "Zombie version"—the one you thought you killed 10 minutes ago. It’s back from the dead, and it’s haunting your EC2 instance. 🧟‍♂️&lt;/p&gt;

&lt;h2&gt;
  
  
  The Crime Scene
&lt;/h2&gt;

&lt;h6&gt;
  
  
  &lt;em&gt;GitHub Actions&lt;/em&gt;: Success.
&lt;/h6&gt;

&lt;h6&gt;
  
  
  &lt;em&gt;AWS ECR&lt;/em&gt;: The latest image is sitting there with a fresh timestamp.
&lt;/h6&gt;

&lt;h6&gt;
  
  
  &lt;em&gt;EC2 Instance&lt;/em&gt;: Still running code from last Tuesday.
&lt;/h6&gt;

&lt;p&gt;&lt;strong&gt;The Culprit?&lt;/strong&gt; Docker’s local image cache.&lt;/p&gt;

&lt;p&gt;Docker is like that friend who "already has a guy for that." When you tell it to run the latest image, it looks at its own internal shelf first. If it sees an image tagged latest, it says, "I’ve already got it! No need to download anything new." Even if the "new" latest is totally different.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Investigation&lt;/strong&gt;: How to Force a "Search and Seizure"&lt;br&gt;
To fix this, we have to perform an "Eviction Notice" on the old image. Here is the play-by-play on how to force your EC2 to stop living in the past.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;: Prove who you are (ECR Login)&lt;br&gt;
You can't take anything from ECR if you don't have the keys.&lt;/p&gt;

&lt;p&gt;Bash&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws ecr get-login-password --region YOUR_REGION | docker login --username AWS --password-stdin YOUR_ECR_REGISTRY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;: Stop the "Imposter" Container&lt;br&gt;
We can't update the engine while the car is still driving. Shut it down.&lt;/p&gt;

&lt;p&gt;Bash&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker stop backend-app
docker rm backend-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt;: Delete the Evidence (The Cache Buster)&lt;br&gt;
This is the most important step. If you don't delete the local image, Docker will just reuse it. Delete the local copy so Docker is forced to go back to AWS ECR.&lt;/p&gt;

&lt;p&gt;Bash&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker rmi YOUR_ECR_REGISTRY/YOUR_REPO:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4&lt;/strong&gt;: The Fresh Start&lt;br&gt;
Now, we bring in the actual "Latest" version from the cloud.&lt;/p&gt;

&lt;p&gt;Bash&lt;/p&gt;

&lt;h3&gt;
  
  
  Pull the actual new image
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker pull YOUR_ECR_REGISTRY/YOUR_REPO:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Run the app
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -d --name backend-app -p 8081:8081 --restart always YOUR_ECR_REGISTRY/YOUR_REPO:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;💡 &lt;strong&gt;The "Senior Dev" Advice&lt;/strong&gt;&lt;br&gt;
If you find yourself doing this manual dance every day, it might be time to move away from the :latest tag in your deployment scripts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Better Way&lt;/strong&gt;: Use the Commit SHA as your tag (e.g., my-app:8f2a4b1).&lt;/p&gt;

&lt;p&gt;Your GitHub Action builds and tags the image with the SHA.&lt;/p&gt;

&lt;p&gt;Your EC2 deployment script asks for that specific SHA.&lt;/p&gt;

&lt;p&gt;Docker looks at its cache, sees it doesn't have that specific version, and pulls it automatically. No more zombies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Closing Thoughts&lt;/strong&gt;&lt;br&gt;
Docker cache is a double-edged sword. It makes things fast, but it can also make you feel like you're losing your mind. When in doubt: Delete the local image and pull again.&lt;/p&gt;

&lt;p&gt;Have you ever spent hours debugging something that turned out to be a cache issue? Share your "war stories" below! 👇&lt;/p&gt;

&lt;h1&gt;
  
  
  AWS #Docker #DevOps #EC2 #ECR
&lt;/h1&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>docker</category>
      <category>ecr</category>
    </item>
    <item>
      <title>I got tired of manual DTO mapping, so I built a visual tool for it 🛠️</title>
      <dc:creator>Anandh</dc:creator>
      <pubDate>Tue, 13 Jan 2026 12:28:55 +0000</pubDate>
      <link>https://forem.com/anandh_a_73d986de2f2e0c58/i-got-tired-of-manual-dto-mapping-so-i-built-a-visual-tool-for-it-35g8</link>
      <guid>https://forem.com/anandh_a_73d986de2f2e0c58/i-got-tired-of-manual-dto-mapping-so-i-built-a-visual-tool-for-it-35g8</guid>
      <description>&lt;p&gt;&lt;strong&gt;The "Manual Mapping" Nightmare&lt;/strong&gt; 😱&lt;/p&gt;

&lt;p&gt;We've all been there. You’re integrating two services. Service A speaks one version of OpenAPI, Service B speaks another. The fields almost match, but not quite.&lt;/p&gt;

&lt;p&gt;What follows is usually an afternoon of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;target.setUserId(source.getUUID()); 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;target.setCreatedAt(source.getTimestamp());
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...multiplied by 50 fields.&lt;/p&gt;

&lt;p&gt;Before you know it, your service layer is 40% "glue code" and 60% MapStruct configurations that only three people in the company understand.&lt;/p&gt;

&lt;p&gt;I decided I'd had enough.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introducing EasyMap: Visual Mapping for OpenAPI&lt;/strong&gt;🧩&lt;/p&gt;

&lt;p&gt;I'm a senior dev, and I spent way too much time wrestling with these mappers. I wanted a way to see the mapping, not just read it in code.&lt;/p&gt;

&lt;p&gt;I built EasyMap to turn that "boilerplate hell" into a visual drag-and-drop experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it works:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Upload your specs: Import your source and target OpenAPI JSON/YAML.&lt;/li&gt;
&lt;li&gt;The Visual Canvas: Literally drag a line from the source field to the target field.&lt;/li&gt;
&lt;li&gt;Keep it Clean: All that mapping logic stays outside of your business code.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Where it stands today (and where it's going)&lt;/strong&gt;&lt;/em&gt; 🚀&lt;/p&gt;

&lt;p&gt;Right now, the tool is a lean MVP focused on Spring Boot integrations. I've been using it to streamline my own workflow, but I'm building it to be framework-agnostic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On the roadmap:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🐍 Python support (FastAPI/Flask devs, I see you!)&lt;/p&gt;

&lt;p&gt;🟦 TypeScript / Node.js support&lt;/p&gt;

&lt;p&gt;Advanced transformations (for those "dirty" mappings)&lt;/p&gt;

&lt;p&gt;Try it out &amp;amp; Break it! 🧪&lt;/p&gt;

&lt;p&gt;It’s in the early stages, and I’m looking for honest peer feedback to see if I’m on the right track.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live App&lt;/strong&gt;: &lt;a href="https://easymap.valorio.io" rel="noopener noreferrer"&gt;https://easymap.valorio.io&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Spring Boot Sample&lt;/strong&gt;: &lt;a href="https://github.com/valorio-io/easymap-integration-springboot-sample" rel="noopener noreferrer"&gt;https://github.com/valorio-io/easymap-integration-springboot-sample&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I'd love to hear from you:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is "visual mapping" something you'd actually use, or do you prefer the "safety" of raw code?&lt;/li&gt;
&lt;li&gt;What’s the most annoying part of your current integration workflow?&lt;/li&gt;
&lt;li&gt;What’s the one feature that would make this a "must-have" for you?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks for reading! Happy coding. ☕&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>productivity</category>
      <category>news</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
