<?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: Sheersh Sinha</title>
    <description>The latest articles on DEV Community by Sheersh Sinha (@sheershsinha).</description>
    <link>https://dev.to/sheershsinha</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%2F3448774%2Faf64769f-e490-4584-8b5d-4e87e6cca18e.jpg</url>
      <title>DEV Community: Sheersh Sinha</title>
      <link>https://dev.to/sheershsinha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sheershsinha"/>
    <language>en</language>
    <item>
      <title>My DevOps Journey: Day 14 - AWS Storage and Global Distribution: The Missing Pieces Every Cloud Engineer Must Master</title>
      <dc:creator>Sheersh Sinha</dc:creator>
      <pubDate>Fri, 14 Nov 2025 21:42:00 +0000</pubDate>
      <link>https://dev.to/sheershsinha/my-devops-journey-day-14-aws-storage-and-global-distribution-the-missing-pieces-every-cloud-42ck</link>
      <guid>https://dev.to/sheershsinha/my-devops-journey-day-14-aws-storage-and-global-distribution-the-missing-pieces-every-cloud-42ck</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In &lt;a href="https://dev.to/sheershsinha/my-devops-journey-part-13-aws-s3-essentials-the-backbone-of-cloud-storage-10ln"&gt;Day 13&lt;/a&gt;, I explored how Amazon S3 changed the way I think about storage - versioning, lifecycle policies, encryption, and automation taught me that &lt;strong&gt;data durability is the backbone of cloud systems&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;But as my sandbox grew into a multi-instance setup, I faced a new reality:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;S3 alone cannot solve all storage needs.&lt;br&gt;&lt;br&gt;
Some data must live with compute.&lt;br&gt;&lt;br&gt;
Some must be shared across servers.&lt;br&gt;&lt;br&gt;
Some must be queried.&lt;br&gt;&lt;br&gt;
Some must be protected.&lt;br&gt;&lt;br&gt;
And some must be delivered globally with low latency.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This realization pushed me into a deeper AWS chapter: &lt;strong&gt;EBS, EFS, FSx, RDS, DynamoDB, Route 53, and CloudFront&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Each one filled a gap I didn't even know existed - until the day I faced a real problem. Let me take you through that journey.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. When My EC2 Lost Its Data - The EBS Lesson
&lt;/h2&gt;

&lt;p&gt;One day, I rebooted my EC2 instance… and my application files were gone.&lt;/p&gt;

&lt;p&gt;I had forgotten the most basic AWS truth:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"EC2 storage disappears unless you attach persistent volumes."&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's when I discovered &lt;strong&gt;EBS (Elastic Block Store)&lt;/strong&gt; - block storage volumes that live independently of the EC2 instance.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I learned about EBS:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Persistent even if the EC2 is stopped&lt;/li&gt;
&lt;li&gt;Can be detached &amp;amp; attached to any EC2&lt;/li&gt;
&lt;li&gt;Great for OS boot volumes, DBs, or app data&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Hands-on Commands:
&lt;/h3&gt;

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

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

&lt;p&gt;&lt;strong&gt;Key Lesson:&lt;/strong&gt; Compute and storage must be decoupled for reliability.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. When Multiple EC2s Needed Shared Storage - Enter EFS
&lt;/h2&gt;

&lt;p&gt;Soon, I deployed two EC2 instances behind a load balancer.&lt;/p&gt;

&lt;p&gt;But then something broke:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One instance had updated config files&lt;/li&gt;
&lt;li&gt;The other still used old ones&lt;/li&gt;
&lt;li&gt;My app behaved inconsistently&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's when I needed shared file storage → &lt;strong&gt;Amazon EFS&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why EFS was a game changer:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Multiple EC2s can read/write the same files&lt;/li&gt;
&lt;li&gt;Perfect for web servers, content directories, shared uploads&lt;/li&gt;
&lt;li&gt;Auto-scaling storage&lt;/li&gt;
&lt;li&gt;Pay only for what you use&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Mount EFS:
&lt;/h3&gt;

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

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

&lt;p&gt;EFS solved consistency issues instantly. No more "it works on server 1, but not server 2."&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Snapshots &amp;amp; Disaster Recovery - EBS Snapshots
&lt;/h2&gt;

&lt;p&gt;Later, I needed safe backups before making risky changes.&lt;/p&gt;

&lt;p&gt;That's when I learned the magic of:&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Snapshots are incremental &amp;amp; stored in S3 internally&lt;/li&gt;
&lt;li&gt;If anything breaks: restore → create new volume → attach&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Always protect your state before making changes."&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  4. High-Performance File Systems - FSx
&lt;/h2&gt;

&lt;p&gt;AWS FSx came next. At first, I ignored it - until I learned it powers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;High-performance workloads&lt;/li&gt;
&lt;li&gt;Machine learning pipelines&lt;/li&gt;
&lt;li&gt;Windows application file shares&lt;/li&gt;
&lt;li&gt;Data-intensive HPC workloads&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Use EFS for Linux. Use FSx for anything heavy-duty.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  5. When My App Needed a Database That Wouldn't Crash - RDS
&lt;/h2&gt;

&lt;p&gt;I deployed MySQL on EC2 once. &lt;strong&gt;Bad idea.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Maintenance, backups, failover… all on me.&lt;/p&gt;

&lt;p&gt;Then I discovered &lt;strong&gt;RDS&lt;/strong&gt; - AWS-managed SQL databases.&lt;/p&gt;

&lt;h3&gt;
  
  
  RDS gives you:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Automated backups&lt;/li&gt;
&lt;li&gt;Multi-AZ replication&lt;/li&gt;
&lt;li&gt;Auto patching&lt;/li&gt;
&lt;li&gt;Read replicas&lt;/li&gt;
&lt;li&gt;Monitoring&lt;/li&gt;
&lt;li&gt;Snapshots&lt;/li&gt;
&lt;li&gt;Encryption&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Launching RDS:
&lt;/h3&gt;

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

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

&lt;p&gt;Suddenly, my backend was stable, consistent, and safe.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. When Performance Outgrew SQL - DynamoDB Saved Me
&lt;/h2&gt;

&lt;p&gt;A scenario happened:&lt;/p&gt;

&lt;p&gt;My app needed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Millisecond reads&lt;/li&gt;
&lt;li&gt;Millions of requests&lt;/li&gt;
&lt;li&gt;No downtime&lt;/li&gt;
&lt;li&gt;No maintenance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enter &lt;strong&gt;DynamoDB&lt;/strong&gt; - serverless NoSQL at massive scale.&lt;/p&gt;

&lt;h3&gt;
  
  
  DynamoDB strengths:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Auto-scaling read/write&lt;/li&gt;
&lt;li&gt;Global tables&lt;/li&gt;
&lt;li&gt;TTL for auto-expiry&lt;/li&gt;
&lt;li&gt;On-demand pricing&lt;/li&gt;
&lt;li&gt;Zero maintenance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;DynamoDB made my backend &lt;strong&gt;"infinitely scalable"&lt;/strong&gt; without touching servers.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. When My App Needed a Domain - Route 53
&lt;/h2&gt;

&lt;p&gt;Next problem: I needed a custom domain for my app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Route 53&lt;/strong&gt; gave me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DNS records&lt;/li&gt;
&lt;li&gt;Traffic routing&lt;/li&gt;
&lt;li&gt;Health checks&lt;/li&gt;
&lt;li&gt;Failover routing&lt;/li&gt;
&lt;li&gt;Latency-based routing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now my app wasn't just functional - it had an online identity.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. When I Needed Global Speed - CloudFront Saved My Bandwidth
&lt;/h2&gt;

&lt;p&gt;Last issue: My images, CSS files, and videos loaded slowly across regions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CloudFront&lt;/strong&gt; fixed everything.&lt;/p&gt;

&lt;h3&gt;
  
  
  CloudFront advantages:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Distributes content globally&lt;/li&gt;
&lt;li&gt;Reduces latency&lt;/li&gt;
&lt;li&gt;Caches static files&lt;/li&gt;
&lt;li&gt;Secures content with HTTPS&lt;/li&gt;
&lt;li&gt;Integrates with S3, EC2, and Load Balancers&lt;/li&gt;
&lt;li&gt;DDoS protection via AWS Shield&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now my system felt "global." Users anywhere experienced fast performance.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Architecture (Day 14 Vision)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Layer&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Service&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;CDN&lt;/td&gt;
&lt;td&gt;CloudFront&lt;/td&gt;
&lt;td&gt;Global CDN Delivery&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DNS/Domain&lt;/td&gt;
&lt;td&gt;Route 53&lt;/td&gt;
&lt;td&gt;Domain &amp;amp; Routing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Load Balancer&lt;/td&gt;
&lt;td&gt;ELB&lt;/td&gt;
&lt;td&gt;Distributes Traffic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Web Servers&lt;/td&gt;
&lt;td&gt;EC2 (EFS)&lt;/td&gt;
&lt;td&gt;Compute/Shared Filesystem&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;RDS / DynamoDB&lt;/td&gt;
&lt;td&gt;Managed DB / NoSQL at Scale&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Storage&lt;/td&gt;
&lt;td&gt;S3, EBS, FSx/EFS&lt;/td&gt;
&lt;td&gt;Object/Block/File Storage&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  What I Learned (Deep DevOps Mindset)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Don't trust EC2 storage&lt;/strong&gt; - use EBS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't duplicate files across instances&lt;/strong&gt; - use EFS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't run SQL manually&lt;/strong&gt; - use RDS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't force SQL for all workloads&lt;/strong&gt; - use DynamoDB&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't expose raw S3&lt;/strong&gt; - use CloudFront&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't buy domains elsewhere&lt;/strong&gt; - Route 53 is built for AWS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't skip backups&lt;/strong&gt; - use Snapshots&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;This blog wasn't just content - it was an evolution in the way I think about designing cloud systems.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;"DevOps isn't about tools - it's about building systems that don't break when life gets busy."&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next (Day 15 - Serverless + Observability)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Coming up next:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Theme&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Topics&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Serverless&lt;/td&gt;
&lt;td&gt;AWS Lambda, Triggers, Events, Destinations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Monitoring&lt;/td&gt;
&lt;td&gt;CloudWatch Metrics &amp;amp; Logs, Dashboards, Alarms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Alerts&lt;/td&gt;
&lt;td&gt;Amazon SNS, SQS message queues&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;This is where automation becomes truly event-driven and intelligent.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>devops</category>
      <category>aws</category>
      <category>cloud</category>
      <category>career</category>
    </item>
    <item>
      <title>My DevOps Journey: Part 13 - AWS S3 Essentials: The Backbone of Cloud Storage</title>
      <dc:creator>Sheersh Sinha</dc:creator>
      <pubDate>Wed, 05 Nov 2025 02:53:00 +0000</pubDate>
      <link>https://dev.to/sheershsinha/my-devops-journey-part-13-aws-s3-essentials-the-backbone-of-cloud-storage-10ln</link>
      <guid>https://dev.to/sheershsinha/my-devops-journey-part-13-aws-s3-essentials-the-backbone-of-cloud-storage-10ln</guid>
      <description>&lt;p&gt;In the last blog  &lt;a href="https://dev.to/sheershsinha/my-devops-journey-part-12-networking-like-a-pro-vpc-subnets-secure-aws-connectivity-464m"&gt;(Day 12)&lt;/a&gt;, I explored how networking in AWS forms the foundation for secure and scalable compute - using VPCs, Subnets, Gateways, and Security Layers.&lt;/p&gt;

&lt;p&gt;But then I faced a new challenge:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Where do I keep the data that shouldn't vanish after my EC2 shuts down?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's when I discovered &lt;strong&gt;Amazon S3 (Simple Storage Service)&lt;/strong&gt; - the unsung hero of the cloud.&lt;/p&gt;

&lt;h2&gt;
  
  
  In this chapter, I'll cover:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;S3 Buckets and Objects&lt;/li&gt;
&lt;li&gt;Regions&lt;/li&gt;
&lt;li&gt;S3 Storage Classes&lt;/li&gt;
&lt;li&gt;Versioning&lt;/li&gt;
&lt;li&gt;Access Control&lt;/li&gt;
&lt;li&gt;Buckets and Keys&lt;/li&gt;
&lt;li&gt;S3 Data Consistency Models&lt;/li&gt;
&lt;li&gt;Object Lifecycle Management&lt;/li&gt;
&lt;li&gt;Encryption&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And I'll share how I applied these in my &lt;strong&gt;AWS Sandbox project&lt;/strong&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  1. What Is S3?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Amazon S3 (Simple Storage Service)&lt;/strong&gt; is AWS's object storage platform - used to store any amount of data, anywhere, at any time.&lt;/p&gt;

