<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shivani Kumari @CloudDevOps Engineer on Medium]]></title>
        <description><![CDATA[Stories by Shivani Kumari @CloudDevOps Engineer on Medium]]></description>
        <link>https://medium.com/@shivani.kumari.clouddevopsblog?source=rss-720e01fb94e2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FEdYfQwNM5sXXnFNorf0ow.png</url>
            <title>Stories by Shivani Kumari @CloudDevOps Engineer on Medium</title>
            <link>https://medium.com/@shivani.kumari.clouddevopsblog?source=rss-720e01fb94e2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 10:37:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shivani.kumari.clouddevopsblog/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How the Loki Operator is Quietly Revolutionizing Kubernetes Logging]]></title>
            <link>https://medium.com/codetodeploy/how-the-loki-operator-is-quietly-revolutionizing-kubernetes-logging-c39f6f4ba14e?source=rss-720e01fb94e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/c39f6f4ba14e</guid>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[grafana-loki]]></category>
            <category><![CDATA[monitoring]]></category>
            <dc:creator><![CDATA[Shivani Kumari @CloudDevOps Engineer]]></dc:creator>
            <pubDate>Sun, 10 May 2026 09:28:32 GMT</pubDate>
            <atom:updated>2026-05-11T02:43:06.427Z</atom:updated>
            <content:encoded><![CDATA[<h4>Your microservices generate millions of log lines daily. Most teams drown in them. Here’s how Loki Operator changes the game — for good</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*0yBRUBmYdf1AK5_NhYvFOw.png" /></figure><p>Imagine you’re an on-call engineer at 2 AM. An alert fires. Your Kubernetes cluster is misbehaving, and you need to find the root cause — fast. You open your logging dashboard, type a query, and within seconds, you’re staring at the exact log line that triggered the failure. No waiting. No noise. Just signal.</p><blockquote><strong><em>🚀 Land Your Next High-Paying Tech Job Faster</em></strong><br>💰 $50–$120/hr • Multiple Roles Open<br> Frontend • Backend • Full Stack • AI/ML • DevOps</blockquote><blockquote><a href="https://optimhire.com/?ref_code=codetodeploy"><strong>👉 Apply in Minutes</strong></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pkQFf0NUnzoFbVEVQCF5WQ.png" /></figure><h3>The Problem With Traditional Log Systems</h3><p>Before we talk about what Loki does <em>right</em>, let’s talk about what traditional systems get <em>wrong</em>.</p><p>Systems like <strong>Elasticsearch</strong> index every single word in every single log line. That’s powerful — but it comes at a cost. Enormous storage bills. Slow ingestion under load. Complex cluster management. For many teams, especially those running lean on Kubernetes, it’s overkill.</p><blockquote><em>Loki takes a radically different approach: </em><strong><em>index only the metadata, not the content.</em></strong></blockquote><p>Instead of indexing your log lines word-by-word, Loki tags them with <em>labels</em> — things like namespace, pod_name, app. When you query, Loki uses those labels to narrow down the log streams and then does a full-text search only within the relevant chunks. It&#39;s faster, cheaper, and astonishingly elegant.</p><h3>Enter the Loki Operator: Kubernetes-Native Simplicity</h3><p>Deploying a distributed system like Loki manually on Kubernetes is an adventure. You’d need to manage distributors, ingesters, queriers, and a query frontend — each with its own configurations, scaling rules, and failure modes.</p><p>The <strong>Loki Operator</strong> eliminates all of that complexity through the power of the Kubernetes Operator pattern.</p><p>Think of it as a <strong>smart automation layer</strong> that:</p><ul><li>🚀 Installs and upgrades Loki components automatically</li><li>⚙️ Manages configurations declaratively via YAML</li><li>📈 Scales components based on demand</li><li>🔗 Integrates natively with Promtail, Fluent Bit, and Grafana</li><li>🛡️ Ensures high availability without manual intervention</li></ul><p>You describe <em>what you want</em>, and the operator makes sure the cluster <em>stays there</em>. That’s the Kubernetes philosophy at its finest.</p><h3>Under the Hood: Loki’s Architecture Explained</h3><p>To truly appreciate the Loki Operator, you need to understand what it’s orchestrating beneath the surface.</p><h4>The Data Flow</h4><pre>Application Pods<br>      │<br>      ▼<br> [Promtail / Fluent Bit]   ← Log collection agents<br>      │<br>      ▼<br>  [Distributor]            ← Receives &amp; distributes log streams<br>      │<br>      ▼<br>   [Ingester]              ← Buffers logs in memory, writes to storage<br>      │<br>      ▼<br>[Object Storage: S3/GCS]   ← Long-term, cost-effective persistence<br>      │<br>      ▼<br>  [Querier] ←──────── [Query Frontend]  ← Caching + load balancing<br>      │<br>      ▼<br>   [Grafana]               ← Visualization &amp; alerting</pre><p>Each component has a single, well-defined responsibility:</p><p><strong>Distributor — </strong>Receives incoming logs and routes them to ingesters</p><p><strong>Ingester — </strong>Buffers, compresses, and writes logs to object storage</p><p><strong>Querier — </strong>Executes LogQL queries against storage and in-memory data</p><p><strong>Query Frontend — </strong>Parallelizes queries and caches results for performance</p><p><strong>Index Gateway — </strong>Optimizes metadata queries (optional, for large deployments)</p><p>The beauty here is <strong>object storage as the backbone</strong>. AWS S3, Google Cloud Storage, Azure Blob, or even on-premises MinIO — Loki doesn’t care. This means your log costs drop dramatically compared to block storage solutions, and your data is inherently durable.</p><h3>Getting Your Hands Dirty: A Real Deployment Walkthrough</h3><p>Let’s walk through deploying Loki on OpenShift using the Loki Operator — step by step.</p><h4>Step 1: Install the Loki Operator</h4><p>Log into your cluster and install the operator via OperatorHub:</p><pre>oc login -u kubeadmin -p &lt;password&gt; https://api.&lt;cluster_name&gt;:6443</pre><p>Then navigate to <strong>Operators → OperatorHub → Search “Loki Operator”</strong> and click <strong>Install</strong>. Prefer the CLI? One command does it:</p><pre>oc apply -f https://operatorhub.io/install/loki-operator.yaml</pre><p>Verify it’s running:</p><pre>oc get csv -n openshift-operators | grep loki</pre><h4>Step 2: Provision Object Storage Credentials</h4><p>Loki needs a home for your logs. Create a secret with your S3 bucket credentials:</p><pre>oc create secret generic loki-storage-secret \<br>  --from-literal=bucketnames=my-loki-bucket \<br>  --from-literal=access_key_id=&lt;your-access-key&gt; \<br>  --from-literal=access_key_secret=&lt;your-secret-key&gt; \<br>  -n openshift-logging</pre><h4>Step 3: Deploy a LokiStack</h4><p>This is where the magic happens. Create a lokistack.yaml file:</p><pre>apiVersion: loki.grafana.com/v1<br>kind: LokiStack<br>metadata:<br>  name: logging-loki<br>  namespace: openshift-logging<br>spec:<br>  size: 1x.extra-small<br>  storage:<br>    type: s3<br>    secret:<br>      name: loki-storage-secret<br>  storageClassName: gp2<br>  tenants:<br>    mode: openshift-logging<br>  limits:<br>    global:<br>      retention:<br>        days: 7</pre><p>Apply it:</p><pre>oc apply -f lokistack.yaml</pre><p>Within minutes, the operator provisions all the necessary pods:</p><pre>oc get pods -n openshift-logging</pre><p>You’ll see distributor, ingester, querier, query-frontend, and compactor — all healthy and running. <strong>That&#39;s it.</strong> A full distributed logging stack, live in minutes.</p><h3>Querying Logs with LogQL: The Secret Weapon</h3><p>Once Loki is up and Grafana is connected, you unlock <strong>LogQL</strong> — Loki’s query language. It’s expressive, fast, and intuitive.</p><p>Want all error logs from a specific app?</p><pre>{app=&quot;myapp&quot;} |~ &quot;error&quot;</pre><p>Want to count error rates over time?</p><pre>rate({app=&quot;myapp&quot;} |= &quot;error&quot; [5m])</pre><p>Want logs from a specific namespace during a specific time window? LogQL handles it. The label-based filtering means queries are lightning fast — Loki only scans the chunks that match your label selectors.</p><h3>Scaling and Retention: Enterprise-Grade Control</h3><p>As your cluster grows, Loki grows with it. Upgrading from a small to a medium deployment is a single YAML change:</p><pre>spec:<br>  size: 1x.medium</pre><p>The operator handles the rest — scaling ingesters, distributors, and queriers automatically. No manual pod management. No downtime.</p><p>For compliance-driven teams, retention policies are first-class citizens:</p><pre>spec:<br>  limits:<br>    global:<br>      retention:<br>        days: 14</pre><p>Need different retention for different teams? Per-tenant policies have you covered — a critical feature for large, multi-team Kubernetes environments where security and data isolation matter.</p><h3>Best Practices From the Field</h3><p>After deploying Loki in production environments, here’s what actually moves the needle:</p><p><strong>🗄️ Storage Class Matters</strong> Use dedicated, high-I/O storage classes for Loki components. Don’t share storage with other workloads — it will hurt query performance.</p><p><strong>🔐 Enable Multi-Tenancy Early</strong> If you’re running a shared cluster, configure multi-tenant logging from day one. Retrofitting it later is painful.</p><p><strong>📊 Monitor the Monitor</strong> Integrate Loki with Alertmanager. If your logging stack goes down silently, you lose observability precisely when you need it most.</p><p><strong>💾 Leverage Object Storage Lifecycle Rules</strong> Loki backs its data in S3 or equivalent. Use your cloud provider’s lifecycle policies alongside Loki’s retention settings for belt-and-suspenders data management.</p><p><strong>🔄 Test Failover</strong> Periodically delete a pod deliberately (oc delete pod &lt;pod-name&gt; -n openshift-logging) to verify the operator&#39;s self-healing behavior. Trust but verify.</p><h3>The Bigger Picture: Why This Matters for Cloud-Native Teams</h3><p>The Loki Operator isn’t just a convenience tool — it represents a <strong>philosophical shift</strong> in how we think about observability infrastructure.</p><p>Traditional logging stacks required dedicated ops expertise to maintain. They were expensive, rigid, and fragile. Loki, managed by its operator, is <strong>designed to be boring in the best possible way</strong>. It handles its own health. It scales declaratively. It stores data cheaply. It integrates natively with the Grafana ecosystem you’re probably already using for metrics.</p><p>The result? Your engineers spend time <strong>writing code and building features</strong> — not babysitting log aggregators.</p><h3>Conclusion</h3><p>Loki and the Loki Operator represent one of the most thoughtful approaches to logging in the cloud-native ecosystem. By indexing labels instead of full content, leveraging cheap object storage, and wrapping everything in an operator that handles the operational complexity, Grafana Labs has built something genuinely impressive.</p><p>Whether you’re running a small startup on a single Kubernetes cluster or managing a sprawling multi-tenant OpenShift environment for an enterprise, the Loki Operator scales to meet you where you are — and grows with you.</p><p><em>The 2 AM debugging session doesn’t have to be painful. With Loki, it might even be fast.</em></p><p><em>#Kubernetes </em><em>#OpenShift </em><em>#Loki </em><em>#Observability </em><em>#DevOps </em><em>#CloudNative </em><em>#Logging </em><em>#Grafana </em><em>#SRE </em><em>#Platform Engineering</em></p><h3>Thank you for being a part of the community</h3><p><em>Before you go:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d9QTaaaxboQP_gKSLedW_w.png" /></figure><p>👉 Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></p><p>👉 Follow us: <a href="https://www.linkedin.com/in/bhumika-ch-3784391b9/"><strong>Linkedin</strong></a>| <a href="https://medium.com/codetodeploy"><strong>Medium</strong></a></p><p>👉 CodeToDeploy Tech Community is live on Discord — <a href="https://discord.gg/ZpwhHq6D"><strong>Join now!</strong></a></p><p><strong>Disclosure:</strong> This post includes affiliate and partnership links.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c39f6f4ba14e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codetodeploy/how-the-loki-operator-is-quietly-revolutionizing-kubernetes-logging-c39f6f4ba14e">How the Loki Operator is Quietly Revolutionizing Kubernetes Logging</a> was originally published in <a href="https://medium.com/codetodeploy">CodeToDeploy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cluster Upgrades — Best Practices for Zero Downtime]]></title>
            <link>https://medium.com/codetodeploy/cluster-upgrades-best-practices-for-zero-downtime-de1d84957478?source=rss-720e01fb94e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/de1d84957478</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[openshift]]></category>
            <dc:creator><![CDATA[Shivani Kumari @CloudDevOps Engineer]]></dc:creator>
            <pubDate>Sun, 03 May 2026 10:26:41 GMT</pubDate>
            <atom:updated>2026-08-08T10:28:42.591Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to keep Kubernetes and OpenShift clusters current without losing a single second of production availability</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MoL5dF0JxNKNC_EqSSFj5A.png" /></figure><p>Enterprises running Kubernetes and OpenShift at scale face an unavoidable reality: clusters must be upgraded. New versions bring security hardening, performance gains, API improvements, and compliance alignment. But how you upgrade determines whether the process is a smooth afternoon — or a chaotic all-nighter.<br>This guide covers everything you need to know to achieve genuinely zero downtime during cluster upgrades.</p><blockquote><strong><em>🚀 Land Your Dream Tech Job in Just Weeks</em></strong></blockquote><blockquote><strong>💰 $50–$120/hr</strong> | Multiple Roles Open<br> Frontend • Backend • Full Stack • AI/ML • DevOps</blockquote><blockquote><a href="https://optimhire.com/?ref_code=codetodeploy">👉 <strong>Apply Now &amp; Get Hired Faster</strong></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pkQFf0NUnzoFbVEVQCF5WQ.png" /></figure><h3>Why Cluster Upgrades Are Non-Negotiable</h3><p>Cluster upgrades are more than technical housekeeping. They are a strategic necessity.</p><p><strong>Security Enhancements</strong> — Regular updates patch known CVEs and close attack vectors before threat actors can exploit them. Running an outdated cluster is not a neutral choice; it is an active risk.</p><p><strong>Feature Adoption</strong> — Newer versions unlock access to new APIs, storage drivers, networking improvements, and autoscaling capabilities that older versions simply cannot offer.</p><p><strong>Compliance</strong> — Many regulated industries (finance, healthcare, government) mandate up-to-date software stacks. Outdated clusters create audit exposure that can have real legal consequences.</p><p><strong>Performance Optimization</strong> — Upgrades routinely include scheduler improvements and resource efficiency gains that directly impact your infrastructure costs and application throughput.</p><blockquote><em>⚠️ </em><strong><em>The Cost of Delay:</em></strong><em> Delaying upgrades compounds risk. Unsupported versions lose security patches. Newer workloads lose compatibility. And eventual forced upgrades become significantly more disruptive — often happening at the worst possible time.</em></blockquote><p>Upgrades should be planned <em>proactively</em>, not triggered by emergencies.</p><h3>Challenges in Achieving Zero Downtime</h3><p>Zero downtime is absolutely achievable — but it demands deliberate architecture decisions and careful sequencing. Here are the five most common failure points teams encounter:</p><p><strong>1. Application Availability</strong> — Applications must continue serving traffic even as the nodes they run on are being replaced one by one.</p><p><strong>2. Stateful Workloads</strong> — Databases and stateful applications are highly sensitive to pod restarts. Replication and leader-election architectures are not optional — they are prerequisites.</p><p><strong>3. Networking Changes</strong> — Upgrades may replace CNI plugins or modify network policies, causing transient routing failures that are hard to diagnose mid-upgrade.</p><p><strong>4. Dependency Management</strong> — Ingress controllers, monitoring agents, logging pipelines, and service meshes must all be verified for version compatibility before the upgrade begins.</p><p><strong>5. Cluster Size &amp; Complexity</strong> — Large multi-node clusters demand meticulous orchestration. Every extra node is another moving part that must be accounted for in your upgrade plan.</p><p>Zero downtime is achievable with the right combination of architecture, testing, and upgrade strategy.</p><h3>Pre-Upgrade Best Practices</h3><blockquote><em>The quality of your upgrade is determined entirely by how well you prepare.</em></blockquote><h4>Version Planning</h4><p>Always consult the <strong>official upgrade graph</strong> before proceeding. Jumping multiple minor versions in a single upgrade is often unsupported and can leave your cluster in an unrecoverable state.</p><ul><li>Review release notes for deprecated APIs, known issues, and breaking changes.</li><li>Never assume a version jump is safe — verify it explicitly against the documentation.</li></ul><h4>Backup Strategy</h4><p>There is no such thing as too many backups before a cluster upgrade.</p><ul><li>Take full <strong>etcd snapshots</strong>.</li><li>Back up all Kubernetes manifests, secrets, ConfigMaps, and persistent volume configurations.</li><li>For critical databases, take <strong>application-level backups</strong> separately from the cluster-level backup.</li></ul><h4>Testing in Non-Production</h4><p>Never run an upgrade path in production that you haven’t already validated in staging.</p><ul><li>Build a staging environment that <strong>mirrors production topology</strong> as closely as possible.</li><li>Run your full automated test suite against the upgraded staging cluster.</li><li>Validate all workloads — not just the critical ones — before touching production.</li></ul><h4>Capacity Planning</h4><p>Before starting any rolling upgrade, ensure the cluster can absorb full production load on N−1 nodes.</p><ul><li>Add <strong>buffer worker nodes</strong> if needed — when draining nodes during an upgrade, workloads need healthy nodes to reschedule onto without exhausting available capacity.</li></ul><h4>Communication &amp; Governance</h4><ul><li>Brief all stakeholders on the upgrade plan, timeline, and expected impact.</li><li><strong>Document the rollback procedure in detail</strong> before you start. If things go wrong, hesitation costs minutes — and minutes cost SLA points.</li></ul><h3>Upgrade Execution Best Practices</h3><h4>Rolling Node Upgrades</h4><p>The core of zero-downtime upgrades is upgrading one node at a time:</p><ol><li><strong>Cordon</strong> the node to prevent new workloads from scheduling onto it.</li><li><strong>Drain</strong> the node gracefully — this reschedules running pods onto healthy nodes without hard evictions.</li><li><strong>Upgrade</strong> the node.</li><li><strong>Uncordon</strong> the node and allow it to rejoin the cluster.</li><li>Validate health before proceeding to the next node.</li></ol><h4>Control Plane First</h4><p>Always upgrade the control plane before worker nodes, in this order:</p><ol><li>API Server</li><li>Controller Manager</li><li>Scheduler</li></ol><p>Upgrade each control plane node <strong>individually</strong> — never simultaneously — to maintain API server availability throughout the entire process.</p><h4>Worker Nodes — Protect with Pod Disruption Budgets</h4><p>Configure <strong>Pod Disruption Budgets (PDBs)</strong> on every critical workload. PDBs enforce a minimum number of live replicas at all times, preventing simultaneous drains from leaving your application without sufficient capacity.</p><p>For stateless services, ReplicaSets and Deployments handle rescheduling automatically. The PDB is your enforcement layer on top.</p><blockquote><em>💡 </em><strong><em>Stateful Workload Strategy:</em></strong><em> For databases using leader-follower replication, upgrade </em><strong><em>follower nodes first</em></strong><em>, then promote a follower and upgrade the original leader last. This preserves data integrity without a write outage.</em></blockquote><h4>Traffic Management</h4><p>Use a service mesh or load balancer configured to respect <strong>readiness probes</strong>. Any pod that isn’t fully ready should receive zero traffic — this is your safety net against serving requests from an initializing, post-migration pod.</p><p>Implement readiness probes on every service. This is non-negotiable for zero-downtime upgrades.</p><h3>Post-Upgrade Validation</h3><p>Do not declare the upgrade complete until you have validated the following:</p><p><strong>Cluster Health Check</strong> — Verify all nodes are in Ready state, all system pods are Running, and etcd is healthy and fully synced.</p><p><strong>Application Validation</strong> — Run smoke tests and integration test suites. Confirm all business-critical user journeys function as expected end-to-end.</p><p><strong>Monitor Dashboards</strong> — Watch latency, error rates, and throughput for at least 30 minutes post-upgrade. Many regressions only become visible under sustained load.</p><p><strong>Cleanup &amp; Optimization</strong> — Remove deprecated API resources and outdated objects. Revisit resource quotas and fine-tune CPU and memory allocations based on the new version’s scheduler behavior.</p><p><strong>Documentation</strong> — Record exactly what steps were taken, what issues were encountered, and how they were resolved. This becomes institutional knowledge for the next upgrade.</p><h3>Automation &amp; Tooling</h3><p>Upgrade automation is the difference between a team that <strong>dreads upgrades</strong> and one that ships them confidently on a predictable schedule.</p><h4>Upgrade Tools</h4><p><strong>OpenShift Upgrade Operator</strong> — Provides automated version management and controlled rollout for OpenShift clusters, with built-in health gating.</p><p><strong>Kubernetes kubeadm</strong> — The native cluster upgrade lifecycle tool for Kubernetes, supporting phased control plane and worker node upgrades.</p><p><strong>Ansible Playbooks</strong> — Enable repeatable, idempotent upgrade workflows that can be run consistently across development, staging, and production environments.</p><h4>Monitoring Tools</h4><p><strong>Prometheus + Grafana</strong> — Real-time metrics collection and dashboards to monitor cluster and application health throughout the upgrade window.</p><p><strong>ELK Stack</strong> — Centralized log aggregation to catch errors and anomalies across nodes in real time during rolling upgrades.</p><h4>CI/CD Integration</h4><p>Automate cluster upgrades as part of a <strong>GitOps pipeline</strong> where possible. GitOps-driven upgrades ensure consistency across environments, reduce manual intervention, and create an auditable history of every change made to the cluster.</p><h4>Blue-Green Cluster Upgrades</h4><p>For mission-critical systems where even momentary risk is unacceptable, consider blue-green cluster upgrades:</p><ol><li>Spin up a fully upgraded <strong>parallel cluster</strong> (green).</li><li>Validate it completely under real or simulated traffic.</li><li>Switch traffic over via DNS or load balancer.</li><li>Keep the old cluster (blue) live for a short period as an instant rollback option.</li></ol><p>This approach reduces upgrade risk to near zero — rollback is a single traffic-routing change.</p><h3>Real-World Case Study</h3><p><strong>Scenario:</strong> An e-commerce company needed to upgrade their OpenShift cluster from <strong>version 4.10 to 4.12</strong> with zero downtime during the holiday season — their highest-traffic period of the year.</p><p><strong>Approach Taken:</strong></p><ol><li>Fully tested the upgrade path in a staging environment mirroring production load patterns.</li><li>Added buffer worker nodes to absorb workload displacement during node drains.</li><li>Applied Pod Disruption Budgets and readiness health checks to every critical service.</li><li>Upgraded control plane nodes individually, validating API availability at each step.</li><li>Rolled through worker nodes one at a time with automated health gates between each node.</li><li>Used service mesh traffic policies to route exclusively to healthy, ready pods throughout the entire process.</li></ol><p><strong>Result:</strong></p><blockquote><em>✅ The upgrade completed successfully with </em><strong><em>zero downtime, zero customer impact, and zero reported incidents</em></strong><em> — during peak holiday traffic.</em></blockquote><h3>Conclusion</h3><p>Cluster upgrades are not a chore to be deferred — they are a core engineering discipline. The organizations that treat upgrades as a scheduled, automated, well-rehearsed DevOps workflow consistently outperform those that treat them as one-off emergency maintenance events.</p><p>By combining rolling upgrade strategies, Pod Disruption Budgets, readiness probes, smart traffic management, comprehensive pre-testing, and post-upgrade monitoring, any team can confidently deliver the modern requirement of <strong>always-on infrastructure</strong> — regardless of how large or complex the cluster.</p><p>Start treating your cluster upgrade process as a first-class engineering practice. Your on-call rotation will thank you.</p><p>Kubernetes OpenShift DevOps Platform Engineering Zero Downtime Cloud Native Site Reliability Engineering</p><h3>Thank you for being a part of the community</h3><p><em>Before you go:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d9QTaaaxboQP_gKSLedW_w.png" /></figure><p>👉 Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></p><p>👉 Follow us: <a href="https://www.linkedin.com/in/bhumika-ch-3784391b9/"><strong>Linkedin</strong></a>| <a href="https://medium.com/codetodeploy"><strong>Medium</strong></a></p><p>👉 CodeToDeploy Tech Community is live on Discord — <a href="https://discord.gg/ZpwhHq6D"><strong>Join now!</strong></a></p><p><strong>Disclosure:</strong> This post includes affiliate and partnership links.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de1d84957478" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codetodeploy/cluster-upgrades-best-practices-for-zero-downtime-de1d84957478">Cluster Upgrades — Best Practices for Zero Downtime</a> was originally published in <a href="https://medium.com/codetodeploy">CodeToDeploy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Just Made S3 Buckets Mountable as File Systems — Here’s What That Means]]></title>
            <link>https://aws.plainenglish.io/aws-just-made-s3-buckets-mountable-as-file-systems-heres-what-that-means-d8588cbdbd77?source=rss-720e01fb94e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8588cbdbd77</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-storage]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-s3]]></category>
            <dc:creator><![CDATA[Shivani Kumari @CloudDevOps Engineer]]></dc:creator>
            <pubDate>Wed, 08 Apr 2026 18:54:12 GMT</pubDate>
            <atom:updated>2026-04-08T18:54:12.968Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>For years, developers picked between object storage and file storage. Amazon’s new S3 Files feature collapses that choice — and the implications are bigger than they first appear.</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YZi1M9bzlZzmtHj2.png" /></figure><p>If you’ve spent any time on AWS, you’ve lived the tension: Amazon S3 is cheap, durable, and deeply integrated with the rest of the platform — but it’s object storage. You can’t just open a file, edit a line, and save it. You have to download the whole object, modify it, and re-upload.</p><p>File systems, on the other hand, are interactive and flexible. But they’re expensive and don’t scale the same way. You’d often end up running both, syncing data between them, and inevitably dealing with stale copies or race conditions.</p><p>AWS just announced <strong>Amazon S3 Files</strong> — and it eliminates that tradeoff entirely.</p><h3>What is S3 Files?</h3><p>S3 Files lets you mount an S3 bucket directly as a file system on any AWS compute resource — EC2 instances, ECS and EKS containers, Fargate, or Lambda functions. You get full NFS v4.1+ support, meaning standard file operations like create, read, update, and delete all work exactly as you’d expect.</p><p>Under the hood, it’s powered by Amazon EFS, delivering roughly 1ms latency for active data. Changes you make through the file system are automatically synced back to S3, and changes made directly to S3 objects are visible in the file system within seconds.</p><blockquote>S3 Files makes Amazon S3 the first and only cloud object store to offer fully-featured, high-performance file system access to the same data — no copies, no pipelines, no sync scripts.</blockquote><h3>Getting Started in Three Steps</h3><h4>Step 1 — Create an S3 file system</h4><p>Head to the S3 section of the AWS Console, choose <strong>File systems</strong>, then <strong>Create file system</strong>. Enter the name of your existing general purpose bucket and you’re done.</p><p>Using the CLI? Run create-file-system to set up the file system.</p><h4>Step 2 — Discover your mount target</h4><p>The console automatically creates VPC mount targets for you. Note down the <strong>Mount Target ID</strong> from the <em>Mount targets</em> tab. If using the CLI, follow up with create-mount-target.</p><h4>Step 3 — Mount on your EC2 instance</h4><p>SSH into your instance and run:</p><pre>sudo mkdir /home/ec2-user/s3files<br>sudo mount -t s3files fs-0aa860d05df9afdfe:/ /home/ec2-user/s3files</pre><p>That’s it. Your S3 bucket is now accessible as a local directory. Here’s what the two-way sync looks like in practice:</p><pre># Write a file via the file system<br>echo &quot;Hello S3 Files&quot; &gt; s3files/hello.txt<br><br># Verify it landed in S3 automatically<br>aws s3 ls s3://my-bucket/hello.txt<br># 2026-04-08 10:04:04   15 hello.txt<br><br># Content is identical<br>aws s3 cp s3://my-bucket/hello.txt . &amp;&amp; cat hello.txt<br># Hello S3 Files</pre><h3>S3 Files vs. Amazon FSx — Which Should You Use?</h3><p>With this launch, AWS now has several file storage options. Here’s a quick breakdown:</p><p><strong>S3 Files — best for</strong></p><ul><li>Shared, interactive access to data already in S3</li><li>Agentic AI agents sharing state via file-based tools</li><li>ML training pipelines reading large datasets</li><li>Multi-cluster data sharing without duplication</li></ul><p><strong>Amazon FSx — best for</strong></p><ul><li>Migrating on-premises NAS workloads to AWS</li><li>HPC / GPU clusters (FSx for Lustre)</li><li>Windows or NetApp ONTAP compatibility requirements</li><li>Specific POSIX or OpenZFS feature requirements</li></ul><h3>A Few Things to Keep in Mind</h3><p>Before you start migrating everything, there are some nuances worth knowing:</p><ul><li><strong>Sync isn’t instant.</strong> File system changes sync back to S3 <em>within minutes</em>, not instantly. S3-side changes appear in the file system within seconds, but can sometimes take up to a minute.</li><li><strong>Update your EFS driver.</strong> Make sure the amazon-efs-utils package is on the latest version on your EC2 instances — the s3files mount type depends on it.</li><li><strong>General purpose buckets only.</strong> Only general purpose S3 buckets are supported right now.</li><li><strong>Smart byte-range reads.</strong> For byte-range reads, only the requested bytes are transferred — good for both cost and throughput.</li><li><strong>Observability built in.</strong> Monitor performance with CloudWatch metrics and audit activity via CloudTrail.</li></ul><h3>Availability and Pricing</h3><p>S3 Files is available today in all commercial AWS Regions. Pricing is based on:</p><ul><li>The portion of data stored in your S3 file system</li><li>Small file reads and all write operations to the file system</li><li>S3 requests during sync between the file system and the bucket</li></ul><p>Full details are on the <a href="https://aws.amazon.com/s3/pricing/">Amazon S3 pricing page</a>.</p><h3>Final Thoughts</h3><p>For anyone building multi-agent AI systems, ML pipelines, or distributed applications that already live in S3, this feature is a significant unlock. The old question — <em>“should I use S3 or a file system?”</em> — is now just <em>“use S3.”</em> The file system part comes along for free.</p><p>Check out the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-files.html">official S3 Files documentation</a> to get started.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8588cbdbd77" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/aws-just-made-s3-buckets-mountable-as-file-systems-heres-what-that-means-d8588cbdbd77">AWS Just Made S3 Buckets Mountable as File Systems — Here’s What That Means</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Building a Production AWS DevOps Pipeline]]></title>
            <link>https://aws.plainenglish.io/building-a-production-aws-devops-pipeline-dc325a419ded?source=rss-720e01fb94e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc325a419ded</guid>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Shivani Kumari @CloudDevOps Engineer]]></dc:creator>
            <pubDate>Sun, 05 Apr 2026 06:40:20 GMT</pubDate>
            <atom:updated>2026-04-05T06:40:20.774Z</atom:updated>
            <content:encoded><![CDATA[<h4>From Git Push to Running in Production on EKS</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_KHpv1jXuImOGTWwA2AN4w.png" /></figure><p><strong>A complete, hands-on walkthrough of building a production-grade AWS CI/CD pipeline using CodeCommit, CodeArtifact, CodeBuild, CodePipeline, CodeDeploy, Amazon EKS, and ArgoCD — wired together into one automated delivery system.</strong></p><p>Modern software delivery is no longer about running a script or clicking a deploy button. It’s a disciplined, automated chain — where every code change flows through security checks, automated tests, container builds, and policy-gated deployments before a single pod restarts in production.</p><p>This post walks through building that exact chain using AWS-native tools. We’ll deploy a simple Flask REST API called <strong>TaskFlow</strong> — but the architecture and every command here applies to any real production service.</p><blockquote>“Every artifact is scanned, validated, and deployed in a controlled, auditable, and secure manner — that’s the standard this pipeline holds itself to.”</blockquote><h3>What You’ll Build</h3><p>One git push triggers a pipeline that:</p><ol><li>Pulls Python dependencies from a private <strong>CodeArtifact</strong> package registry — not public PyPI</li><li>Runs all tests and builds a Docker image in <strong>CodeBuild</strong></li><li>Pushes the image to <strong>ECR</strong> tagged with the exact git commit SHA</li><li>Waits for a <strong>manual approval</strong> in CodePipeline before deploying</li><li>Uses <strong>CodeDeploy lifecycle hooks</strong> to safely roll out to EKS with auto-rollback on failure</li><li>Meanwhile, <strong>ArgoCD</strong> watches the k8s/ manifests in Git and auto-syncs any infrastructure changes</li></ol><p><strong>The full pipeline flow:</strong></p><pre>CodeCommit → CodePipeline → CodeArtifact → CodeBuild → Manual Approve → CodeDeploy → EKS<br>                                                ↕<br>                              ArgoCD (GitOps) watches k8s/ → auto-syncs to EKS</pre><h4>The Application: TaskFlow API</h4><p>The app itself is intentionally simple — a task manager with CRUD endpoints plus /health, /ready, and /live endpoints. Those last three are what Kubernetes uses to decide whether to send traffic to a pod and whether to restart it.</p><pre>aws-devops-lab/<br>├── app/app.py            ← Flask API: /health /ready /live + CRUD<br>├── Dockerfile            ← BUILD_NUMBER + IMAGE_TAG injected by CodeBuild<br>├── requirements.txt      ← Pulled from CodeArtifact, not public PyPI<br>├── buildspec.yml         ← Full CodeBuild spec (4 phases)<br>├── appspec.yml           ← CodeDeploy lifecycle hook config<br>├── scripts/              ← 4 hook scripts (before/after/validate)<br>├── k8s/                  ← Namespace, ConfigMap, Deployment, Service, HPA<br>├── argocd/               ← Application CRD + CodeCommit repo secret<br>└── pipeline/             ← CodePipeline JSON + IAM policies</pre><blockquote><strong><em>Setup Order Matters:</em></strong><em> Follow this sequence — EKS → ECR → CodeArtifact → CodeCommit → CodeBuild → CodePipeline → CodeDeploy → ArgoCD. Each service depends on the one before it being ready.</em></blockquote><h3>1. AWS CodeArtifact — Private Package Registry</h3><p>Your builds should never depend on the public internet. CodeArtifact proxies PyPI and caches every package your project uses — giving you full control, auditability, and the ability to block vulnerable versions.</p><p>A <strong>domain</strong> is the top-level namespace. Inside it, you create repositories. The pattern here: one upstream pypi-store that talks to public PyPI and caches everything, and one taskflow-repo that your projects actually pull from.</p><h4>Create Domain and Repositories</h4><pre># 1. Create the domain (one per AWS account/org)<br>aws codeartifact create-domain \<br>  --domain taskflow-domain \<br>  --region ap-south-1<br><br># 2. Create the upstream PyPI proxy store<br>aws codeartifact create-repository \<br>  --domain      taskflow-domain \<br>  --repository  pypi-store<br><br>aws codeartifact associate-external-connection \<br>  --domain              taskflow-domain \<br>  --repository          pypi-store \<br>  --external-connection public:pypi<br><br># 3. Create your project repo with pypi-store as upstream<br>aws codeartifact create-repository \<br>  --domain      taskflow-domain \<br>  --repository  taskflow-repo \<br>  --upstreams   repositoryName=pypi-store</pre><h4>Test pip Login Locally</h4><p>Before wiring this into CodeBuild, verify it works end-to-end from your local machine. The auth token is short-lived (12 hours) — in CI, CodeBuild generates it fresh at the start of every build.</p><pre># Configure pip to point at CodeArtifact<br>aws codeartifact login \<br>  --tool         pip \<br>  --domain       taskflow-domain \<br>  --domain-owner $(aws sts get-caller-identity --query Account --output text) \<br>  --repository   taskflow-repo<br><br># Install — packages now come from CodeArtifact (cached from PyPI)<br>pip install flask==3.0.3 gunicorn==22.0.0<br><br># Confirm packages were cached in your repo<br>aws codeartifact list-packages \<br>  --domain     taskflow-domain \<br>  --repository taskflow-repo \<br>  --format     pypi</pre><blockquote><strong>Why this matters:</strong> If PyPI goes down — or if a malicious package gets published — your builds are unaffected because they’re hitting your cached registry. You can also pin exact approved versions per project and block packages that fail your security review.</blockquote><h3>2. AWS CodeBuild — Build and Test</h3><p>Serverless build runner. No infrastructure to manage. Every build starts in a fresh container, runs your tests, builds and pushes the Docker image, and writes deployment metadata for downstream stages.</p><h4>Understanding buildspec.yml</h4><p>The buildspec.yml defines four phases. Failure in any command fails the entire build — which is exactly what you want.</p><p><strong>Phase</strong></p><p><strong>install</strong> Sets up Python 3.12 runtime, upgrades pip</p><p><strong>pre_build</strong> Authenticates to ECR, gets CodeArtifact token, installs deps, sets IMAGE_TAG = first 8 chars of git commit SHA</p><p><strong>build</strong> Runs pytest with coverage, then docker build tagged with git SHA and latest</p><p><strong>post_build</strong> Pushes both tags to ECR, updates k8s/deployment.yaml image tag via sed, writes imagedefinitions.json for CodeDeploy</p><pre>phases:<br>  pre_build:<br>    commands:<br>      # Authenticate to ECR<br>      - aws ecr get-login-password --region $AWS_REGION |<br>          docker login --username AWS --password-stdin<br>          $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com<br><br>      # Authenticate to CodeArtifact and configure pip<br>      - aws codeartifact login --tool pip<br>          --domain $DOMAIN_NAME --repository $REPO_NAME<br><br>      - pip install -r requirements.txt<br><br>      # Tag = first 8 chars of git commit SHA<br>      - export IMAGE_TAG=${CODEBUILD_RESOLVED_SOURCE_VERSION:0:8}<br><br>  build:<br>    commands:<br>      - pytest tests/ -v --cov=app --cov-report=xml<br>      - docker build --platform linux/amd64<br>          --build-arg BUILD_NUMBER=$CODEBUILD_BUILD_NUMBER<br>          --build-arg IMAGE_TAG=$IMAGE_TAG<br>          -t $ECR_URI:$IMAGE_TAG -t $ECR_URI:latest .<br><br>  post_build:<br>    commands:<br>      - docker push $ECR_URI:$IMAGE_TAG<br>      - docker push $ECR_URI:latest<br>      # Update deployment.yaml with the new image tag<br>      - sed -i &quot;s|image:.*taskflow-api.*|image: $ECR_URI:$IMAGE_TAG|g&quot;<br>          k8s/deployment.yaml<br>      # Required by CodeDeploy<br>      - printf &#39;[{&quot;name&quot;:&quot;taskflow-api&quot;,&quot;imageUri&quot;:&quot;%s&quot;}]&#39;<br>          $ECR_URI:$IMAGE_TAG &gt; imagedefinitions.json</pre><h4>Create the CodeBuild Project</h4><pre>ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)<br><br># Create ECR repository first<br>aws ecr create-repository --repository-name taskflow-api<br><br># Create the CodeBuild project<br>aws codebuild create-project \<br>  --name        taskflow-api-build \<br>  --source      &#39;{&quot;type&quot;:&quot;CODECOMMIT&quot;,&quot;location&quot;:&quot;https://git-codecommit.ap-south-1.amazonaws.com/v1/repos/taskflow-api&quot;}&#39; \<br>  --artifacts   &#39;{&quot;type&quot;:&quot;NO_ARTIFACTS&quot;}&#39; \<br>  --environment &#39;{<br>    &quot;type&quot;:&quot;LINUX_CONTAINER&quot;,<br>    &quot;image&quot;:&quot;aws/codebuild/standard:7.0&quot;,<br>    &quot;computeType&quot;:&quot;BUILD_GENERAL1_SMALL&quot;,<br>    &quot;privilegedMode&quot;:true,<br>    &quot;environmentVariables&quot;:[<br>      {&quot;name&quot;:&quot;AWS_ACCOUNT_ID&quot;,&quot;value&quot;:&quot;&#39;$ACCOUNT_ID&#39;&quot;},<br>      {&quot;name&quot;:&quot;AWS_REGION&quot;,&quot;value&quot;:&quot;ap-south-1&quot;},<br>      {&quot;name&quot;:&quot;DOMAIN_NAME&quot;,&quot;value&quot;:&quot;taskflow-domain&quot;},<br>      {&quot;name&quot;:&quot;REPO_NAME&quot;,&quot;value&quot;:&quot;taskflow-repo&quot;}<br>    ]<br>  }&#39; \<br>  --service-role arn:aws:iam::${ACCOUNT_ID}:role/CodeBuildTaskflowRole<br><br># Trigger a test build and follow the logs<br>BUILD_ID=$(aws codebuild start-build \<br>  --project-name taskflow-api-build --query build.id --output text)<br><br>aws logs tail /aws/codebuild/taskflow-api-build --follow</pre><blockquote><strong><em>Note on </em></strong><strong><em>privilegedMode: true</em></strong><em> — CodeBuild needs this flag to run </em><em>docker build inside a container (Docker-in-Docker). Without it, the Docker daemon is unavailable and the build fails. Only enable this when you actually need Docker.</em></blockquote><h3>3. AWS CodePipeline — Orchestration</h3><p>The conductor. Listens for every push to main on CodeCommit, triggers CodeBuild, enforces a human approval gate, then hands the artifact to CodeDeploy. All automated — except the approval you choose to keep human.</p><h4>The Four Stages</h4><p><strong>Stage</strong></p><p><strong>Source</strong> CodeCommit Detects push to main via EventBridge. Stores repo as S3 artifact.</p><p><strong>Build </strong>CodeBuild Runs buildspec.yml, produces imagedefinitions.json + updated k8s manifests.</p><p><strong>Approve</strong> Manual Sends SNS email. Pipeline pauses until you approve or reject.</p><p><strong>Deploy</strong> CodeDeploy Runs lifecycle hooks, validates health, auto-rolls back on failure.</p><pre># Create artifact bucket (versioning required)<br>BUCKET=taskflow-pipeline-artifacts-$(aws sts get-caller-identity --query Account --output text)<br>aws s3 mb s3://$BUCKET --region ap-south-1<br>aws s3api put-bucket-versioning --bucket $BUCKET \<br>  --versioning-configuration Status=Enabled<br><br># Create SNS approval topic + subscribe your email<br>TOPIC_ARN=$(aws sns create-topic --name taskflow-approvals \<br>  --query TopicArn --output text)<br>aws sns subscribe --topic-arn $TOPIC_ARN \<br>  --protocol email --notification-endpoint you@email.com<br><br># Create the pipeline (fill in ACCOUNT_ID in pipeline.json first)<br>aws codepipeline create-pipeline \<br>  --cli-input-json file://pipeline/pipeline.json</pre><h4>Approving the Manual Gate via CLI</h4><pre># Get the approval token (only valid while stage is In_Progress)<br>TOKEN=$(aws codepipeline get-pipeline-state \<br>  --name taskflow-api-pipeline \<br>  --query &quot;stageStates[?stageName==&#39;Approve&#39;].actionStates[0].latestExecution.token&quot; \<br>  --output text)<br><br># Approve<br>aws codepipeline put-approval-result \<br>  --pipeline-name taskflow-api-pipeline \<br>  --stage-name    Approve \<br>  --action-name   ManualApproval \<br>  --token         $TOKEN \<br>  --result        &#39;{&quot;status&quot;:&quot;Approved&quot;,&quot;summary&quot;:&quot;Tests passed, LGTM&quot;}&#39;<br><br># Or reject (Deploy stage never runs)<br>aws codepipeline put-approval-result \<br>  --pipeline-name taskflow-api-pipeline \<br>  --stage-name    Approve \<br>  --action-name   ManualApproval \<br>  --token         $TOKEN \<br>  --result        &#39;{&quot;status&quot;:&quot;Rejected&quot;,&quot;summary&quot;:&quot;Performance regression found&quot;}&#39;</pre><h3>4. AWS CodeDeploy — Safe Deployment with Auto Rollback</h3><p>Controlled deployment execution with lifecycle hook scripts, health validation, and automatic rollback — so a failed deployment never stays failed.</p><h4>The Four Lifecycle Hooks</h4><p>CodeDeploy calls these shell scripts at specific points in the deployment. If any exits with a non-zero code, CodeDeploy marks the deployment as failed and rolls back automatically.</p><p><strong>1. BeforeInstall</strong> (before_install.sh) — Verifies kubectl is installed and the EKS cluster is reachable before any manifests are applied. A fast early exit if the cluster is unhealthy.</p><p><strong>2. AfterInstall</strong> (after_install.sh) — Runs kubectl apply on the namespace, ConfigMap, Deployment, and Service. The image tag has already been updated by CodeBuild.</p><p><strong>3. BeforeAllowTraffic</strong> (validate_service.sh) — Waits for kubectl rollout status to confirm all pods are healthy. If it times out, automatically runs kubectl rollout undo and exits with code 1 — triggering CodeDeploy&#39;s rollback.</p><p><strong>4. AfterAllowTraffic</strong> (after_allow_traffic.sh) — Traffic is live on the new version. Sends a success notification.</p><pre>ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)<br><br># Create CodeDeploy application for EKS<br>aws deploy create-application \<br>  --application-name  taskflow-api \<br>  --compute-platform  EKS<br><br># Create deployment group with auto-rollback on failure<br>aws deploy create-deployment-group \<br>  --application-name        taskflow-api \<br>  --deployment-group-name   taskflow-api-eks-dg \<br>  --service-role-arn        arn:aws:iam::${ACCOUNT_ID}:role/CodeDeployTaskflowRole \<br>  --deployment-config-name  CodeDeployDefault.EKSLinear10PercentEvery1Minutes \<br>  --auto-rollback-configuration &#39;{&quot;enabled&quot;:true,&quot;events&quot;:[&quot;DEPLOYMENT_FAILURE&quot;]}&#39;<br><br># Test rollback: break validate_service.sh, push, watch it auto-recover<br>echo &quot;exit 1  # simulated failure&quot; &gt;&gt; scripts/validate_service.sh<br>git add scripts/validate_service.sh<br>git commit -m &quot;test: simulate deployment validation failure&quot;<br>git push origin main<br># CodeDeploy will fail the deployment and roll back to the previous revision</pre><blockquote><strong>Deployment Strategies available:</strong></blockquote><blockquote>EKSLinear10PercentEvery1Minutes — shifts 10% of pods every minute. Slow and safe for production.</blockquote><blockquote>EKSCanary10Percent5Minutes — 10% for 5 minutes, then 100%. Good middle ground.</blockquote><blockquote>EKSAllAtOnce — replaces all at once. Fast, no incremental safety net.</blockquote><h3>5. Amazon EKS — Managed Kubernetes</h3><p>AWS owns the control plane. You manage the nodes. The app runs as 2 pods across 2 Availability Zones with topology spread constraints, HPA autoscaling, and liveness/readiness probes.</p><h4>Cluster Setup</h4><pre># Create cluster — 2 nodes, 2 AZs, managed node group (~15 mins)<br>eksctl create cluster \<br>  --name           taskflow-eks \<br>  --region         ap-south-1 \<br>  --version        1.32 \<br>  --nodegroup-name taskflow-ng \<br>  --node-type      t3.small \<br>  --nodes          2 \<br>  --nodes-min      2 \<br>  --nodes-max      4 \<br>  --managed        \<br>  --with-oidc      \<br>  --asg-access<br><br># Confirm nodes are in different AZs<br>kubectl get nodes --show-labels | grep topology.kubernetes.io/zone<br><br># Deploy the application<br>kubectl apply -f k8s/namespace.yaml<br>kubectl apply -f k8s/configmap.yaml<br>kubectl apply -f k8s/deployment.yaml<br>kubectl apply -f k8s/service.yaml<br>kubectl apply -f k8s/hpa.yaml<br><br># Verify<br>kubectl get all -n taskflow<br>kubectl get pods -n taskflow -o wide</pre><h4>Least-Privilege RBAC</h4><p>The CodeDeploy role needs to call kubectl apply — but it should never read secrets, list all nodes, or modify RBAC rules. We map the IAM role in aws-auth with only system:authenticated, then create a targeted ClusterRole.</p><pre>apiVersion: rbac.authorization.k8s.io/v1<br>kind: ClusterRole<br>metadata:<br>  name: codedeploy-deployer<br>rules:<br>- apiGroups: [&quot;apps&quot;]<br>  resources: [&quot;deployments&quot;, &quot;replicasets&quot;]<br>  verbs:      [&quot;get&quot;, &quot;list&quot;, &quot;watch&quot;, &quot;create&quot;, &quot;update&quot;, &quot;patch&quot;]<br>- apiGroups: [&quot;&quot;]<br>  resources: [&quot;pods&quot;, &quot;services&quot;, &quot;namespaces&quot;, &quot;configmaps&quot;]<br>  verbs:      [&quot;get&quot;, &quot;list&quot;, &quot;watch&quot;, &quot;create&quot;, &quot;update&quot;, &quot;patch&quot;]<br># Notably absent: secrets, nodes, clusterroles, namespaces (delete)</pre><blockquote><em>⚠️ </em><strong><em>Never use </em></strong><strong><em>system:masters for CI/CD.</em></strong><em> It is full cluster-admin with no restrictions. If a CodeDeploy role or build agent is ever compromised, an attacker with </em><em>system:masters owns your entire cluster. Always use a scoped ClusterRole.</em></blockquote><h3>6. ArgoCD — GitOps Pull-Based Deployment</h3><p>Pull-based GitOps. ArgoCD watches the k8s/ directory in CodeCommit and continuously syncs the cluster to match. Change a YAML, push it — the cluster updates itself. No kubectl from CI needed.</p><h4>CodeDeploy vs ArgoCD — Two Philosophies</h4><p><strong>CodeDeploy (Push-Based)</strong></p><ul><li>CI pipeline drives deployment</li><li>Explicit approval gates</li><li>Lifecycle hooks for custom logic</li><li>Built-in canary/linear strategies</li><li>Pipeline holds cluster credentials</li></ul><p><strong>ArgoCD (Pull-Based / GitOps)</strong></p><ul><li>Cluster watches Git continuously</li><li>Automatic drift correction</li><li>No cluster credentials in CI</li><li>Rollback = revert a git commit</li><li>Git is single source of truth</li></ul><p>These aren’t mutually exclusive. Many teams use both: CodeDeploy for application releases (pipeline-driven) and ArgoCD for infrastructure changes (ConfigMaps, HPA settings, Kubernetes config).</p><h4>Install ArgoCD on EKS</h4><pre># Install ArgoCD into its own namespace<br>kubectl create namespace argocd<br>kubectl apply -n argocd \<br>  -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml<br><br>kubectl wait --for=condition=Ready pods --all -n argocd --timeout=180s<br><br># Get the initial admin password<br>kubectl get secret argocd-initial-admin-secret -n argocd \<br>  -o jsonpath=&quot;{.data.password}&quot; | base64 -d &amp;&amp; echo<br><br># Expose the UI (for lab access)<br>kubectl patch svc argocd-server -n argocd \<br>  -p &#39;{&quot;spec&quot;:{&quot;type&quot;:&quot;LoadBalancer&quot;}}&#39;<br><br># Install argocd CLI and login<br>ARGOCD_HOST=$(kubectl get svc argocd-server -n argocd \<br>  -o jsonpath=&#39;{.status.loadBalancer.ingress[0].hostname}&#39;)<br>argocd login $ARGOCD_HOST --username admin --insecure \<br>  --password $(kubectl get secret argocd-initial-admin-secret \<br>    -n argocd -o jsonpath=&quot;{.data.password}&quot; | base64 -d)</pre><h4>The GitOps Workflow</h4><p>Once the Application is created, the entire workflow is: <strong>edit YAML → git push → ArgoCD syncs</strong>. No pipeline step. No manual kubectl.</p><pre># Connect CodeCommit repo to ArgoCD<br>argocd repo add \<br>  https://git-codecommit.ap-south-1.amazonaws.com/v1/repos/taskflow-api \<br>  --username YOUR_IAM_USER --password YOUR_CODECOMMIT_HTTPS_PASS<br><br># Create the Application (auto-sync + self-heal enabled)<br>argocd app create taskflow-api \<br>  --repo          https://git-codecommit.ap-south-1.amazonaws.com/v1/repos/taskflow-api \<br>  --path          k8s \<br>  --dest-server   https://kubernetes.default.svc \<br>  --dest-namespace taskflow \<br>  --revision      main \<br>  --sync-policy   automated \<br>  --auto-prune \<br>  --self-heal<br><br># === Practice: GitOps Update ===<br># Change replica count, push → ArgoCD auto-applies in ~3 min<br>sed -i &#39;s/replicas: 2/replicas: 3/&#39; k8s/deployment.yaml<br>git add k8s/deployment.yaml &amp;&amp; git commit -m &quot;scale: 3 replicas&quot; &amp;&amp; git push origin main<br>argocd app sync taskflow-api  # force immediate sync if you don&#39;t want to wait<br><br># === Practice: Drift Detection ===<br># Manually scale to 1 — ArgoCD self-heals back to 3 within seconds<br>kubectl scale deployment taskflow-api -n taskflow --replicas=1<br>kubectl get pods -n taskflow --watch  # watch it snap back<br><br># === Practice: Rollback ===<br>argocd app history taskflow-api<br>argocd app rollback taskflow-api &lt;REVISION_ID&gt;# Create the Application (auto-sync + self-heal enabled)<br>argocd app create taskflow-api \<br>  --repo           https://git-codecommit.ap-south-1.amazonaws.com/v1/repos/taskflow-api \<br>  --path           k8s \<br>  --dest-server    https://kubernetes.default.svc \<br>  --dest-namespace taskflow \<br>  --revision       main \<br>  --sync-policy    automated \<br>  --auto-prune \<br>  --self-heal</pre><h3>Putting It All Together</h3><p>The first end-to-end run is always the most satisfying. You push one commit to CodeCommit, and over the next few minutes you watch: CodePipeline light up, CodeBuild run your tests, an image appear in ECR with a git SHA tag, an approval email hit your inbox, CodeDeploy lifecycle hooks fire one by one, and finally kubectl get pods -n taskflow showing the new version running.</p><p>ArgoCD adds a separate layer — watching the same repo and ensuring the cluster never drifts from what Git says. Try manually editing a replica count with kubectl and watch ArgoCD snap it back within seconds. That&#39;s self-healing infrastructure.</p><h3>What Each Service Does in This Pipeline</h3><h4>Service Role</h4><p><strong>CodeCommit</strong> Source of truth. Triggers the entire pipeline on every push to main.</p><p><strong>CodeArtifact</strong> Private PyPI proxy. Controlled, auditable, network-independent dependencies.</p><p><strong>CodeBuild</strong> Tests pass, image built, pushed to ECR with an immutable git-SHA tag.</p><p><strong>CodePipeline</strong> Orchestrates every stage with a human approval gate before deploy.</p><p><strong>CodeDeploy</strong> Lifecycle hooks, health validation, auto-rollback on failure.</p><p><strong>Amazon EKS</strong> Multi-AZ, autoscaling, least-privilege RBAC, self-healing pods.</p><p><strong>ArgoCD</strong> GitOps drift detection. Cluster always matches Git. Instant rollback.</p><blockquote><em>⚠️ </em><strong><em>Cost Reminder:</em></strong><em> EKS control plane costs ~$0.10/hr. Two t3.small nodes add ~$0.04/hr each. When done: </em><em>eksctl delete cluster --name taskflow-eks and delete ECR images, CodePipeline, S3 bucket, and SNS topic.</em></blockquote><p>AWS DevOps Complete Lab · CodeCommit · CodeArtifact · CodeBuild · CodePipeline · CodeDeploy · EKS · ArgoCD</p><p><em>Originally published at </em><a href="https://shi1va.github.io/aws-devops-blog/"><em>https://shi1va.github.io</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc325a419ded" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/building-a-production-aws-devops-pipeline-dc325a419ded">🚀 Building a Production AWS DevOps Pipeline</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Master AWS CodeCommit with a Real-World DevOps Lab (TaskFlow API)]]></title>
            <link>https://aws.plainenglish.io/master-aws-codecommit-with-a-real-world-devops-lab-taskflow-api-7815e2feb27b?source=rss-720e01fb94e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/7815e2feb27b</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[aws-codecommit]]></category>
            <dc:creator><![CDATA[Shivani Kumari @CloudDevOps Engineer]]></dc:creator>
            <pubDate>Mon, 30 Mar 2026 20:46:23 GMT</pubDate>
            <atom:updated>2026-03-30T20:46:23.422Z</atom:updated>
            <content:encoded><![CDATA[<h4>A real Flask REST API with multiple files, tests, a Dockerfile, and intentional bugs — purpose-built so you can practice every CodeCommit workflow from first push to pull requests.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7N5LABpahokHCR7pPstYiA.png" /></figure><p>If you’re preparing for <strong>DevOps, SRE, or Cloud Engineer interviews</strong>, just knowing Git commands isn’t enough.</p><p>You need to demonstrate:</p><ul><li>Real-world workflows</li><li>Collaboration (branches, PRs, conflicts)</li><li>Automation (SNS triggers, CI/CD integration)</li><li>Debugging and production thinking</li></ul><p>That’s exactly what this lab delivers.</p><h3>Prerequisites</h3><p>Make sure all of these are ready before starting the exercises.</p><h4>1. AWS CLI configured</h4><pre># Verify AWS CLI is installed and configured<br>aws --version<br>aws sts get-caller-identity   # should return your account ID</pre><h4>2. CodeCommit HTTPS credential helper</h4><pre># Add to ~/.gitconfig  (run once)<br>git config --global credential.helper \<br>  &#39;!aws codecommit credential-helper $@&#39;<br>git config --global credential.UseHttpPath true</pre><p><strong>Alternative: SSH keys</strong></p><blockquote>You can also use SSH keys uploaded to IAM → Security credentials → SSH keys for CodeCommit. HTTPS credential helper is simpler for most lab setups.</blockquote><h4>3. IAM permissions needed</h4><pre>{<br>  &quot;Effect&quot;: &quot;Allow&quot;,<br>  &quot;Action&quot;: [<br>    &quot;codecommit:*&quot;      // full access for lab purposes<br>  ],<br>  &quot;Resource&quot;: &quot;*&quot;<br>}</pre><p><strong>Lab vs Production</strong></p><blockquote>codecommit:* is fine for a personal practice lab. In production, scope permissions to specific repositories and actions.</blockquote><h3>Project Structure</h3><p>The <strong>TaskFlow API</strong> dummy project gives you a realistic multi-file Python project to work with. It contains real code, real tests, intentional bugs, and a Dockerfile.</p><h4>The 3 bugs in notifications.py (for Exercise 3)</h4><pre># BUG 1 (line ~28): wrong log level passed<br>def notify_task_created(self, task_id):<br>    return self._log(level=&quot;debug&quot;, ...)   # ← should be &quot;info&quot;<br><br># BUG 2 (line ~33): missing return statement<br>def notify_task_completed(self, task_id):<br>    self._log(...)                          # ← caller gets None<br><br># BUG 3 (line ~39): typo in dict key<br>entry = {&quot;level&quot;: &quot;warn&quot;, &quot;messge&quot;: ...}  # ← should be &quot;message&quot;</pre><h3>Step 1. Create the CodeCommit Repository</h3><ol><li>Create the repository via AWS CLI</li></ol><p>Creates a new empty CodeCommit repo in your default region.</p><pre>aws codecommit create-repository \<br>  --repository-name taskflow-api \<br>  --repository-description &quot;TaskFlow API - CodeCommit practice&quot; \<br>  --region ap-south-1<br><br># Note the cloneUrlHttp from the output</pre><p>2. Verify the repo was created</p><pre>aws codecommit get-repository \<br>  --repository-name taskflow-api<br><br># List all your CodeCommit repos<br>aws codecommit list-repositories</pre><p>3. Clone the empty repository</p><pre>git clone \<br>  https://git-codecommit.ap-south-1.amazonaws.com/v1/repos/taskflow-api<br><br>cd taskflow-api</pre><h3>Step 2. First Push — Seed the Repository</h3><p><strong>Copy the dummy project files</strong></p><blockquote>Copy all files from the downloaded codecommit-practice/ folder into your cloned taskflow-api/ directory. Do NOT copy the folder itself — copy its contents.</blockquote><pre># Inside your cloned taskflow-api/ directory<br># Copy all dummy project files here, then:<br><br>git status                          # see untracked files<br>git add .                           # stage everything<br>git status                          # verify staged files<br>git commit -m &quot;feat: initial TaskFlow API project&quot;<br>git push origin main                # push to CodeCommit</pre><pre># Verify push via CLI<br>aws codecommit get-branch \<br>  --repository-name taskflow-api \<br>  --branch-name main<br><br># Or list commits<br>aws codecommit list-branches \<br>  --repository-name taskflow-api</pre><h3>Exercises Overview</h3><h4>All 8 Practice Exercises</h4><p>Complete these in order — each builds on the previous.</p><p><strong>Exercise 01 — Clone &amp; Commit</strong></p><blockquote>Edit a file, stage, commit, push. See changes in AWS Console.</blockquote><p><strong>Exercise 02 — Feature Branch</strong></p><blockquote>Create feature/add-search branch, add search endpoint, push branch.</blockquote><p><strong>Exercise 03 — Fix Bugs</strong></p><blockquote>Find and fix 3 bugs in notifications.py on a hotfix branch.</blockquote><p><strong>Exercise 04 — Pull Request</strong></p><blockquote>Raise a PR, add description, approve, merge via Console &amp; CLI.</blockquote><p><strong>Exercise 05 — Merge Conflict</strong></p><blockquote>Create two branches that edit the same line. Resolve the conflict.</blockquote><p><strong>Exercise 06 — Tags &amp; Releases</strong></p><blockquote>Tag a commit as v1.0.0, push the tag, list tags via CLI.</blockquote><p><strong>Exercise 07 — SNS Notifications</strong></p><blockquote>Set up CodeCommit triggers to send push events to an SNS topic.</blockquote><p><strong>Exercise 08 — Cross-Repo Clone</strong></p><blockquote>Inspect commit history, diff two commits, view blame via CLI.</blockquote><h3>Exercise 01</h3><h4>Clone &amp; Commit</h4><p>The most fundamental CodeCommit workflow: edit a file locally, commit it, push it, and verify the change in the AWS Console.</p><p><strong>Task: Update the app version in config.py</strong></p><pre># 1. Make a visible change<br>sed -i &#39;s/version&quot;: &quot;1.0.0&quot;/version&quot;: &quot;1.0.1&quot;/&#39; app/app.py<br><br># Also update CHANGELOG.md<br>echo &quot;## [1.0.1] - $(date +%Y-%m-%d)&quot; &gt;&gt; CHANGELOG.md<br>echo &quot;### Changed&quot; &gt;&gt; CHANGELOG.md<br>echo &quot;- Bumped version to 1.0.1&quot; &gt;&gt; CHANGELOG.md<br><br># 2. Stage specific files (not git add .)<br>git add app/app.py CHANGELOG.md<br><br># 3. Check what&#39;s staged<br>git diff --cached<br><br># 4. Commit with a meaningful message<br>git commit -m &quot;chore: bump version to 1.0.1&quot;<br><br># 5. Push to CodeCommit<br>git push origin main<br><br># 6. Verify via CLI<br>aws codecommit get-branch \<br>  --repository-name taskflow-api \<br>  --branch-name main</pre><p><strong>What to check in AWS Console</strong></p><blockquote>Go to CodeCommit → taskflow-api → Commits. You should see your new commit at the top with the message “chore: bump version to 1.0.1”. Click it to see the diff.</blockquote><p><strong>Bonus: View commit details via CLI</strong></p><pre># Get the latest commit ID<br>COMMIT_ID=$(aws codecommit get-branch \<br>  --repository-name taskflow-api \<br>  --branch-name main \<br>  --query &#39;branch.commitId&#39; \<br>  --output text)<br><br># Get full commit details<br>aws codecommit get-commit \<br>  --repository-name taskflow-api \<br>  --commit-id $COMMIT_ID</pre><h3>Exercise 02</h3><h4>Feature Branch</h4><p>Create a feature branch, add a new endpoint, push the branch to CodeCommit, and verify the branch appears independently of main.</p><pre># 1. Create and switch to a new branch<br>git checkout -b feature/add-search<br><br># 2. Add a search endpoint to app/app.py<br>#    Open app/app.py and add this block before &quot;if __name__&quot;:</pre><pre># Add this new endpoint to app/app.py<br>@app.route(&quot;/tasks/search&quot;, methods=[&quot;GET&quot;])<br>def search_tasks():<br>    &quot;&quot;&quot;Search tasks by keyword in title or description.&quot;&quot;&quot;<br>    query = request.args.get(&quot;q&quot;, &quot;&quot;).lower()<br>    if not query:<br>        return jsonify({&quot;error&quot;: &quot;q parameter is required&quot;}), 400<br>    results = [<br>        t for t in TASKS.values()<br>        if query in t[&quot;title&quot;].lower() or query in t[&quot;description&quot;].lower()<br>    ]<br>    return jsonify({&quot;results&quot;: results, &quot;count&quot;: len(results)})</pre><pre># 3. Stage and commit<br>git add app/app.py<br>git commit -m &quot;feat: add GET /tasks/search endpoint&quot;<br><br># 4. Push the branch to CodeCommit<br>git push origin feature/add-search<br><br># 5. Verify the branch exists in CodeCommit<br>aws codecommit list-branches \<br>  --repository-name taskflow-api<br><br># 6. Compare branches via CLI<br>aws codecommit get-differences \<br>  --repository-name taskflow-api \<br>  --before-commit-specifier main \<br>  --after-commit-specifier feature/add-search</pre><h3>Exercise 03</h3><h4>Fix Bugs on a Hotfix Branch</h4><p>The file app/notifications.py has 3 intentional bugs. Create a hotfix branch from main, fix all 3, and push.</p><p><strong>The 3 bugs to find and fix</strong></p><p><strong>Bug 1</strong> — notify_task_created: level should be &quot;info&quot;, not &quot;debug&quot;<br><strong>Bug 2</strong> — notify_task_completed: missing return before self._log(...)<br><strong>Bug 3</strong> — notify_task_deleted: dict key is &quot;messge&quot;, should be &quot;message&quot;</p><pre># 1. Switch back to main first (hotfix branches from main)<br>git checkout main<br>git pull origin main<br><br># 2. Create hotfix branch<br>git checkout -b hotfix/fix-notifications<br><br># 3. Open app/notifications.py and fix all 3 bugs<br>#    (see the bug locations in the file comments)<br><br># 4. Commit each fix separately for clear history<br>git add app/notifications.py<br>git commit -m &quot;fix: use &#39;info&#39; level in notify_task_created&quot;<br><br># (make your fix 2 edit, then:)<br>git add app/notifications.py<br>git commit -m &quot;fix: add missing return in notify_task_completed&quot;<br><br># (make your fix 3 edit, then:)<br>git add app/notifications.py<br>git commit -m &quot;fix: correct typo &#39;messge&#39; → &#39;message&#39; in notify_task_deleted&quot;<br><br># 5. Push the hotfix branch<br>git push origin hotfix/fix-notifications<br><br># 6. See commit log for this branch<br>git log --oneline --graph origin/main..hotfix/fix-notifications</pre><h3>Exercise 04</h3><h4>Pull Requests</h4><p>Create, review, and merge a Pull Request entirely via the AWS CLI — then also try it in the Console.</p><pre># 1. Create a Pull Request from hotfix → main<br>aws codecommit create-pull-request \<br>  --title &quot;fix: resolve 3 bugs in notifications.py&quot; \<br>  --description &quot;Fixes incorrect log level, missing return, and typo in Notifier class&quot; \<br>  --targets repositoryName=taskflow-api,sourceReference=hotfix/fix-notifications,destinationReference=main<br><br># Note the pullRequestId from output (e.g. &quot;1&quot;)<br><br># 2. List all open PRs<br>aws codecommit list-pull-requests \<br>  --repository-name taskflow-api \<br>  --pull-request-status OPEN<br><br># 3. Get PR details<br>aws codecommit get-pull-request \<br>  --pull-request-id 1<br><br># 4. Post a review comment on the PR<br>aws codecommit post-comment-for-pull-request \<br>  --pull-request-id 1 \<br>  --repository-name taskflow-api \<br>  --before-commit-id $(git rev-parse origin/main) \<br>  --after-commit-id  $(git rev-parse origin/hotfix/fix-notifications) \<br>  --content &quot;LGTM! All 3 bugs fixed correctly.&quot;<br><br># 5. Approve the PR<br>aws codecommit update-pull-request-approval-state \<br>  --pull-request-id 1 \<br>  --revision-id $(aws codecommit get-pull-request --pull-request-id 1 \<br>    --query &#39;pullRequest.revisionId&#39; --output text) \<br>  --approval-state APPROVE<br><br># 6. Merge the PR (squash merge)<br>aws codecommit merge-pull-request-by-squash \<br>  --pull-request-id 1 \<br>  --repository-name taskflow-api \<br>  --source-commit-specifier hotfix/fix-notifications \<br>  --destination-commit-specifier main \<br>  --commit-message &quot;fix: resolve 3 notification bugs (#1)&quot;<br><br># 7. Pull merged changes locally<br>git checkout main &amp;&amp; git pull origin main</pre><p><strong>Three merge strategies available</strong></p><p>merge-pull-request-by-fast-forward — no merge commit, linear history<br>merge-pull-request-by-squash — squashes all commits into one<br>merge-pull-request-by-three-way — explicit merge commit (GitHub-style)</p><h3>Exercise 05</h3><h4>Create &amp; Resolve a Merge Conflict</h4><p>Two developers edit the same line on different branches. Practice resolving the conflict before merging.</p><pre>## ── Branch A: change MAX_TASKS to 500 ──────────────────────────<br>git checkout main &amp;&amp; git pull origin main<br>git checkout -b conflict/branch-a<br><br># Edit app/config.py line:  MAX_TASKS = int(os.getenv(&quot;MAX_TASKS&quot;, 1000))<br># Change 1000  →  500<br>sed -i &#39;s/MAX_TASKS&quot;, 1000/MAX_TASKS&quot;, 500/&#39; app/config.py<br>git add app/config.py<br>git commit -m &quot;config: reduce MAX_TASKS to 500&quot;<br>git push origin conflict/branch-a<br><br>## ── Branch B: change MAX_TASKS to 2000 ─────────────────────────<br>git checkout main<br>git checkout -b conflict/branch-b<br><br># Edit the SAME line in app/config.py: change 1000  →  2000<br>sed -i &#39;s/MAX_TASKS&quot;, 1000/MAX_TASKS&quot;, 2000/&#39; app/config.py<br>git add app/config.py<br>git commit -m &quot;config: increase MAX_TASKS to 2000&quot;<br>git push origin conflict/branch-b<br><br>## ── Merge Branch A into main first (succeeds) ───────────────────<br>git checkout main<br>git merge conflict/branch-a<br>git push origin main<br><br>## ── Try to merge Branch B (this will CONFLICT) ──────────────────<br>git merge conflict/branch-b<br># Git will report: CONFLICT (content): Merge conflict in app/config.py<br><br>## ── Open app/config.py, find the conflict markers:<br># &lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD<br># MAX_TASKS = int(os.getenv(&quot;MAX_TASKS&quot;, 500))<br># =======<br># MAX_TASKS = int(os.getenv(&quot;MAX_TASKS&quot;, 2000))<br># &gt;&gt;&gt;&gt;&gt;&gt;&gt; conflict/branch-b<br><br>## ── Decide: keep 2000, remove conflict markers ───────────────────<br>git add app/config.py<br>git commit -m &quot;merge: resolve MAX_TASKS conflict, keep 2000&quot;<br>git push origin main</pre><h3>Exercise 06</h3><h4>Tags &amp; Releases</h4><p>Tag a stable commit as a release version and explore tags via CLI.</p><pre># 1. Create an annotated tag on the current main HEAD<br>git checkout main &amp;&amp; git pull origin main<br>git tag -a v1.0.0 -m &quot;Release v1.0.0 - Initial stable release&quot;<br><br># 2. Push the tag to CodeCommit<br>git push origin v1.0.0<br><br># 3. Push ALL local tags at once<br>git push origin --tags<br><br># 4. List tags via CLI<br>aws codecommit list-tags-for-resource \<br>  --resource-arn $(aws codecommit get-repository \<br>    --repository-name taskflow-api \<br>    --query &#39;repositoryMetadata.Arn&#39; --output text)<br><br># 5. Get commit behind a tag<br>git show v1.0.0 --stat<br><br># 6. Create a patch release after another fix<br>git tag -a v1.0.1 -m &quot;Release v1.0.1 - Bug fixes&quot;<br>git push origin v1.0.1<br><br># 7. Checkout code at a specific tag (detached HEAD)<br>git checkout v1.0.0<br>git checkout main   # return to main</pre><h3>Exercise 07</h3><h4>SNS Notifications / Triggers</h4><p>Set up a CodeCommit trigger that sends a notification to an SNS topic on every push to main. This is the foundation for CI/CD integrations.</p><pre># 1. Create an SNS topic<br>TOPIC_ARN=$(aws sns create-topic \<br>  --name taskflow-codecommit-events \<br>  --query TopicArn --output text)<br><br>echo &quot;Topic ARN: $TOPIC_ARN&quot;<br><br># 2. Subscribe your email to the topic<br>aws sns subscribe \<br>  --topic-arn $TOPIC_ARN \<br>  --protocol email \<br>  --notification-endpoint [email protected]<br># Check your email and confirm the subscription<br><br># 3. Grant CodeCommit permission to publish to the topic<br>aws sns set-topic-attributes \<br>  --topic-arn $TOPIC_ARN \<br>  --attribute-name Policy \<br>  --attribute-value &#39;{<br>    &quot;Version&quot;:&quot;2012-10-17&quot;,<br>    &quot;Statement&quot;:[{<br>      &quot;Effect&quot;:&quot;Allow&quot;,<br>      &quot;Principal&quot;:{&quot;Service&quot;:&quot;codecommit.amazonaws.com&quot;},<br>      &quot;Action&quot;:&quot;sns:Publish&quot;,<br>      &quot;Resource&quot;:&quot;&#39;$TOPIC_ARN&#39;&quot;<br>    }]<br>  }&#39;<br><br># 4. Create the trigger on the repository<br>aws codecommit put-repository-triggers \<br>  --repository-name taskflow-api \<br>  --triggers &#39;[{<br>    &quot;name&quot;: &quot;push-to-main&quot;,<br>    &quot;destinationArn&quot;: &quot;&#39;$TOPIC_ARN&#39;&quot;,<br>    &quot;branches&quot;: [&quot;main&quot;],<br>    &quot;events&quot;: [&quot;updateReference&quot;],<br>    &quot;customData&quot;: &quot;taskflow-push&quot;<br>  }]&#39;<br><br># 5. Verify triggers are set<br>aws codecommit get-repository-triggers \<br>  --repository-name taskflow-api<br><br># 6. Test: make a commit and push to main — check your email!<br>echo &quot;# Trigger test $(date)&quot; &gt;&gt; CHANGELOG.md<br>git add CHANGELOG.md<br>git commit -m &quot;test: trigger notification&quot;<br>git push origin main</pre><h3>Exercise 08</h3><h4>Inspect History &amp; Diff</h4><p>Practice reading commit history, diffing commits, and viewing file blame — all via the CLI.</p><pre># 1. List recent commits on main<br>aws codecommit get-differences \<br>  --repository-name taskflow-api \<br>  --after-commit-specifier main<br><br># 2. Get commits between two points<br>aws codecommit get-commit-history \<br>  --repository-name taskflow-api \<br>  --commit-id main<br><br># 3. Diff two specific commits<br>BEFORE=$(git rev-parse HEAD~2)<br>AFTER=$(git rev-parse HEAD)<br><br>aws codecommit get-differences \<br>  --repository-name taskflow-api \<br>  --before-commit-specifier $BEFORE \<br>  --after-commit-specifier $AFTER<br><br># 4. Get the content of a specific file at a commit<br>aws codecommit get-file \<br>  --repository-name taskflow-api \<br>  --commit-specifier main \<br>  --file-path app/app.py \<br>  --query fileContent \<br>  --output text | base64 --decode<br><br># 5. View the file tree at a commit<br>aws codecommit get-folder \<br>  --repository-name taskflow-api \<br>  --commit-specifier main \<br>  --folder-path /<br><br># 6. View blame (who changed each line)<br>git blame app/app.py<br><br># 7. Search commits by message<br>git log --oneline --grep=&quot;fix:&quot;<br><br># 8. See which files changed in the last 3 commits<br>git log --name-only --oneline -3</pre><h3>Final Thoughts</h3><p>This is not just a Git lab — it’s a <strong>mini DevOps simulation</strong>.</p><p>If you can confidently explain this project in an interview, you can easily clear:</p><ul><li>DevOps Engineer</li><li>Cloud Engineer</li><li>SRE roles</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7815e2feb27b" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/master-aws-codecommit-with-a-real-world-devops-lab-taskflow-api-7815e2feb27b">Master AWS CodeCommit with a Real-World DevOps Lab (TaskFlow API)</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Production-Ready DevSecOps Pipeline on AWS (EKS + Jenkins + Trivy + SonarQube)]]></title>
            <link>https://medium.com/@shivani.kumari.clouddevopsblog/building-a-production-ready-devsecops-pipeline-on-aws-eks-jenkins-trivy-sonarqube-12f60a5d711a?source=rss-720e01fb94e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/12f60a5d711a</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[sonarqube]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Shivani Kumari @CloudDevOps Engineer]]></dc:creator>
            <pubDate>Sun, 29 Mar 2026 08:11:50 GMT</pubDate>
            <atom:updated>2026-03-29T08:11:50.050Z</atom:updated>
            <content:encoded><![CDATA[<h4>From Code to Secure Deployment: A Complete Hands-On DevSecOps CI/CD Architecture with Real-World Best Practices</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iS7aG8PciYtRmzB-.jpeg" /></figure><h3>Introduction</h3><p>In today’s cloud-native world, <strong>security cannot be an afterthought</strong>. Traditional DevOps focuses on speed, but modern systems demand <strong>secure, automated, and scalable delivery pipelines</strong>.</p><p>That’s where <strong>DevSecOps</strong> comes in.</p><p>In this blog, we’ll build a <strong>complete DevSecOps CI/CD pipeline on AWS</strong>, starting from launching EC2 instances to deploying a secure application on Kubernetes.</p><p>📌 This blog is based on a complete hands-on pipeline implementation</p><h3>Why I Built This Project</h3><p>While preparing for DevOps interviews, I realized that most CI/CD pipelines focus only on automation but ignore security.</p><p>In one of my interviews, I was asked:<br> 👉 <em>“How do you ensure only secure images are deployed to production?”</em></p><p>I had theoretical knowledge — but lacked a real implementation.</p><p>That’s when I decided to build this <strong>end-to-end DevSecOps pipeline</strong>, where security is enforced at every stage — from code commit to production deployment.</p><h3>What is DevSecOps?</h3><p>DevSecOps = <strong>Development + Security + Operations</strong></p><p>It integrates security at every stage of the CI/CD pipeline.</p><h3>Key Concept: Shift Left Security</h3><p>Instead of testing security at the end:</p><ul><li>Scan code during development</li><li>Scan dependencies during build</li><li>Scan images before deployment</li></ul><p>✔ Result: Faster fixes, lower cost, more secure applications</p><h3>End-to-End Architecture</h3><p>Here’s what we are building:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bkEvRk_JtLJOERCI.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*nrYkSw-o6a5YcWue.png" /></figure><h4>Pipeline Flow</h4><ol><li>Code pushed to GitHub</li><li>Jenkins triggers pipeline</li><li>Trivy scans source code (SAST + SCA)</li><li>SonarQube analyzes code quality</li><li>Docker builds image</li><li>Trivy scans container image</li><li>Push image to ECR</li><li>Deploy to EKS (Kubernetes)</li></ol><h4>Step-by-Step Implementation</h4><h4>Step 1: Launch Jenkins Controller (EC2)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/0*J6maMiJtS7DeJw2w.gif" /></figure><ul><li>Launch Ubuntu EC2</li><li>Install Java &amp; Jenkins</li><li>Access UI on port 8080</li><li>Configure admin user</li></ul><p>💡 Jenkins acts as the <strong>brain of CI/CD</strong></p><h4>Step 2: Configure Jenkins Agent</h4><ul><li>Separate EC2 instance</li><li>SSH-based connection</li></ul><p>Install:</p><ul><li>Docker</li><li>Maven</li><li>Trivy</li><li>AWS CLI</li></ul><p>💡 Why Agent?</p><ul><li>Better security</li><li>Scalable builds</li><li>Isolated workloads</li></ul><h4>Step 3: Setup SonarQube (SAST)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hoz59c6E3x2bjUUj.png" /></figure><ul><li>Install SonarQube on EC2</li><li>Configure PostgreSQL DB</li><li>Generate token for Jenkins</li></ul><p><strong>What it does:</strong></p><ul><li>Detects vulnerabilities</li><li>Checks code quality</li><li>Enforces <strong>Quality Gate</strong></li></ul><h4>Step 4: Install Trivy (Security Scanner)</h4><ul><li>FS Scan → scans source code</li><li>Image Scan → scans Docker image</li></ul><pre>trivy fs .<br>trivy image &lt;image&gt;</pre><p>💡 Pipeline fails if HIGH/CRITICAL vulnerabilities are found</p><h4>Step 5: Setup Amazon ECR</h4><ul><li>Create private repository</li><li>Enable <strong>immutable tags</strong></li></ul><p>💡 Why ECR?</p><ul><li>Secure image storage</li><li>IAM-based authentication</li><li>No hardcoded credentials</li></ul><h4>Step 6: Create EKS Cluster</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*WcWyS9FdQ6LFDv7-.jpg" /></figure><ul><li>Use eksctl to create cluster</li><li>Configure IAM roles</li><li>Setup aws-auth ConfigMap</li><li>Apply RBAC</li></ul><p>💡 Key Feature:</p><ul><li>Multi-AZ deployment → High Availability</li></ul><h4>Step 7: Jenkins Pipeline (Core Logic)</h4><p>Here’s what your pipeline does:</p><pre>pipeline {<br>  agent { label &#39;docker-maven-trivy&#39; }<br><br>  stages {<br>    stage(&#39;Trivy FS Scan&#39;) { ... }<br>    stage(&#39;Build &amp; Sonar&#39;) { ... }<br>    stage(&#39;Build Image&#39;) { ... }<br>    stage(&#39;Trivy Image Scan&#39;) { ... }<br>    stage(&#39;Push to ECR&#39;) { ... }<br>    stage(&#39;Deploy to EKS&#39;) { ... }<br>  }<br>}</pre><h4>Security Gates in Pipeline</h4><ul><li>❌ Fail if vulnerabilities found</li><li>❌ Fail if quality gate fails</li><li>❌ Fail if deployment fails</li></ul><h4>Security Best Practices Implemented</h4><p>✔ IAM Roles (No hardcoded credentials)<br> ✔ Immutable Docker tags<br> ✔ RBAC in Kubernetes<br> ✔ Multi-layer scanning (code + image)<br> ✔ Rollback on deployment failure</p><p>💡 This is <strong>Defense in Depth</strong> in action</p><h3>Real-World Use Case</h3><p>Imagine you’re working in a fintech company:</p><ul><li>Developers push code daily</li><li>Security vulnerabilities must be blocked immediately</li><li>Zero downtime deployment required</li></ul><p>👉 This pipeline ensures:</p><ul><li>Secure builds</li><li>Automated checks</li><li>Safe production deployment</li></ul><h3>Common Interview Questions</h3><p><strong>Q1: What is DevSecOps?</strong></p><p>👉 Integrating security into CI/CD pipeline at every stage.</p><p><strong>Q2: Why use both Trivy FS and Image Scan?</strong></p><p>👉 FS catches early issues, Image scan validates final artifact.</p><p><strong>Q3: What is aws-auth ConfigMap?</strong></p><p>👉 Maps IAM roles to Kubernetes users for authentication.</p><p><strong>Q4: Why immutable tags?</strong></p><p>👉 Prevents overwriting scanned images → ensures integrity.</p><p><strong>Q5: Difference between SAST &amp; DAST?</strong></p><ul><li>SAST → Code analysis (SonarQube)</li><li>DAST → Runtime testing</li></ul><h3>Troubleshooting Scenarios</h3><h4>Pipeline fails at Trivy scan</h4><p>👉 Fix:</p><ul><li>Remove vulnerable dependency</li><li>Or use .trivyignore (only if justified)</li></ul><h4>SonarQube Quality Gate fails</h4><p>👉 Fix:</p><ul><li>Improve code coverage</li><li>Fix bugs/security issues</li></ul><h4>EKS deployment fails</h4><p>👉 Check:</p><ul><li>kubeconfig</li><li>IAM role mapping</li><li>RBAC permissions</li></ul><h4>Docker push fails</h4><p>👉 Check:</p><ul><li>ECR login</li><li>IAM role permissions</li></ul><h3>Production Improvements</h3><p>To make this enterprise-ready:</p><ul><li>🔁 Use ArgoCD (GitOps)</li><li>🔐 Use HashiCorp Vault</li><li>📊 Add Prometheus + Grafana</li><li>🧾 Use Helm for deployments</li><li>🛡️ Add OPA/Gatekeeper policies</li></ul><h3>Conclusion</h3><p>This DevSecOps pipeline demonstrates how to:</p><p>✔ Automate CI/CD<br> ✔ Integrate security at every stage<br> ✔ Deploy scalable apps on Kubernetes<br> ✔ Follow real-world best practices</p><p>👉 Mastering this makes you <strong>interview-ready + production-ready</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12f60a5d711a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ AWS Lambda Just Got Smarter: AZ-Aware Serverless is Finally Here!]]></title>
            <link>https://aws.plainenglish.io/aws-lambda-just-got-smarter-az-aware-serverless-is-finally-here-fac98ab47843?source=rss-720e01fb94e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/fac98ab47843</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cost-optimization]]></category>
            <dc:creator><![CDATA[Shivani Kumari @CloudDevOps Engineer]]></dc:creator>
            <pubDate>Fri, 20 Mar 2026 07:38:51 GMT</pubDate>
            <atom:updated>2026-03-20T07:38:51.771Z</atom:updated>
            <content:encoded><![CDATA[<h4>🔥 Build Faster, Lower Latency, and Highly Resilient Serverless Architectures with AZ Metadata</h4><h3>🌍 Why This Update Matters</h3><p>AWS just released a <strong>powerful enhancement</strong> to Lambda that many engineers have been waiting for.</p><p><strong>👉 Lambda can now identify which Availability Zone (AZ) it is running in.</strong></p><p>Until now, Lambda was a <strong>black box</strong> in terms of AZ awareness. You had no idea whether your function was running in use1-az1, use1-az2, or another AZ.</p><p>Now?<br> You can <strong>programmatically access AZ metadata</strong> and build smarter, faster, and more resilient systems.</p><h3>🧠 What Exactly Is This Feature?</h3><p>AWS Lambda now exposes a <strong>metadata endpoint inside the execution environment</strong> that provides:</p><ul><li>✅ Availability Zone ID (e.g., use1-az1)</li><li>✅ Accessible via simple HTTP call</li><li>✅ Works with all runtimes (Python, Node, Java, container images)</li></ul><p>✅ Compatible with:</p><ul><li>VPC-enabled Lambdas</li><li>SnapStart</li><li>Provisioned Concurrency</li></ul><h3>⚙️ How It Works (Under the Hood)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2aBWKC2sqpyd28F3.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XsAp2mKe75__0cGg.png" /></figure><p>Inside every Lambda execution environment:</p><ol><li>AWS injects environment variables</li><li>Lambda exposes a metadata endpoint within the execution environment, accessible via environment variables, allowing functions to retrieve runtime information such as the Availability Zone ID.</li><li>Your function makes an HTTP request</li><li>It returns the <strong>AZ ID</strong></li></ol><p>👉 This enables your function to make <strong>AZ-aware routing and resilience decisions</strong>.</p><p>👉 You can also use <strong>AWS Powertools</strong> to simplify this.</p><h3>🏗️ Real-World Use Cases (This is where it gets powerful)</h3><h4>1️⃣ Same-AZ Routing (🔥 Latency Optimization)</h4><p>Imagine this architecture:</p><ul><li>Lambda → ElastiCache</li><li>Lambda → RDS</li></ul><p>Now you can:</p><p>👉 Route traffic to <strong>same-AZ endpoints</strong></p><p><strong>Benefit:</strong></p><ul><li>🚀 Lower latency</li><li>💸 Reduced cross-AZ data transfer cost</li></ul><h4>2️⃣ AZ-Aware Failover Design</h4><p>You can design:</p><ul><li>AZ-specific fallback logic</li><li>Smart retries across AZs</li></ul><p>Example:</p><pre>IF primary AZ fails:<br>   switch to secondary AZ endpoint</pre><h4>3️⃣ Fault Injection Testing (Chaos Engineering)</h4><p>👉 Simulate:</p><ul><li>AZ failure scenarios</li><li>Partial outages</li></ul><p>👉 Validate:</p><ul><li>Resilience</li><li>Recovery mechanisms</li></ul><h4>4️⃣ Smart Load Distribution</h4><p>Instead of random routing:</p><p>👉 You can:</p><ul><li>Prefer same AZ</li><li>Balance across AZs intelligently</li></ul><h3>🧩 Architecture Pattern (Before vs After)</h3><h4>❌ Before (Blind Routing)</h4><ul><li>Lambda → Random AZ endpoint</li><li>Higher latency</li><li>Cross-AZ charges</li></ul><h4>✅ After (AZ-Aware Routing)</h4><ul><li>Lambda → Same AZ endpoint</li><li>Optimized performance</li><li>Cost-efficient</li></ul><h3>⚠️ Things to Keep in Mind</h3><ul><li>AZ IDs differ across accounts</li><li>Always map AZ ID → AZ name carefully</li><li>Don’t hardcode AZ assumptions</li></ul><h3>🎯 Final Thoughts</h3><p>This might look like a small update — but it unlocks:</p><ul><li>⚡ Faster serverless apps</li><li>💸 Lower costs</li><li>🛡️ Better resilience</li></ul><p>👉 If you are working in <strong>DevOps, SRE, or Cloud Engineering</strong>, this is something you should <strong>start using immediately</strong>.</p><h3>📣 If You Found This Useful</h3><p>👉 Follow for more DevOps &amp; Cloud insights<br> 👉 Clap 👏 and share to help others learn</p><p>#AWS #Lambda #AZ #Cloud #DevOps</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fac98ab47843" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/aws-lambda-just-got-smarter-az-aware-serverless-is-finally-here-fac98ab47843">🚀 AWS Lambda Just Got Smarter: AZ-Aware Serverless is Finally Here!</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrating OpenShift Worker Nodes from Intel to AMD on AWS — A Cost Optimization Journey Without…]]></title>
            <link>https://aws.plainenglish.io/migrating-openshift-worker-nodes-from-intel-to-amd-on-aws-a-cost-optimization-journey-without-a17ff363488e?source=rss-720e01fb94e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a17ff363488e</guid>
            <category><![CDATA[cost-optimization]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[red-hat-openshift]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Shivani Kumari @CloudDevOps Engineer]]></dc:creator>
            <pubDate>Thu, 05 Mar 2026 13:16:44 GMT</pubDate>
            <atom:updated>2026-03-05T13:16:44.505Z</atom:updated>
            <content:encoded><![CDATA[<h3>Migrating OpenShift Worker Nodes from Intel to AMD on AWS — A Cost Optimization Journey Without Downtime</h3><h4>A practical approach to migrating ROSA worker nodes using MachinePools while maintaining application availability.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b-ANcvzJUBkHP-qnP_lCMQ.png" /></figure><h3>How we optimized compute infrastructure in a production ROSA cluster using a rolling node replacement strategy</h3><p>Running Kubernetes in production is not only about scalability and reliability — it is also about <strong>optimizing infrastructure cost while maintaining stability and performance</strong>.</p><p>In one of our <strong>Red Hat OpenShift Service on AWS (ROSA)</strong> environments, we observed that the worker nodes powering our application workloads were running on <strong>Intel-based EC2 instances</strong>. While the cluster was performing well, we identified an opportunity to <strong>improve cost efficiency</strong> by moving to <strong>AMD-based EC2 instances</strong> that offer a better price-to-performance ratio.</p><p>Instead of redesigning the architecture or introducing risky infrastructure changes, we implemented a <strong>controlled migration strategy</strong> that allowed us to replace worker nodes gradually while maintaining application availability in the production environment.</p><p>In this article, I’ll walk through the <strong>approach, migration strategy, and operational steps</strong> we used to safely transition our OpenShift worker nodes from Intel to AMD instances.</p><p><strong>Before Migration</strong></p><pre>Applications<br>      ↓<br>Intel Worker Nodes<br>      ↓<br>ROSA Cluster</pre><p><strong>After Migration</strong></p><pre>Applications<br>      ↓<br>AMD Worker Nodes<br>      ↓<br>ROSA Cluster</pre><h3>Understanding the Existing Architecture</h3><p>Our platform was running on <strong>Red Hat OpenShift Service on AWS (ROSA)</strong>.</p><p>ROSA provides a <strong>fully managed OpenShift control plane</strong>, while organizations manage the <strong>worker nodes</strong> that run application workloads.</p><p>The architecture looked similar to the following:</p><pre>ROSA Cluster<br>│<br>├── Control Plane (Managed by Red Hat)<br>│<br>└── Worker Nodes<br>       └── Intel-based EC2 instances</pre><p>The worker nodes form the <strong>compute layer</strong> of the cluster and are responsible for running application pods.</p><p>These nodes were configured with <strong>memory-optimized EC2 instances</strong>, providing sufficient compute and memory resources for container workloads.</p><h3>Identifying the Optimization Opportunity</h3><p>AWS offers multiple EC2 instance families powered by different processors.</p><p>Many traditional deployments use <strong>Intel-based instances</strong>, but AWS also provides newer instance families powered by <strong>AMD EPYC processors</strong>.</p><p>AMD-based instances offer several advantages:</p><ul><li>Comparable compute performance</li><li>Improved <strong>price-to-performance ratio</strong></li><li>Full compatibility with <strong>x86_64 architecture</strong></li></ul><p>Because containerized workloads run independently of the underlying processor vendor, migrating from Intel to AMD <strong>does not require application changes</strong> as long as the architecture remains compatible.</p><p>This made the migration <strong>a low-risk optimization opportunity</strong>.</p><h3>Target Architecture</h3><p>The goal of the migration was straightforward:</p><p>Replace the existing Intel-based worker nodes with <strong>AMD-based instances</strong> while keeping the rest of the cluster unchanged.</p><p>The updated architecture looked like this:</p><pre>ROSA Cluster<br>│<br>├── Control Plane (Managed by Red Hat)<br>│<br>└── Worker Nodes<br>       └── AMD-based EC2 instances</pre><p>Since only the <strong>compute layer was changing</strong>, application deployments and cluster configurations remained unaffected.</p><h3>Migration Strategy</h3><p>To ensure service availability during the migration, we used a <strong>rolling worker node replacement strategy</strong>.</p><p>Instead of replacing all nodes at once, we followed a gradual process:</p><ol><li>Create a new <strong>MachinePool</strong> with AMD-based worker nodes</li><li>Allow the new nodes to join the cluster</li><li>Move workloads from old nodes to the new nodes</li><li>Validate application health</li><li>Decommission the old worker nodes</li></ol><p>This strategy ensured <strong>continuous workload availability and minimal operational risk</strong>.</p><h3>Step-by-Step Migration Process</h3><h4>Step 1 — Create a New MachinePool</h4><p>The first step was to provision a new <strong>MachinePool</strong> with the target instance type.</p><p>From the <strong>OpenShift console</strong>:</p><ol><li>Navigate to the cluster dashboard</li><li>Open the <strong>Machine Pools</strong> section</li><li>Create a new MachinePool</li><li>Select the desired AMD-based instance family</li></ol><p>Once created, the new worker nodes automatically joined the cluster.</p><p>To verify that the nodes were ready:</p><pre>oc get nodes</pre><p>The new nodes appeared in the cluster with <strong>Ready status</strong>.</p><h4>Step 2 — Verify Cluster Health</h4><p>Before starting the migration, it was important to ensure that the cluster was operating normally.</p><p>Cluster operators were validated using:</p><pre>oc get co</pre><p>Next, we verified the machine resources associated with the existing worker nodes:</p><pre>oc get machine -n openshift-machine-api</pre><p>This helped identify the nodes belonging to the <strong>original worker node pool</strong>.</p><h4>Step 3 — Safely Drain Existing Worker Nodes</h4><p>Kubernetes provides mechanisms to safely migrate workloads between nodes. Two key commands were used during the process.</p><p><strong>Cordon</strong></p><p>Cordoning prevents new workloads from scheduling on a node.</p><pre>oc adm cordon &lt;node-name&gt;</pre><p><strong>Drain</strong></p><p>Draining evicts running pods from the node and reschedules them onto other available nodes.</p><pre>oc adm drain &lt;node-name&gt; \<br>--ignore-daemonsets \<br>--delete-emptydir-data \<br>--force</pre><p>Each node was drained <strong>one at a time</strong> to ensure workloads remained available.</p><p>As nodes were drained, pods were automatically scheduled on the <strong>new AMD worker nodes</strong>.</p><h4>Step 4 — Validate Application Health</h4><p>Once workloads had moved to the new nodes, we performed several validation checks.</p><p>These included:</p><ul><li>Verifying pod health and status</li><li>Monitoring cluster metrics</li><li>Confirming application functionality</li><li>Ensuring deployment synchronization through the deployment platform</li></ul><p>These checks confirmed that the workloads were <strong>running successfully on the new worker nodes</strong>.</p><h4>Step 5 — Decommission the Old Worker Nodes</h4><p>After verifying that all workloads were running correctly on the new nodes, the final step was to remove the old infrastructure.</p><p>This involved:</p><ol><li>Scaling down the original MachinePool</li><li>Confirming that no workloads were running on the old nodes</li><li>Removing the old worker node pool from the cluster</li></ol><p>At this stage, the migration was complete and the cluster was fully operating on the <strong>new AMD-based infrastructure</strong>.</p><h3>Impact Analysis</h3><p>The migration only affected the <strong>underlying compute infrastructure</strong>.</p><p>During the process:</p><ul><li>Pods were restarted as part of the draining procedure</li><li>Kubernetes automatically rescheduled workloads</li><li>Application configurations remained unchanged</li><li>Because workloads were deployed with multiple replicas, Kubernetes services continued routing traffic to healthy pods during the migration.</li></ul><p>Overall, the migration was completed <strong>without functional impact to applications</strong>.</p><h3>Downtime Considerations</h3><p>Because the migration followed a <strong>rolling replacement strategy</strong>, workloads were moved gradually across nodes.</p><p>This ensured that <strong>applications remained available throughout the process</strong>.</p><p>Proper workload distribution across nodes helped avoid any service interruption.</p><h3>Rollback Strategy</h3><p>Any production change should include a clear rollback plan.</p><p>If any issues had occurred during the migration, the rollback process would involve:</p><ol><li>Scaling the original worker node pool back up</li><li>Allowing workloads to reschedule onto those nodes</li><li>Restoring the previous infrastructure configuration</li></ol><p>Since no application-level changes were involved, rollback could be performed quickly and safely.</p><h3>Lessons Learned</h3><p>This migration reinforced several key operational practices.</p><ul><li><strong>Rolling node replacement reduces operational risk — </strong>Gradual migration ensures workloads remain available and prevents cluster instability.</li><li><strong>MachinePools simplify infrastructure upgrades — </strong>OpenShift MachinePools provide a powerful mechanism for managing worker node infrastructure.</li><li><strong>Instance family optimization matters — </strong>Switching to newer instance families can significantly improve cost efficiency without affecting performance.</li><li><strong>Validation is essential — </strong>Cluster health checks and application testing play a critical role in ensuring successful infrastructure changes.</li></ul><p>Infrastructure optimization does not always require complex architectural redesign.</p><p>Sometimes, simple improvements — such as selecting the right instance family — can deliver meaningful cost savings while maintaining reliability and performance.</p><p>By implementing a <strong>rolling MachinePool migration strategy</strong>, we successfully transitioned our OpenShift worker nodes from Intel-based instances to AMD-based infrastructure without downtime.</p><p>For teams operating Kubernetes or OpenShift clusters in production, this approach can be an effective way to <strong>improve cost efficiency while maintaining operational stability</strong>.</p><blockquote>If you’re operating Kubernetes or OpenShift clusters in production, I’d love to hear how you approach infrastructure optimization and worker node upgrades.</blockquote><p>#OpenShift #AWS #Kubernetes #DevOps #CostOptimization</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a17ff363488e" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/migrating-openshift-worker-nodes-from-intel-to-amd-on-aws-a-cost-optimization-journey-without-a17ff363488e">Migrating OpenShift Worker Nodes from Intel to AMD on AWS — A Cost Optimization Journey Without…</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an Automated AWS Cloud Governance System Using Lambda, EventBridge & SES]]></title>
            <link>https://aws.plainenglish.io/building-an-automated-aws-cloud-governance-system-using-lambda-eventbridge-ses-7160e6f0ec56?source=rss-720e01fb94e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/7160e6f0ec56</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Shivani Kumari @CloudDevOps Engineer]]></dc:creator>
            <pubDate>Sat, 21 Feb 2026 11:54:39 GMT</pubDate>
            <atom:updated>2026-02-21T12:32:18.712Z</atom:updated>
            <content:encoded><![CDATA[<h4>Cloud governance is often discussed in theory.<br>But what if we automate it — fully serverless, scheduled, and production-ready?</h4><p>As cloud environments scale, governance becomes less about visibility — and more about automation.</p><p>Manual audits don’t scale. Spreadsheets don’t prevent risk. And reactive monitoring is already too late.</p><p>So I designed and implemented a fully serverless, automated Cloud Governance Framework on AWS that:</p><blockquote>Identifies security exposures</blockquote><blockquote>Validates compliance tagging</blockquote><blockquote>Generates structured audit reports</blockquote><blockquote>Notifies stakeholders automatically</blockquote><blockquote>Runs on a scheduled basis</blockquote><p>In this blog, I’ll walk through how I built an end-to-end <strong>AWS Cloud Governance Automation System</strong> using:</p><ul><li>AWS Lambda</li><li>Amazon EventBridge</li><li>Amazon S3</li><li>Amazon SES</li><li>IAM</li><li>CloudWatch</li></ul><p>This system automatically audits cloud resources, generates reports, stores them in S3, and sends email notifications — without manual intervention.</p><h3>Architecture Overview</h3><p><strong>EventBridge (Scheduled Rule)</strong><br> ⬇<br> <strong>Lambda (Governance Engine)</strong><br> ⬇<br> <strong>S3 (CSV Report Storage)</strong><br> ⬇<br> <strong>SES (Email Notification)</strong></p><h4>Step 1: IAM Role &amp; Policy Configuration</h4><p>Security first.</p><p>I created a dedicated IAM role:</p><p><strong>Role Name:</strong> LambdaCloudGovernanceRole<br> <strong>Trusted Entity:</strong> lambda.amazonaws.com</p><p><strong>IAM Policy (Least Privilege)</strong></p><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Sid&quot;: &quot;EC2ReadOnlyAccess&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: [<br>                &quot;ec2:DescribeInstances&quot;,<br>                &quot;ec2:DescribeVolumes&quot;,<br>                &quot;ec2:DescribeSecurityGroups&quot;<br>            ],<br>            &quot;Resource&quot;: &quot;*&quot;<br>        },<br>        {<br>            &quot;Sid&quot;: &quot;CloudWatchMetricsReadOnly&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: [<br>                &quot;cloudwatch:GetMetricStatistics&quot;<br>            ],<br>            &quot;Resource&quot;: &quot;*&quot;<br>        },<br>        {<br>            &quot;Sid&quot;: &quot;RDSReadOnlyAccess&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: [<br>                &quot;rds:DescribeDBInstances&quot;,<br>                &quot;rds:ListTagsForResource&quot;<br>            ],<br>            &quot;Resource&quot;: &quot;*&quot;<br>        },<br>        {<br>            &quot;Sid&quot;: &quot;S3WriteToSpecificBucket&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: [<br>                &quot;s3:PutObject&quot;<br>            ],<br>            &quot;Resource&quot;: &quot;arn:aws:s3:::cloud-governance-test-xxx/reports/*&quot;<br>        },<br>        {<br>            &quot;Sid&quot;: &quot;SESSendEmailFromVerifiedIdentity&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: [<br>                &quot;ses:SendEmail&quot;<br>            ],<br>            &quot;Resource&quot;: &quot;*&quot;<br>        },<br>        {<br>            &quot;Sid&quot;: &quot;CloudWatchLogsWriteAccess&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: [<br>                &quot;logs:CreateLogGroup&quot;,<br>                &quot;logs:CreateLogStream&quot;,<br>                &quot;logs:PutLogEvents&quot;<br>            ],<br>            &quot;Resource&quot;: &quot;arn:aws:logs:AWS_REGION:ACCOUNT_ID:*&quot;<br>        }<br>    ]<br>}</pre><p>This allows:</p><ul><li>EC2 inspection</li><li>CloudWatch metrics and logs retrieval</li><li>RDS validation</li><li>S3 report upload</li><li>SES email sending</li></ul><p>IAM Role trust relationship:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*94_mx3Zpb04RQM6Y1TOAfg.png" /></figure><h4>Step 2: S3 Bucket Setup</h4><p>Bucket created:</p><pre>cloud-governance-test-351</pre><p>Folder structure:</p><pre>reports/test/</pre><p>Reports generated as:</p><pre>cloud_governance_YYYY-MM-DD.csv</pre><p>S3 report validation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U7Lx4gHSAMq1JzsPa-jElQ.png" /></figure><h4>Step 3: Amazon SES Configuration</h4><p>To send reports via email:</p><ol><li>Created Email Identity</li><li>Verified sender email</li><li>Verified recipient email</li><li>Confirmed verification via AWS email link</li></ol><p>SES Identity Verification:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fDJlRI1pQOV7Zbly3M92Jw.png" /></figure><p>Verification Success:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OOHhEp0b7Ty2Mxvine3-gw.png" /></figure><h4>Step 4: Lambda Function — Governance Engine</h4><p><strong>Function Name:</strong> my-cloud-governance<br> <strong>Runtime:</strong> Python 3.10<br> <strong>Memory:</strong> 128 MB<br> <strong>Trigger:</strong> EventBridge (cron)</p><h4>Lambda Governance Checks Implemented</h4><p><strong>1️⃣ Idle EC2 Detection</strong></p><ul><li>Checks CPU utilization</li><li>14-day average</li><li>Flags instances below 5%</li></ul><p><strong>2️⃣ Orphaned EBS Volumes</strong></p><ul><li>Detects volumes with status = available</li></ul><p><strong>3️⃣ RDS Business Hour Validation</strong></p><ul><li>Validates BusinessHours tag</li><li>Detects running outside defined window</li></ul><p><strong>4️⃣ Security Groups Open to World</strong></p><ul><li>Detects inbound 0.0.0.0/0</li><li>Detects outbound 0.0.0.0/0</li></ul><p>Example finding:</p><pre>sg-0e3619bc49515c988 | Outbound open to world</pre><p>Generated CSV Report(Testing Purpose):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*YMDi5ogjurohn01o30YheQ.png" /></figure><h4>Lambda Code (Core Logic)</h4><p>NOTE : Created for testing every 5 min(Testing purpose)</p><p>Here is the governance engine:</p><pre>import boto3<br>import csv<br>import os<br>from datetime import datetime, timedelta<br>from io import StringIO<br><br>ec2 = boto3.client(&#39;ec2&#39;)<br>cw = boto3.client(&#39;cloudwatch&#39;)<br>rds = boto3.client(&#39;rds&#39;)<br>s3 = boto3.client(&#39;s3&#39;)<br>ses = boto3.client(&#39;ses&#39;, region_name=&#39;us-east-1&#39;)<br><br>BUCKET = os.environ[&#39;REPORT_BUCKET&#39;]<br>EMAIL_FROM = os.environ[&#39;EMAIL_FROM&#39;]<br>EMAIL_TO = os.environ[&#39;EMAIL_TO&#39;]<br>FREQ = os.environ.get(&#39;REPORT_FREQUENCY&#39;, &#39;weekly&#39;)<br><br>def get_idle_ec2():<br>    result = []<br>    end = datetime.utcnow()<br>    start = end - timedelta(days=14)<br><br>    for r in ec2.describe_instances()[&#39;Reservations&#39;]:<br>        for i in r[&#39;Instances&#39;]:<br>            if i[&#39;State&#39;][&#39;Name&#39;] != &#39;running&#39;:<br>                continue<br><br>            metrics = cw.get_metric_statistics(<br>                Namespace=&#39;AWS/EC2&#39;,<br>                MetricName=&#39;CPUUtilization&#39;,<br>                Dimensions=[{&#39;Name&#39;: &#39;InstanceId&#39;, &#39;Value&#39;: i[&#39;InstanceId&#39;]}],<br>                StartTime=start,<br>                EndTime=end,<br>                Period=86400,<br>                Statistics=[&#39;Average&#39;]<br>            )<br><br>            if metrics[&#39;Datapoints&#39;]:<br>                avg = sum(d[&#39;Average&#39;] for d in metrics[&#39;Datapoints&#39;]) / len(metrics[&#39;Datapoints&#39;])<br>                if avg &lt; 5:<br>                    result.append([i[&#39;InstanceId&#39;], i[&#39;InstanceType&#39;], round(avg, 2)])<br>    return result<br><br>def get_orphaned_ebs():<br>    return [[v[&#39;VolumeId&#39;], v[&#39;Size&#39;], v[&#39;VolumeType&#39;]]<br>            for v in ec2.describe_volumes(<br>                Filters=[{&#39;Name&#39;: &#39;status&#39;, &#39;Values&#39;: [&#39;available&#39;]}]<br>            )[&#39;Volumes&#39;]]<br><br>def get_rds_violations():<br>    result = []<br>    hour = datetime.utcnow().hour<br><br>    for db in rds.describe_db_instances()[&#39;DBInstances&#39;]:<br>        tags = rds.list_tags_for_resource(<br>            ResourceName=db[&#39;DBInstanceArn&#39;]<br>        )[&#39;TagList&#39;]<br><br>        bh = next((t[&#39;Value&#39;] for t in tags if t[&#39;Key&#39;] == &#39;BusinessHours&#39;), None)<br><br>        if not bh:<br>            result.append([db[&#39;DBInstanceIdentifier&#39;], &#39;Missing BusinessHours tag&#39;])<br>            continue<br><br>        start, end = map(int, bh.split(&#39;-&#39;))<br>        if hour &lt; start or hour &gt; end:<br>            result.append([db[&#39;DBInstanceIdentifier&#39;], &#39;Running outside business hours&#39;])<br>    return result<br><br>def get_sg_issues():<br>    issues = []<br>    for sg in ec2.describe_security_groups()[&#39;SecurityGroups&#39;]:<br><br>        # Inbound<br>        for rule in sg.get(&#39;IpPermissions&#39;, []):<br>            for ip in rule.get(&#39;IpRanges&#39;, []):<br>                if ip.get(&#39;CidrIp&#39;) == &#39;0.0.0.0/0&#39;:<br>                    issues.append([sg[&#39;GroupId&#39;], &#39;Inbound open to world&#39;, rule.get(&#39;FromPort&#39;)])<br><br>        # Outbound<br>        for rule in sg.get(&#39;IpPermissionsEgress&#39;, []):<br>            for ip in rule.get(&#39;IpRanges&#39;, []):<br>                if ip.get(&#39;CidrIp&#39;) == &#39;0.0.0.0/0&#39;:<br>                    issues.append([sg[&#39;GroupId&#39;], &#39;Outbound open to world&#39;, rule.get(&#39;FromPort&#39;)])<br><br>    return issues<br><br>def build_csv(ec2_data, ebs_data, rds_data, sg_data):<br>    output = StringIO()<br>    w = csv.writer(output)<br><br>    w.writerow([&#39;Idle EC2 Instances&#39;])<br>    w.writerow([&#39;InstanceId&#39;, &#39;Type&#39;, &#39;AvgCPU&#39;])<br>    w.writerows(ec2_data)<br><br>    w.writerow([])<br>    w.writerow([&#39;Orphaned EBS Volumes&#39;])<br>    w.writerow([&#39;VolumeId&#39;, &#39;SizeGB&#39;, &#39;Type&#39;])<br>    w.writerows(ebs_data)<br><br>    w.writerow([])<br>    w.writerow([&#39;RDS Business Hour Violations&#39;])<br>    w.writerow([&#39;DBInstance&#39;, &#39;Issue&#39;])<br>    w.writerows(rds_data)<br><br>    w.writerow([])<br>    w.writerow([&#39;Security Group Issues&#39;])<br>    w.writerow([&#39;SG-ID&#39;, &#39;Issue&#39;, &#39;Port&#39;])<br>    w.writerows(sg_data)<br><br>    return output.getvalue()<br><br>def lambda_handler(event, context):<br>    report = build_csv(<br>        get_idle_ec2(),<br>        get_orphaned_ebs(),<br>        get_rds_violations(),<br>        get_sg_issues()<br>    )<br><br>    key = f&quot;reports/{FREQ}/cloud_governance_{datetime.utcnow().date()}.csv&quot;<br><br>    s3.put_object(Bucket=BUCKET, Key=key, Body=report)<br><br>    ses.send_email(<br>        Source=EMAIL_FROM,<br>        Destination={&#39;ToAddresses&#39;: [EMAIL_TO]},<br>        Message={<br>            &#39;Subject&#39;: {&#39;Data&#39;: &#39;AWS Cloud Governance Report&#39;},<br>            &#39;Body&#39;: {<br>                &#39;Text&#39;: {&#39;Data&#39;: f&#39;Report generated successfully.\nS3 Path: s3://{BUCKET}/{key}&#39;}<br>            }<br>        }<br>    )<br><br>    return {&#39;status&#39;: &#39;SUCCESS&#39;}</pre><p>Lambda Execution Success:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vi0Sr8i0iZn0xpi38aAnOg.png" /></figure><p>CloudWatch Logs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aL2cbMPF-KtNQit0S27j0w.png" /></figure><h4>Step 5: EventBridge Scheduling</h4><p>Created rule:</p><p><strong>Name:</strong> cloud-governance-test<br> <strong>Schedule:</strong> Every 5 minutes (Testing)</p><pre>cron(0/5 * * * ? *)</pre><p>EventBridge Rule:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YXYClLpkwrx77q_dtZrnKQ.png" /></figure><p>Production-ready schedules could be:</p><ul><li>Weekly: cron(0 9 ? * MON *)</li><li>Monthly: cron(0 9 1 * ? *)</li></ul><h3>Final Outcome</h3><p>✔ Automated Governance Framework<br> ✔ Scheduled Compliance Monitoring<br> ✔ Cost Optimization Visibility<br> ✔ Security Exposure Detection<br> ✔ Email-based Reporting<br> ✔ Serverless Architecture</p><p>This is not just a script.</p><p>It’s a scalable governance system that can be extended to:</p><ul><li>Multi-account monitoring</li><li>Security Hub integration</li><li>Slack notifications</li><li>HTML formatted reports</li><li>Severity classification</li></ul><h3>Why This Project Matters</h3><p>This project demonstrates:</p><ul><li>Real-world AWS automation</li><li>Security-first IAM design</li><li>Event-driven architecture</li><li>Governance engineering mindset</li><li>Cost optimization awareness</li><li>End-to-end implementation capability</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7160e6f0ec56" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/building-an-automated-aws-cloud-governance-system-using-lambda-eventbridge-ses-7160e6f0ec56">Building an Automated AWS Cloud Governance System Using Lambda, EventBridge &amp; SES</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Managing 10+ Kubernetes Clusters Taught Me — And Why OpenShift ACM Changed Everything]]></title>
            <link>https://medium.com/devsecops-community/what-managing-10-kubernetes-clusters-taught-me-and-why-openshift-acm-changed-everything-7455ce56a9b4?source=rss-720e01fb94e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/7455ce56a9b4</guid>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[gitops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[openshift]]></category>
            <dc:creator><![CDATA[Shivani Kumari @CloudDevOps Engineer]]></dc:creator>
            <pubDate>Sun, 08 Feb 2026 15:48:36 GMT</pubDate>
            <atom:updated>2026-02-26T18:26:50.860Z</atom:updated>
            <content:encoded><![CDATA[<h3>What Managing 20+ Kubernetes Clusters Taught Me — And Why OpenShift ACM Changed Everything</h3><h4>A DevOps engineer’s real-world experience with multi-cluster chaos, governance, and sanity</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*U3YNPjs6BepLvnBi.png" /></figure><h3>How enterprises manage, secure, and scale Kubernetes across hybrid and multi-cloud environments?</h3><p>Modern enterprises no longer run workloads on a single Kubernetes cluster. Today’s reality is <strong>hybrid and multi-cloud</strong> — clusters spread across on-premises data centers, public clouds, and even edge locations.</p><p>But here’s the real challenge<br> 👉 <em>How do you manage, secure, and govern dozens (or hundreds) of Kubernetes clusters without chaos?</em></p><p>This is where <strong>OpenShift Advanced Cluster Management (ACM)</strong> steps in as a <strong>game-changer</strong> for platform, DevOps, and SRE teams.</p><h3>Why Multi-Cluster Kubernetes Becomes a Problem at Scale</h3><p>Managing one cluster is manageable.<br>Managing <strong>20+ clusters across AWS, Azure, GCP, on-prem, and edge</strong> is a different story.</p><p>Teams often struggle with:</p><ul><li>Fragmented visibility across clusters</li><li>Inconsistent security and compliance</li><li>Manual upgrades and configuration drift</li><li>Complex application deployments</li><li>Rising operational costs</li></ul><p>Without a centralized control plane, Kubernetes quickly turns from an enabler into an operational burden.</p><h3>What Is OpenShift Advanced Cluster Management (ACM)?</h3><p><strong>OpenShift Advanced Cluster Management (ACM)</strong> provides a <strong>single control plane</strong> to manage <strong>multiple OpenShift and Kubernetes clusters</strong> from one console.</p><p>ACM helps organizations:</p><ul><li>Manage cluster lifecycles</li><li>Enforce governance and security policies</li><li>Deploy applications consistently using GitOps</li><li>Gain real-time observability across environments</li></ul><h3>Core Capabilities That Make ACM Powerful</h3><h4>1️⃣ Centralized Cluster Lifecycle Management</h4><p>ACM automates:</p><ul><li>Cluster creation and import</li><li>Version upgrades</li><li>Scaling and configuration</li><li>Policy-based maintenance</li></ul><p>This removes manual errors and ensures <strong>consistent cluster operations</strong> across environments.</p><h4>2️⃣ Policy-Driven Governance, Risk, and Compliance (GRC)</h4><p>Security and compliance are no longer optional.</p><p>ACM allows teams to:</p><ul><li>Define security and compliance policies once</li><li>Automatically enforce them across <strong>all clusters</strong></li><li>Detect and remediate violations in real time</li></ul><p>This is especially critical for organizations following <strong>ISO, SOC2, or PCI-DSS</strong> standards.</p><h4>3️⃣ GitOps-Based Application Lifecycle Management</h4><p>With ACM, applications can be deployed across multiple clusters using <strong>Git as the source of truth</strong>.</p><p>Benefits include:</p><ul><li>Faster, version-controlled deployments</li><li>Easy rollbacks</li><li>Consistent configurations</li><li>Reduced deployment risk</li></ul><p>This aligns perfectly with <strong>modern DevOps and GitOps practices</strong>.</p><h4>4️⃣ Built-In Observability Across Clusters</h4><p>ACM provides a <strong>single dashboard</strong> to:</p><ul><li>Monitor cluster health</li><li>Track performance metrics</li><li>Receive alerts for proactive issue resolution</li></ul><p>Instead of jumping between tools, teams gain <strong>end-to-end visibility</strong> from one place.</p><h3>Business Value: Why Organizations Adopt ACM</h3><h4>💰 Cost and Resource Optimization</h4><p>By centralizing operations:</p><ul><li>Tool sprawl is reduced</li><li>Resource usage becomes visible</li><li>Workloads can be optimized and auto-scaled</li></ul><p>This directly translates to <strong>lower operational costs</strong>.</p><h4>📈 Scalability Without Vendor Lock-In</h4><p>ACM can manage <strong>hundreds of clusters</strong> across:</p><ul><li>On-premises</li><li>AWS, Azure, GCP</li><li>Edge environments</li></ul><p>Organizations gain flexibility to place workloads where they make the most sense — without being tied to a single vendor.</p><h4>🤝 Better Collaboration Between Teams</h4><p>ACM clearly separates responsibilities:</p><ul><li>Platform/IT teams manage security, compliance, and clusters</li><li>Developers focus on application delivery</li></ul><p>This shared visibility improves collaboration and <strong>accelerates innovation</strong>.</p><h4>🔐 Stronger Security Posture</h4><p>With continuous monitoring and automated policy enforcement, ACM helps organizations:</p><ul><li>Detect misconfigurations early</li><li>Reduce human error</li><li>Maintain consistent security across clusters</li></ul><p>Security becomes <strong>proactive</strong>, not reactive.</p><h3>Seamless Integration with the OpenShift Ecosystem</h3><p>ACM works hand-in-hand with:</p><ul><li><strong>Quay</strong> for container image management</li><li><strong>Advanced Cluster Security (ACS)</strong> for runtime threat detection</li><li><strong>OpenShift Data Foundation</strong> for storage management</li></ul><p>Together, they form a <strong>complete hybrid cloud management platform.</strong></p><h3>Real-World Use Cases Where ACM Shines</h3><p>✔ Hybrid cloud governance<br> ✔ Multi-cluster application deployments<br> ✔ Automated compliance and remediation<br> ✔ Edge and remote cluster management<br> ✔ Disaster recovery using GitOps backups</p><p>These use cases make ACM highly valuable for industries like <strong>finance, healthcare, manufacturing, and retail</strong>.</p><h3>Strategic Impact on the Organization</h3><ul><li><strong>Operational Efficiency:</strong> Less manual work, fewer errors</li><li><strong>Risk Reduction:</strong> Automated security and compliance</li><li><strong>Business Agility:</strong> Faster deployments and scaling</li><li><strong>Future-Ready Platforms:</strong> Built for cloud-native growth</li></ul><p>ACM enables teams to focus on <strong>innovation</strong>, not infrastructure firefighting.</p><h3>Final Thoughts</h3><p>As Kubernetes environments grow more complex, <strong>OpenShift Advanced Cluster Management</strong> becomes essential — not optional.</p><p>By offering:</p><ul><li>Centralized control</li><li>Policy-driven governance</li><li>GitOps-based application delivery</li><li>Enterprise-grade security</li></ul><p>ACM empowers organizations to manage Kubernetes <strong>at scale</strong>, <strong>securely</strong>, and <strong>efficiently</strong>.</p><p>If you’re serious about hybrid or multi-cloud Kubernetes, <strong>ACM is a platform you can’t afford to ignore.</strong></p><h3>DevSecOps — Community 🚀</h3><p><em>Thank you for being a part of the </em><a href="https://medium.com/devsecops-community/devopsin90days/home"><strong><em>DevSecOps — Community</em></strong></a><strong><em> </em></strong><em>community! Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> ️ the Author👏<strong>️️</strong></li><li>Follow: <a href="https://medium.com/devsecops-community/newsletters/devsecops"><strong>Newsletter</strong></a> |<a href="https://www.linkedin.com/groups/14547253/"> <strong>LinkedIn Group</strong></a><strong>s </strong>|</li><li>More content at <a href="https://medium.com/devsecops-community/devopsin90days/home"><strong>DevSecOps — Community</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7455ce56a9b4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devsecops-community/what-managing-10-kubernetes-clusters-taught-me-and-why-openshift-acm-changed-everything-7455ce56a9b4">What Managing 10+ Kubernetes Clusters Taught Me — And Why OpenShift ACM Changed Everything</a> was originally published in <a href="https://medium.com/devsecops-community">devsecops-community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>