<?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 Sapna Yadav on Medium]]></title>
        <description><![CDATA[Stories by Sapna Yadav on Medium]]></description>
        <link>https://medium.com/@sapnarsy2612?source=rss-a2845e2f30ab------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*8M15ijfQb_IJtT7n</url>
            <title>Stories by Sapna Yadav on Medium</title>
            <link>https://medium.com/@sapnarsy2612?source=rss-a2845e2f30ab------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 30 May 2026 09:18:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sapnarsy2612/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[Resolving 403 Errors on API (Cloudflare WAF Block)]]></title>
            <link>https://medium.com/@sapnarsy2612/resolving-403-errors-on-api-cloudflare-waf-block-b44f5f15fd9b?source=rss-a2845e2f30ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/b44f5f15fd9b</guid>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[waf]]></category>
            <dc:creator><![CDATA[Sapna Yadav]]></dc:creator>
            <pubDate>Wed, 22 Apr 2026 15:43:17 GMT</pubDate>
            <atom:updated>2026-04-25T17:29:18.227Z</atom:updated>
            <content:encoded><![CDATA[<p>We recently investigated an issue where clients experienced <strong>HTTP 403 Forbidden errors</strong> while uploading images via the API:</p><ul><li><strong>PRE:</strong><br> <a href="https://mi-non-financial-transactions.insure-pre.momentum.co.za/VehicleInspectionApi/v1/uploadImage">https://**********/Ve*****/v1/up****e</a></li><li><strong>PROD:</strong><br> <a href="https://mi-non-financial-transactions.insure-pre.momentum.co.za/VehicleInspectionApi/v1/uploadImage">https://**********/Ve*****/v1/up****e</a></li></ul><p>Despite the error on the client side, backend logs confirmed that:</p><ul><li>No corresponding <strong>403 errors were generated by the application.</strong></li></ul><h3>🔍 Initial Observations</h3><ul><li>Client received a <strong>Cloudflare HTML error page</strong> (not a backend JSON response)</li><li>Error message: <em>“Client error — the request contains bad syntax or cannot be fulfilled”</em></li><li>Backend logs showed <strong>successful processing.</strong></li><li>Issue appeared <strong>intermittent .</strong></li></ul><p>No clear error patterns found in:</p><ul><li>Application logs</li><li>Kubernetes pod logs</li><li>Service-level logging.</li></ul><h3>🧭 Investigation Journey</h3><h3>1. Infrastructure Checks</h3><ul><li>Reviewed <strong>ALB (Application Load Balancer)</strong>:</li><li>~72 routing rules configured</li><li>Default fallback route → 404</li><li>Verified correct routing for affected domain</li><li>Traced traffic flow:</li><li><strong>Cloudflare → ALB → Target Group → EKS Pods</strong></li></ul><h3>2. Kubernetes (EKS) Analysis</h3><ul><li>Identified:</li><li>Pod restart occurred ~5 days prior (around issue timeline)</li><li>However:</li><li>No <strong>403-related logs</strong></li><li>No application-level failures</li></ul><p>➡️ Conclusion: Issue <strong>not originating from application or pods .</strong></p><h3>3. Key Breakthrough: Cloudflare Layer</h3><p>Evidence pointing to Cloudflare:</p><ul><li>Response contained <strong>Cloudflare-branded HTML</strong></li><li>Presence of <strong>CF-Ray ID</strong></li><li>No matching backend error logs .</li></ul><pre><br>I/flutter ( 4966): *** Response ***<br>I/flutter ( 4966): uri: ***********<br>I/flutter ( 4966): statusCode: 403<br>I/flutter ( 4966): statusMessage: Forbidden<br>I/flutter ( 4966): headers:<br>I/flutter ( 4966):  connection: keep-alive<br>I/flutter ( 4966):  cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0<br>I/flutter ( 4966):  transfer-encoding: chunked<br>I/flutter ( 4966):  date: Wed, 22 Apr 2026 08:53:48 GMT<br>I/flutter ( 4966):  vary: accept-encoding<br>I/flutter ( 4966):  content-encoding: gzip<br>I/flutter ( 4966):  strict-transport-security: max-age=0; includeSubDomains<br>I/flutter ( 4966):  referrer-policy: same-origin<br>I/flutter ( 4966):  server-timing: cfEdge;dur=149,cfOrigin;dur=0<br>I/flutter ( 4966):  content-type: text/html; charset=UTF-8<br>I/flutter ( 4966):  server: cloudflare<br>I/flutter ( 4966):  cf-ray: 9fc-JNB<br>I/flutter ( 4966):  x-frame-options: SAMEORIGIN<br>I/flutter ( 4966):  expires: Thu, 01 Jan 1970 00:00:01 GMT<br>I/flutter ( 4966): Response Text:<br>I/flutter ( 4966): &lt;!DOCTYPE html&gt;<br>I/flutter ( 4966): &lt;!--[if lt IE 7]&gt; &lt;html class=&quot;no-js ie6 oldie&quot; lang=&quot;en-US&quot;&gt; &lt;![endif]--&gt;<br>I/flutter ( 4966): &lt;!--[if IE 7]&gt;    &lt;html class=&quot;no-js ie7 oldie&quot; lang=&quot;en-US&quot;&gt; &lt;![endif]--&gt;<br>I/flutter ( 4966): &lt;!--[if IE 8]&gt;    &lt;html class=&quot;no-js ie8 oldie&quot; lang=&quot;en-US&quot;&gt; &lt;![endif]--&gt;<br>I/flutter ( 4966): &lt;!--[if gt IE 8]&gt;&lt;!--&gt; &lt;html class=&quot;no-js&quot; lang=&quot;en-US&quot;&gt; &lt;!--&lt;![endif]--&gt;<br>I/flutter ( 4966): &lt;head&gt;<br>I/flutter ( 4966): &lt;title&gt;Attention Required! | Cloudflare&lt;/title&gt;<br>I/flutter ( 4966): &lt;meta charset=&quot;UTF-8&quot; /&gt;<br>I/flutter ( 4966): &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;<br>I/flutter ( 4966): &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=Edge&quot; /&gt;<br>I/flutter ( 4966): &lt;meta name=&quot;robots&quot; content=&quot;noindex, nofollow&quot; /&gt;<br>I/flutter ( 4966): &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width,initial-scale=1&quot; /&gt;<br>I/flutter ( 4966): &lt;link rel=&quot;stylesheet&quot; id=&quot;cf_styles-css&quot; href=&quot;/cdn-cgi/styles/cf.errors.css&quot; /&gt;<br>I/flutter ( 4966): &lt;!--[if lt IE 9]&gt;&lt;link rel=&quot;stylesheet&quot; id=&#39;cf_styles-ie-css&#39; href=&quot;/cdn-cgi/styles/cf.errors.ie.css&quot; /&gt;&lt;![endif]--&gt;<br>I/flutter ( 4966): &lt;style&gt;body{margin:0;padding:0}&lt;/style&gt;<br>2<br>I/flutter ( 4966): <br>I/flutter ( 4966): &lt;!--[if gte IE 10]&gt;&lt;!--&gt;<br>I/flutter ( 4966): &lt;script&gt;<br>I/flutter ( 4966):   if (!navigator.cookieEnabled) {<br>I/flutter ( 4966):     window.addEventListener(&#39;DOMContentLoaded&#39;, function () {<br>I/flutter ( 4966):       var cookieEl = document.getElementById(&#39;cookie-alert&#39;);<br>I/flutter ( 4966):       cookieEl.style.display = &#39;block&#39;;<br>I/flutter ( 4966):     })<br>I/flutter ( 4966):   }<br>I/flutter ( 4966): &lt;/script&gt;<br>I/flutter ( 4966): &lt;!--&lt;![endif]--&gt;<br>I/flutter ( 4966): <br>I/flutter ( 4966): &lt;/head&gt;<br>I/flutter ( 4966): &lt;body&gt;<br>I/flutter ( 4966):   &lt;div id=&quot;cf-wrapper&quot;&gt;<br>I/flutter ( 4966):     &lt;div class=&quot;cf-alert cf-alert-error cf-cookie-error&quot; id=&quot;cookie-alert&quot; data-translate=&quot;enable_cookies&quot;&gt;Please enable cookies.&lt;/div&gt;<br>I/flutter ( 4966):     &lt;div id=&quot;cf-error-details&quot; class=&quot;cf-error-details-wrapper&quot;&gt;<br>I/flutter ( 4966):       &lt;div class=&quot;cf-wrapper cf-header cf-error-overview&quot;&gt;<br>I/flutter ( 4966):         &lt;h1 data-translate=&quot;block_headline&quot;&gt;Sorry, you have been blocked&lt;/h1&gt;<br>I/flutter ( 4966):         &lt;h2 class=&quot;cf-subheadline&quot;&gt;&lt;span data-translate=&quot;unable_to_access&quot;&gt;You are unable to access&lt;/span&gt; &lt;/h2&gt;<br>I/flutter ( 4966):       &lt;/div&gt;&lt;!-- /.header --&gt;<br>I/flutter ( 4966): <br>I/flutter ( 4966):       &lt;div class=&quot;cf-section cf-highlight&quot;&gt;<br>I/flutter ( 4966):         &lt;div class=&quot;cf-wrapper&quot;&gt;<br>I/flutter ( 4966):           &lt;div class=&quot;cf-screenshot-container cf-screenshot-full&quot;&gt;<br>I/flutter ( 4966):             <br>I/flutter ( 4966):               &lt;span class=&quot;cf-no-screenshot error&quot;&gt;&lt;/span&gt;<br>I/flutter ( 4966):             <br>I/flutter ( 4966):           &lt;/div&gt;<br>I/flutter ( 4966):         &lt;/div&gt;<br>I/flutter ( 4966):       &lt;/div&gt;&lt;!-- /.captcha-container --&gt;<br>I/flutter ( 4966): <br>I/flutter ( 4966):       &lt;div class=&quot;cf-section cf-wrapper&quot;&gt;<br>I/flutter ( 4966):         &lt;div class=&quot;cf-columns two&quot;&gt;<br>I/flutter ( 4966):           &lt;div class=&quot;cf-column&quot;&gt;<br>I/flutter ( 4966):             &lt;h2 data-translate=&quot;blocked_why_headline&quot;&gt;Why have I been blocked?&lt;/h2&gt;<br>I/flutter ( 4966): <br>I/flutter ( 4966):             &lt;p data-translate=&quot;blocked_why_detail&quot;&gt;This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.&lt;/p&gt;<br>I/flutter ( 4966):           &lt;/div&gt;<br>I/flutter ( 4966): <br>I/flutter ( 4966):           &lt;div class=&quot;cf-column&quot;&gt;<br>I/flutter ( 4966):             &lt;h2 data-translate=&quot;blocked_resolve_headline&quot;&gt;What can I do to resolve this?&lt;/h2&gt;<br>I/flutter ( 4966): <br>I/flutter ( 4966):             &lt;p data-translate=&quot;blocked_resolve_detail&quot;&gt;You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.&lt;/p&gt;<br>I/flutter ( 4966):           &lt;/div&gt;<br>I/flutter ( 4966):         &lt;/div&gt;<br>I/flutter ( 4966):       &lt;/div&gt;&lt;!-- /.section --&gt;<br>I/flutter ( 4966): <br>I/flutter ( 4966):       &lt;div class=&quot;cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300&quot;&gt;<br>I/flutter ( 4966):     &lt;p class=&quot;text-13&quot;&gt;<br>I/flutter ( 4966):       &lt;span class=&quot;cf-footer-separator sm:hidden&quot;&gt;&amp;bull;&lt;/span&gt;<br>I/flutter ( 4966):       &lt;span id=&quot;cf-footer-item-ip&quot; class=&quot;cf-footer-item hidden sm:block sm:mb-1&quot;&gt;<br>I/flutter ( 4966):         Your IP:<br>I/flutter ( 4966):         &lt;button type=&quot;button&quot; id=&quot;cf-footer-ip-reveal&quot; class=&quot;cf-footer-ip-reveal-btn&quot;&gt;Click to reveal&lt;/button&gt;<br>I/flutter ( 4966):         &lt;span class=&quot;hidden&quot; id=&quot;cf-footer-ip&quot;&gt;169.1.122.127&lt;/span&gt;<br>I/flutter ( 4966):         &lt;span class=&quot;cf-footer-separator sm:hidden&quot;&gt;&amp;bull;&lt;/span&gt;<br>I/flutter ( 4966):       &lt;/span&gt;<br>I/flutter ( 4966):       &lt;span class=&quot;cf-footer-item sm:block sm:mb-1&quot;&gt;&lt;span&gt;Performance &amp;amp; security by&lt;/span&gt; &lt;a rel=&quot;noopener noreferrer&quot; href=&quot;https://www.cloudflare.com/5xx-error-landing&quot; id=&quot;brand_link&quot; target=&quot;_blank&quot;&gt;Cloudflare&lt;/a&gt;&lt;/span&gt;<br>I/flutter ( 4966):       <br>I/flutter ( 4966):     &lt;/p&gt;<br>I/flutter ( 4966):     &lt;script&gt;(function(){function d(){var b=a.getElementById(&quot;cf-footer-item-ip&quot;),c=a.getElementById(&quot;cf-footer-ip-reveal&quot;);b&amp;&amp;&quot;classList&quot;in b&amp;&amp;(b.classList.remove(&quot;hidden&quot;),c.addEventListener(&quot;click&quot;,function(){c.classList.add(&quot;hidden&quot;);a.getElementById(&quot;cf-footer-ip&quot;).classList.remove(&quot;hidden&quot;)}))}var a=document;document.addEventListener&amp;&amp;a.addEventListener(&quot;DOMContentLoaded&quot;,d)})();&lt;/script&gt;<br>I/flutter ( 4966):   &lt;/div&gt;&lt;!-- /.error-footer --&gt;<br>I/flutter ( 4966): <br>I/flutter ( 4966):     &lt;/div&gt;&lt;!-- /#cf-error-details --&gt;<br>I/flutter ( 4966):   &lt;/div&gt;&lt;!-- /#cf-wrapper --&gt;<br>I/flutter ( 4966): <br>I/flutter ( 4966):   &lt;script&gt;<br>I/flutter ( 4966):     window._cf_translation = {};<br>2<br>I/flutter ( 4966):     <br>I/flutter ( 4966):   &lt;/script&gt;<br>I/flutter ( 4966): &lt;script defer src=&quot;https://static.cloudflareinsights.com/beacon.min.js/v8c78df7c7c0f484497ecbca7046644da1771523124516&quot; integrity=&quot;sha512-8DS7rgIrAmghBFwoOTujcf6D9rXvH8xm8JQ1Ja01h9QX8EzXldiszufYa4IFfKdLUKTTrnSFXLDkUEOTrZQ8Qg==&quot; data-cf-beacon=&#39;{&quot;version&quot;:&quot;2024.11.0&quot;,&quot;token&quot;:&quot;6198157001034b0bb2bc5b27f7e9df31&quot;,&quot;server_timing&quot;:{&quot;name&quot;:{&quot;cfCacheStatus&quot;:true,&quot;cfEdge&quot;:true,&quot;cfExtPri&quot;:true,&quot;cfL4&quot;:true,&quot;cfOrigin&quot;:true,&quot;cfSpeedBrain&quot;:true},&quot;location_startswith&quot;:null}}&#39; crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;<br>I/flutter ( 4966): &lt;/body&gt;<br>I/flutter ( 4966): &lt;/html&gt;</pre><p>Cloudflare team confirmed:</p><p>Requests were being blocked by a <strong>Managed WAF Rule: “PHP Code Injection” .</strong></p><h3>⚠️ Root Cause</h3><p>Cloudflare’s <strong>Web Application Firewall (WAF)</strong> incorrectly flagged legitimate API requests as:</p><blockquote><em>🛑 </em><strong><em>PHP Code Injection Attack</em></strong></blockquote><p>This resulted in:</p><ul><li>Cloudflare <strong>blocking the request</strong></li><li>Returning <strong>HTTP 403</strong></li><li>Preventing response from reaching client correctly</li></ul><p>Even though:</p><ul><li>Backend had already processed the request successfully</li></ul><h3>🚨 Security Event Log (The Problem)</h3><p>This screen shows an actual <strong>blocked request event</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*oX81v2Y7u8KEbjdTIwwfJQ.png" /></figure><h3>Key details:</h3><ul><li><strong>Action taken:</strong> Block</li><li><strong>Rule triggered:</strong> PHP - Code Injection</li><li><strong>Ruleset:</strong> Cloudflare Managed Ruleset</li><li><strong>Endpoint:</strong></li><li><strong>Method:</strong> POST</li><li><strong>User-Agent:</strong> Dart (Flutter app)</li><li><strong>Country:</strong> ****</li><li><strong>Ray ID:</strong> 9f03639c</li></ul><p>👉 Translation:</p><pre>A real API request was blocked by Cloudflare WAF, thinking it was a PHP injection attack.</pre><ol><li>Request hits Cloudflare</li><li>WAF evaluates payload</li><li>Matches <strong>PHP Code Injection rule</strong></li><li>❌ Request blocked → <strong>403 returned</strong></li></ol><h3>✅ Resolution</h3><ul><li>Created <strong>WAF exception rule</strong> in Cloudflare</li><li>Excluded affected endpoints from the <strong>PHP Code Injection rule</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*oxjoE9bMrmrI5NjkuB_ZNA.png" /><figcaption>Adding cloudflare managed ruleset .</figcaption></figure><ul><li>Request hits Cloudflare</li><li>Rule condition matches your API domain</li><li>WAF <strong>skips PHP injection checks</strong></li><li>✅ Request allowed through</li><li>Client gets proper response.</li></ul><p>✅ The 403 errors were <strong>NOT from your backend</strong><br> ✅ They were caused by <strong>Cloudflare WAF blocking requests</strong><br> ✅ Specifically due to <strong>false positives in PHP Code Injection rule</strong></p><h3>✔️ Applied to:</h3><ul><li>PRE environment</li><li>PROD environment</li></ul><h3>🧪 Validation</h3><p>Post-change testing confirmed:</p><ul><li>✅ No more 403 errors</li><li>✅ API functioning as expected</li><li>✅ Image uploads successful end-to-end</li></ul><h3>📚 Key Learnings</h3><h3>1. Not All 403s Come From Your Backend</h3><p>If you see:</p><ul><li>HTML error pages</li><li>Cloudflare branding</li><li>Missing backend logs</li></ul><p>➡️ Always suspect <strong>edge layers (WAF/CDN)</strong></p><h3>2. WAF Rules Can Cause False Positives</h3><p>Managed rules are powerful but:</p><ul><li>Can misinterpret payloads (especially file uploads)</li><li>Require <strong>fine-tuning via exceptions</strong></li></ul><h3>3. Shared Responsibility Still Applies</h3><ul><li><strong>Dev team</strong> → Owns application behavior &amp; investigation</li><li><strong>DevOps / Infra</strong> → Platform stability &amp; routing</li><li><strong>Network / Cloudflare</strong> → Edge security &amp; filtering</li></ul><p>➡️ Effective RCA requires <strong>collaboration + strong initial analysis.</strong></p><h3>🛠 Recommendations</h3><ul><li>Add <strong>structured logging</strong>:</li><li>Request IDs</li><li>Timestamps</li><li>Correlation IDs across layers</li><li>Capture <strong>failing payload samples</strong></li><li>Monitor <strong>WAF logs proactively</strong></li><li>Maintain a <strong>known exceptions list</strong> for APIs handling:</li><li>File uploads</li><li>Encoded payloads</li><li>Add <strong>alerting on Cloudflare blocks.</strong></li></ul><h3>🧩 Final Takeaway</h3><p>This was not:</p><ul><li>A backend failure ❌</li><li>A Kubernetes issue ❌</li><li>A load balancer misconfiguration ❌</li></ul><p>It was:</p><blockquote><em>✅ A </em><strong><em>Cloudflare WAF false positive (PHP Code Injection rule)</em></strong></blockquote><p>If you run into similar symptoms:</p><ul><li>403 + Cloudflare page</li><li>Backend success logs</li><li>Intermittent failures</li></ul><p>👉 Check WAF before diving deep into application code.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b44f5f15fd9b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fixing SSH Key Authentication for AD User After RHEL Migration]]></title>
            <link>https://medium.com/@sapnarsy2612/fixing-ssh-key-authentication-for-ad-user-after-rhel-migration-d30cdf9f82b1?source=rss-a2845e2f30ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/d30cdf9f82b1</guid>
            <category><![CDATA[ssh-keygen]]></category>
            <category><![CDATA[ssh-keys]]></category>
            <category><![CDATA[jenkins]]></category>
            <dc:creator><![CDATA[Sapna Yadav]]></dc:creator>
            <pubDate>Fri, 17 Apr 2026 11:59:17 GMT</pubDate>
            <atom:updated>2026-04-17T11:59:17.453Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>After a recent RHEL migration, we encountered an issue where SSH key-based authentication failed for the AD user ansible, which is used by Jenkins for automation.</p><p>This post documents the root cause, troubleshooting, and final resolution.</p><h3>Issue</h3><p>While attempting SSH login using a private key:</p><pre>ssh -i ~/ansible-key-rsa ansible@10.xxx.xxx.xx</pre><p>Instead of key-based login, the system prompted for a password:</p><pre>ansible@10.xxx.xxx.xx&#39;s password:</pre><h3>Root Cause</h3><p>The issue was introduced after the <strong>RHEL migration</strong>.</p><p>👉 The ansible user is an <strong>AD/LDAP (domain) user</strong>, not a local Linux user.</p><p>After migration:</p><ul><li>The <strong>home directory </strong><strong>/home/ansiblewas missing</strong></li><li>The <strong>.ssh/authorized_keys file was not present</strong></li><li>SSH key authentication had nothing to validate against</li></ul><p>As a result:</p><ul><li>SSH fell back to password authentication</li></ul><h3>Investigation</h3><p>We verified the user:</p><pre>id ansible</pre><p>Confirmed:</p><ul><li>It belongs to domain users</li><li>It is resolved via AD (SSSD)</li></ul><p>Checked home directory:</p><pre>ls -ld /home/ansible</pre><p>Observed:</p><ul><li>Directory either missing or improperly initialized</li><li>.ssh directory missing or incorrect</li></ul><h3>Resolution Steps</h3><h3>1. Create Home SSH Structure</h3><pre>mkdir -p /home/ansible/.ssh</pre><h3>2. Set Correct Permissions</h3><pre>chmod 700 /home/ansible<br>chmod 700 /home/ansible/.ssh</pre><h3>3. Fix Ownership (Important for AD user)</h3><pre>chown ansible:&quot;domain users&quot; /home/ansible<br>chown -R ansible:&quot;domain users&quot; /home/ansible/.ssh</pre><h3>4. Add Public Key</h3><pre>vi /home/ansible/.ssh/authorized_keys</pre><p>Paste the public key.</p><h3>5. Secure the Key File</h3><pre>chmod 600 /home/ansible/.ssh/authorized_keys</pre><h3>Final Expected State</h3><pre>/home/ansible            -&gt; drwx------ (700)<br>/home/ansible/.ssh       -&gt; drwx------ (700)<br>/home/ansible/.ssh/authorized_keys -&gt; -rw------- (600)</pre><p>Ownership:</p><pre>ansible:domain users</pre><h3>Key Learnings</h3><ul><li>AD users do <strong>not automatically recreate SSH configurations</strong> after OS migration</li><li>SSH key authentication depends entirely on:</li><li>Home directory</li><li>.ssh directory</li><li>authorized_keys file</li><li>Missing any of the above → authentication fails silently</li><li>Permissions and ownership must be exact</li></ul><h3>Impact</h3><ul><li>Jenkins jobs using ansible failed SSH authentication</li><li>Automation pipelines were blocked</li></ul><h3>Conclusion</h3><p>The issue was not with SSH itself, but with <strong>missing user-level configuration after RHEL migration</strong>.</p><p>Once the home directory and authorized_keys were properly restored, SSH key authentication worked as expected.</p><h3>Recommendation</h3><p>After any OS migration:</p><ul><li>Validate service users (especially AD users)</li><li>Ensure:</li><li>Home directories exist</li><li>SSH keys are restored</li><li>Permissions are correct</li></ul><p>This avoids unexpected failures in automation tools like Jenkins and Ansible.</p><p>A simple missing .ssh directory can break an entire automation pipeline—always verify user environments post-migration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d30cdf9f82b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Lesson That Still Defines Today’s Job Market]]></title>
            <link>https://medium.com/@sapnarsy2612/a-lesson-that-still-defines-todays-job-market-0fb715fcc34e?source=rss-a2845e2f30ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/0fb715fcc34e</guid>
            <dc:creator><![CDATA[Sapna Yadav]]></dc:creator>
            <pubDate>Tue, 07 Apr 2026 16:44:41 GMT</pubDate>
            <atom:updated>2026-04-07T16:44:41.982Z</atom:updated>
            <content:encoded><![CDATA[<p>Our dads: “Duniya ke saath chalna seekho, warna peeche reh jaoge.”</p><p>Us back then: “Relax papa, sab control mein hai…” 😎</p><p>Us now in job market:</p><p>“Yeh new skill kab aayi?! Kal tak toh sab theek tha!” 😭</p><p>Moral of the story:</p><p>Papa was not giving advice… he was just 10 years ahead of the trend. 😃</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0fb715fcc34e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Trust Your Gut: Why AI Can’t Replace Human Judgment]]></title>
            <link>https://medium.com/@sapnarsy2612/trust-your-gut-why-ai-cant-replace-human-judgment-0563ce5b33e0?source=rss-a2845e2f30ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/0563ce5b33e0</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-critical-thinking]]></category>
            <dc:creator><![CDATA[Sapna Yadav]]></dc:creator>
            <pubDate>Fri, 06 Mar 2026 18:14:03 GMT</pubDate>
            <atom:updated>2026-03-06T18:14:03.734Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Imagine this: </strong>you’re in an AI-driven interview. The AI asks questions, you answer, and it keeps digging deeper — but here’s the catch: it never challenges you. Even if some of your answers are slightly off, the AI just accepts them as correct. That’s exactly what happened to me this afternoon.</p><h3>The Eye-Opener</h3><p>AI is incredible at processing data, spotting patterns, and generating insights. But there’s one thing it can’t do: <strong>question your gut</strong>. Whatever you feed AI — even if it’s wrong — it treats as truth until corrected. That made me pause and think: if AI can’t detect wrong information, how reliable is it as a decision-maker?</p><h3>Why Your Gut Matters</h3><p>Humans have an edge AI can’t replicate: intuition. When something doesn’t feel right, your instincts nudge you to pause, rethink, and cross-check. That inner skepticism is critical when interacting with AI. Here’s why:</p><ul><li><strong>AI follows patterns, not principles:</strong> It can’t judge morality, context, or nuance the way humans can.</li><li><strong>AI mirrors input:</strong> If you feed it misinformation, it will treat it as fact.</li><li><strong>Humans can question assumptions:</strong> Your gut helps you spot inconsistencies and errors that AI might miss.</li></ul><h3>Make AI Work for You</h3><p>Think of AI as a collaborator, not a replacement. Here’s how to use it effectively:</p><ol><li><strong>Feed it carefully:</strong> Make sure your data is accurate.</li><li><strong>Question its output:</strong> Don’t accept answers blindly — ask yourself, “Does this feel right?”</li><li><strong>Trust your gut:</strong> If something seems off, investigate further before moving forward.</li><li><strong>Combine intuition and AI:</strong> Let AI analyze, but let your judgment decide.</li></ol><h3>Interactive Exercise</h3><p>Try this: next time you use AI, write down three answers it gives you. Then, pause and ask:</p><ul><li>Does this match what I know?</li><li>Are there gaps or inconsistencies?</li><li>What would my gut tell me if I had no AI?</li></ul><p>Notice the difference between AI’s “certainty” and your human intuition. That’s the power you bring to the table.</p><h3>The Takeaway</h3><p>AI is a powerful tool, but it’s not infallible. Its strength lies in analyzing information, not questioning it. Your strength lies in critical thinking, intuition, and the courage to say, “Wait, that doesn’t seem right.”</p><p>The future isn’t about AI replacing humans — it’s about humans using AI <strong>wisely</strong>, while trusting themselves enough to challenge what seems wrong.</p><p>Thanks for reading , Feedbacks are always welcome !!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0563ce5b33e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ How We Resolved a Critical P1 Incident Triggered by a Network Configuration Change]]></title>
            <link>https://medium.com/@sapnarsy2612/how-we-resolved-a-critical-p1-incident-triggered-by-a-network-configuration-change-4e6296b3d531?source=rss-a2845e2f30ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e6296b3d531</guid>
            <category><![CDATA[tcp-reset]]></category>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[p1]]></category>
            <dc:creator><![CDATA[Sapna Yadav]]></dc:creator>
            <pubDate>Mon, 09 Feb 2026 06:40:17 GMT</pubDate>
            <atom:updated>2026-02-09T07:38:32.696Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Friday mornings are usually calm… until they aren’t.</strong><br> On this particular Friday, our team was met with a sudden surge of alerts from one of our core services. The service was attempting to call an external endpoint — but every attempt failed.</p><p>This marked the beginning of a long troubleshooting journey that touched our application, middleware, and network layers, eventually uncovering a subtle yet impactful network configuration change.</p><h3>🔔 Phase 1: Initial Alerts &amp; Investigation</h3><h3>1. First Alert — External Service Failure</h3><p>The first alert indicated that one of our services was unable to reach an external client system. Requests were failing continuously, prompting us to notify the client to confirm whether their system was receiving our calls.</p><h3>2. Second Alert — Claim Appointment Service Failure</h3><p>By evening, <em>another</em> service started throwing errors. This service is responsible for appointing a 3rd‑party vendor for claim assessments. It too was unable to call the vendor’s endpoint.</p><h3>Log Analysis Reveals Core Error</h3><p>Digging deeper into logs, we encountered:</p><pre>java.io.IOException: A connection with a remote socket was reset by that socket.</pre><h3>🔍 What Does This Error Mean?</h3><p>This error refers to a <strong>TCP RST (reset) packet</strong> being sent by the remote server.<br> In simple terms:</p><ul><li>Your application created a connection.</li><li>The remote endpoint forcefully closed it.</li><li>The connection ended abruptly before completion.</li></ul><p>Usually, this is caused by:</p><ul><li>Network devices blocking traffic</li><li>Firewall actions</li><li>Protocol mismatch</li><li>Improper TCP teardown</li><li>Server issues on the destination side</li></ul><p>Despite restarting <strong>WAS services</strong>, <strong>Liberty</strong>, and even redeploying affected services — the issue persisted.</p><h3>🔄 Phase 2: New Error Emerges</h3><p>After multiple retries and restarts, a new exception surfaced:</p><pre>WSDLException: faultCode=WSDL4JWrapper : <br>javax.wsdl.WSDLException: WSDLException: faultCode=WSDL4JWrapper :<br>java.net.SocketException: A system call received a parameter that is not valid. (Read failed)</pre><h3>🔍 Meaning of This Error</h3><p>This typically happens when:</p><ul><li>The WSDL cannot be fetched due to network interruption.</li><li>Communication between client and SOAP service is broken.</li><li>Underlying TCP connection receives invalid or malformed packets.</li></ul><p>In essence, this error confirmed that <strong>the SOAP/WSDL endpoints were unreachable due to a deeper network-level issue</strong>.</p><h3>🌐 Phase 3: Network-Level Troubleshooting</h3><p>At this stage, we involved both <strong>network</strong> and <strong>middleware</strong> teams.</p><h3>🖥️ Commands Used to Identify Source &amp; Destination IPs</h3><p>To determine which source IP our server was using:</p><pre>curl -v &lt;URL&gt;<br><br>Or using ip route: <br>ip route get &lt;destination-ip&gt;<br><br>To resolve the destination IP:<br>nslookup &lt;url&gt;<br>or<br>dig &lt;url&gt;<br><br></pre><h3>🔥 Firewall (Fortigate) Observation</h3><p>Network team checked:</p><ul><li><strong>Source IP of our server</strong></li><li><strong>Destination IP</strong></li><li><strong>Destination port</strong></li></ul><p>Connectivity was present, but the firewall logs showed:</p><h3>❌ Firewall Action: server-rst</h3><p>This means the firewall injected a <strong>TCP Reset</strong> packet on behalf of the server, forcefully closing the connection.<br> This usually happens when a firewall rule or security profile blocks or interferes with the traffic.</p><h3>🆚 Phase 4: PRE vs PROD Comparison</h3><p>To narrow down the issue, we logged into both <strong>PRE</strong> and <strong>PROD</strong> servers and ran:</p><pre>curl -u &lt;username&gt;:&lt;password&gt; &lt;client-url&gt;</pre><ul><li><strong>PRE:</strong> Returned full client response successfully</li><li><strong>PROD:</strong> Failed to connect</li></ul><p>This confirmed:<br> ✔ Application layer working<br> ✔ Client endpoint working<br> ❌ Issue isolated to <strong>PROD network path</strong></p><h3>🕵️ Root Cause Identified</h3><p>Upon deeper investigation, we learned that a <strong>network configuration change</strong> had been implemented on Thursday night:</p><h3>⚙️ Change Implemented</h3><blockquote><strong><em>FortiDDos — Enable Prevention Mode for DTO SPP</em></strong><em><br> Multiple SPPs were moved from </em>Detection Mode<em> → </em>Prevention Mode<em>.</em></blockquote><p>The plan involved:</p><ul><li>Editing SPP</li><li>Changing inbound/outbound mode from <em>Detection</em> to <em>Prevention</em></li></ul><p>This caused our PROD traffic to be <strong>classified as suspicious</strong> and forcibly reset.</p><h3>🔁 Fix: Rolling Back the Change</h3><p>Once the configuration was reverted:</p><ul><li>All endpoints became reachable</li><li>CURL calls succeeded</li><li>Application logs cleared</li><li>Alerts stopped immediately</li></ul><h3>✅ Final Outcome</h3><p>We successfully resolved a <strong>Critical P1</strong> incident triggered by a network-level security configuration change.</p><h3>Key Takeaways</h3><ul><li>Always compare <strong>PRE vs PROD</strong> paths — it narrows down culprits quickly.</li><li>TCP Reset errors often point to <strong>firewall/security layer interventions</strong>.</li><li>Cross-team collaboration (App, Middleware, Network) is essential for P1 resolution.</li><li>Documenting firewall and DDOS rule changes helps prevent unexpected production outages.</li></ul><p>🛡️ <strong>Mitigation &amp; Preventive Action Plan</strong></p><p>To prevent similar incidents and ensure early detection of connectivity issues, we are implementing the following mitigation steps across application, middleware, and network layers.</p><h3>1. Implement Vendor‑Provided Health‑Check Endpoint</h3><p>We will work with the vendor to expose a lightweight <strong>health‑check endpoint</strong> that returns a simple HTTP status.<br> Our monitoring systems will periodically <strong>ping/curl</strong> this endpoint to validate real‑time connectivity.</p><p><strong>Benefits:</strong></p><ul><li>Early detection of network disruptions</li><li>Immediate alerting if vendor endpoint becomes unreachable</li><li>Helps differentiate between application vs. network problems</li><li>Allows validation of SSL/TLS, DNS, and routing paths</li></ul><pre>curl -I https://&lt;vendor-health-url&gt;</pre><p>This gives us proactive visibility and prevents outages from going unnoticed until business transactions fail.</p><h3>2. Move All Vendor Integrations from HTTP to HTTPS</h3><p>During the incident, HTTP calls were more likely to be flagged by the DDOS/IPS security policies.<br> To avoid being classified as suspicious traffic:</p><ul><li>All vendor endpoints in PROD will be migrated from <strong>HTTP → HTTPS</strong></li><li>TLS encryption ensures better compatibility with FortiDDos, firewalls, and security inspection tools</li><li>Encrypted traffic is less prone to being reset or terminated by network appliances</li></ul><p>This also aligns with modern security standards and vendor best practices.</p><h3>3. Introduce Synthetic Transaction Monitoring</h3><p>Beyond basic health checks, we will set up periodic synthetic tests that simulate a minimal real call to the vendor.</p><p>These tests will:</p><ul><li>Validate connectivity</li><li>Confirm authentication is working</li><li>Ensure response format is valid</li><li>Measure latency and timeouts</li></ul><p>Any failure will alert teams before impacting consumers.</p><h3>4. Strengthen Change Management for Network &amp; Security Rules</h3><p>We will improve the approval and review process for firewall, DDOS, and IDS/IPS configuration changes:</p><ul><li>Mandatory <strong>impact assessment</strong> for changes to Prevention/Blocking modes</li><li>Change review by Application, Middleware, and Network stakeholders</li><li>Scheduled <strong>post‑change validation testing</strong> using agreed test scripts</li><li>Documented rollback plans for each rule change</li></ul><p>This ensures high‑risk network changes do not unintentionally block production traffic.</p><h3>5. Add Continuous Firewall Log Monitoring &amp; Alerts</h3><p>We will configure:</p><ul><li>Real‑time alerting on TCP resets generated by firewall or DDOS appliances</li><li>Threshold-based alerts for spikes in blocking, drops, or resets</li><li>Correlation dashboards for app errors vs. firewall events</li></ul><p>This lets us detect anomalies as soon as they occur.</p><h3>6. Implement PRE vs. PROD Environment Validation Scripts</h3><p>Before any major change:</p><ul><li>Connectivity checks</li><li>Curl tests</li><li>DNS resolution</li><li>Firewall rule validation</li><li>Endpoint handshake tests</li></ul><p>Comparison between PRE and PROD helps catch misconfigurations early.</p><h3>7. Maintain a Registry of Critical External Endpoints</h3><p>We will create and maintain a registry that includes:</p><ul><li>Vendor URLs (PRE/PROD)</li><li>Ports and protocols</li><li>Expected response codes</li><li>TLS versions/cipher requirements</li><li>Source IP requirements</li><li>Whitelisting/Firewall rules</li></ul><p>This centralized reference ensures nothing is missed during audits or changes.</p><h3>✅ Summary</h3><p>By combining health checks, improved monitoring, better network change governance, and security‑aligned protocols, we significantly reduce the risk of similar outages recurring. These preventive measures strengthen our overall observability and ensure faster detection and response during any network‑related disruptions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e6296b3d531" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Production incident : The “No Space Left on Device” Crisis: How We Rescued Our Docker Jenkins…]]></title>
            <link>https://medium.com/@sapnarsy2612/production-incident-the-no-space-left-on-device-crisis-how-we-rescued-our-docker-jenkins-25ab0f71c8db?source=rss-a2845e2f30ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/25ab0f71c8db</guid>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[incident]]></category>
            <dc:creator><![CDATA[Sapna Yadav]]></dc:creator>
            <pubDate>Sun, 11 Jan 2026 12:46:34 GMT</pubDate>
            <atom:updated>2026-01-11T12:46:34.729Z</atom:updated>
            <content:encoded><![CDATA[<h3>Production incident : The “No Space Left on Device” Crisis: How We Rescued Our Docker Jenkins Agents</h3><p>We’ve all been there. Everything is running smoothly until a Jenkins build fails with a cryptic error message: No space left on device.</p><p>Suddenly, the CI/CD pipeline is paralyzed. In our case, the culprit was our Docker server hosting two high-traffic Jenkins agents. Here is the story of how we diagnosed the issue, cleaned up the mess, and what we learned.</p><h3>1. The Symptoms</h3><p>The first sign of trouble wasn’t a warning; it was a total halt. When a Docker host runs out of disk space, it doesn’t just slow down — it stops being able to write logs, create temporary build files, or pull new images.</p><p>Upon logging into the server, a quick df -h confirmed our fears: the partition hosting /var/lib/docker was at <strong>100% capacity</strong>.</p><h3>2. Identifying the Culprit</h3><p>While Jenkins agents are incredibly powerful, they are also “disk hungry.” Every time a build runs, the agent:</p><ul><li>Pulls new base images.</li><li>Creates intermediate build layers.</li><li>Leaves behind “dangling” images when a build is interrupted or updated.</li></ul><p>With two agents running side-by-side, the volume of orphaned data grew faster than our manual cleanup could keep up with.</p><h3>3. The Rescue: docker system prune</h3><p>To get back online, we needed a surgical but effective cleanup. We turned to the built-in Docker Swiss Army knife:</p><h3>Step 1: Analyze the Waste</h3><p>First, we checked exactly how much space Docker was consuming:</p><p>Bash</p><pre>docker system df</pre><p>This command showed us a massive amount of “reclaimable” space held by images that were no longer associated with a running container.</p><h3>Step 2: The Prune</h3><p>We executed the prune command to wipe away the clutter:</p><p>Bash</p><pre>docker image prune -a</pre><p><strong>What it does:</strong> Removes all unused images, not just dangling ones.</p><ul><li><strong>The Result:</strong> We reclaimed gigabytes of space in seconds, allowing the Jenkins agents to resume their work immediately.</li></ul><h3>4. Lessons Learned &amp; Prevention</h3><p>Cleaning up after a crash is a reactive fix. To stop this from happening again, we are implementing a few “best practices”:</p><ul><li><strong>Automated Cleanup:</strong> Adding a cron job or a Jenkins “Post-build” step to run docker image prune -f weekly.</li><li><strong>Monitoring Alerts:</strong> Setting up thresholds (e.g., at 80% disk usage) to alert the DevOps team <em>before</em> the server hits 100%.</li><li><strong>Docker Data Root:</strong> Moving the Docker data directory to a larger, dedicated partition to isolate it from the OS.</li></ul><h3>Final Thoughts</h3><p>Disk space management is often overlooked in the world of containerization until it becomes a crisis. By understanding how Jenkins agents interact with the Docker daemon, you can turn a “server down” emergency into a routine maintenance task.</p><p><strong>Has your CI/CD ever been taken down by a full disk? Let us know your favorite cleanup tricks in the comments!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25ab0f71c8db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS STEP FUNCTION .]]></title>
            <link>https://medium.com/@sapnarsy2612/aws-step-function-3db8b484121f?source=rss-a2845e2f30ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/3db8b484121f</guid>
            <category><![CDATA[aws-step-functions]]></category>
            <dc:creator><![CDATA[Sapna Yadav]]></dc:creator>
            <pubDate>Sat, 19 Apr 2025 18:10:52 GMT</pubDate>
            <atom:updated>2025-04-19T18:10:52.145Z</atom:updated>
            <content:encoded><![CDATA[<h3>AWS STEP FUNCTION .</h3><p>Hey all , we will learn step functions .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*j-G0I5WzHMYd0SXJvFRQyQ.png" /><figcaption>We will craete 3 EC2 instances .</figcaption></figure><p>We will create lambda fucntion which will start servers in order : Active directroy server will start first , then will start database server , then web server .</p><p>We will create lambda functions for all , which will run in order one after the other .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*vZGUfr3RpNxnm5Drw4OR3Q.png" /><figcaption>Craete lambda function for ad server and attach role to lambda .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*XICYwZJ2y-FeICQ8i_ABwA.png" /><figcaption>This function will start the server .</figcaption></figure><p>Similarly create function for other servers as well .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*hAThxNi_Vy4iP0NF80_4hg.png" /><figcaption>Let’s create step function .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hYqtjPAxnyktlX5fFR7DrA.png" /><figcaption>Create state machine for our workflow .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LQLt4AVhbePzfa7eDPaQaA.png" /><figcaption>Add lambda to the workflow and provide details .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HFdx6wftmHnprq1-dMQI5w.png" /><figcaption>Add lambda to the workflow and provide details , we will also add next step wiat and lambda function similarly .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nDMeGkzMk6wcWtOix7znpw.png" /><figcaption>Add wait state , thereafter add lambda function .</figcaption></figure><p>Similarly add other lambda and wait state .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R4wvN1Calea04gNWYn1G3A.png" /><figcaption>This is how our step function workflow works .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*blQ2rbKaj9Dcb8qEZQRtGA.png" /><figcaption>Add role to step function to invoke lambda functions .</figcaption></figure><p>This is how we can design a workflow which will run all steps in aws .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XEZTPHmSCbiN8Glimv7_Ow.png" /><figcaption>In a dataflowsimulator we can edit and view all our steps .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aB7rWJPmNi5H03Dha_sAag.png" /><figcaption>If we want our step function to execute daily at specific time , then we can create eventbridge rule .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*LtrLf1UpAxspj6tlMecjEA.png" /><figcaption>We can specify cron expression in eventbridge .</figcaption></figure><p>Thanks for reading !!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3db8b484121f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Working with AWS ECS .]]></title>
            <link>https://medium.com/@sapnarsy2612/working-with-aws-ecs-7d9ef368ab0b?source=rss-a2845e2f30ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d9ef368ab0b</guid>
            <category><![CDATA[aws-ecs]]></category>
            <dc:creator><![CDATA[Sapna Yadav]]></dc:creator>
            <pubDate>Fri, 18 Apr 2025 19:32:52 GMT</pubDate>
            <atom:updated>2025-04-18T19:32:52.736Z</atom:updated>
            <content:encoded><![CDATA[<h3>Working with AWS ECS .</h3><p>Hey all , we will work with aws ecs .</p><p>We will be craeting ECS containers and attach it to load baalncer .</p><p>We will configure VPC for our containers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c9KROufZWyPUBKE5MlAxJQ.png" /><figcaption>We will use this architecture . For this arch , we need 1 VPC , 4 Subnets ,</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*mIoFYshjn5qHCNDU80ZfNg.png" /><figcaption>Create vpc .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*RsrbasHp5W6BshVoQzb4tg.png" /><figcaption>Create Public Subnet . Similarly create all subnets with specfied range as in architecture .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*4o-s0-OCCgUM-zuK__gZeQ.png" /><figcaption>Craete internet gateway .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*Xk9Juw8nWZS7YwloRaNbDw.png" /><figcaption>Attach IG to VPC .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*rDDkhwSNWECqx_Ue6QPGRQ.png" /><figcaption>Craete route table in VPC .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YduFhBvqdfL5JrpJcMWldg.png" /><figcaption>Add public subnets to newly craeted route table .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K7PI69Is6lFZRqvzlbCBhQ.png" /><figcaption>Add route for public RT to IG .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*iv6_DXRLveyiQLtnAs_Dcw.png" /><figcaption>Create NAT gateway .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*7wjH6J07y05TMYXnqBXxQQ.png" /><figcaption>Add nat gateway route to main route table .</figcaption></figure><p>Now , we will create load balancer . When we creat container we can attach lb with that and load balance our traffic from ECS and EC2 .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*D9QpNingdmqRzNbRcV1xqg.png" /><figcaption>Create internet facing alb with public subnet .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oPAqyk5vBWz5RtBz7njRzQ.png" /><figcaption>Let’s allow internet traffic over port 80 .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*ZhsI0ceK7iEjnWSEqpkb8Q.png" /><figcaption>Add targets for routing . right now we dont have any targets . This will provision the load balancer .</figcaption></figure><p>Let’s test load balancer with ECS .</p><p>We will craete ECS cluster and add containers to them . We will also add load balancer to load balance the traffic .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*b7qMis8qdED-hsvMEo60Uw.png" /><figcaption>Craete linux cluster for ECS .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*KESE8eMC1DTsvsPjPCZTaw.png" /><figcaption>Select the details for instance in our cluster .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*Z9g-fGx8lGiROn2zdjeo3w.png" /><figcaption>Select all details for ECS . Attach sg with all traffic allowed .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*PLpZXgkEfbjPbcmdBNwTrQ.png" /><figcaption>We will need to add roles so that ECS cluster will be able to manage containers agents on EC2 host .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tfpCeLu-k9VuhJQ4gLLRGw.png" /><figcaption>We have created the ECS instances host in cluster .</figcaption></figure><p>Let’s create container .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Y1q0AgGi85F-_a91UJjNw.png" /><figcaption>Let’s create a task definition for our EC2 host to create containers .</figcaption></figure><p>We have differnet kind of network mode for containers , for this lab we will be using : bridge mode .</p><p>We wont attach role to our task since we dont want to access any other service for our application , we are craeting simple application .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*01R8baPU64XmyrgrROgJCg.png" /><figcaption>We will craete container within the task .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*nEjhABiPC1Vzng-v7bUrzA.png" /><figcaption>Create task definition .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*8EGjfK5aTD0lwkr-bA03sQ.png" /><figcaption>We will be creating load balancing service for our cluster .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*KuGl42neGtGuUcJvfnKSrA.png" /><figcaption>Creating service for EC2 .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*n0t38gGwcB5w5_3fLm1xFQ.png" /><figcaption>I have selected 6 task since we want to craete 6 containers .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*OSPniU11XS5ImUvJX560ZA.png" /><figcaption>This will balance conatiers automatically in load balancer .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*SeEOx7MIJt_6nAWfC-EAHQ.png" /><figcaption>Now create load balancer in next step .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*nTFQspj_ozAS85fmDfRmQA.png" /><figcaption>Listener port is 80 .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*vZ3HKhWwruDASLIM-XuQSA.png" /><figcaption>We will specify setting for auto scaling as well .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0UW0w4m5_sM-Ih-6lfdD_A.png" /><figcaption>Our service is deployed .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*E0C1rtppwWVPItpsF8xhsw.png" /><figcaption>We can see containers on our target group which is using dynamic ports . So we have to enable traffic from all ports in our security group attached .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*akFEEGHTXbEQFjPrN40O2g.png" /><figcaption>Test load balancer it should give nginx page .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vzyR28Zv-ZeTBFz7oXCqnw.png" /><figcaption>We can also specify EC2 to allow traffic only from SG of ALB , for better security , So ALB will route requests to ECS which have task definotion for EC2 containers .</figcaption></figure><p>Thanks for reading .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d9ef368ab0b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Working with streaming data in AWS kinesis .]]></title>
            <link>https://medium.com/@sapnarsy2612/working-with-streaming-data-in-aws-kinesis-a3a26968f9bf?source=rss-a2845e2f30ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3a26968f9bf</guid>
            <category><![CDATA[firehose]]></category>
            <category><![CDATA[kinesis]]></category>
            <dc:creator><![CDATA[Sapna Yadav]]></dc:creator>
            <pubDate>Thu, 17 Apr 2025 16:35:05 GMT</pubDate>
            <atom:updated>2025-04-17T16:35:05.412Z</atom:updated>
            <content:encoded><![CDATA[<h3>Working with streaming data in AWS kinesis .</h3><p>Hey all we will work with kinesis in this lab .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1jExLecSJQAlUoqWhDyFww.png" /><figcaption>This will be architecture on which we will work .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*enf9iWQxKxDJWBZG2vkIeQ.png" /><figcaption>Craete a data stream .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tjdlNqlagJpHH6jyMMUzJA.png" /><figcaption>Create kinesis firehose for source .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*Fio1Zle1PtomA92POPTuNA.png" /><figcaption>We will be setting source as kinesis for stream in firehose and use s3 for stream destination .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*yv3ztWwDhxWJwV-S73iKiA.png" /><figcaption>Now , lets create a bucket which will receive data from firehose .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*714ltOoCg2qwd87rRQpE9A.png" /><figcaption>In destination setting of firehose specify the bucket created .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lJpo155_w9sGvkamjrg1Ww.png" /><figcaption>We will be using this for kinesis data generator .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*p0X7VlIy_ORaDYhCVhyNLw.png" /><figcaption>Lets craete cognito user as above for our steeam .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Nt-UiVFgGc_hyyEE4hTBw.png" /><figcaption>We have received url for kinesis generator .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*VA9JvM2COG6WlyieOiRIiw.png" /><figcaption>Let’s login to our kinesis data generator using the cognito user created . We will send the stream data .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*2vzgKY5pF9-eB9OrH6oO5w.png" /><figcaption>Data will be captured in kinesis .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FPutv09jGLGU9s4IR396Xg.png" /><figcaption>Our data will be captured in s3 from firehose since we have used s3 as destination .</figcaption></figure><p>This is how we will connect kinesis , firehose and s3 and stream application data .</p><p>Thanks .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3a26968f9bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating SQS queue which will poll messages to lambda function .]]></title>
            <link>https://medium.com/@sapnarsy2612/creating-sqs-queue-which-will-poll-messages-to-lambda-function-2e9c82216c40?source=rss-a2845e2f30ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e9c82216c40</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws-sqs]]></category>
            <dc:creator><![CDATA[Sapna Yadav]]></dc:creator>
            <pubDate>Thu, 17 Apr 2025 14:24:36 GMT</pubDate>
            <atom:updated>2025-04-17T14:24:36.324Z</atom:updated>
            <content:encoded><![CDATA[<h3>Creating SQS queue which will poll messages to lambda function .</h3><p>Hey , we will be creating queue which will poll messages to lambda function as consumer .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tS85BcQ5qmEVrxFvJPGiSA.png" /><figcaption>Creating queue .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*72RIM1wmsUPp91vNGYbkHA.png" /><figcaption>We will be creating SQS poller lambda function using blueprint .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*tm5VQZRQiPqfzHBSWk7Z7g.png" /><figcaption>We will also need to specify role to lambda so that lambda can poll messages from SQS .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*mKY5XVHIB0WmWsUmcW4hZQ.png" /><figcaption>Will specify SQS queue in lambda and enable trigger which will trigger lambda whenever new messages are being polled to SQS queue .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*QwiIV5LjDqbkaJbSU3oqYQ.png" /><figcaption>Create blueprint function .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XQifunF59pNB1w3B6sERJg.png" /><figcaption>Now , in SQS lambda trigger is added but its disabled .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*SiD-BIPVT4w0TrEm6Up0vQ.png" /><figcaption>We can enable trigger from lambda config .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rvhFL1qyj9yudPzZteOUpA.png" /><figcaption>We can send message from SQS and it will trigger lambda .</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A_Nwo0nnWl49VVTmoacgFg.png" /><figcaption>We can view messages in lambda function logs for SQS .</figcaption></figure><p>This is how we can integrate SQS and lambda .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e9c82216c40" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>