&lt;p&gt;Unlike local drives or block storage, &lt;strong&gt;S3 isn't tied to an instance&lt;/strong&gt; - it's global, durable, and accessible via APIs, SDKs, or the console.&lt;/p&gt;

&lt;p&gt;Think of it like this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"EC2 runs your application, S3 remembers everything it does."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's where you store logs, backups, images, configurations, or even entire static websites.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Buckets and Objects - The Core of S3
&lt;/h2&gt;

&lt;p&gt;Everything in S3 lives inside &lt;strong&gt;Buckets&lt;/strong&gt; (like folders), and the data inside them are called &lt;strong&gt;Objects&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Each object can be up to &lt;strong&gt;5TB&lt;/strong&gt; in size and includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data&lt;/strong&gt; (file itself)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metadata&lt;/strong&gt; (info like type, owner, last-modified)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key&lt;/strong&gt; (unique identifier within the bucket)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  In my setup:
&lt;/h3&gt;

&lt;p&gt;I created a bucket named &lt;strong&gt;my-s3-bucket-mumbai-13&lt;/strong&gt; to store log files and system backups from my EC2 sandbox.&lt;/p&gt;

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

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

&lt;p&gt;&lt;strong&gt;Practical takeaway:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once uploaded, the object gets a unique key path, like:&lt;/p&gt;

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

&lt;h2&gt;
  
  
  3. Regions - Where Your Data Lives
&lt;/h2&gt;

&lt;p&gt;Each &lt;strong&gt;S3 bucket&lt;/strong&gt; exists in a specific &lt;strong&gt;AWS region&lt;/strong&gt; (e.g., ap-south-1 for Mumbai).&lt;/p&gt;

&lt;p&gt;This helps reduce latency and ensures compliance with local data laws.&lt;/p&gt;

&lt;p&gt;For instance, my project bucket was created in &lt;strong&gt;Mumbai region&lt;/strong&gt;, keeping latency low for my EC2 instance running in the same zone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Always keep S3 and EC2 in the same region to avoid unnecessary data transfer costs.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. S3 Storage Classes - Cost Meets Performance
&lt;/h2&gt;

&lt;p&gt;AWS offers multiple storage classes based on how frequently you access data:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Storage Class&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Standard&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;High availability, low latency&lt;/td&gt;
&lt;td&gt;Frequently accessed data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Intelligent-Tiering&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Auto-moves data between classes&lt;/td&gt;
&lt;td&gt;Mixed access patterns&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Standard-IA&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Lower cost, higher retrieval time&lt;/td&gt;
&lt;td&gt;Infrequent access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;One Zone-IA&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Stored in one AZ&lt;/td&gt;
&lt;td&gt;Archival data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Glacier / Deep Archive&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Very low cost, long retrieval&lt;/td&gt;
&lt;td&gt;Long-term backups&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In my setup, I used &lt;strong&gt;Standard&lt;/strong&gt; for live log files and &lt;strong&gt;Glacier&lt;/strong&gt; for archived reports.&lt;/p&gt;

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

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

&lt;h2&gt;
  
  
  5. S3 Versioning - Protecting from Mistakes
&lt;/h2&gt;

&lt;p&gt;Ever deleted or overwritten something important?&lt;/p&gt;

&lt;p&gt;That's where &lt;strong&gt;Versioning&lt;/strong&gt; saves lives.&lt;/p&gt;

&lt;p&gt;Enabling it keeps every version of every object - even if you delete or overwrite it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enable via CLI:&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Lesson:&lt;/strong&gt; In DevOps, versioning isn't just for code - it's for everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. S3 Access Control - The Gatekeepers
&lt;/h2&gt;

&lt;p&gt;Security is crucial when multiple users or applications access your S3.&lt;/p&gt;

&lt;p&gt;You can manage access using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;IAM Policies:&lt;/strong&gt; Control access via user roles (recommended).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bucket Policies:&lt;/strong&gt; JSON rules directly applied to a bucket.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ACLs (Access Control Lists):&lt;/strong&gt; Legacy but still useful for object-level control.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example Bucket Policy (read-only public access):&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Always use IAM roles for internal apps - never expose access keys in code.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Buckets and Keys - The Naming Convention
&lt;/h2&gt;

&lt;p&gt;Each object inside S3 is identified by a &lt;strong&gt;key&lt;/strong&gt; - similar to a file path.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;s3://my-s3-bucket-mumbai-13/reports/2025/summary.csv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;my-s3-bucket-mumbai-13&lt;/strong&gt; - Bucket&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;reports/2025/summary.csv&lt;/strong&gt; - Key&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding this helps when automating tasks like uploading logs or parsing S3 URLs in scripts.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. S3 Data Consistency Models
&lt;/h2&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read-after-write consistency&lt;/strong&gt; for new objects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Eventual consistency&lt;/strong&gt; for overwrites and deletions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In simpler terms:&lt;/p&gt;

&lt;p&gt;New uploads appear instantly, but updates may take a few seconds to propagate globally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When building pipelines or backup scripts, always add a short delay after overwrites to ensure consistency.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Object Lifecycle Management - Automate Archival
&lt;/h2&gt;

&lt;p&gt;Storage is cheap - but at scale, even "cheap" becomes expensive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lifecycle policies&lt;/strong&gt; help automatically transition or delete old objects.&lt;/p&gt;

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

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

&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; Fully automated cost control without manual cleanup.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. S3 Encryption - Security Beyond Access Control
&lt;/h2&gt;

&lt;p&gt;AWS offers three levels of encryption:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Encryption Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SSE-S3&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;AWS manages encryption keys&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SSE-KMS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Customer-managed keys (via AWS KMS)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SSE-C&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;You manage your own keys&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Enable Server-Side Encryption (KMS):&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Always use SSE-KMS for enterprise-grade compliance and auditing.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;S3 is not just storage - it's the foundation for &lt;strong&gt;data resilience&lt;/strong&gt; in AWS.&lt;/li&gt;
&lt;li&gt;Buckets and objects are simple, but their policies and lifecycle define your &lt;strong&gt;security posture&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Versioning + Encryption + Lifecycle rules&lt;/strong&gt; = A production-grade storage strategy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;"If compute is the brain of cloud, storage is its memory - precise, persistent, and priceless."&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next (Day 14 - AWS Storage &amp;amp; Distribution Deep Dive)
&lt;/h2&gt;

&lt;p&gt;After mastering object storage with S3, I'll now explore persistent, file, and database-level storage, and how AWS distributes content globally.&lt;/p&gt;

&lt;h3&gt;
  
  
  In Day 14, I'll cover:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Elastic Block Store (EBS)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Elastic File System (EFS)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;EBS Snapshots &amp;amp; FSx&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Relational Database Service (RDS)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DynamoDB&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Route 53&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CloudFront&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;"S3 taught me how to store data. The next step is learning how to serve it - faster, smarter, and everywhere."&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>aws</category>
      <category>cloud</category>
      <category>career</category>
    </item>
    <item>
      <title>My DevOps Journey: Part 12 - Networking Like a Pro: VPC, Subnets &amp; Secure AWS Connectivity</title>
      <dc:creator>Sheersh Sinha</dc:creator>
      <pubDate>Fri, 31 Oct 2025 20:35:31 +0000</pubDate>
      <link>https://dev.to/sheershsinha/my-devops-journey-part-12-networking-like-a-pro-vpc-subnets-secure-aws-connectivity-464m</link>
      <guid>https://dev.to/sheershsinha/my-devops-journey-part-12-networking-like-a-pro-vpc-subnets-secure-aws-connectivity-464m</guid>
      <description>&lt;p&gt;In my previous blog &lt;a href="https://dev.to/sheershsinha/my-devops-journey-part-11-building-scalable-and-cost-effective-aws-infrastructure-real-world-1m7b"&gt;Day-11&lt;/a&gt; ,I explored how to build scalable and cost-effective AWS infrastructure using Load Balancers, Auto Scaling Groups, and Launch Templates - the foundation of resilience in cloud compute.&lt;/p&gt;

&lt;p&gt;But soon, I faced a realization:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scaling applications means nothing if your network isn't designed to support it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So in this chapter, I decided to go deeper - to understand how AWS networking actually works behind the scenes, how instances talk to each other securely, and how data travels safely in and out of the cloud.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'll Cover in Day 12
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;- Virtual Private Cloud (VPC)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Subnets (Public and Private)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Internet Gateway (IGW)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- NAT Gateway&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Route Tables&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Elastic IPs&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Security Groups vs NACLs&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Problem
&lt;/h2&gt;

&lt;p&gt;It started with a small frustration.&lt;/p&gt;

&lt;p&gt;I launched an EC2 instance in my new custom environment... and it refused to connect to the Internet.&lt;/p&gt;

&lt;p&gt;No updates. No pings. No outgoing traffic.&lt;/p&gt;

&lt;p&gt;That's when I discovered my first real DevOps truth:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"In AWS, nothing connects by default - you build the roads yourself."&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Designing My Own Virtual Private Cloud (VPC)
&lt;/h2&gt;

&lt;p&gt;A VPC (Virtual Private Cloud) is your own private slice of AWS networking.&lt;/p&gt;

&lt;p&gt;Think of it as your company's private data center inside the cloud - completely isolated until you decide what connects to what.&lt;/p&gt;

&lt;p&gt;I created a custom VPC:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Name: MY-VPC&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- CIDR Block: 10.0.0.0/22&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Region: ap-south-1 (Mumbai)&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;This became my cloud playground - the foundation for all my future deployments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Public and Private Subnets
&lt;/h2&gt;

&lt;p&gt;The first rule of networking - not everything should be exposed to the Internet.&lt;/p&gt;

&lt;p&gt;So I divided my VPC into two subnets:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Subnet Type&lt;/th&gt;
&lt;th&gt;CIDR Block&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Public Subnet&lt;/td&gt;
&lt;td&gt;10.0.0.0/24&lt;/td&gt;
&lt;td&gt;Hosts Internet-facing resources (Load Balancer, Bastion)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Private Subnet&lt;/td&gt;
&lt;td&gt;10.0.1.0/24&lt;/td&gt;
&lt;td&gt;Hosts application and database servers&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each subnet was mapped to a different Availability Zone - ensuring fault tolerance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Subnets are the boundaries that define your exposure."&lt;/strong&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Step 3: Route Tables and Internet Gateway
&lt;/h2&gt;

&lt;p&gt;Once I had my subnets, it was time to connect them properly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Public Route Table:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Destination: 0.0.0.0/0&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Target: Internet Gateway (IGW)&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Private Route Table:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Destination: Local traffic only (10.0.0.0/22)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Target: None (isolated network)&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Then, I created an Internet Gateway and attached it to my VPC - the bridge between my cloud and the outside world.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson Learned:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Without a route or gateway, your instance is alive but stranded.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Launching EC2 in the Custom VPC
&lt;/h2&gt;

&lt;p&gt;This time, I launched my EC2 instance in the public subnet of my custom VPC and allowed HTTP/HTTPS traffic through the security group.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A quick ping 8.8.8.8 returned success.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That one reply packet was more than a test - it was my first working AWS network.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Adding NAT Gateway for Private Subnets
&lt;/h2&gt;

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

&lt;p&gt;&lt;strong&gt;My private EC2 instances needed to download system updates but still remain unreachable from outside.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution: NAT Gateway&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here's what I did:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Created a NAT Gateway in the public subnet.&lt;/li&gt;
&lt;li&gt;Allocated an Elastic IP to give it a static public address.&lt;/li&gt;
&lt;li&gt;Updated the Private Route Table:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;- Destination: 0.0.0.0/0&lt;/strong&gt;&lt;br&gt;
 &lt;strong&gt;- Target: NAT Gateway&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, my private servers could reach the Internet outbound (for updates, API calls) while staying invisible to inbound traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"A NAT Gateway is like a one-way mirror - you can see out, but no one can see in."&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Elastic IP  - Stable Connectivity
&lt;/h2&gt;

&lt;p&gt;Public IPs in AWS are dynamic - they change when you stop/start instances.&lt;/p&gt;

&lt;p&gt;But real-world servers need consistency (for whitelisting, SSH, or API calls).&lt;/p&gt;

&lt;p&gt;That's where Elastic IPs come in.&lt;/p&gt;

&lt;p&gt;They're static, reassignable IPs you can attach to NAT Gateways or EC2s.&lt;/p&gt;

&lt;p&gt;I attached one EIP to my NAT and another to my Bastion EC2.&lt;/p&gt;

&lt;p&gt;Now, even after reboots, I had predictable, reliable connectivity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 7: Security Groups vs Network ACLs
&lt;/h2&gt;

&lt;p&gt;To secure my environment, I used AWS's two-tier firewall model:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Security Groups&lt;/th&gt;
&lt;th&gt;Network ACLs&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Scope&lt;/td&gt;
&lt;td&gt;Instance-level&lt;/td&gt;
&lt;td&gt;Subnet-level&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stateful&lt;/td&gt;
&lt;td&gt;Yes (remembers connections)&lt;/td&gt;
&lt;td&gt;No (must allow return traffic manually)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Default Behavior&lt;/td&gt;
&lt;td&gt;Deny inbound, allow outbound&lt;/td&gt;
&lt;td&gt;Allow all&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Use Case&lt;/td&gt;
&lt;td&gt;Fine-tuned port access&lt;/td&gt;
&lt;td&gt;Broader subnet security&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For my setup:&lt;br&gt;
&lt;strong&gt;- Security Group: Allowed inbound HTTP/HTTPS + SSH.&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- NACL: Blocked everything except ports 22 and 80.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Together, they formed a layered defense system - something every DevOps engineer should think about from Day 1.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 8: My Final Architecture
&lt;/h2&gt;

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

&lt;p&gt;&lt;strong&gt;Key Components:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Public Subnet - Internet-facing&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Private Subnet - Internal workloads&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- NAT Gateway + EIP - Outbound access only&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Security Groups + NACLs - Layered security&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 9: My Practical Takeaway
&lt;/h2&gt;

&lt;p&gt;This project changed how I think about the cloud.&lt;/p&gt;

&lt;p&gt;I stopped focusing on individual instances - and started seeing the architecture as a living system.&lt;/p&gt;

&lt;p&gt;Key insights:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Isolation is intentional, not accidental.&lt;/li&gt;
&lt;li&gt;Every subnet and route is a design decision.&lt;/li&gt;
&lt;li&gt;Networking is where security and scalability truly begin.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;"In DevOps, understanding networks isn't optional - it's the difference between deploying and designing."&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next (Day 13 - AWS S3 Essentials)
&lt;/h2&gt;

&lt;p&gt;Now that I've built a secure and scalable network for compute, it's time to move to the next core AWS service - storage.&lt;/p&gt;

&lt;p&gt;In Day 13, I'll dive deep into Amazon S3 (Simple Storage Service) - learning how to store, manage, and secure data efficiently in the cloud.&lt;/p&gt;

&lt;h2&gt;
  
  
  Here's what I'll cover next:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;- S3 Buckets and Objects - the basic building blocks of cloud storage&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Regions and Data Distribution - where and how data physically lives&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- S3 Storage Classes - balancing performance and cost&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- S3 Versioning - tracking and recovering previous data states&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- S3 Access Control - IAM policies and bucket permissions&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Buckets and Keys - organizing and addressing data&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- S3 Consistency Models - how AWS ensures data reliability&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Object Lifecycle Management - automating archival and deletion&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- S3 Encryption - securing data at rest and in transit&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Compute gives life to your application, Networking connects it, and Storage ensures it remembers."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Stay tuned for Day 13, where I explore S3 - the backbone of cloud storage and how DevOps engineers use it for reliability, versioning, and automation.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>aws</category>
      <category>cloud</category>
      <category>career</category>
    </item>
    <item>
      <title>My DevOps Journey: Part 11 - Building Scalable and Cost-Effective AWS Infrastructure (Real-World Problem DevOps Solution)</title>
      <dc:creator>Sheersh Sinha</dc:creator>
      <pubDate>Sun, 26 Oct 2025 21:09:11 +0000</pubDate>
      <link>https://dev.to/sheershsinha/my-devops-journey-part-11-building-scalable-and-cost-effective-aws-infrastructure-real-world-1m7b</link>
      <guid>https://dev.to/sheershsinha/my-devops-journey-part-11-building-scalable-and-cost-effective-aws-infrastructure-real-world-1m7b</guid>
      <description>&lt;p&gt;Every DevOps journey reaches that point where the system starts talking back to you - not in words, but in CPU spikes, slow response times, and growing user traffic.&lt;/p&gt;

&lt;p&gt;For me, that moment came one Friday afternoon.&lt;/p&gt;

&lt;p&gt;My personal project, hosted on a single EC2 instance, suddenly started slowing down during peak hours.&lt;/p&gt;

&lt;p&gt;Logs looked fine. Network was stable. But users were waiting.&lt;/p&gt;

&lt;p&gt;That's when I realized - it's not about fixing bugs anymore; it's about designing for growth.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Problem - When One Server Isn't Enough
&lt;/h2&gt;

&lt;p&gt;My single EC2 instance was doing everything:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Serving frontend + backend&lt;/li&gt;
&lt;li&gt;Handling API requests&lt;/li&gt;
&lt;li&gt;Logging activities&lt;/li&gt;
&lt;li&gt;Running cron jobs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It was the perfect "one-man army" - until it wasn't.&lt;/p&gt;

&lt;p&gt;Then came the symptoms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Latency spiked above &lt;strong&gt;700ms&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;CPU utilization touched &lt;strong&gt;90%&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One deployment crash&lt;/strong&gt; took down the entire site&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's when I understood - in DevOps, &lt;strong&gt;resilience &amp;gt; perfection&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I didn't need a stronger machine.&lt;/p&gt;

&lt;p&gt;I needed multiple lightweight servers working together, scaling up and down as traffic demanded.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1 - Architecting a Scalable System
&lt;/h2&gt;

&lt;p&gt;I started small - with what a real company would do in this scenario:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Scale horizontally, not vertically."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here's the system design I implemented:&lt;/p&gt;

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

&lt;p&gt;This architecture allowed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Traffic distribution using an &lt;strong&gt;Application Load Balancer (ALB)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Automated scaling based on CPU or memory usage via &lt;strong&gt;Auto Scaling Groups (ASG)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Health monitoring through &lt;strong&gt;CloudWatch Metrics&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 2 - Implementation Journey &amp;amp; Challenges
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Creating a Launch Template
&lt;/h3&gt;

&lt;p&gt;A launch template is your blueprint for EC2 - defining AMI, instance type, and startup configuration.&lt;/p&gt;

&lt;p&gt;It's what ensures every new instance behaves exactly as you intend.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Lesson learned:&lt;/strong&gt; Templates remove the human error of "I forgot to install X on that instance."&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating a Load Balancer
&lt;/h3&gt;

&lt;p&gt;Once the ALB was configured (internet-facing on port 80), I connected it to my Target Group where all EC2 instances register automatically.&lt;/p&gt;

&lt;p&gt;AWS started routing requests evenly.&lt;/p&gt;

&lt;p&gt;No more single-server bottlenecks.&lt;/p&gt;

&lt;p&gt;No more downtime during deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"If one instance fails, the others don't even notice - that's the DevOps way."&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting Up Auto Scaling
&lt;/h3&gt;

&lt;p&gt;Then came automation.&lt;/p&gt;

&lt;p&gt;Instead of guessing how many servers I'd need, I let AWS decide.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scaling Policy:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Minimum Instances → &lt;strong&gt;1&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Desired → &lt;strong&gt;2&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Maximum → &lt;strong&gt;4&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Scale out when CPU &amp;gt; &lt;strong&gt;70%&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws autoscaling put-scaling-policy &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--auto-scaling-group-name&lt;/span&gt; webapp-asg &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--policy-name&lt;/span&gt; scale-out &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--policy-type&lt;/span&gt; TargetTrackingScaling &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--target-tracking-configuration&lt;/span&gt; &lt;span class="s1"&gt;'{"PredefinedMetricSpecification":{"PredefinedMetricType":"ASGAverageCPUUtilization"},"TargetValue":70.0}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, new instances appeared automatically during load peaks and shut down when traffic cooled off.&lt;/p&gt;

&lt;p&gt;That's the moment I realized - &lt;strong&gt;true DevOps is not manual control, it's intelligent automation.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3 - The Cost-Effectiveness Perspective
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;I learned early that "scale" doesn't mean "spend more."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To stay cost-efficient:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Used t2.micro (free-tier) for tests.&lt;/li&gt;
&lt;li&gt;Configured scaling cooldowns to prevent unnecessary spin-ups.&lt;/li&gt;
&lt;li&gt;Added CloudWatch alarms to shut down idle EC2s.&lt;/li&gt;
&lt;li&gt;Reserved spot instances for low-priority workloads.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;System scaled automatically but stayed &lt;strong&gt;40% cheaper&lt;/strong&gt; than running fixed instances.&lt;/p&gt;

&lt;p&gt;That's how you build a production-like system on a student budget.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4 - Remedy &amp;amp; Prevention
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;When things go wrong, DevOps thinking kicks in.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here's what I learned to always keep ready:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Problem&lt;/th&gt;
&lt;th&gt;Remedy&lt;/th&gt;
&lt;th&gt;Preventive Measure&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;High CPU utilization&lt;/td&gt;
&lt;td&gt;Scale horizontally using ASG&lt;/td&gt;
&lt;td&gt;Add CloudWatch alarms for CPU &amp;gt; 70%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Instance failure&lt;/td&gt;
&lt;td&gt;Health checks via ALB&lt;/td&gt;
&lt;td&gt;Enable ELB-based instance replacement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Configuration drift&lt;/td&gt;
&lt;td&gt;Use Launch Templates&lt;/td&gt;
&lt;td&gt;Version control templates via Git&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost surge&lt;/td&gt;
&lt;td&gt;Review billing dashboard weekly&lt;/td&gt;
&lt;td&gt;Set AWS Budgets &amp;amp; alerts&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Step 5 - Real-World Architecture (VPC Layer Included)
&lt;/h2&gt;

&lt;p&gt;Here's what my updated system design looked like:&lt;/p&gt;

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

&lt;p&gt;Each subnet, route, and NAT was designed to keep public entry restricted and internal services isolated - something real organizations practice every day.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6 - My Vision as a DevOps Engineer
&lt;/h2&gt;

&lt;p&gt;This experience shifted my perspective forever.&lt;/p&gt;

&lt;p&gt;I stopped seeing AWS as a set of services - and started seeing it as an ecosystem.&lt;/p&gt;

&lt;p&gt;Every design decision - from choosing an instance type to writing a cron job - impacts cost, scalability, and security.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"DevOps isn't about tools; it's about foresight - knowing what breaks tomorrow, and fixing it today."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is what I strive for in my journey - not just deploying applications, but designing systems that can handle the unknown.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next (Day 12 - AWS Networking &amp;amp; VPC Deep Dive)
&lt;/h2&gt;

&lt;p&gt;Now that I've learned how to distribute and scale workloads with load balancers and auto scaling groups, it's time to look under the hood - the network layer that powers it all.&lt;/p&gt;

&lt;p&gt;In Day 12, I'll explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Virtual Private Cloud (VPC)&lt;/strong&gt; - the foundation of your private AWS network&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Route Tables&lt;/strong&gt; - directing traffic inside your cloud&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security Groups and Network Access Control Lists (NACLs)&lt;/strong&gt; - understanding inbound/outbound control&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Subnets (Public and Private)&lt;/strong&gt; - isolating workloads securely&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Internet Gateway (IGW)&lt;/strong&gt; - bridging private cloud to the public internet&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NAT Gateway&lt;/strong&gt; - controlled outbound access for private instances&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Elastic IP (EIP)&lt;/strong&gt; - fixed IPs for stable external communication&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;"If Load Balancing is about distributing requests, Networking is about defining where those requests can even go."&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>aws</category>
      <category>linux</category>
      <category>career</category>
    </item>
    <item>
      <title>My DevOps Journey: Part 10 - Deep Dive into AWS EC2 (Elastic Compute Cloud)</title>
      <dc:creator>Sheersh Sinha</dc:creator>
      <pubDate>Mon, 20 Oct 2025 21:48:06 +0000</pubDate>
      <link>https://dev.to/sheershsinha/my-devops-journey-part-10-deep-dive-into-aws-ec2-elastic-compute-cloud-2d2n</link>
      <guid>https://dev.to/sheershsinha/my-devops-journey-part-10-deep-dive-into-aws-ec2-elastic-compute-cloud-2d2n</guid>
      <description>&lt;p&gt;After understanding how cloud computing works in my previous post, I was eager to move from concepts to creation. I wanted to actually build something in the cloud - and that's when I discovered &lt;strong&gt;Amazon EC2 (Elastic Compute Cloud)&lt;/strong&gt; - the beating heart of AWS infrastructure.&lt;/p&gt;

&lt;p&gt;This was the first time I felt like I wasn't just using the cloud… I was running it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is EC2?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;EC2&lt;/strong&gt; is Amazon's virtual server - it's like renting a computer in the cloud that you can access anytime, configure however you want, and scale instantly.&lt;/p&gt;

&lt;p&gt;Think of EC2 as your personal Linux or Windows machine - but hosted globally and available on demand. Each instance (server) you launch can host an application, a script, a database, or even an entire architecture.&lt;/p&gt;

&lt;p&gt;When I launched my first EC2 instance, it wasn't just a VM - it was a sandbox for experimentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding AMI - The Blueprint of Your Cloud Machines
&lt;/h2&gt;

&lt;p&gt;Every EC2 instance starts from an &lt;strong&gt;AMI (Amazon Machine Image)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;An AMI is like a template that defines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The operating system (Ubuntu, Amazon Linux, Windows)&lt;/li&gt;
&lt;li&gt;Pre-installed packages&lt;/li&gt;
&lt;li&gt;System configuration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When I was testing my Log Analyzer project, I picked an &lt;strong&gt;Ubuntu 22.04 AMI&lt;/strong&gt;, installed git, cron, gzip, and cloned my repository. I later created my own custom AMI - so I could launch pre-configured instances instantly, saving time in future experiments.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Key Lesson:&lt;/strong&gt; Building custom AMIs means infrastructure can be versioned just like code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Instance Metadata and User Data - Automating Configuration
&lt;/h2&gt;

&lt;p&gt;One of the most powerful features of EC2 is &lt;strong&gt;instance metadata&lt;/strong&gt; and &lt;strong&gt;user data&lt;/strong&gt;. They allow your instance to know about itself and even auto-configure during boot.&lt;/p&gt;

&lt;h3&gt;
  
  
  Instance Metadata
&lt;/h3&gt;

&lt;p&gt;This is the instance's "self-awareness." It stores dynamic information like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instance ID&lt;/li&gt;
&lt;li&gt;Public/Private IP&lt;/li&gt;
&lt;li&gt;Security group&lt;/li&gt;
&lt;li&gt;Region&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Command to view metadata (from inside EC2):&lt;/p&gt;

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

&lt;h3&gt;
  
  
  User Data
&lt;/h3&gt;

&lt;p&gt;This is a script that runs automatically when your EC2 instance starts for the first time. I used it to automate dependency installation and log setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; git cron &lt;span class="nb"&gt;gzip
&lt;/span&gt;git clone https://github.com/sheersh123/bash-log-analyzer.git
&lt;span class="nb"&gt;cd &lt;/span&gt;bash-log-analyzer
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x log_analyzer.sh
&lt;span class="o"&gt;(&lt;/span&gt;crontab &lt;span class="nt"&gt;-l&lt;/span&gt; 2&amp;gt;/dev/null&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"0 0 * * * /home/ubuntu/bash-log-analyzer/log_analyzer.sh /var/log/syslog"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; | crontab -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When I launched this instance - it auto-setup my environment. No manual SSH, no copy-paste - everything was ready within minutes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Lesson:&lt;/strong&gt; Automation doesn't start with tools like Ansible - it starts with User Data scripts.&lt;/p&gt;

&lt;h2&gt;
  
  
  EC2 Instance Types and Pricing Models - The Cost Optimization Game
&lt;/h2&gt;

&lt;p&gt;AWS gives you flexibility not just in size, but in how you pay.&lt;/p&gt;

&lt;h3&gt;
  
  
  Instance Types
&lt;/h3&gt;

&lt;p&gt;Each type is designed for a specific workload:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Family&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;General Purpose&lt;/td&gt;
&lt;td&gt;t3.micro&lt;/td&gt;
&lt;td&gt;Lightweight apps, testing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compute Optimized&lt;/td&gt;
&lt;td&gt;c5.large&lt;/td&gt;
&lt;td&gt;High CPU workloads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory Optimized&lt;/td&gt;
&lt;td&gt;r5.large&lt;/td&gt;
&lt;td&gt;Databases, analytics&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Storage Optimized&lt;/td&gt;
&lt;td&gt;i3.large&lt;/td&gt;
&lt;td&gt;High disk I/O operations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPU Instances&lt;/td&gt;
&lt;td&gt;p3.2xlarge&lt;/td&gt;
&lt;td&gt;ML, deep learning&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Pricing Models
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;On-Demand&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Pay hourly - no commitment&lt;/td&gt;
&lt;td&gt;Testing, short workloads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Reserved&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Commit for 1-3 years, lower cost&lt;/td&gt;
&lt;td&gt;Long-term stable apps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Spot&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Use spare capacity at huge discounts&lt;/td&gt;
&lt;td&gt;Flexible, interruptible tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Savings Plan&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Flexible compute commitment&lt;/td&gt;
&lt;td&gt;Mixed workloads&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;When I started, I used &lt;strong&gt;t2.micro (Free Tier)&lt;/strong&gt; to experiment. It was enough for scripts, GitHub syncs, and learning automation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Lesson:&lt;/strong&gt; Cloud computing rewards those who understand efficiency - not just scalability.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS CLI - Controlling AWS from the Command Line
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;AWS CLI&lt;/strong&gt; became my favorite DevOps weapon. Instead of clicking through the console, I started managing everything through the terminal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing AWS CLI
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;awscli &lt;span class="nt"&gt;-y&lt;/span&gt;
aws configure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll be prompted for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS Access Key&lt;/li&gt;
&lt;li&gt;Secret Key&lt;/li&gt;
&lt;li&gt;Default region&lt;/li&gt;
&lt;li&gt;Output format (json, text, or table)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Common AWS CLI Commands
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws ec2 describe-instances&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;List all EC2 instances&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws s3 ls&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;List S3 buckets&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws ec2 stop-instances --instance-ids &amp;lt;id&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Stop a specific instance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws s3 cp ./reports s3://my-devops-logs/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Upload files to S3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws iam list-users&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;View IAM users&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Key Lesson:&lt;/strong&gt; The CLI is where DevOps engineers truly control the cloud - it's scriptable, repeatable, and fast.&lt;/p&gt;

&lt;h2&gt;
  
  
  My AWS Task - Launching My First Windows EC2 Instance
&lt;/h2&gt;

&lt;p&gt;After experimenting with Linux instances for scripting and automation, I wanted to test how DevOps workflows translate into Windows environments.&lt;/p&gt;

&lt;p&gt;As part of my AWS Task, I decided to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a Windows VM on AWS EC2&lt;/li&gt;
&lt;li&gt;Connect via &lt;strong&gt;RDP (Remote Desktop Protocol)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Open CMD inside the instance&lt;/li&gt;
&lt;li&gt;Verify system details such as hostname, architecture, and OS build&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This task helped me understand how cross-platform management works in the cloud.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tech Stack Used:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS EC2 (Windows)&lt;/li&gt;
&lt;li&gt;RDP (Client pre-installed in Windows)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Commands Executed in CMD:&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Once connected, I could view the instance's IP, processor, and memory details - confirming that my Windows EC2 instance was successfully deployed and live.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Lesson:&lt;/strong&gt; Managing Windows VMs on AWS gives a new perspective - it's not just about Linux automation; DevOps engineers often maintain hybrid environments where both OS types coexist.&lt;/p&gt;

&lt;p&gt;This small exercise boosted my confidence in handling multi-OS infrastructure - a key skill when working in enterprise-scale DevOps setups.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Turning Point - The "Vanishing Instance" Moment
&lt;/h2&gt;

&lt;p&gt;During one of my test runs, I accidentally terminated an EC2 instance without creating an AMI backup. All my logs and configurations vanished.&lt;/p&gt;

&lt;p&gt;It was frustrating - but it also taught me one of the most powerful lessons in cloud computing:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"In the cloud, if you didn't back it up, it never existed."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Since then, I've built the habit of creating snapshots and AMIs before every experiment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;EC2&lt;/strong&gt; is the core of AWS computing - your virtual data center&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AMIs&lt;/strong&gt; are blueprints for consistent deployments&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metadata &amp;amp; User Data&lt;/strong&gt; enable automation from the first boot&lt;/li&gt;
&lt;li&gt;Understanding pricing saves money and mistakes&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;AWS CLI&lt;/strong&gt; turns DevOps engineers into automation pros&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hybrid environments&lt;/strong&gt; (Linux + Windows) reflect real-world DevOps challenges&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's Next - Load Balancing &amp;amp; Auto Scaling in AWS
&lt;/h2&gt;

&lt;p&gt;Now that I've learned to launch and automate EC2 instances, the next step is understanding how to distribute traffic and maintain high availability.&lt;/p&gt;

&lt;p&gt;In my next post, I'll explore how AWS helps scale applications seamlessly through &lt;strong&gt;Load Balancers&lt;/strong&gt; and &lt;strong&gt;Auto Scaling Groups&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here's what's coming next:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Load Balancer&lt;/strong&gt; - The foundation of traffic management in AWS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Application Load Balancer (ALB)&lt;/strong&gt; - Handling HTTP/HTTPS traffic intelligently&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network Load Balancer (NLB)&lt;/strong&gt; - High-performance traffic routing at Layer 4&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Launch Templates&lt;/strong&gt; - Predefined instance configurations for auto-scaling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Types of Load Balancers&lt;/strong&gt; - Understanding Classic vs Application vs Network&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Target Groups and Listeners&lt;/strong&gt; - The logic behind routing and instance health checks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto Scaling Group (ASG)&lt;/strong&gt; - Automatically adjusting instance count based on demand&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;"Scaling isn't about adding servers - it's about maintaining stability while the world grows around your system."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Stay tuned - the next post will be all about keeping your cloud architecture resilient, dynamic, and efficient.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>aws</category>
      <category>linux</category>
      <category>career</category>
    </item>
    <item>
      <title>My DevOps Journey: Part 9 - Into the Cloud (Cloud Computing, IAM, and AWS Foundations)</title>
      <dc:creator>Sheersh Sinha</dc:creator>
      <pubDate>Wed, 15 Oct 2025 21:33:29 +0000</pubDate>
      <link>https://dev.to/sheershsinha/my-devops-journey-part-9-into-the-cloud-cloud-computing-iam-and-aws-foundations-5dl1</link>
      <guid>https://dev.to/sheershsinha/my-devops-journey-part-9-into-the-cloud-cloud-computing-iam-and-aws-foundations-5dl1</guid>
      <description>&lt;p&gt;After exploring how to secure systems and networks in &lt;a href="https://dev.to/sheershsinha/my-devops-journey-part-8-network-security-and-devsecops-protecting-what-connects-3gna"&gt;Day 8 (Network Security and DevSecOps)&lt;/a&gt;, I wanted to understand where all these systems actually live.&lt;/p&gt;

&lt;p&gt;I had spent enough time protecting the pipelines - now it was time to understand the platform that powers them.&lt;/p&gt;

&lt;p&gt;That's when I entered the world of &lt;strong&gt;Cloud Computing&lt;/strong&gt; - the heart of modern DevOps.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Cloud Computing?
&lt;/h2&gt;

&lt;p&gt;When I first launched my sandbox project on an &lt;strong&gt;AWS EC2 instance&lt;/strong&gt;, it hit me - the cloud isn't some distant, complex system.&lt;/p&gt;

&lt;p&gt;It's &lt;strong&gt;computing on demand&lt;/strong&gt; - available anytime, anywhere, in seconds.&lt;/p&gt;

&lt;p&gt;No cables, no datacenters - just configuration, connectivity, and scalability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Definition:&lt;/strong&gt; Cloud computing delivers servers, databases, storage, networking, and software services over the internet ("the cloud") - on a &lt;strong&gt;pay-as-you-go model&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cloud Service Models
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;What It Offers&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;IaaS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Infrastructure as a Service&lt;/td&gt;
&lt;td&gt;Compute, storage, networking&lt;/td&gt;
&lt;td&gt;AWS EC2, Azure VM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;PaaS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Platform as a Service&lt;/td&gt;
&lt;td&gt;Managed environment for development&lt;/td&gt;
&lt;td&gt;AWS Elastic Beanstalk&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SaaS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Software as a Service&lt;/td&gt;
&lt;td&gt;Ready-to-use applications&lt;/td&gt;
&lt;td&gt;Gmail, Salesforce&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each model defines how much control you have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;IaaS:&lt;/strong&gt; You manage everything above the OS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PaaS:&lt;/strong&gt; Focus only on code - the platform handles scaling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SaaS:&lt;/strong&gt; You consume; the vendor manages all.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Lesson:&lt;/strong&gt; Cloud computing isn't about moving data online - it's about shifting responsibility strategically.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deployment Models
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Public Cloud&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Shared by multiple organizations&lt;/td&gt;
&lt;td&gt;AWS, Azure, GCP&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Private Cloud&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Dedicated to one organization&lt;/td&gt;
&lt;td&gt;VMware Cloud&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hybrid Cloud&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Mix of both&lt;/td&gt;
&lt;td&gt;AWS Outposts, Azure Stack&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  My "Aha!" Moment - Elasticity in Action
&lt;/h3&gt;

&lt;p&gt;During one of my log analyzer tests, I scaled my application on AWS from 1 to 3 instances in under a minute.&lt;/p&gt;

&lt;p&gt;Then, I stopped them - and billing stopped too.&lt;/p&gt;

&lt;p&gt;That's when I realized what &lt;strong&gt;"elasticity"&lt;/strong&gt; truly meant.&lt;/p&gt;

&lt;p&gt;You only pay for what you use, and you scale when you need it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson:&lt;/strong&gt; Cloud computing isn't just about running servers - it's about running them intelligently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Identity and Access Management (IAM) - The Security Backbone of AWS
&lt;/h2&gt;

&lt;p&gt;In traditional setups, access control meant login credentials.&lt;/p&gt;

&lt;p&gt;In the cloud, it's &lt;strong&gt;Identity and Access Management (IAM)&lt;/strong&gt; - a system that defines who can do what on which resources.&lt;/p&gt;

&lt;p&gt;At first, I underestimated IAM - until I accidentally gave an admin-level policy to a test user.&lt;/p&gt;

&lt;p&gt;It taught me a critical lesson about &lt;strong&gt;cloud security hygiene&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key IAM Components
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Users&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Individual accounts (engineers, admins)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Groups&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Collection of users with common permissions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Roles&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Temporary access for AWS services (EC2, Lambda)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Policies&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;JSON-based documents defining permissions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Example IAM Policy (Least Privilege)
&lt;/h3&gt;

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

&lt;p&gt;This gives read-only access to the S3 bucket - nothing more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key takeaway:&lt;/strong&gt; Always apply the &lt;strong&gt;Principle of Least Privilege&lt;/strong&gt; - give only what's needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  My First IAM Mistake
&lt;/h3&gt;

&lt;p&gt;While experimenting with AWS, I once created a new IAM user to test access permissions for S3.&lt;br&gt;
I wanted the user to upload log reports from the Bash Log Analyzer project — but every time I tried running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws s3 cp ./reports s3://my-devops-logs/ --recursive
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;I kept getting this frustrating error:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An error occurred (AccessDenied) when calling the PutObject operation: Access Denied&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;After checking the policy, I realized the user only had s3:GetObject (read-only) permissions - not s3:PutObject (write).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It was such a small oversight, yet it stopped my automation completely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I updated the policy to:&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;And instantly, everything worked.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson: In the cloud, permissions can make or break productivity. Always double-check what’s allowed — both read and write.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction to AWS - My First Steps into the Cloud
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;AWS (Amazon Web Services)&lt;/strong&gt; felt like a huge universe of services at first.&lt;/p&gt;

&lt;p&gt;So I simplified it - I started with the essentials every DevOps engineer must know.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Launching an EC2 Instance
&lt;/h3&gt;

&lt;p&gt;My first step was creating a virtual machine (EC2) on AWS.&lt;/p&gt;

&lt;p&gt;Commands that became second nature:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh &lt;span class="nt"&gt;-i&lt;/span&gt; mykey.pem ubuntu@&amp;lt;public-ip&amp;gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That one EC2 instance became my testing ground for every experiment - from bash scripts to log analyzers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Storing Logs in S3
&lt;/h3&gt;

&lt;p&gt;Then I moved my project's log reports to &lt;strong&gt;Amazon S3 (Simple Storage Service)&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 &lt;span class="nb"&gt;cp &lt;/span&gt;reports/ s3://my-devops-logs/ &lt;span class="nt"&gt;--recursive&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Suddenly, my reports were globally accessible - securely and durably.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Networking with VPC
&lt;/h3&gt;

&lt;p&gt;I created a &lt;strong&gt;Virtual Private Cloud (VPC)&lt;/strong&gt; - my own isolated network inside AWS.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Subnets (Public &amp;amp; Private)&lt;/li&gt;
&lt;li&gt;Internet Gateway&lt;/li&gt;
&lt;li&gt;Routing Tables&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That experience made me appreciate how my networking knowledge from Day 7 now directly applied in the cloud.&lt;/p&gt;

&lt;h2&gt;
  
  
  The DevOps Connection - Cloud as the Engine
&lt;/h2&gt;

&lt;p&gt;In DevOps, cloud computing isn't just about hosting - it's about &lt;strong&gt;automation and scalability&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Benefit&lt;/th&gt;
&lt;th&gt;Impact&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Scalability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Auto-scaling instances during traffic spikes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Reliability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Multi-region deployments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Speed&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;CI/CD pipelines running globally&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Security&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;IAM, encryption, monitoring&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Observability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;CloudWatch + custom dashboards&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Lesson:&lt;/strong&gt; DevOps without cloud is like scripting without a terminal - limited and local.&lt;/p&gt;

&lt;h3&gt;
  
  
  Real Scenario - The Forgotten S3 Policy
&lt;/h3&gt;

&lt;p&gt;Once, while uploading files from EC2 to S3, I kept getting "Access Denied."&lt;/p&gt;

&lt;p&gt;Everything seemed fine - until I checked the bucket policy.&lt;/p&gt;

&lt;p&gt;It was denying uploads from non-HTTPS connections.&lt;/p&gt;

&lt;p&gt;A small oversight, but a great reminder:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Security isn't a barrier - it's a guide to better configurations."&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cloud Computing&lt;/strong&gt; = Renting intelligence, not just hardware.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IAM&lt;/strong&gt; = The guardian of every resource.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AWS&lt;/strong&gt; = The backbone of modern DevOps workflows.&lt;/li&gt;
&lt;li&gt;Always prefer &lt;strong&gt;roles over credentials&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Test your permissions before you automate them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's Next (Day 10 - Deep Dive into AWS EC2)
&lt;/h2&gt;

&lt;p&gt;Now that we've explored the foundations of Cloud Computing and IAM, it's time to roll up our sleeves and build inside the cloud.&lt;/p&gt;

&lt;p&gt;In Day 10, I'll dive deep into &lt;strong&gt;Amazon EC2 (Elastic Compute Cloud)&lt;/strong&gt; - where theory meets execution.&lt;/p&gt;

&lt;p&gt;Here's what's coming next:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Elastic Compute Cloud (EC2)&lt;/strong&gt; - Understanding the core of AWS computing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon Machine Images (AMI)&lt;/strong&gt; - The blueprints of every instance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EC2 Instance Metadata &amp;amp; User Data&lt;/strong&gt; - Automating configuration at launch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EC2 Instance Types &amp;amp; Pricing Models&lt;/strong&gt; - Choosing the right compute for the right workload.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AWS CLI&lt;/strong&gt; - Managing AWS resources from the terminal like a true DevOps engineer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;"This is where cloud theory turns into infrastructure reality."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Stay tuned - Day 10 will be all about launching, configuring, and optimizing instances at scale.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>aws</category>
      <category>linux</category>
      <category>career</category>
    </item>
    <item>
      <title>My DevOps Journey: Part 8 - Network Security and DevSecOps: Protecting What Connects</title>
      <dc:creator>Sheersh Sinha</dc:creator>
      <pubDate>Mon, 06 Oct 2025 16:56:16 +0000</pubDate>
      <link>https://dev.to/sheershsinha/my-devops-journey-part-8-network-security-and-devsecops-protecting-what-connects-3gna</link>
      <guid>https://dev.to/sheershsinha/my-devops-journey-part-8-network-security-and-devsecops-protecting-what-connects-3gna</guid>
      <description>&lt;p&gt;After mastering how systems communicate in &lt;a href="https://dev.to/sheershsinha/my-devops-journey-part-7-mastering-networking-for-devops-engineers-3eo8"&gt; Networking (Day 7) &lt;/a&gt;,I learned that communication without protection is like sending postcards without envelopes - anyone can read them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So, my next mission was clear: learn how to protect the network.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This part of my journey was where DevOps met Security - the phase where "moving fast" had to evolve into "moving fast securely."&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Network Security Attacks - The Reality Every Engineer Faces&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;My first encounter with security wasn't in a textbook - it was on an EC2 instance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;One morning, I opened /var/log/auth.log and saw dozens of failed SSH login attempts from random IPs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;That's when I realized: even your test servers are visible to the entire internet.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's break down a few common network security attacks I studied (and later simulated safely in my sandbox):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Attack&lt;/th&gt;
&lt;th&gt;What happens&lt;/th&gt;
&lt;th&gt;How to mitigate&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;DDoS (Distributed Denial of Service)&lt;/td&gt;
&lt;td&gt;Servers flooded with fake requests&lt;/td&gt;
&lt;td&gt;Use CDN, WAF, rate limiting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Man-in-the-Middle (MITM)&lt;/td&gt;
&lt;td&gt;Attacker intercepts communication&lt;/td&gt;
&lt;td&gt;Enforce HTTPS/TLS, VPNs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DNS Spoofing&lt;/td&gt;
&lt;td&gt;Fake DNS responses redirect users&lt;/td&gt;
&lt;td&gt;Use DNSSEC &amp;amp; trusted resolvers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Port Scanning&lt;/td&gt;
&lt;td&gt;Attackers find open services&lt;/td&gt;
&lt;td&gt;Restrict ports via firewalls&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Brute Force&lt;/td&gt;
&lt;td&gt;Repeated login attempts&lt;/td&gt;
&lt;td&gt;Enable fail2ban, SSH keys only&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Real-World Learning&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When I faced that SSH attack, I realized my biggest mistake - I had allowed inbound SSH from 0.0.0.0/0.&lt;/p&gt;

&lt;p&gt;Within hours, my logs were filled with brute-force attempts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I fixed it by:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allowing SSH only from my IP range&lt;/li&gt;
&lt;li&gt;Switching to key-based authentication&lt;/li&gt;
&lt;li&gt;Installing fail2ban&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Lesson: Security breaches don't wait for production - they start with small misconfigurations.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Firewall and ACL Configurations - The Digital Security Guard&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A firewall isn't just software; it's the first layer of trust your system builds.&lt;/p&gt;

&lt;p&gt;It decides who can knock on your door and who can't.&lt;/p&gt;

&lt;p&gt;Example: Linux Firewall with iptables&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;iptables &lt;span class="nt"&gt;-A&lt;/span&gt; INPUT &lt;span class="nt"&gt;-p&lt;/span&gt; tcp &lt;span class="nt"&gt;--dport&lt;/span&gt; 22 &lt;span class="nt"&gt;-s&lt;/span&gt; 192.168.1.10 &lt;span class="nt"&gt;-j&lt;/span&gt; ACCEPT
&lt;span class="nb"&gt;sudo &lt;/span&gt;iptables &lt;span class="nt"&gt;-A&lt;/span&gt; INPUT &lt;span class="nt"&gt;-p&lt;/span&gt; tcp &lt;span class="nt"&gt;--dport&lt;/span&gt; 22 &lt;span class="nt"&gt;-j&lt;/span&gt; DROP
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;ul&gt;
&lt;li&gt;Only 192.168.1.10 can access SSH.&lt;/li&gt;
&lt;li&gt;Everyone else gets blocked.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;AWS Security Group Example&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rule type&lt;/th&gt;
&lt;th&gt;Port&lt;/th&gt;
&lt;th&gt;Source&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Inbound&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;My IP only&lt;/td&gt;
&lt;td&gt;SSH access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Inbound&lt;/td&gt;
&lt;td&gt;80&lt;/td&gt;
&lt;td&gt;0.0.0.0/0&lt;/td&gt;
&lt;td&gt;HTTP traffic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Outbound&lt;/td&gt;
&lt;td&gt;All&lt;/td&gt;
&lt;td&gt;0.0.0.0/0&lt;/td&gt;
&lt;td&gt;Internet access&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In one of my sandbox deployments, my web app failed to load because I forgot to allow HTTP  in inbound rules - a simple oversight that taught me how much firewalls influence availability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson: Firewalls don't just block; they define your system's exposure.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;TLS, IPsec and Encryption Protocols - The Science of Safe Communication&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Encryption is what turns a public network into a private channel.&lt;/p&gt;

&lt;p&gt;As I explored it, I realized - security doesn't always mean adding tools; sometimes, it's about using the right protocol.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Protocol&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;th&gt;Example use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;TLS (Transport Layer Security)&lt;/td&gt;
&lt;td&gt;Encrypts data in transit&lt;/td&gt;
&lt;td&gt;HTTPS, email&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IPsec (Internet Protocol Security)&lt;/td&gt;
&lt;td&gt;Encrypts IP packets&lt;/td&gt;
&lt;td&gt;VPNs, VPC tunnels&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SSH (Secure Shell)&lt;/td&gt;
&lt;td&gt;Secure remote login&lt;/td&gt;
&lt;td&gt;Admin access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DNSSEC&lt;/td&gt;
&lt;td&gt;Validates DNS responses&lt;/td&gt;
&lt;td&gt;Prevents DNS spoofing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;To check if a site supports TLS:&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Lesson: Encryption doesn't make systems slower - it makes trust faster.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;DevSecOps - Automating Security, Not Just Deployments&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Once I got comfortable securing systems manually, I realized - manual security doesn't scale.&lt;/p&gt;

&lt;p&gt;That's where DevSecOps comes in: security integrated into DevOps pipelines.&lt;/p&gt;

&lt;p&gt;Instead of "deploy first, scan later," DevSecOps shifts everything left - security testing starts during development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here are some tools I began experimenting with:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Trivy&lt;/td&gt;
&lt;td&gt;Scans Docker images for vulnerabilities&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Falco&lt;/td&gt;
&lt;td&gt;Monitors runtime threats&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HashiCorp Vault&lt;/td&gt;
&lt;td&gt;Manages and encrypts secrets&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OWASP ZAP&lt;/td&gt;
&lt;td&gt;Scans web apps for security issues&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SonarQube&lt;/td&gt;
&lt;td&gt;Detects code vulnerabilities and bugs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Example: Trivy in Action&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;trivy image myapp:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It listed all the CVEs present in my Docker image - outdated packages, unpatched libraries.&lt;/p&gt;

&lt;p&gt;I fixed those and pushed a cleaner, more secure image.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson: Security isn't about fear - it's about visibility before failure.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;My Turning Point - The "Allow All" Mistake&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In one of my early deployments, I opened up inbound rules for all ports - just to test multiple services.&lt;/p&gt;

&lt;p&gt;Within a day, my system logs showed multiple scans and failed access attempts.&lt;/p&gt;

&lt;p&gt;That one careless configuration taught me what no textbook could:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Convenience is the enemy of security."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, every environment I build - from testing to production - follows zero-trust principles and least privilege access.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Every open port is an invitation - protect it.&lt;/li&gt;
&lt;li&gt;Security starts with small steps: IP restriction, SSH keys, encryption.&lt;/li&gt;
&lt;li&gt;Firewalls and ACLs define who your system talks to.&lt;/li&gt;
&lt;li&gt;DevSecOps = embedding security into every build, commit, and deployment.&lt;/li&gt;
&lt;li&gt;Prevention always costs less than recovery.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What's Next (Day 9 - Cloud Foundations and IAM Essentials)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Now that I've learned how to protect systems and secure communication, the next logical step is to explore where those systems live - the cloud.&lt;/p&gt;

&lt;p&gt;In Day 9, I'll be exploring:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is Cloud Computing?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Identity &amp;amp; Access Management (IAM)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Introduction to AWS&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's where this journey moves from protecting connections to building secure infrastructure.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>networking</category>
      <category>linux</category>
      <category>career</category>
    </item>
    <item>
      <title>My DevOps Journey: Part 7 - Mastering Networking for DevOps Engineers</title>
      <dc:creator>Sheersh Sinha</dc:creator>
      <pubDate>Sat, 04 Oct 2025 21:06:08 +0000</pubDate>
      <link>https://dev.to/sheershsinha/my-devops-journey-part-7-mastering-networking-for-devops-engineers-3eo8</link>
      <guid>https://dev.to/sheershsinha/my-devops-journey-part-7-mastering-networking-for-devops-engineers-3eo8</guid>
      <description>&lt;p&gt;When I started with DevOps, I focused on automation and scripting - but soon realized none of it mattered if systems couldn’t talk to each other. One broken route, a blocked port, or a misconfigured subnet could turn a perfect deployment into a dead service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That’s when I decided to truly understand Networking, not as theory, but as the heartbeat of DevOps.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Computer Networking Overview
&lt;/h2&gt;

&lt;p&gt;Networking is simply how systems communicate. But in DevOps, it’s the foundation of everything — from connecting CI/CD runners to Kubernetes pods.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Think of it like this:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your code travels through the network pipeline to reach users.&lt;/p&gt;

&lt;p&gt;If that pipeline breaks, your service disappears.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson: In DevOps, networking isn’t optional knowledge - it’s your system’s lifeline.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  OSI Model - My Troubleshooting Map
&lt;/h2&gt;

&lt;p&gt;The OSI Model isn’t just textbook theory - it’s a structured way to debug real problems.&lt;/p&gt;

&lt;p&gt;Layer --- Name           ------                  What I Check As DevOps&lt;br&gt;
7 ---   Application  ------                    Web servers, APIs, DNS, SSH&lt;br&gt;
6 ---   Presentation     ------                   SSL/TLS encryption&lt;br&gt;
5 ---   Session          ------                    Long-lived connections&lt;br&gt;
4 ---   Transport    ------                    TCP/UDP, ports&lt;br&gt;
3 ---   Network          ------                   IP routing, subnets&lt;br&gt;
2 ---   Data Link    ------                    MAC addressing, ARP&lt;br&gt;
1 ---   Physical     ------                    NICs, cables, virtual interfaces&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario:&lt;/strong&gt;&lt;br&gt;
Once, my SSH connection to an EC2 instance failed. Using OSI logic:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;L3 (ping worked)&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;L4 (port 22 blocked by security group)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson: OSI = The ultimate DevOps debugging checklist.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Cloud Networking - The Invisible Backbone
&lt;/h2&gt;

&lt;p&gt;When I deployed my first multi-tier app on AWS, the frontend couldn’t talk to the backend.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cause: The frontend was in a public subnet, backend in a private one, but I forgot to configure NAT Gateway for outbound access.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fixed it by:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Updating route tables&lt;/li&gt;
&lt;li&gt;Attaching a NAT gateway&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Lesson: Cloud networking uses old principles with new names - VPC = LAN, NAT = router, SG = firewall.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  LAN, Switch, Router, Subnet, Firewall, Gateway
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Concept   Purpose Real-World DevOps Example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;LAN      -----      Connects devices locally       -----                      Kubernetes cluster network&lt;br&gt;
Switch   -----      Connects nodes in LAN      -----                       Docker bridge network&lt;br&gt;
Router   -----    Routes traffic between networks  -----                      VPC internet gateway&lt;br&gt;
Subnet   -----      Segments network          -----                    Private and public subnets in AWS&lt;br&gt;
Firewall -----     Controls access           ------                         Security groups, NACLs&lt;br&gt;
Gateway  -----      Network exit point   -------                      NAT Gateway for private instances&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real Scenario:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Two Docker containers couldn’t reach each other - turned out they were on different bridge networks.&lt;/li&gt;
&lt;li&gt;Fixed it by connecting them to the same subnet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Lesson: Understanding topology saves hours of debugging.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Microservices Networking - When Services Talk to Each Other
&lt;/h2&gt;

&lt;p&gt;In a microservices world, everything talks - but not everything listens properly.&lt;/p&gt;

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

&lt;p&gt;payment-service couldn’t reach user-service.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl exec -it payment-pod -- nslookup user-service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CoreDNS was down. Restarted it, and communication was restored.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson: In Kubernetes, DNS = glue for microservices. If DNS breaks, your entire mesh collapses.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  IP Addresses and Ports - The System’s Identity
&lt;/h2&gt;

&lt;p&gt;An IP is your system’s address; a port is the specific door you knock on.&lt;/p&gt;

&lt;p&gt;Service   ----      Port        ----              Protocol&lt;br&gt;
SSH   ----        22        ----                TCP&lt;br&gt;
HTTP      ----       80             ----                TCP&lt;br&gt;
HTTPS     ----       443        ----                TCP&lt;br&gt;
Jenkins   ----       8080       ----                TCP&lt;br&gt;
MySQL     ----       3306       ----                TCP&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check open connections:&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Lesson: Every port tells a story - know which ones your app uses, and why.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  DNS - The Internet’s Phonebook
&lt;/h2&gt;

&lt;p&gt;When you type google.com, your system asks a DNS server for the IP.&lt;/p&gt;

&lt;p&gt;If DNS fails, even healthy servers look “down.”&lt;/p&gt;

&lt;p&gt;Commands:&lt;/p&gt;

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

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

&lt;p&gt;My app worked with IP but failed with the domain - misconfigured DNS record.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson: DNS is invisible until it breaks - then it’s everything.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Useful Networking Commands Every DevOps Engineer Must Know
&lt;/h2&gt;

&lt;p&gt;Command             ------              Purpose&lt;/p&gt;

&lt;p&gt;ping                ------                Check connectivity&lt;br&gt;
ifconfig / ip a     ------                 View interfaces&lt;br&gt;
traceroute      ------                Show packet path&lt;br&gt;
arp -a              ------                View MAC-to-IP mapping&lt;br&gt;
iptables -L -n      ------                 Firewall rules&lt;br&gt;
netstat -tuln       ------                Active ports&lt;br&gt;
route -n        ------               Routing table&lt;br&gt;
nslookup / dig      ------               DNS resolution&lt;br&gt;
curl -v             ------                Test HTTP connections&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;These commands have saved me more times than I can count.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-World Turning Point
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;During one deployment, everything looked green - yet users couldn’t reach the app.&lt;/li&gt;
&lt;li&gt;After hours of panic, I realized the service was configured as ClusterIP (internal-only) instead of LoadBalancer.&lt;/li&gt;
&lt;li&gt;One YAML change later, traffic started flowing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Lesson: In DevOps, most “application outages” are actually network misconfigurations.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaways&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Networking is the foundation of DevOps.&lt;/li&gt;
&lt;li&gt;OSI model = debugging GPS.&lt;/li&gt;
&lt;li&gt;Cloud networking = traditional concepts in fancy wrappers.&lt;/li&gt;
&lt;li&gt;DNS, IP, and ports define your app’s reachability.&lt;/li&gt;
&lt;li&gt;Always test with real tools (ping, curl, traceroute, netstat).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What’s Next (Day 8: Network Security &amp;amp; DevSecOps)
&lt;/h2&gt;

&lt;p&gt;Now that I know how systems talk, the next step is learning how to protect that communication.&lt;br&gt;
In Day 8, I’ll explore:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Network Security Attacks (DDoS, MITM)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Firewall &amp;amp; ACL configurations&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- TLS/IPsec protocols&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- DevSecOps tools for automated security&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>linux</category>
      <category>networking</category>
      <category>career</category>
    </item>
    <item>
      <title>My DevOps Journey: Part 6 - Building a Bash Log Analyzer for Real DevOps Scenarios</title>
      <dc:creator>Sheersh Sinha</dc:creator>
      <pubDate>Mon, 29 Sep 2025 15:18:09 +0000</pubDate>
      <link>https://dev.to/sheershsinha/my-devops-journey-part-6-building-a-bash-log-analyzer-for-real-devops-scenarios-pbj</link>
      <guid>https://dev.to/sheershsinha/my-devops-journey-part-6-building-a-bash-log-analyzer-for-real-devops-scenarios-pbj</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Why I Chose This Project&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If you’ve worked in DevOps, you know the 2 AM drill:&lt;/li&gt;
&lt;li&gt; A service goes down.&lt;/li&gt;
&lt;li&gt; The first question: “What do the logs say?”&lt;/li&gt;
&lt;li&gt; Ten minutes later, you’re still scrolling through thousands of lines of /var/log/syslog&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;During my internship, I saw this problem first-hand. The logs had the answer — but the signal was buried in noise. By the time the team found the root cause, customers had already noticed the downtime.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That’s when I realized: slow log analysis is not just a technical issue, it’s a business risk.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So I built the Bash Log Analyzer &amp;amp; Error Report Generator&lt;/strong&gt;&lt;br&gt;
.&lt;/p&gt;
&lt;h2&gt;
  
  
  What Problem Does It Solve?
&lt;/h2&gt;

&lt;p&gt;In real DevOps environments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Incident response time matters → every minute of downtime = lost money.&lt;/li&gt;
&lt;li&gt;Logs are the first diagnostic tool but are messy to read manually.&lt;/li&gt;
&lt;li&gt;Teams need structure fast → not raw lines, but actionable insights.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;This project automates that workflow by:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Parsing logs for ERROR, WARNING, and CRITICAL entries.&lt;/li&gt;
&lt;li&gt;Generating reports in .txt and .csv for teams and management.&lt;/li&gt;
&lt;li&gt;Automating analysis via cron so reports are delivered daily.&lt;/li&gt;
&lt;li&gt; Business Value: Faster incident response → reduced MTTR (Mean Time to Recovery) → better uptime and reliability.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/Sheersh123/bash-log-analyzer" rel="noopener noreferrer"&gt;bash-log-analyzer&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Sandbox Deployment — My DevOps Action Story
&lt;/h2&gt;

&lt;p&gt;I tested the project on an AWS EC2 Ubuntu sandbox before touching production logs. Here’s what happened:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dependency Pitfalls&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First attempt:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install -y grep awk sed cut sort uniq gzip cron git unzip

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

&lt;/div&gt;



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

&lt;blockquote&gt;
&lt;p&gt;awk → “virtual package.”&lt;br&gt;
cut, uniq, sort → “not found.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Fix: Installed gawk. Learned that others come with coreutils.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DevOps Lesson: Don’t assume base images have the same packages — always verify.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub Battles&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Branch divergence blocked pushes → fixed with git pull --rebase.&lt;/li&gt;
&lt;li&gt;Password auth failed → switched to Personal Access Token (PAT).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;DevOps Lesson: Auth evolves (PAT/SSH &amp;gt; passwords). CI/CD pipelines must adapt too.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Permission Errors&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ran analyzer → Permission denied.&lt;br&gt;
 Fixed with:&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;DevOps Lesson: Permissions are small details that break big things.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing Logs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Forgot argument → script scolded me with usage instructions.&lt;/li&gt;
&lt;li&gt;Ran with sample logs → reports generated fine.&lt;/li&gt;
&lt;li&gt;For real /var/log/syslog, I backed it up first before running the script.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;DevOps Lesson: Never test directly on production logs without backups.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Cron Automation
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Goal: automate daily reports at midnight.&lt;/li&gt;
&lt;li&gt;Cron failed silently. Why? I used relative paths
.
&lt;strong&gt;Fix: switched to absolute paths.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;DevOps Lesson: In automation, paths must always be explicit.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Outcome
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Analyzer worked in sandbox.&lt;/li&gt;
&lt;li&gt;.txt and .csv reports generated successfully.&lt;/li&gt;
&lt;li&gt;Cron job automated the process.&lt;/li&gt;
&lt;li&gt;GitHub repo synced with latest updates.&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%2F9vgemf17qn8mo6w8st0d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9vgemf17qn8mo6w8st0d.png" alt=" " width="800" height="545"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  DevOps Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Faster MTTR: Logs parsed into clean reports, no endless scrolling.&lt;/li&gt;
&lt;li&gt;Safe Practices: Sandbox testing + backups before touching live logs.&lt;/li&gt;
&lt;li&gt;Automation First: Cron removes human dependency.&lt;/li&gt;
&lt;li&gt;Scalable Vision: Ready for future integrations (Grafana/ELK).&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;In Day 7, I’ll explore Networking for DevOps Engineers — because once you can analyze logs and automate insights, the next step is ensuring systems communicate reliably.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topics coming up:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Computer Networking Basics (in DevOps context)&lt;/li&gt;
&lt;li&gt;OSI Model as a troubleshooting map&lt;/li&gt;
&lt;li&gt;LAN, Switches, Routers, Subnets, Firewalls, Gateways&lt;/li&gt;
&lt;li&gt;Cloud Networking&lt;/li&gt;
&lt;li&gt;Microservices Networking&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Networking is the glue of distributed systems — without it, even the best automation fails.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This project showed me how even a simple Bash script can shrink troubleshooting time, improve observability, and support real business outcomes.&lt;/p&gt;

&lt;p&gt;It gave me hands-on experience in log analysis, automation, and deployment troubleshooting — critical skills for a DevOps engineer.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>discuss</category>
      <category>linux</category>
      <category>career</category>
    </item>
    <item>
      <title>My DevOps Journey: Part 5 - Shell Scripting Lessons from Real Troubleshooting</title>
      <dc:creator>Sheersh Sinha</dc:creator>
      <pubDate>Thu, 18 Sep 2025 19:53:38 +0000</pubDate>
      <link>https://dev.to/sheershsinha/my-devops-journey-part-5-shell-scripting-lessons-from-real-troubleshooting-3len</link>
      <guid>https://dev.to/sheershsinha/my-devops-journey-part-5-shell-scripting-lessons-from-real-troubleshooting-3len</guid>
      <description>&lt;p&gt;After setting up cronjobs in  &lt;a href="https://dev.to/sheersh_sinha_1ac2bb28045/my-devops-journey-part-4-archiving-scheduling-remote-access-system-administration-5apf"&gt;Part 4 &lt;/a&gt; , I realized typing commands manually wasn’t scaling. In the real world, systems don’t wait for you to type - they break when you’re asleep. That’s when I leaned on Shell Scripting.&lt;/p&gt;

&lt;p&gt;But instead of learning it the “classroom way,” I picked it up through real troubleshooting scenarios. Each concept - variables, arguments, loops - came alive only when I faced a problem I had to solve.&lt;/p&gt;

&lt;p&gt;Here’s how scripting became my real-world rescue tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing My First Script - The “On-Call Repetition Nightmare”
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Scenario: During my internship, disk alerts kept firing at midnight. Every time, I’d log in and type df -h manually. It was exhausting.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution:
&lt;/h2&gt;

&lt;p&gt;I wrote a script called diskcheck.sh:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash
df -h
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, instead of typing commands half-asleep, I just ran:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./diskcheck.sh

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

&lt;/div&gt;



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

&lt;p&gt;&lt;strong&gt;Lesson: Scripts are your second brain during on-call duty.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Variables- The “Multiple Servers, One Script” Challenge
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Scenario: I had to check connectivity for 3 different servers. My first script hardcoded the IP. If the server changed, the script broke.
&lt;/h2&gt;

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

&lt;p&gt;Use variables:&lt;/p&gt;

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

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

&lt;p&gt;Later, I swapped the value, and the script worked everywhere.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson: Variables save scripts from becoming useless with changing infrastructure.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Operators-The “Disk Space Alert” Problem
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Scenario: A staging server ran out of space, crashing the app. I needed a script to check disk usage and alert only when it crossed 80%.&lt;/strong&gt;&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;USED=$(df / | grep / | awk '{ print $5 }' | sed 's/%//g')
THRESHOLD=80

if [ $USED -gt $THRESHOLD ]; then
  echo " Disk usage critical: $USED%"
fi

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Lesson: Operators + conditions = automated monitoring without external tools.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Read User Input-The “Backup Flexibility” Problem
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Scenario: My backup script only archived /home/, but once I needed /etc/ configs too. Editing the script every time was painful.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution: Make the script ask:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "Enter path to backup:"
read PATH
tar -cvf backup.tar $PATH
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now I could run it for any directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson: Interactivity makes scripts versatile across environments.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Functions-he “Scattered Logging Mess”
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Scenario: I had multiple scripts spitting logs in random formats. Debugging failures became a nightmare.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution: I created a reusable logging function:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;log() {
  echo "[INFO] $(date): $1"
}
log "Backup started"
log "Backup completed"


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

&lt;/div&gt;



&lt;p&gt;Now all my scripts spoke the same language.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson: Functions bring consistency to messy automation.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Shell vs sh vs Bash - The “Works on Ubuntu, Breaks on Alpine” Problem
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Scenario: A deployment script ran fine on Ubuntu but failed inside a lightweight Alpine Docker container.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The issue: Alpine used /bin/sh, which didn’t support certain Bash features.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution: Always specify the interpreter:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Lesson: Explicit is better than implicit. Always define your shell&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conditionals - The “Don’t Delete While Running” Disaster
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Scenario: A cleanup script started wiping logs while nginx was still running. The service crashed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution: Add a safety check:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if pgrep nginx; then
  echo "Nginx running. Skipping cleanup."
else
  rm -rf /var/log/nginx/*
fi

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Lesson: Conditionals are the guardrails that keep automation safe.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Arguments - The “One Script Per Environment” Problem
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Scenario: I had separate scripts for dev, test, and prod backups. Unmanageable.&lt;/strong&gt;&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ENV=$1
echo "Backing up $ENV environment..."
tar -cvf backup_$ENV.tar /var/$ENV/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./backup.sh dev
./backup.sh prod

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Lesson: Arguments make scripts scale across environments.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Loops - The “50 Log Files” Problem
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Scenario: Compressing logs one by one? Impossible during an outage.&lt;/strong&gt;&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for file in /var/log/*.log; do
  gzip $file
done

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Lesson: Loops are the ultimate time-savers for bulk operations.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Advanced Turning Point: When My Script Nearly Wiped Production
&lt;/h2&gt;

&lt;p&gt;Late one night, I was asked to “clean up temp files.” I rushed and wrote:&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;But I forgot my script was running as root inside a container mount. It began deleting critical shared files.&lt;/li&gt;
&lt;li&gt;I pulled the brakes with Ctrl+C, but the damage was real — some mounted configs were gone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How I Recovered:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Restored configs from backup.&lt;/li&gt;
&lt;li&gt;Added dry-run safety in my scripts:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "Would delete: $file"

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;before actually running rm.&lt;/li&gt;
&lt;li&gt;Enforced set -e and logging for all critical scripts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Lesson: Scripts are scalpels - powerful, precise, and dangerous. Treat them with respect.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways from Part 5
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Shell scripting concepts come alive only through real problems.&lt;/li&gt;
&lt;li&gt;Variables, arguments, loops → not “syntax,” but solutions to DevOps pain.&lt;/li&gt;
&lt;li&gt;Conditionals and functions prevent disasters.&lt;/li&gt;
&lt;li&gt;Always test in a sandbox before production.&lt;/li&gt;
&lt;li&gt;Scripts aren’t toys — they’re system lifelines.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What’s Next (Part 6: Networking Basics)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that I can script my way out of problems, the next step is to make sure systems can talk to each other.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In Part 6, I’ll explore:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Computer Networking Overview&lt;/li&gt;
&lt;li&gt;OSI Model&lt;/li&gt;
&lt;li&gt;LAN, Switch, Router, Subnet, Firewall&lt;/li&gt;
&lt;li&gt;Cloud Networking&lt;/li&gt;
&lt;li&gt;Microservices Networking&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Over to You
&lt;/h2&gt;

&lt;p&gt;What was your biggest shell scripting disaster? Did you ever run a command that made you sweat? Share it  - maybe we can all save someone else from repeating it.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>linux</category>
      <category>discuss</category>
      <category>career</category>
    </item>
    <item>
      <title>My DevOps Journey: Part 4 - Archiving, Scheduling, Remote Access &amp; System Administration Essentials</title>
      <dc:creator>Sheersh Sinha</dc:creator>
      <pubDate>Mon, 15 Sep 2025 20:59:10 +0000</pubDate>
      <link>https://dev.to/sheershsinha/my-devops-journey-part-4-archiving-scheduling-remote-access-system-administration-5apf</link>
      <guid>https://dev.to/sheershsinha/my-devops-journey-part-4-archiving-scheduling-remote-access-system-administration-5apf</guid>
      <description>&lt;p&gt;After learning about permissions, ownership, and package managers in &lt;a href="https://dev.to/sheersh_sinha_1ac2bb28045/my-devops-journey-part-3-linux-users-groups-permissions-package-managers-3go9"&gt;Part 3&lt;/a&gt;, I realized that being comfortable with Linux also means being able to manage files, automate tasks, secure access, and work across systems.&lt;/p&gt;

&lt;p&gt;This part of my journey dives into some of the most practical everyday tools of a DevOps engineer: archiving, cronjobs, SSH, SCP, virtual machines, and key pairs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Archiving &amp;amp; Compression
&lt;/h2&gt;

&lt;p&gt;One of my first real struggles was handling log backups. I had thousands of log files in /var/log/, and transferring them individually was a nightmare.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So I used tar:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tar -cvf logs.tar /var/log/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/var/log/syslog
/var/log/auth.log
/var/log/kern.log
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Later, to extract:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tar -xvf logs.tar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I tried compressing a single file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gzip demo.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;demo.txt → demo.txt.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Lesson: Instead of moving hundreds of files, I just tar them into one archive, transfer, and extract. Much cleaner.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Automating Tasks with Cronjobs
&lt;/h2&gt;

&lt;p&gt;I hated repeating backups manually, so I created a cronjob.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;I added:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0 0 * * * /home/user/backup.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;To check:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0 0 * * * /home/user/backup.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Troubleshooting: At first, my cronjob didn’t run. The issue? My script used python3, but cron didn’t recognize it. I fixed it by giving the full path:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/usr/bin/python3 /home/user/backup.py

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Security &amp;amp; System Administration Basics
&lt;/h2&gt;

&lt;p&gt;Next, I explored system security.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating a new user:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo adduser dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Adding user `dev' ...
Adding new group `dev' (1002) ...
Creating home directory `/home/dev' ...

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Giving sudo rights:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo usermod -aG sudo dev

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Lesson: I once mistakenly gave a developer sudo rights when he only needed file access. It taught me that least privilege is key in production.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Remote Connections with SSH
&lt;/h2&gt;

&lt;p&gt;When I first tried logging into a server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh user@192.168.1.10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It asked for a password - fine. But when I disabled password login, I hit this error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Permission denied (publickey).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The fix was to use SSH key pairs.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Generating SSH Key Pairs
&lt;/h2&gt;

&lt;p&gt;I generated a key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen -t rsa -b 4096 -C "sheershsinha30@gmail.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa):

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

&lt;/div&gt;



&lt;p&gt;Then copied it to the server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-copy-id user@192.168.1.10

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

&lt;/div&gt;



&lt;p&gt;Now login works without typing a password:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh user@192.168.1.10

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Creating Virtual Machines
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Before trying things on production servers, I practiced on VirtualBox:&lt;/li&gt;
&lt;li&gt;Created a VM with Ubuntu.&lt;/li&gt;
&lt;li&gt;Configured NAT networking.&lt;/li&gt;
&lt;li&gt;Installed nginx inside the VM:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install nginx -y

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

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systemctl status nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nginx.service - A high performance web server and a reverse proxy server
   Active: active (running)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Lesson: Breaking things in a VM is safe - I just reverted to a snapshot.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways from Part 4
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Archiving makes backups portable.&lt;/li&gt;
&lt;li&gt;Cronjobs automate repetitive tasks.&lt;/li&gt;
&lt;li&gt;System security is about principle of least privilege.&lt;/li&gt;
&lt;li&gt;SSH &amp;amp; SCP are lifelines for remote management.&lt;/li&gt;
&lt;li&gt;SSH key pairs enable passwordless secure automation.&lt;/li&gt;
&lt;li&gt;Virtual machines provide a safe DevOps sandbox.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What’s Next (Part 5: Shell Scripting)
&lt;/h2&gt;

&lt;p&gt;After learning permissions, automation, and SSH, I realized that typing commands again and again isn’t efficient. That’s where Shell Scripting comes in - the real glue of DevOps.&lt;/p&gt;

&lt;p&gt;In the next part of my journey, I’ll cover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Introduction to Shell Scripting - Why scripts matter in DevOps.&lt;/li&gt;
&lt;li&gt; Write &amp;amp; execute a simple script - Going from one-liners to automation.&lt;/li&gt;
&lt;li&gt; Variables &amp;amp; Operators - Storing values and doing calculations.&lt;/li&gt;
&lt;li&gt; Read user input - Making scripts interactive.&lt;/li&gt;
&lt;li&gt; Functions &amp;amp; Loops - Reusing and repeating code smartly.&lt;/li&gt;
&lt;li&gt; Shell vs sh vs Bash - What’s the difference?&lt;/li&gt;
&lt;li&gt; How to write Bash scripts - Best practices for real-world use.&lt;/li&gt;
&lt;li&gt; Conditional Statements - Adding logic to decisions.&lt;/li&gt;
&lt;li&gt; Passing Arguments to a Script - Making scripts flexible and reusable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This will be the point where I move from “just running commands” to building automation workflows - a must-have step for any DevOps engineer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Over to You
&lt;/h2&gt;

&lt;p&gt;What was your first cronjob or SSH key setup experience like? Did it work on the first try, or did you spend hours debugging like me? Share your story&lt;/p&gt;

</description>
      <category>devops</category>
      <category>linux</category>
      <category>discuss</category>
      <category>career</category>
    </item>
    <item>
      <title>My DevOps Journey: Part 3 - Linux Users, Groups, Permissions &amp; Package Managers</title>
      <dc:creator>Sheersh Sinha</dc:creator>
      <pubDate>Fri, 12 Sep 2025 20:40:06 +0000</pubDate>
      <link>https://dev.to/sheershsinha/my-devops-journey-part-3-linux-users-groups-permissions-package-managers-3go9</link>
      <guid>https://dev.to/sheershsinha/my-devops-journey-part-3-linux-users-groups-permissions-package-managers-3go9</guid>
      <description>&lt;p&gt;In  &lt;a href="https://dev.to/sheersh_sinha_1ac2bb28045/my-devops-journey-part-2-understanding-the-linux-file-system-for-devops-engineers-14kk"&gt;Part 2 &lt;/a&gt;  I explored the Linux file system and system logs. But very soon, I hit another roadblock:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Permission denied.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you’ve ever worked on Linux, you’ve probably seen those dreaded words. At first, I thought it was just me typing the wrong command. But as I dug deeper, I realized it’s actually one of the most important safeguards in Linux - permissions and ownership.&lt;/p&gt;

&lt;p&gt;And soon after that, I discovered another layer of control that keeps systems safe: package managers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Users, Groups &amp;amp; Permissions - The Basics
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;User (Owner) → The account that creates or owns the file. By default, the creator becomes the owner.&lt;/li&gt;
&lt;li&gt;Group → A collection of users with shared permissions (like a project team).&lt;/li&gt;
&lt;li&gt;Permissions → Define who can read (r), write (w), and execute (x) a file or directory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example from ls -l:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-rwxrw-r--  1 sheersh devops 0 Sep  9 12:00 demo.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;ul&gt;
&lt;li&gt;sheersh → owner (user)&lt;/li&gt;
&lt;li&gt;devops → group&lt;/li&gt;
&lt;li&gt;rwx → owner permissions (full access)&lt;/li&gt;
&lt;li&gt;rw- → group permissions (read/write)&lt;/li&gt;
&lt;li&gt;r-- → others permissions (only read)&lt;/li&gt;
&lt;li&gt;This matches 764 in octal form.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My Hands-On Assignment
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;I was asked to create a file /home/demo.txt and assign permissions so that:&lt;/li&gt;
&lt;li&gt;Owner → read, write, execute&lt;/li&gt;
&lt;li&gt;Group → read, write&lt;/li&gt;
&lt;li&gt;Others → read&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Here’s what I did:
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Step 1: Create the file
&lt;/h2&gt;

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

&lt;h2&gt;
  
  
  Step 2: Change permissions
&lt;/h2&gt;

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

&lt;h2&gt;
  
  
  Step 3: Verify
&lt;/h2&gt;

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

&lt;h2&gt;
  
  
  Output:
&lt;/h2&gt;

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

&lt;p&gt;Perfect! The file now matches the required permissions.&lt;/p&gt;

&lt;p&gt;** Ownership in Action**&lt;/p&gt;

&lt;p&gt;Permissions don’t mean much if the wrong user owns the file. Ownership decides who can exercise those permissions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Commands&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls -l → shows file ownership (user &amp;amp; group).

chown newuser:newgroup file.txt → changes ownership.

chgrp groupname file.txt → changes group only.

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

&lt;/div&gt;



&lt;p&gt;This is crucial in DevOps because files often get created by root, but need to be used by app users or CI/CD pipelines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-World Troubleshooting Story
&lt;/h2&gt;

&lt;p&gt;The Scenario:&lt;/p&gt;

&lt;p&gt;We deployed a simple shell script for rotating logs in /var/log/app/. The script worked perfectly in development. But in staging, developers kept reporting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash: ./logrotate.sh: Permission denied

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

&lt;/div&gt;



&lt;p&gt;At first, I thought it was missing execute permission (x). But after checking, I found something else.&lt;/p&gt;

&lt;p&gt;The Investigation:&lt;/p&gt;

&lt;p&gt;Check file permissions &amp;amp; ownership:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls -l logrotate.sh

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Output:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-rwxrwxr-- 1 root root 120 Sep  9 10:00 logrotate.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;File was owned by root.&lt;/p&gt;

&lt;p&gt;Developers were in the dev group, but since the file belonged to root:root, they had no control.&lt;/p&gt;

&lt;p&gt;Even though permissions looked fine, the ownership was wrong.&lt;/p&gt;

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

&lt;p&gt;Change ownership to the correct user and group:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo chown dev:dev logrotate.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-rwxrwxr-- 1 dev dev 120 Sep  9 10:00 logrotate.sh

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Verify developer access:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;su - dev
./logrotate.sh

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

&lt;/div&gt;



&lt;p&gt;Script runs fine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson Learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Permissions control what actions are allowed.&lt;/li&gt;
&lt;li&gt;Ownership controls who applies those permissions.&lt;/li&gt;
&lt;li&gt;A file owned by the wrong user/group can be just as problematic as missing x.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Package Managers - The Next Layer of Control
&lt;/h2&gt;

&lt;p&gt;Once I got comfortable with users, groups, and permissions, I realized something:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Permissions decide who can use files, but package managers decide who can install and update software on the system.”&lt;br&gt;
On Linux, package managers are the tools that handle software installation, updates, and dependency management.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;** Common Package Managers**&lt;/p&gt;

&lt;p&gt;APT (Advanced Package Tool) → Used in Ubuntu/Debian.&lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
sudo apt install nginx

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

&lt;/div&gt;



&lt;p&gt;YUM/DNF → Used in CentOS, Fedora, RHEL.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo dnf install nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Zypper → Used in openSUSE.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo zypper install nginx

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

&lt;/div&gt;



&lt;p&gt;Pacman → Used in Arch Linux.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo pacman -S nginx

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

&lt;/div&gt;



&lt;p&gt;** Package Managers + Permissions**&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only users with sudo/root privileges can install or update packages.&lt;/li&gt;
&lt;li&gt;This prevents ordinary users from accidentally (or intentionally) breaking the system.&lt;/li&gt;
&lt;li&gt;In DevOps, package managers are often automated via Ansible, Puppet, Dockerfiles, or CI/CD pipelines — but under the hood, it’s the same mechanism.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;** Troubleshooting Example**&lt;/p&gt;

&lt;p&gt;I once tried installing Nginx as a normal user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apt install nginx

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

&lt;/div&gt;



&lt;p&gt;And got:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;E: Could not open lock file /var/lib/dpkg/lock-frontend - Permission denied

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

&lt;/div&gt;



&lt;p&gt;The fix? Run with sudo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because installing software changes system-wide directories (like /usr/bin, /etc/nginx), Linux protects it by requiring elevated privileges.&lt;/p&gt;

&lt;p&gt;** Lesson: Just like ownership protects files, package managers + permissions protect the whole OS.**&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways from Part 3
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Users, groups, and permissions protect files.&lt;/li&gt;
&lt;li&gt;Ownership decides who controls those files.&lt;/li&gt;
&lt;li&gt;Package managers control software installation - only privileged users (or automated DevOps pipelines) can use them.&lt;/li&gt;
&lt;li&gt;Real-world troubleshooting often comes down to a mix of permissions, ownership, and package manager access.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What’s Next (Part 4)
&lt;/h2&gt;

&lt;p&gt;Now that I’ve explored permissions, ownership, and package managers, the next step is to dive into the day-to-day toolkit of a Linux system administrator.&lt;/p&gt;

&lt;h2&gt;
  
  
  In Part 4, I’ll cover:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Archiving and compressing files (tar, gzip, zip)&lt;/li&gt;
&lt;li&gt;Automating tasks with cronjobs&lt;/li&gt;
&lt;li&gt;Security basics and system administration&lt;/li&gt;
&lt;li&gt;Remote access with SSH &amp;amp; SCP&lt;/li&gt;
&lt;li&gt;Creating VMs on VirtualBox or equivalent&lt;/li&gt;
&lt;li&gt;Generating SSH Key Pairs for passwordless logins&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is where Linux starts feeling like a real DevOps playground.&lt;/p&gt;

&lt;p&gt;** Over to You**&lt;/p&gt;

&lt;p&gt;Have you ever faced a “Permission denied” while installing software or running a script? Was it due to permissions, ownership, or missing sudo? Share your experience below &lt;/p&gt;

</description>
      <category>devops</category>
      <category>linux</category>
      <category>discuss</category>
      <category>career</category>
    </item>
  </channel>
</rss>
