<?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 Sahana on Medium]]></title>
        <description><![CDATA[Stories by Sahana on Medium]]></description>
        <link>https://medium.com/@sahanaishwarya012?source=rss-945e8cf8c400------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bW2Ux4HmY1Wt_nYvP1smoQ.png</url>
            <title>Stories by Sahana on Medium</title>
            <link>https://medium.com/@sahanaishwarya012?source=rss-945e8cf8c400------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 16:58:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sahanaishwarya012/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[Lambda Just Grew a Memory: Meet Lambda Durable Functions]]></title>
            <link>https://awstip.com/lambda-just-grew-a-memory-meet-lambda-durable-functions-1274b04d8535?source=rss-945e8cf8c400------2</link>
            <guid isPermaLink="false">https://medium.com/p/1274b04d8535</guid>
            <category><![CDATA[awsreinvent]]></category>
            <category><![CDATA[amazon-web-services]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Sahana]]></dc:creator>
            <pubDate>Sun, 01 Feb 2026 15:01:04 GMT</pubDate>
            <atom:updated>2026-02-01T15:01:04.538Z</atom:updated>
            <content:encoded><![CDATA[<p>Say no more</p><p>For years, we’ve all repeated the same rule about AWS Lambda:</p><blockquote><strong><em>“Lambda is stateless. If you need workflows, use Step Functions.”</em></strong></blockquote><p>It was gospel.<br>It was safe.<br>It was… true.</p><p>Until now.</p><p>AWS just changed the game with a new feature called <strong>Lambda Durable Functions</strong> — and it quietly flips the whole “Lambda is stateless” mental model on its head.</p><p>Let’s talk about what it is, what it isn’t, and why this might be one of the biggest evolutions in serverless since async + event-driven architecture went mainstream.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*ETtlBOPLR6iceJ_h-udoQA.png" /><figcaption>AWS re:Invent 2025</figcaption></figure><h3>🧠 The Old World: Lambda Was a Goldfish</h3><p>Lambda has always been brilliant at one thing:</p><p>➡️ Run → finish → disappear.</p><p>No memory.<br>No long-term state.<br>No waiting around.</p><p>So if you wanted to build something like:</p><p>• A multi-step order workflow<br>• An AI pipeline with human approval<br>• A saga-style microservice transaction<br>• A process that runs over hours, days, or weeks</p><p>You ended up building a mini distributed system:</p><p>Lambda + Step Functions + SQS + DynamoDB + retries + glue code + prayers 🙃</p><p>It worked… but it was heavy.</p><h3>🧩 Enter: Lambda Durable Functions</h3><p>With <strong>Durable Functions</strong>, your Lambda can now:</p><p>✅ Pause execution<br>✅ Persist its state<br>✅ Resume later<br>✅ Recover from failures automatically</p><p>In plain English:</p><blockquote><em>Lambda can finally </em><strong><em>remember what it was doing.</em></strong></blockquote><p>Instead of “run and forget,” Lambda becomes:</p><p>👉 <strong>run → pause → remember → resume</strong></p><p>That’s a <em>huge</em> shift.</p><h3>🎬 How Durable Functions Feel (Conceptually)</h3><p>Think of your Lambda like a Netflix episode:</p><p>You start watching.<br>You pause it.<br>You close the app.<br>You come back tomorrow…</p><p>…and it starts <em>exactly</em> where you left off.</p><p>That’s what Durable Functions do for your code.</p><p>You write your workflow like normal code, and AWS handles:</p><p>• Checkpointing<br>• State persistence<br>• Replay<br>• Failure recovery</p><p>You don’t manually wire DynamoDB or SQS just to remember where you were.</p><h3>🛠 What You Actually Get</h3><p>Durable Functions introduce a new execution model with:</p><p>🔹 <strong>Steps</strong> → checkpoints in your workflow<br>🔹 <strong>Waits</strong> → suspend execution without billing<br>🔹 <strong>Replay</strong> → resume from last good state<br>🔹 <strong>Durable context</strong> → AWS stores your progress</p><p>Your Lambda becomes a <strong>long-running, resilient workflow engine</strong> — inside Lambda.</p><p>Yes. Inside.</p><h3>⏱️ The 15-Minute Myth: Let’s Kill It Properly</h3><p>This is where a lot of people get confused, so let’s be crystal clear:</p><p>👉 <strong>You cannot use Durable Functions to bypass Lambda’s 15-minute execution limit.</strong></p><p>Yes, AWS says:</p><blockquote><em>Durable executions can last up to </em><strong><em>one year</em></strong><em>.</em></blockquote><p>But that does <strong>not</strong> mean a single Lambda invocation runs for a year.</p><p>Here’s the real model 👇</p><h3>🧠 The Mental Model You Need</h3><p>Think of Lambda Durable Functions like this:</p><blockquote><em>It’s </em><strong><em>Step Functions inside Lambda code</em></strong><em> — not a longer Lambda runtime.</em></blockquote><p>So:</p><p>• The <strong>durable execution</strong> can last up to <strong>1 year</strong><br>• But each <strong>individual Lambda invocation</strong> is still capped at <strong>15 minutes</strong></p><p>Your function doesn’t run continuously for a year.<br>It runs in <strong>chunks</strong>, across many invocations.</p><h3>🔁 How It Actually Works</h3><p>A Durable Function:</p><p>• Runs some code<br>• Hits a <strong>checkpoint / wait / step</strong><br>• Stops<br>• AWS stores state<br>• Later… the <em>same function</em> is invoked again<br>• It resumes from where it left off</p><p>So you’re not extending Lambda’s runtime.</p><p>You’re <strong>orchestrating many Lambda runs as one logical workflow.</strong></p><h3>🧩 Think of It Like Step Functions (But in Code)</h3><p>If you’ve used Step Functions, this will click instantly:</p><p>• Same Lambda function<br>• Called multiple times<br>• Each time runs a different part of the workflow<br>• State is replayed<br>• Progress is checkpointed</p><p>Durable Functions just move that orchestration <em>into your Lambda code</em>.</p><h3>⚠️ Important Edge Case People Miss</h3><p>If your Durable Function is triggered by:</p><p>• S3<br>• API Gateway<br>• SQS<br>• EventBridge</p><p>Then:</p><p>👉 The <strong>maximum execution window is still 15 minutes per invocation</strong>, not one year.</p><p>So you <strong>cannot</strong>:</p><p>• Upload a file to S3<br>• Trigger a Durable Function<br>• Expect it to “run for a year” in that same execution</p><p>Durable ≠ Long-running Lambda<br>Durable = <strong>Long-running workflow</strong></p><p>Big difference.</p><h3>🔥 Real Use Cases That Make This Click</h3><h3>1️⃣ AI + Human Approval</h3><ol><li>User submits a request</li><li>Lambda calls an LLM</li><li>LLM generates output</li><li>Lambda pauses</li><li>Human reviews it</li><li>Lambda resumes and continues</li></ol><p>Previously? Step Functions + Lambda + queues + DB.<br>Now? One Durable Function.</p><h3>2️⃣ Order Processing</h3><ol><li>Validate order</li><li>Reserve inventory</li><li>Process payment</li><li>Wait for confirmation</li><li>Ship order</li></ol><p>Each step can fail, retry, or wait — and your Lambda doesn’t lose its place.</p><h3>3️⃣ Long-Running Pipelines</h3><p>ETL jobs.<br>Onboarding flows.<br>Async approvals.<br>Multi-day processes.</p><p>Durable Functions finally make Lambda suitable for <em>real</em> workflows.</p><h3>⚔️ Durable Functions vs Step Functions</h3><p>Let’s be honest — this isn’t “Step Functions is dead.”</p><p>It’s more like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*7TKAj3_u9NSf8e4Ho40g9A.png" /></figure><p><strong>Hot take:</strong><br>Step Functions are still amazing.<br>But Durable Functions feel like AWS saying:</p><blockquote><em>“Okay fine… you can keep your workflows in code now.”</em></blockquote><h3>🚫 When You Shouldn’t Use Durable Functions</h3><p>Don’t force it everywhere.</p><p>Skip Durable Functions if:</p><p>• You need visual workflows for ops teams<br>• Non-devs manage flows<br>• You already love Step Functions + ASL<br>• Your app is simple stateless CRUD</p><p>This is power tooling — not default tooling.</p><h3>📍 Region Reality Check</h3><p>If you’ve been looking for Durable Functions in:</p><p>• us-east-1<br>• us-west-2</p><p>…and couldn’t find it…</p><p>You’re not crazy 😅</p><p>👉 <strong>Lambda Durable Functions are currently only available in </strong><strong>us-east-2 (Ohio)</strong></p><p>So if you don’t see the option — that’s expected.</p><h3>🧭 Why This Is a Big Deal</h3><p>Lambda just crossed a line.</p><p>It’s no longer just:</p><blockquote><em>“Run some code when an event happens.”</em></blockquote><p>It’s now:</p><blockquote><strong><em>“Run a workflow. Pause it. Remember it. Resume it.”</em></strong></blockquote><p>That blurs the line between:</p><p>• Function<br>• Service<br>• Workflow engine</p><p>Lambda Durable Functions might be the biggest evolution in serverless since async + event-driven architecture went mainstream.</p><h3>🧠 Final Thought</h3><p>For years, we built workflows <em>around</em> Lambda.</p><p>Now, Lambda builds workflows <em>inside itself</em>.</p><p>That’s not a small change.<br>That’s a new way to think about serverless.</p><p>And honestly?</p><p>I think this is just the beginning. 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1274b04d8535" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/lambda-just-grew-a-memory-meet-lambda-durable-functions-1274b04d8535">Lambda Just Grew a Memory: Meet Lambda Durable Functions</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Strangler Fig Pattern: Modernization Without the Meltdown]]></title>
            <link>https://aws.plainenglish.io/the-strangler-fig-pattern-modernization-without-the-meltdown-aab3a5d4a00e?source=rss-945e8cf8c400------2</link>
            <guid isPermaLink="false">https://medium.com/p/aab3a5d4a00e</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-architecture]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Sahana]]></dc:creator>
            <pubDate>Thu, 29 Jan 2026 20:04:02 GMT</pubDate>
            <atom:updated>2026-01-29T20:04:02.490Z</atom:updated>
            <content:encoded><![CDATA[<p>Let me ask you something first.</p><p>If your legacy system went down for two hours today, how much money, trust, and sanity would you lose?</p><p>That answer is why the Strangler Fig pattern exists.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*uSSdvDrn4RW3yiXGm9CqVA.png" /><figcaption>Strangler Pattern Process in Microservices</figcaption></figure><h3>The Core Problem You Are Solving</h3><p>If you have ever tried to modernize a legacy system, you know the feeling. You touch one part and three other parts start shaking. The codebase is old, fragile, and somehow still running the business. Rewriting everything from scratch sounds heroic, but in real life it is usually a slow, expensive, and risky way to lose sleep.</p><p>Legacy systems fail in three ways at the same time:</p><ol><li>They are hard to change</li><li>They are risky to touch</li><li>They still run the business</li></ol><p>So you are stuck between two bad options:<br>• Rewrite everything and gamble the company<br>• Do nothing and slowly rot</p><p>The Strangler Fig pattern introduces a third option:</p><p><strong>You replace behavior, not systems. One capability at a time. While everything is still running.</strong></p><h3>What “Strangling” Actually Means in Architecture Terms</h3><p>You do not migrate “the app.”<br>You migrate <strong>capabilities</strong>.</p><p>Examples of real capabilities:<br>• Authentication<br>• Order creation<br>• Payment processing<br>• Inventory checks<br>• Reporting<br>• Notifications</p><p>Each of these becomes its own boundary.<br>Each boundary becomes a candidate for extraction.</p><p>You are not modernizing code.<br>You are modernizing <strong>responsibility ownership</strong>.</p><h3>Step 1: Introduce a Control Point</h3><p>You need a single place where traffic is routed.</p><p>This can be:<br>• API gateway<br>• Reverse proxy<br>• Edge routing layer<br>• Service mesh ingress</p><p>This layer must be able to say:</p><p>“If the request is for X, send it to the new system.<br>Otherwise, send it to the old one.”</p><p>Without this control point, you are not strangling anything. You are just deploying random services.</p><h3>Step 2: Slice by Behavior, Not by Tables</h3><p>This is where most teams screw it up.</p><p>They try to extract by:<br>• Database tables<br>• Packages<br>• Modules</p><p>Wrong axis.</p><p>You extract by <strong>business capability</strong>.</p><p>Example:<br>Instead of “let’s move the users table,” you do:<br>“Let’s own the user profile lifecycle end to end.”</p><p>That means:<br>• Input validation<br>• Business rules<br>• Persistence<br>• Events<br>• Side effects</p><p>A real service owns its behavior completely. Partial ownership creates ghost dependencies that haunt you later.</p><h3>Step 3: Decide the Data Truth Model</h3><p>This is the real battleground.</p><p>You must choose one of these strategies:</p><h4>Option A: Shared Database (Short Term Only)</h4><p>Both old and new read the same data.</p><p>Pros:<br>• Fast to start<br>• No duplication</p><p>Cons:<br>• You are still coupled<br>• You cannot evolve schemas freely</p><p>Use this only as a temporary bridge.</p><h4>Option B: Data Replication via Events</h4><p>Old system emits events.<br>New services build their own state from them.</p><p>Pros:<br>• Loose coupling<br>• New system becomes autonomous</p><p>Cons:<br>• Event design becomes critical<br>• You must handle replays, idempotency, ordering</p><p>This is where you stop being a “CRUD engineer” and start being a systems engineer.</p><h4>Option C: Ownership Transfer</h4><p>New service becomes the source of truth for that capability.</p><p>Old system now <em>calls</em> the new service instead of owning the data.</p><p>This is the moment the strangling actually begins.</p><h3>Step 4: Make the Cutover Reversible</h3><p>Every strangler move must support rollback.</p><p>That means:<br>• Dual routing capability<br>• Feature flags<br>• Shadow traffic<br>• Metrics that prove correctness</p><p>You do not guess whether the new system works.<br>You observe it.</p><p>You run old and new in parallel and ask:</p><p>“Do they make the same decisions for the same inputs?”</p><p>Until the answer is yes, you do not fully cut over.</p><h3>Step 5: Observability Is Not Optional</h3><p>You cannot strangler-migrate blind.</p><p>You need:<br>• Request tracing across old and new<br>• Business metrics per capability<br>• Error rates by version<br>• Latency per route</p><p>Your strangler project is not a code project.<br>It is a <strong>control and visibility project</strong>.</p><p>If you cannot see behavior, you cannot replace behavior.</p><h3>The Tradeoffs Nobody Escapes</h3><p>Let’s be honest.</p><p>This pattern costs you in three ways:</p><h4>1. Temporary Complexity</h4><p>For a long time you will have:<br>• Two architectures<br>• Two data models<br>• Two failure modes</p><p>That is not a bug. That is the price of zero downtime evolution.</p><h4>2. Design Pressure</h4><p>You are forced to define boundaries clearly.</p><p>Vague domains get exposed immediately.<br>Hidden coupling becomes visible.<br>Bad abstractions die fast.</p><p>This is uncomfortable. That is also why it works.</p><h4>3. Discipline Requirement</h4><p>You must finish slices fully.</p><p>Half-extracted capabilities are worse than a monolith.<br>They create distributed spaghetti.</p><p>If you start strangling something, you own it until the old version is dead.</p><h3>When the Pattern Is the Right Weapon</h3><p>Use Strangler Fig when:</p><p>• The system is business critical<br>• Downtime is unacceptable<br>• The codebase is untrustworthy<br>• You want modular ownership<br>• You want to evolve continuously</p><p>Do not use it when:</p><p>• The system is small<br>• You can afford downtime<br>• The logic is simple<br>• You actually understand everything inside it</p><p>Not every problem needs a surgical approach. But big systems do.</p><h3>The Real Shift Is Mental, Not Technical</h3><p>The Strangler Fig pattern is not about microservices.<br>It is not about tools.<br>It is not about trends.</p><p>It is about this mindset shift:</p><p>👉 Stop thinking in terms of “applications.”<br>👉 Start thinking in terms of <strong>capabilities, ownership, and contracts.</strong></p><p>Once your team thinks that way, the architecture follows naturally.</p><h3>Final Thought</h3><p>A rewrite is an act of hope.<br>Strangler Fig is an act of control.</p><p>Hope says: “The new system will be better.”<br>Control says: “We will prove it, one capability at a time, under real traffic.”</p><p>If your system matters, control beats hope every single time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aab3a5d4a00e" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/the-strangler-fig-pattern-modernization-without-the-meltdown-aab3a5d4a00e">The Strangler Fig Pattern: Modernization Without the Meltdown</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[Amazon S3 Object Lambda: Changing Data Without Touching It]]></title>
            <link>https://medium.com/@sahanaishwarya012/amazon-s3-object-lambda-changing-data-without-touching-it-8b4f43560c12?source=rss-945e8cf8c400------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b4f43560c12</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws-s3]]></category>
            <dc:creator><![CDATA[Sahana]]></dc:creator>
            <pubDate>Tue, 20 Jan 2026 09:00:35 GMT</pubDate>
            <atom:updated>2026-01-20T09:00:35.265Z</atom:updated>
            <content:encoded><![CDATA[<p>There is a familiar tension in most data systems.</p><p>You store data in one place.<br>You want to use it in many different ways.</p><p>Different teams want different formats.<br>Different applications want different schemas.<br>Different users want different levels of filtering, masking, or enrichment.</p><p>So you copy the data.<br>You transform it.<br>You create more buckets, more pipelines, more versions.</p><p>And slowly, the simplicity of object storage turns into a maze.</p><p>Amazon S3 Object Lambda exists to remove that maze.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*naMPWHTg82wLLKzUfjK-TQ.png" /></figure><h3>The Hidden Cost of Preprocessing</h3><p>Traditionally, if an application needs data in a specific shape, you solve it before storage.</p><p>You transform on ingest.<br>You store multiple variants.<br>You build batch jobs that rewrite objects.</p><p>It works, but it creates problems:</p><ul><li>Storage grows because every transformation becomes a new copy</li><li>Pipelines become brittle and hard to change</li><li>A small schema change can require reprocessing years of data</li><li>Every consumer becomes coupled to how the data was prepared</li></ul><p>So the question becomes:</p><p>What if you could transform data at the moment it is requested, instead of when it is stored?</p><p>That is the idea behind S3 Object Lambda.</p><h3>What Amazon S3 Object Lambda Actually Does</h3><p>S3 Object Lambda lets you intercept an S3 GetObject request and run your own code before the object is returned.</p><p>The original object stays unchanged in S3.</p><p>Your code runs on demand.<br>It receives the object.<br>It transforms, filters, masks, or enriches it.<br>Then it returns the modified version to the caller.</p><p>From the application’s point of view, it looks like it simply read an object.</p><p>But the object was shaped specifically for that request.</p><h3>A Mental Model</h3><p>Think of S3 as a source of truth.</p><p>Think of Object Lambda as a programmable view layer on top of that truth.</p><p>Not a copy.<br>Not a rewrite.<br>Not a new bucket.</p><p>A view.</p><p>Every request can see a different version of the same underlying object.</p><h3>What This Enables</h3><p>This simple idea unlocks powerful patterns.</p><h3>Data filtering</h3><p>Return only part of an object.</p><p>For example:</p><ul><li>Only rows for a specific customer</li><li>Only fields relevant to a service</li><li>Only records newer than a given timestamp</li></ul><h3>Data transformation</h3><p>Change format on the fly.</p><p>For example:</p><ul><li>Convert CSV to JSON</li><li>Convert XML to Parquet</li><li>Normalize field names or units</li></ul><h3>Data masking</h3><p>Hide sensitive fields dynamically.</p><p>For example:</p><ul><li>Mask personal identifiers for analytics users</li><li>Remove payment data for support tooling</li><li>Obfuscate internal IDs for external consumers</li></ul><p>The same object can serve multiple trust levels without duplication.</p><h3>Data enrichment</h3><p>Add information at read time.</p><p>For example:</p><ul><li>Add metadata from another service</li><li>Attach computed fields</li><li>Append classification or scoring results</li></ul><h3>Why This Matters Architecturally</h3><p>This changes where complexity lives.</p><p>Instead of complexity being baked into storage pipelines, it moves into request-time logic.</p><p>That has real consequences:</p><ul><li>Storage stays simple and immutable</li><li>You avoid storing multiple transformed copies</li><li>New consumers can appear without forcing reprocessing</li><li>You can evolve formats without migrating old data</li></ul><p>Your data becomes stable.<br>Your views become flexible.</p><h3>Performance and Cost Considerations</h3><p>This power is not free.</p><p>Each request triggers compute.<br>Each transformation adds latency.<br>Each invocation has cost.</p><p>So the question is not “Is this good?”</p><p>The question is “Where does this tradeoff make sense?”</p><p>It works best when:</p><ul><li>Read patterns are selective</li><li>Consumers need different shapes of the same data</li><li>Data volume is large but access is sparse or targeted</li><li>You want to avoid heavy batch pipelines</li></ul><p>It is less ideal when:</p><ul><li>Every object is read in full by every consumer</li><li>Latency must be as low as physically possible</li><li>Transformations are extremely heavy</li></ul><p>This is a design tool, not a default.</p><h3>A Subtle Shift in How We Think About Storage</h3><p>Object Lambda nudges architecture away from “store what you serve” toward “serve what you store.”</p><p>That shift is small in words and big in impact.</p><p>It separates the concerns of:</p><ul><li>What data is</li><li>How data is used</li></ul><p>Once those are separated, systems become easier to change.</p><h3>A Question Worth Asking</h3><p>Before building a pipeline, before copying a dataset, before creating another bucket, ask:</p><p>Is this a storage problem or a presentation problem?</p><p>If it is a presentation problem, Object Lambda might be the right place to solve it.</p><h3>Final Thought</h3><p>Amazon S3 Object Lambda is not about transformation.</p><p>It is about <strong>deferring decisions</strong>.</p><p>It lets you postpone format, shape, filtering, and masking decisions until the moment they are actually needed.</p><p>That keeps your data simple, your pipelines smaller, and your systems more adaptable over time.</p><p>And in complex systems, adaptability is often more valuable than optimization.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b4f43560c12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Hypervisors to Hardware: How the AWS Nitro System and Nitro Enclaves Redefine Isolation and…]]></title>
            <link>https://medium.com/@sahanaishwarya012/from-hypervisors-to-hardware-how-the-aws-nitro-system-and-nitro-enclaves-redefine-isolation-and-4ce0fc8f5fa6?source=rss-945e8cf8c400------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ce0fc8f5fa6</guid>
            <category><![CDATA[system-architecture]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[aws-nitro-enclave]]></category>
            <category><![CDATA[cloud-infrastructure]]></category>
            <dc:creator><![CDATA[Sahana]]></dc:creator>
            <pubDate>Tue, 13 Jan 2026 04:59:43 GMT</pubDate>
            <atom:updated>2026-01-13T04:59:43.372Z</atom:updated>
            <content:encoded><![CDATA[<h3>From Hypervisors to Hardware: How the AWS Nitro System and Nitro Enclaves Redefine Isolation and Trust</h3><p>There is a moment in every system design journey where performance stops being the main concern.</p><p>Not because performance no longer matters.<br>But because <strong>trust</strong> starts to matter more.</p><p>Can you trust what is running your code?<br>Can you trust what can see your data?<br>Can you trust the boundary between your application and the infrastructure beneath it?</p><p>That is where this story begins.</p><p>Not with software, but with hardware.</p><h3>The Shift No One Sees</h3><p>Most people imagine AWS infrastructure as software layered on software.</p><p>Virtual machines.<br>Hypervisors.<br>Networking stacks.<br>Storage abstractions.</p><p>But something subtle changed inside AWS.</p><p>Instead of building everything in software, AWS moved core infrastructure functions into <strong>specialized hardware</strong>.</p><p>Why?</p><p>Because when everything is software, everything becomes attack surface.<br>When everything is software, everything becomes overhead.</p><p>So AWS redesigned EC2 from the ground up with one idea:</p><blockquote><em>Push infrastructure down into hardware so workloads can run closer to the metal, with fewer layers, fewer risks, and fewer surprises.</em></blockquote><p>That idea became the <strong>AWS Nitro System</strong>.</p><h3>What the AWS Nitro System Really Is</h3><p>The AWS Nitro System is not one thing.</p><p>It is a collection of <strong>AWS-designed hardware components and a minimal hypervisor</strong> that together replace the traditional “big hypervisor does everything” model.</p><p>Instead of one massive software layer handling networking, storage, security, and virtualization, AWS splits responsibilities into dedicated components:</p><ul><li>Nitro cards for VPC networking</li><li>Nitro cards for EBS storage</li><li>Nitro hardware for local instance storage</li><li>A Nitro controller coordinating the platform</li><li>A Nitro security chip enforcing hardware-level trust</li><li>A minimal Nitro hypervisor whose only job is isolation</li></ul><p>The important part is not the list.</p><p>The important part is the <strong>philosophy</strong>:</p><blockquote><em>Your EC2 instance should spend its time running your workload, not emulating infrastructure.</em></blockquote><p>That is how AWS achieves performance close to bare metal, even for virtualized instances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DcaqN0E7ukiNOu2YbpFYkQ.png" /><figcaption>AWS Nitro System Architecture</figcaption></figure><h3>Why This Matters in Practice</h3><p>Because of the Nitro architecture on AWS:</p><ul><li>EC2 instances can reach network throughput well over 100 Gbps</li><li>Storage-dense instances can pack tens of terabytes into a single machine</li><li>High-performance computing workloads can run without fighting noisy neighbors</li><li>Bare metal EC2 instances exist without losing the safety of managed infrastructure</li></ul><p>You get:</p><ul><li>Near bare-metal performance</li><li>Strong isolation between customers</li><li>Faster platform innovation because features are no longer constrained by a single giant hypervisor</li></ul><p>It’s a rare case where performance, security, and velocity improve together.</p><h3>But Performance Isn’t the Most Interesting Part</h3><p>The most interesting part is what this enables next on AWS.</p><p>Once you have hardware-enforced isolation, you can create environments that are not just isolated from other customers.</p><p>They are isolated from <em>you</em>.</p><p>And that is where <strong>AWS Nitro Enclaves</strong> come in.</p><h3>AWS Nitro Enclaves: Compute You Cannot See</h3><p>An AWS Nitro Enclave is an isolated compute environment created from an EC2 instance.</p><p>It runs inside the instance, but it is:</p><ul><li>Isolated by the Nitro hypervisor</li><li>Deprived of external networking</li><li>Without persistent storage</li><li>Without interactive shell access</li></ul><p>You cannot SSH into it.<br>You cannot inspect its memory.<br>You cannot attach a debugger.</p><p>It runs code. That’s it.</p><p>You send data in through controlled channels.<br>You get results out.<br>But you cannot observe what happens inside.</p><p>Before sending data, you can verify what is running inside the enclave through <strong>cryptographic attestation</strong>.</p><p>That attestation can be checked and tied into <strong>AWS Key Management Service (KMS)</strong> so that only approved enclaves can access encryption keys.</p><h3>Why Anyone Would Want That</h3><p>Because sometimes the problem is not external attackers.</p><p>Sometimes the problem is <strong>trust boundaries inside your own system</strong>.</p><p>Think about data that is so sensitive that even your own operators should not see it:</p><ul><li>Personally identifiable information</li><li>Healthcare records</li><li>Financial transactions</li><li>Intellectual property</li><li>Encryption keys</li></ul><p>With AWS Nitro Enclaves, you can process that data in a place that:</p><ul><li>AWS operators cannot access</li><li>Your own administrators cannot access</li><li>Your application cannot accidentally log or leak</li></ul><p>The data lives, is processed, and disappears inside a sealed environment.</p><p>You only get the output.</p><h3>The Bigger Pattern</h3><p>AWS is quietly shifting infrastructure from:</p><p>“Trust software controls”</p><p>to:</p><p>“Trust hardware boundaries.”</p><p>Not because software is bad.</p><p>But because hardware gives you something software cannot:</p><p>A <strong>root of trust</strong> that is physically enforced.</p><p>Once you have that, you can build:</p><ul><li>Faster systems</li><li>Safer systems</li><li>More trustworthy systems</li></ul><p>Without constantly trading one for the other.</p><h3>A Question Worth Sitting With</h3><p>Here’s the real question:</p><p>Are you building systems that assume trust, or systems that <strong>prove</strong> trust?</p><p>Because that difference shapes everything.</p><p>How you handle secrets.<br>How you process sensitive data.<br>How you think about insiders, operators, and attackers.<br>How you explain your security posture to customers and regulators.</p><p>The AWS Nitro System and AWS Nitro Enclaves are not just features.</p><p>They are a statement:</p><blockquote><em>The future of cloud infrastructure is not only about scale.<br>It is about verifiable trust.</em></blockquote><p>And once you start designing with that in mind, it becomes very hard to go back.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ce0fc8f5fa6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sticky Sessions: When Consistency Matters More Than Perfect Balance]]></title>
            <link>https://medium.com/@sahanaishwarya012/sticky-sessions-when-consistency-matters-more-than-perfect-balance-af50974bd64d?source=rss-945e8cf8c400------2</link>
            <guid isPermaLink="false">https://medium.com/p/af50974bd64d</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Sahana]]></dc:creator>
            <pubDate>Tue, 06 Jan 2026 05:55:42 GMT</pubDate>
            <atom:updated>2026-01-06T05:55:42.904Z</atom:updated>
            <content:encoded><![CDATA[<p>There’s a quiet moment in every distributed system where you realize something subtle is broken.</p><p>Not the obvious stuff, no 500 errors, no crashes, no alarms blaring.</p><p>But users start saying things like:</p><blockquote><em>“Why did I get logged out?”<br>“Why did my cart reset?”<br>“Why did my form submission disappear?”</em></blockquote><p>And when you trace it down, you discover the problem isn’t that your system is <em>down,</em> it’s that your system is <em>too well distributed</em>.</p><p>Let’s talk about <strong>sticky sessions: </strong>what they are, why they exist, when they help, and when they quietly cause more harm than good.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uw5-p6F3SQthwedLBzlt_g.png" /><figcaption>Figure 1.1</figcaption></figure><h3>The Problem: Stateless Infrastructure vs. Stateful Humans</h3><p>Modern load balancing is designed to be fair.</p><p>Requests come in.<br>They get distributed across healthy backend instances.<br>Everyone gets an equal share of the work.</p><p>But users are not stateless.</p><p>They log in.<br>They build carts.<br>They fill multi-step forms.<br>They expect continuity.</p><p>So what happens if:</p><ul><li>Request #1 goes to Instance A</li><li>Request #2 goes to Instance B</li><li>Instance B has never seen this user before</li></ul><p>Suddenly:</p><ul><li>The session looks empty</li><li>The user looks unauthenticated</li><li>The experience feels broken</li></ul><p>Sticky sessions exist to bridge this gap.</p><h3>What Sticky Sessions Actually Do</h3><p><strong>Sticky sessions (also called session affinity)</strong> ensure that:</p><blockquote><em>Once a client is routed to a backend instance, future requests from that same client go back to the </em>same<em> instance.</em></blockquote><p>Think of it like this:</p><p>Instead of saying <em>“any server will do”</em>, the load balancer says:</p><blockquote><em>“Ah, you again, you were with Instance A earlier. Let’s send you back there.”</em></blockquote><p>This routing decision is stored using a <strong>cookie</strong> on the client side.</p><p>So the system remains distributed, but individual users get continuity.</p><h3>The Tradeoff (And It’s a Big One)</h3><p>Sticky sessions solve one problem by introducing another:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*74Is6tqsEvMo41siaxbSPw.png" /><figcaption>Figure 2.1</figcaption></figure><p>Imagine one backend instance becomes responsible for:</p><ul><li>A very active user</li><li>Or a large corporate client</li><li>Or a bot generating lots of traffic</li></ul><p>That instance becomes overloaded while others sit idle.</p><p>So the real question becomes:</p><blockquote><strong><em>Do I value user continuity more than perfect load fairness?</em></strong></blockquote><p>Sometimes the answer is <strong>yes,</strong> especially early in a system’s life.</p><p>Sometimes the answer is <strong>no,</strong> especially at massive scale.</p><h3>How Stickiness Is Implemented</h3><p>Stickiness is implemented using <strong>cookies</strong>.</p><p>There are two broad categories:</p><h3>1. Application-Based Cookies</h3><p>These are generated by your backend application.</p><ul><li>You define the cookie name.</li><li>You control its attributes.</li><li>You decide its expiration.</li></ul><p><strong>Important rules:</strong></p><ul><li>The cookie name must be unique per target group.</li><li>You must not use reserved names like:<br>* AWSALB <br>* AWSALBAPP<br>* AWSALBTG</li></ul><p>These are reserved internally by the load balancing layer.</p><p><strong>When this is useful:</strong></p><ul><li>You already have a session system.</li><li>You want full control over how sessions are identified.</li><li>You want to attach custom attributes to sessions.</li></ul><h3>2. Load-Balancer-Generated Cookies</h3><p>These are created and managed for you.</p><p>Two main types:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k1075oO8hTHLsjaTJw5PaQ.png" /><figcaption>Figure 3.1</figcaption></figure><p>You don’t manage the contents just the expiration.</p><p><strong>When this is useful:</strong></p><ul><li>You want stickiness but don’t want to build session plumbing.</li><li>You’re fine letting infrastructure manage routing identity.</li></ul><h3>Why Expiration Matters</h3><p>Sticky cookies always have an expiration.</p><p>That’s intentional.</p><p>Without expiration:</p><ul><li>Old routing decisions persist forever.</li><li>Instances that should be drained keep receiving traffic.</li><li>Failover becomes messy.</li></ul><p>Expiration gives the system a chance to:</p><ul><li>Rebalance</li><li>Heal</li><li>Adapt</li></ul><p>A good mental model is:</p><blockquote><em>Stickiness should be </em><strong><em>temporary</em></strong><em>, not permanent.</em></blockquote><p>It’s a hint, not a promise.</p><h3>When Sticky Sessions Are a Good Idea</h3><p>Sticky sessions make sense when:</p><ul><li>You’re migrating from a stateful monolith to a distributed system</li><li>You have session data stored in memory, not shared storage</li><li>You’re running legacy applications that can’t be easily rewritten</li><li>You want fast wins with minimal refactoring</li></ul><p>They act as a <strong>bridge</strong> between old assumptions and new infrastructure.</p><h3>When Sticky Sessions Are a Bad Idea</h3><p>They become problematic when:</p><ul><li>You need even load distribution at high scale</li><li>You’re autoscaling aggressively</li><li>You rely on frequent instance replacement</li><li>You want true statelessness</li></ul><p>In those cases, external session storage (databases, caches, tokens) is usually a better long-term solution.</p><h3>A Quiet Design Philosophy</h3><p>Sticky sessions aren’t about performance.<br>They aren’t about scaling.<br>They aren’t about architecture elegance.</p><p>They’re about <strong>user experience continuity</strong>.</p><p>They acknowledge something deeply human:</p><blockquote><em>Users don’t care how elegant your infrastructure is.<br>They care whether their session feels stable.</em></blockquote><p>And sometimes, stability is more important than purity.</p><h3>Final question for you:</h3><p>Are you using sticky sessions because:</p><ul><li>You <em>want</em> to?</li><li>Or because you <em>need</em> to?</li></ul><p>There’s no wrong answer but the difference matters.</p><p>If you want, tell me your scenario (traffic size, app type, state handling style), and I can help you decide whether stickiness is the right tool or just a convenient crutch.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af50974bd64d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Most Teams Choose the Wrong Compute Model]]></title>
            <link>https://medium.com/@sahanaishwarya012/why-most-teams-choose-the-wrong-compute-model-0f892fe70e01?source=rss-945e8cf8c400------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f892fe70e01</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[virtual-machine]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Sahana]]></dc:creator>
            <pubDate>Fri, 02 Jan 2026 05:27:24 GMT</pubDate>
            <atom:updated>2026-01-02T05:27:24.385Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“<strong>It depends.</strong>”<em><br>That’s the most honest and most frustrating answer to almost every architecture question.</em></blockquote><p>After designing and reviewing dozens of production systems across wildly different workloads, one pattern becomes clear: <strong>choosing between serverless, containers, and virtual machines is less about technology and more about understanding the shape of your problem.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IJ-dY4SZl67ldM0GIRxhJw.png" /></figure><p>Let’s walk through this decision together, not as a comparison chart, but as a set of questions you can ask yourself.</p><h3>Start Here: What Are You Really Building?</h3><p>Before choosing a compute model, pause and answer these:</p><ul><li>Is the workload <strong>event-driven or continuously running</strong>?</li><li>Is traffic <strong>bursty or predictable</strong>?</li><li>Do you need <strong>fine-grained OS or runtime control</strong>?</li><li>How important is <strong>speed of iteration vs long-term operational control</strong>?</li><li>Are you optimizing for <strong>developer velocity, cost, or performance</strong>?</li></ul><p>Keep these in mind as we explore each option.</p><h3>Serverless: When You Want to Think in Events, Not Servers</h3><p><strong>Pick this when:</strong></p><ul><li>Your system reacts to events (HTTP calls, messages, file uploads, cron jobs).</li><li>Load is unpredictable or spiky.</li><li>You want near-zero infrastructure management.</li><li>You want to move fast.</li></ul><p><strong>Typical examples:</strong></p><ul><li>APIs</li><li>Webhooks</li><li>Background jobs</li><li>Image/video processing</li><li>Data transformation pipelines</li></ul><p><strong>The mindset shift:</strong><br>You stop thinking about machines and start thinking about <em>flows</em>.</p><blockquote><em>“When this happens → run this code.”</em></blockquote><p><strong>Interactive check:</strong><br>Ask yourself:</p><ul><li>If traffic went to zero for 6 hours, should I still be paying for compute?</li><li>Does each request run independently?</li><li>Can my function finish in seconds or minutes?</li></ul><p>If yes, serverless is likely a strong fit.</p><p><strong>Trade-offs:</strong></p><ul><li>Cold starts (sometimes)</li><li>Execution limits</li><li>Harder debugging locally</li><li>Less control over runtime internals</li></ul><h3>Containers: When You Want Control and Portability</h3><p><strong>Pick this when:</strong></p><ul><li>You want consistent environments from laptop → production.</li><li>You have long-running services.</li><li>You need custom runtimes or libraries.</li><li>You care about portability between platforms.</li></ul><p><strong>Typical examples:</strong></p><ul><li>Web backends</li><li>Microservices</li><li>ML inference services</li><li>Stateful-but-scalable apps</li><li>Systems with internal service-to-service communication</li></ul><p>Containers shine when:</p><ul><li>You care about how the process runs.</li><li>You need predictable performance.</li><li>You want to control networking, memory, and dependencies.</li></ul><p><strong>Interactive check:</strong></p><ul><li>Does my service run continuously?</li><li>Do I need background threads, open sockets, or custom binaries?</li><li>Do I want control over scaling behavior?</li></ul><p>If yes, containers are your friend.</p><p><strong>Trade-offs:</strong></p><ul><li>You now manage orchestration.</li><li>You own scaling logic.</li><li>You are responsible for patching, upgrades, and monitoring.</li></ul><h3>Virtual Machines: When You Need Full Control or Legacy Compatibility</h3><p><strong>Pick this when:</strong></p><ul><li>You are migrating legacy systems.</li><li>You need full OS-level access.</li><li>You run software that can’t be containerized.</li><li>You require very specific networking or security configurations.</li></ul><p><strong>Typical examples:</strong></p><ul><li>Legacy enterprise applications</li><li>Specialized databases or appliances</li><li>Monoliths that are too risky to refactor yet</li><li>Commercial software with OS-level dependencies</li></ul><p>VMs are still incredibly valuable especially when modern abstractions are too constraining.</p><p><strong>Interactive check:</strong></p><ul><li>Does this software expect a full OS?</li><li>Does it require manual tuning at the kernel or filesystem level?</li><li>Is refactoring too risky or expensive right now?</li></ul><p>If yes, start with VMs.</p><p><strong>Trade-offs:</strong></p><ul><li>Slower scaling</li><li>Higher operational burden</li><li>Less efficient resource usage</li><li>Slower iteration cycles</li></ul><h3>The Most Common Mistake</h3><p>People often ask:</p><blockquote>“Which one is best?”</blockquote><p>The better question is:</p><blockquote><strong><em>“Which one reduces my risk the most for this specific workload?”</em></strong></blockquote><ul><li>Serverless reduces operational risk.</li><li>Containers reduce platform risk.</li><li>VMs reduce migration risk.</li></ul><h3>A Simple Decision Flow</h3><p>Try this mental model:</p><p>1️⃣ Is the workload event-driven, bursty, and stateless? → <strong>Serverless</strong><br>2️⃣ Is it a continuously running service with custom dependencies? → <strong>Containers</strong><br>3️⃣ Is it legacy, tightly coupled to OS, or risky to change? → <strong>VMs</strong></p><p>You can also mix them.</p><p>In fact, most mature architectures do.</p><h3>Final Thought</h3><p>Architecture is not about picking the “coolest” technology.</p><p>It’s about:</p><ul><li>Reducing uncertainty</li><li>Matching the system to the problem</li><li>Choosing the path that lets you learn safely</li></ul><p>The best architectures are not the most advanced ones, they’re the ones that evolve gracefully.</p><h3>Your turn 👇</h3><ul><li>What are you building right now?</li><li>Where do you feel friction: speed, cost, reliability, or complexity?</li><li>Which model are you currently using, and why?</li></ul><p>Drop your thoughts in the comments. I’ll gladly think through it with you 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f892fe70e01" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lambda Power Tuning]]></title>
            <link>https://medium.com/@sahanaishwarya012/lambda-power-tuning-b457c16f0e3d?source=rss-945e8cf8c400------2</link>
            <guid isPermaLink="false">https://medium.com/p/b457c16f0e3d</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Sahana]]></dc:creator>
            <pubDate>Tue, 18 Nov 2025 12:17:53 GMT</pubDate>
            <atom:updated>2025-11-18T12:17:53.734Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I Used Lambda Power Tuning to Fix Performance Bottlenecks and Reduce Cost in Realtime Projects</h3><p>Over the past few months, I’ve had to troubleshoot and optimize several serverless workloads running on AWS Lambda — some powering internal APIs, others processing high-volume data streams. A repeating theme kept showing up: <strong>performance inconsistency and unpredictable cost</strong>.</p><p>At first, I assumed the usual suspects — database latency, external API calls, or cold starts. But after digging into logs, X-Ray traces, and Lambda Insights, a pattern emerged:</p><blockquote><strong><em>The majority of performance issues weren’t due to code. They were due to wrong memory allocation.</em></strong></blockquote><p>That realization is what pushed me to incorporate <strong>AWS Lambda Power Tuning</strong> directly into my workflow.</p><p>This blog walks through how I used it, what problems it solved, and why I now consider it a mandatory step for every Lambda-based architecture I design.</p><h3>🔍 The Problem I Kept Running Into</h3><p>Several Lambdas showed similar symptoms:</p><ul><li>Slow or spiky response times under moderate load</li><li>Execution time increasing after code deployments</li><li>Cost rising even though invocation count stayed the same</li><li>Inconsistent behavior between dev/stage/prod</li></ul><p>Initially, these symptoms looked unrelated — but the root cause was the same:</p><h3>The functions were underpowered. Even though they weren’t memory-heavy, they were CPU-bound.</h3><p>Lambda ties CPU, network throughput, and I/O proportionally to memory.<br> If memory is low → CPU is low → everything slows down.</p><p>This is why the 128 MB → 1024 MB jump frequently results in <em>lower</em> total cost.</p><p>I needed a systematic, data-driven way to choose memory — not guesswork.</p><h3>🧠 Why I Decided to Use Lambda Power Tuning</h3><p>At this point, I had three goals in mind:</p><h3>1. Find the cheapest configuration without compromising performance</h3><p>Some workloads run the same speed at 512 MB and 2048 MB — so why pay more?</p><h3>2. Find the fastest configuration for latency-sensitive APIs</h3><p>Milliseconds matter when front-end teams are waiting.</p><h3>3. Justify architectural decisions with real performance evidence</h3><p>As an AWS architect, it’s not enough to say “increase the memory.”<br> I must <strong>prove</strong> that the recommendation reduces cost or improves performance.</p><p>Lambda Power Tuning quickly became my go-to solution.</p><h3>⚙️ How I Actually Implemented It</h3><p>These steps aren’t theoretical — this is exactly what I did in multiple projects.</p><h3>Step 1 — Deploy Power Tuning From Serverless Application Repository</h3><p>I went to the <strong>Serverless Application Repository</strong>, searched for “power,” and enabled the option to show apps that create custom IAM roles.</p><p>Selected <strong>aws-lambda-power-tuning</strong>, acknowledged the IAM warning, and deployed it with default settings.</p><p>This gave me a <strong>Step Functions state machine</strong> purpose-built for power tuning.</p><h3>Step 2 — Run the Tuning With My Own Lambda</h3><p>Inside Step Functions, I found the powerTuningStateMachine and clicked <strong>Start Execution</strong>.</p><p>Then I prepared my input JSON. Here’s the exact structure I used:</p><pre>{<br>  &quot;lambdaARN&quot;: &quot;YOUR LAMBDA ARN HERE&quot;,<br>  &quot;powerValues&quot;: [128, 256, 512, 1024],<br>  &quot;num&quot;: enter_value,<br>  &quot;payload&quot;: {<br>    &quot;operation&quot;: &quot;list&quot;,<br>    &quot;tableName&quot;: &quot;YOUR LAMBDA FUNCTION NAME&quot;,<br>    &quot;payload&quot;: {}<br>  },<br>  &quot;parallelInvocation&quot;: true,<br>  &quot;strategy&quot;: &quot;cost&quot;<br>}</pre><p>A few things I learned:</p><ul><li><strong>parallelInvocation</strong> for realistic load behavior</li><li><strong>Testing multiple memory tiers</strong> to find the elbow point</li><li><strong>Choosing </strong><strong>strategy: cost</strong> for high-throughput workloads</li></ul><h3>Step 3 — Analyze the Visualization</h3><p>After execution finished, I opened the visualization link.</p><p>This is where the magic happens.</p><p>I saw exactly:</p><ul><li>Which memory setting gave <strong>best performance</strong></li><li>Which gave <strong>lowest cost</strong></li><li>Where the <strong>optimal balance</strong> was</li><li>How warm vs cold starts varied</li><li>How execution time dropped as CPU increased</li></ul><p>In some cases, 128 MB → 1024 MB reduced runtime by <strong>75%</strong>.</p><p>In one project, cost dropped by <strong>40%</strong> even though the memory allocation increased 8× — simply because the function finished faster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sP5J1ZqXEvak58tYPSgSkg.png" /><figcaption>Fig 1.1: Power Tuning Results Before Optimization</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*afUp0KZvgLghfd1X5kisBg.png" /><figcaption>Fig 1.2: Lambda Power Tuning Results After Optimization</figcaption></figure><h3>🧪 How I Validated Improvements With Postman Load Testing</h3><p>Lambda Power Tuning tells me how Lambda behaves.<br> But I also wanted to understand <strong>end-to-end API latency</strong> through API Gateway.</p><p>That’s where Postman load testing was extremely useful.</p><h3>Step 1 — I Created a POST Request to My API Gateway Endpoint</h3><p>I built a collection, switched the method to <strong>POST</strong>, and added the request body:</p><pre>{<br>  &quot;operation&quot;: &quot;list&quot;,<br>  &quot;tableName&quot;: &quot;YOUR LAMBDA FUNCTION NAME&quot;,<br>  &quot;payload&quot;: {}<br>}</pre><p>(The “Make sure you click Save” lesson was learned the hard way.)</p><h3>Step 2 — Performance Test</h3><p>Running the collection under Performance Mode gave me:</p><ul><li>Average response time</li><li>P95 / P99 latency</li><li>Error rates</li><li>Throughput</li></ul><p>In one of my tests, the average latency was <strong>~421 ms</strong> at 128 MB.</p><p>Not bad — but not great either.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rK8LrByfpdmwlGqxwycRPg.png" /><figcaption>Fig 2.1: Power Tuning Results Before Optimization</figcaption></figure><h3>Step 3 — Increase Lambda Memory and Test Again</h3><p>I updated the Lambda from <strong>128 MB → 512 MB</strong>, which I predicted with the help of Lambda Power Tuning graph (refer Fig 1.1), and saved.</p><p>Then I ran the Postman test again.</p><p>Result?<br> Response time dropped <em>significantly</em> — exactly what Lambda Power Tuning predicted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o8AlhUoTuDe9VVNcKVFmoQ.png" /><figcaption>Fig 2.2: Results From Postman After Optimization</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6lStpw6mDP14jWKg23BjmQ.png" /><figcaption>Fig 3.1: Comparison of Before And After Optimization</figcaption></figure><h3>💡 What I Learned</h3><h3>1. Memory != memory. Memory = CPU + network + disk + speed.</h3><p>Most engineers underestimate this.</p><h3>2. Low memory is often the most expensive setting</h3><p>Because your function runs longer.</p><h3>3. Workloads behave differently</h3><p>Some scale linearly with CPU; others barely change.</p><h3>4. Tuning should be a part of CI/CD</h3><p>Not a one-time manual process.</p><h3>5. Postman + Lambda Power Tuning = full insight</h3><p>One shows backend compute behavior.<br> The other shows API-level user impact.</p><p>Together, they form a complete performance story.</p><h3>🚀 Final Thoughts — Why I Now Use It in Every Serverless Project</h3><p>Lambda Power Tuning moved me from guessing to engineering.</p><p>It gave me:</p><ul><li>Proof to justify memory settings</li><li>Repeatable performance analysis</li><li>Lower cost for high-scale systems</li><li>Faster response times for API workloads</li><li>A standardized optimization path</li></ul><p>This tool helped me catch performance bottlenecks <strong>before</strong> they became production incidents — and helped my teams build serverless systems that are both faster and cheaper.</p><p>If you’re designing or maintaining serverless architectures, incorporate this into your workflow. You’ll thank yourself later.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b457c16f0e3d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[7 Rs of AWS Migration]]></title>
            <link>https://medium.com/@sahanaishwarya012/7-rs-of-aws-migration-576d876f3985?source=rss-945e8cf8c400------2</link>
            <guid isPermaLink="false">https://medium.com/p/576d876f3985</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-migration]]></category>
            <category><![CDATA[solution-architecture]]></category>
            <dc:creator><![CDATA[Sahana]]></dc:creator>
            <pubDate>Tue, 07 Oct 2025 13:58:15 GMT</pubDate>
            <atom:updated>2025-10-07T13:58:15.902Z</atom:updated>
            <content:encoded><![CDATA[<p>Migrations rarely fail because of bad technology; they fail when the assumptions behind it go untested.</p><p>Across industries — from BFSI to retail and manufacturing — the same slide appears in every cloud workshop:<br> the <strong>7 Rs of migration</strong>.<br> Simple in theory, nuanced in practice.<br> They’re not menu choices; they’re patterns that emerge once teams weigh cost, risk, and time.</p><p>Below is a look at how the 7 Rs actually behave in the field — beyond certification decks and project charters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*A17yC9M_yzSOIptoR7gV2g.png" /><figcaption>Figure 1.1</figcaption></figure><h3>1 — Rehost → The “clock-is-ticking” move</h3><p>When a data-center contract expires or a hardware refresh looms, rehosting becomes the fastest escape route. Teams replicate servers to EC2 using <strong>AWS Application Migration Service</strong>, aiming for functional parity rather than perfection. It’s the tactical “lift-and-shift” that buys time to rethink later.</p><p>Good rehosts start with automation and hygiene: consistent <strong>Launch Templates</strong>, baseline monitoring through <strong>CloudWatch</strong>, and system access via <strong>Systems Manager</strong>. Those basics pay off when post-migration analytics reveal over-provisioned hosts and idle licenses.</p><p>Rehost delivers speed — but only if followed by analysis. Stop there, and you’ve just moved legacy costs to a new data center with better branding.</p><h3>2 — Replatform → Lift, then tune</h3><p>Once stability returns, attention shifts to removing operational drag. Replatforming keeps the business logic intact but replaces self-managed dependencies with managed ones:</p><ul><li>SQL Server → <strong>RDS PostgreSQL</strong></li><li>Tomcat → <strong>Elastic Beanstalk</strong></li><li>Cron jobs → <strong>EventBridge + Lambda</strong>.</li></ul><p>Organizations typically see cost and reliability gains within a quarter. But partial modernization without governance is dangerous — teams can scatter across overlapping AWS services. A defined <strong>Service Catalog</strong>, consistent IaC standards, and tagging policies prevent that chaos.</p><p>Replatforming succeeds when it’s guided centrally but executed locally.</p><h3>3 — Refactor → Rebuild for the next decade</h3><p>Refactoring is modernization in its truest sense. Applications are decomposed, logic becomes event-driven, and infrastructure turns ephemeral.</p><p>Typical target patterns include:</p><ul><li><strong>ECS Fargate / EKS</strong> for containerized microservices</li><li><strong>Lambda + Step Functions + EventBridge</strong> for serverless orchestration</li><li><strong>DynamoDB</strong>, <strong>Aurora Serverless</strong>, or <strong>S3 + Athena</strong> for domain-based data stores</li></ul><p>Enterprises usually refactor workloads that drive business differentiation — pricing engines, analytics platforms, or personalization APIs. Effort is high, ROI long-term. The hidden cost is cultural: teams must mature in CI/CD, IaC, and observability before refactoring pays off.</p><p>Modernization always stretches delivery cycles before it shortens them.</p><h3>4 — Repurchase → Replace to refocus</h3><p>Some functions simply aren’t worth owning. When agility matters more than customization, repurchase through SaaS makes sense.</p><p>Adopting products like Salesforce, ServiceNow, or Workday shifts focus from maintenance to integration. AWS provides the connective tissue:</p><ul><li><strong>AppFlow</strong> for managed data exchange</li><li><strong>PrivateLink</strong> to keep SaaS traffic on the AWS backbone</li><li><strong>Cognito / IAM Identity Center</strong> for unified access control</li></ul><p>The key lesson: measure success by freed capacity, not new features.<br> Every SaaS adoption that eliminates server babysitting is budget returned to innovation.</p><h3>5 — Relocate → The VMware bridge</h3><p>Large VMware estates often take the <strong>relocate</strong> route first. <strong>VMware Cloud on AWS</strong> lifts entire clusters into AWS hardware with minimal change, preserving vCenter and operational familiarity.</p><p>It’s a pragmatic bridge — ideal for disaster-recovery readiness or tight decommission timelines. But cost per host is significant. Successful programs treat VMC as a <em>transition zone</em>: migrate first, modernize later. Within a year, mature teams begin moving individual workloads off VMC to native AWS services to reclaim elasticity and FinOps visibility.</p><h3>6 — Retain → Hybrid by design, not by accident</h3><p>Certain workloads stay put for good reasons — latency to plant systems, data-sovereignty mandates, or specialized hardware. The difference between success and stagnation is how they’re integrated.</p><p>AWS Outposts, Local Zones, and Direct Connect enable on-prem assets to operate under the same visibility plane as cloud ones. Unified monitoring through <strong>CloudWatch + X-Ray</strong> and lifecycle governance in <strong>Backup Vaults</strong> keeps hybrid estates manageable.</p><p>Retain is not “do nothing”; it’s “manage deliberately.”</p><h3>7 — Retire → Delete as a deliverable</h3><p>Every migration assessment uncovers forgotten utilities, test apps, and scripts still burning compute hours. Retiring them is the quiet hero of cost optimization.</p><p>Portfolio analysis with <strong>Migration Hub Strategy Recommendations</strong> and <strong>Trusted Advisor</strong> reveals candidates quickly. Organizations that prune aggressively often fund their modernization from the savings alone. Retirement isn’t the end of a workload — it’s the beginning of fiscal room for something better.</p><h3>Sequencing &gt; Selection</h3><p>Real programs don’t pick one R — they cycle through several.</p><p>A typical roadmap looks like:</p><ol><li><strong>Rehost</strong> for speed.</li><li><strong>Replatform</strong> for efficiency.</li><li><strong>Refactor</strong> for agility.</li><li><strong>Repurchase / Retire</strong> to reinvest.</li><li><strong>Relocate / Retain</strong> where compliance or latency dictates.</li></ol><p>The misstep most teams make is tackling too many Rs simultaneously. When everything is “priority,” governance collapses. Establish a <strong>Cloud Center of Excellence (CCoE)</strong> to phase migrations, define graduation criteria, and enforce tagging and budget policies. Sequencing builds confidence; chaos destroys it.</p><h3>After Migration — The Long Game</h3><p>Moving workloads is logistics. Making them thrive in AWS is evolution.</p><ul><li><strong>Observability:</strong> standardize CloudWatch metrics, X-Ray traces, and OpenTelemetry logs across environments.</li><li><strong>Security:</strong> integrate IAM roles with SSO, use <strong>AWS Organizations + Service Control Policies</strong> for consistent guardrails.</li><li><strong>FinOps:</strong> map tags to business units, surface spend through <strong>Cost Explorer</strong> and <strong>Budgets</strong>, and act on <strong>Compute Optimizer</strong> insights.</li><li><strong>Resilience:</strong> validate assumptions with <strong>Fault Injection Simulator</strong> and regular game days.</li></ul><p>The post-migration phase is where cloud maturity quietly compounds.</p><h3>Closing Thought</h3><p>Every successful migration shares one discipline: <strong>progress over perfection</strong>. Teams rarely start with the “right R.” They earn it — through telemetry, cost visibility, and continuous learning.</p><p>The cloud rewards iteration, not ideology. The 7 Rs aren’t steps on a ladder; they’re seven perspectives on how organizations evolve. Pick one, master it, move on — and let data tell you when it’s time for the next.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=576d876f3985" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Real-Time Alert System Using AWS Lambda and SNS]]></title>
            <link>https://medium.com/@sahanaishwarya012/building-a-real-time-alert-system-using-aws-lambda-and-sns-85233aa5bcf9?source=rss-945e8cf8c400------2</link>
            <guid isPermaLink="false">https://medium.com/p/85233aa5bcf9</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws-sns]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-s3]]></category>
            <dc:creator><![CDATA[Sahana]]></dc:creator>
            <pubDate>Tue, 22 Jul 2025 17:38:51 GMT</pubDate>
            <atom:updated>2025-07-22T17:38:51.956Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Skills covered</strong>: IAM · S3 · SNS · Lambda</p><p><strong>🚀 Introduction</strong></p><p>In a cloud-native world, proactive alerts are key to maintaining reliability and quick response times. Imagine a scenario where someone uploads a large file to S3 — say over <strong>10 MB</strong> — and that could affect performance, costs, or downstream processes.</p><p>Let’s build a simple serverless solution using <strong>Lambda</strong> that:</p><ul><li>Logs a warning if an S3 object is over 10MB</li><li>Sends an email notification via <strong>SNS</strong></li></ul><p><strong>🔧 Tools &amp; Services Used</strong></p><ul><li><strong>Amazon S3</strong> — Storage for incoming files</li><li><strong>AWS Lambda</strong> — Processes the file and triggers alerts</li><li><strong>Amazon SNS</strong> — Sends email notifications</li><li><strong>IAM</strong> — Manages secure permissions for services</li></ul><p><strong>🧱 Architecture</strong></p><ol><li>A file is uploaded to an S3 bucket.</li><li>S3 triggers a Lambda function.</li><li>Lambda checks file size:</li></ol><p>a. If &gt; 10MB: logs a warning in CloudWatch and triggers an SNS topic</p><p>b. Otherwise: exits silently</p><p>4. SNS sends email to subscribed addresses</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qhZyEDY2K74r82mytdFfkQ.png" /><figcaption><strong>Figure 1: Architecture Diagram</strong></figcaption></figure><p><strong>🛠️ Step-by-Step Setup</strong></p><ol><li><strong><em>Create the S3 Bucket</em></strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6KV72p_PKAsEbcApPSRU6g.png" /></figure><p><strong><em>2. Create an SNS Topic &amp; Email Subscription</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B3X89DZJ45lvvlQae1HLGw.png" /></figure><p>✅ Confirm the subscription from your inbox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B3X89DZJ45lvvlQae1HLGw.png" /></figure><p><strong><em>3. Create an IAM Role for Lambda</em></strong></p><p>Make sure the role allows:</p><ul><li>s3:GetObject</li><li>sns:Publish</li><li>logs:CreateLogGroup</li><li>logs:PutLogEvents</li></ul><p><strong><em>4. Write the Lambda Function</em></strong></p><pre>import logging<br>import boto3<br><br># Set up logger<br>logger = logging.getLogger()<br>logger.setLevel(logging.INFO)<br><br>sns_client = boto3.client(&#39;sns&#39;)<br>sns_arn = &#39;enter arn for your sns notification&#39;<br><br>def lambda_handler(event, context):<br>    # Extract file size from the S3 event<br>    file_size = event[&#39;Records&#39;][0][&#39;s3&#39;][&#39;object&#39;][&#39;size&#39;]<br>    file_key = event[&#39;Records&#39;][0][&#39;s3&#39;][&#39;object&#39;][&#39;key&#39;]<br>    bucket_name = event[&#39;Records&#39;][0][&#39;s3&#39;][&#39;bucket&#39;][&#39;name&#39;]<br><br>    # Define threshold: 10 MB in bytes<br>    TEN_MB = 10 * 1024 * 1024  # 10,485,760 bytes<br><br>    # Check file size<br>    if file_size &gt; TEN_MB:<br>        logger.warning(<br>            f&quot;ALERT: File &#39;{file_key}&#39; in bucket &#39;{bucket_name}&#39; is {file_size} bytes &quot;<br>            f&quot;({round(file_size / (1024 * 1024), 2)} MB), which exceeds the 10 MB limit.&quot;<br>        )<br>        message = f&quot;File &#39;{file_key}&#39; in bucket &#39;{bucket_name}&#39; is <br>            {round(file_size / (1024 * 1024), 2)} MB, which exceeds the 10 MB limit.&quot;<br>        sns_client.publish(<br>            Subject=&quot;ALERT - File size exceeds 10MB!&quot;,<br>            TopicArn=sns_arn,<br>            Message=message<br>        )<br>    else:<br>        logger.info(<br>            f&quot;File &#39;{file_key}&#39; is {file_size} bytes &quot;<br>            f&quot;({round(file_size / 1024, 2)} KB) — within allowed size.&quot;<br>        )</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KoUrd4ZqPj_nxFuKrGbb1w.png" /></figure><p>Deploy the changes once the code snippet is ready.</p><p><strong><em>5. Create Trigger to connect Lambda to S3 Event</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VsjnuTTyI937DByLH_m5tA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DBxEaR_FAp3aN_iZLI1zjQ.png" /></figure><p><strong>📊 Observability: Log Warning in CloudWatch</strong></p><p>All Lambda logs are available in <strong>CloudWatch Logs</strong>. You’ll see entries like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1y4fymhQRQjXyJtkOuCxWw.png" /></figure><p><strong><em>6. Testcases</em></strong></p><p><strong><em>Scenario 1: File size less than 10 MB</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YuPgT54xhgdaswoU5qIhQg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rTEz0IsxHU9VoDRf5gFL9Q.png" /></figure><p><strong><em>Scenario 2: File size greater than 10 MB</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ZsL8UHw2XckdmFFYUPWLQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wvtfRZcVdXrr85JRuFYczA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T0Fy0OmJHD9KdhU58RwXDQ.png" /></figure><p><strong>🧠 Extend This Pattern</strong></p><p>This model is powerful. With small changes, you can:</p><ul><li>Monitor critical data pipelines and notify developers on failure</li><li>Alert product teams when sensitive data is uploaded</li><li>Automatically notify stakeholders on major deployment events</li><li>Enforce size limits or quarantine suspicious uploads</li></ul><p><strong>✅ Summary</strong></p><p>You just built a lightweight automation using:</p><ul><li><strong>S3</strong> to store files</li><li><strong>Lambda</strong> to process events</li><li><strong>SNS</strong> to alert stakeholders</li><li><strong>IAM</strong> to safely tie it all together</li></ul><p>🎯 <strong>Real-World Application</strong>: Use this same model for any critical process — if something needs attention, you can immediately notify the people who solve, manage, or make decisions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85233aa5bcf9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Azure Managed Identities: System-Assigned vs. User-Assigned]]></title>
            <link>https://medium.com/@sahanaishwarya012/understanding-azure-managed-identities-system-assigned-vs-user-assigned-b9b2b06ae586?source=rss-945e8cf8c400------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9b2b06ae586</guid>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[azure-active-directory]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Sahana]]></dc:creator>
            <pubDate>Wed, 09 Oct 2024 09:20:16 GMT</pubDate>
            <atom:updated>2024-10-09T09:20:16.725Z</atom:updated>
            <content:encoded><![CDATA[<p>Azure Managed Identities allow your applications to securely access Azure resources without requiring explicit credentials like passwords or API keys. They help reduce the security risks related to secrets management and follow a more secure, scalable approach for identity management. In this blog, we’ll delve deep into two types of managed identities in Azure: System-Assigned Managed Identity and User-Assigned Managed Identity.</p><p><strong>Managed Identity in Azure</strong></p><p>A managed identity is essentially a service principal in Azure Active Directory (Azure AD) that can be automatically created and managed for your applications and services. Managed identities eliminate the need to manage secrets, API keys, or connection strings in your code, reducing security exposure.</p><ul><li><strong>System-Assigned Managed Identity</strong>: Created and tied to an Azure resource like a Virtual Machine, App Service, Logic App, etc. The lifecycle of this identity is tightly coupled with the resource.</li><li><strong>User-Assigned Managed Identity</strong>: Created as a standalone Azure resource, allowing you to assign it to multiple resources, providing more flexibility and control.</li></ul><p><strong>Deep Dive: How Each Identity Works</strong></p><p><strong>System-Assigned Managed Identity</strong></p><p>When you enable a system-assigned managed identity for an Azure resource (e.g., a Virtual Machine or Azure App Service), Azure automatically creates an identity in Azure AD and links it to that resource. This identity can then be used to authenticate to Azure resources that support Azure AD authentication (e.g., Key Vault, Storage Accounts) without the need for credentials.</p><ol><li><strong>Creation</strong>: The identity is created as soon as you enable it on the resource.</li><li><strong>Access Control</strong>: You assign the required roles for the identity using Azure Role-Based Access Control (RBAC).</li><li><strong>Lifecycle</strong>: The identity is deleted when the associated resource is deleted.</li></ol><p><strong>User-Assigned Managed Identity</strong></p><p>A user-assigned managed identity is a standalone Azure resource that can be assigned to multiple Azure services. This gives you more flexibility to use the same identity across different resources, maintaining consistent permissions and identities across services.</p><ol><li><strong>Creation</strong>: You create the identity manually in the Azure portal or via an Azure CLI command.</li><li><strong>Assignment</strong>: You can assign this identity to one or more resources like Virtual Machines or Azure Functions.</li><li><strong>Access Control</strong>: Just like system-assigned identities, user-assigned identities are granted permissions via Azure RBAC.</li><li><strong>Lifecycle</strong>: The identity exists independently from the resource. If the resource is deleted, the identity remains active and can be used elsewhere.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*VADSjMSieIdYsUxQLLgC_w.png" /><figcaption>Table 1: Comparison</figcaption></figure><p><strong>Real-World Scenarios</strong></p><p>Let’s explore practical examples of how managed identities can be used to secure and simplify access to Azure resources.</p><p><strong>1. Securing Azure Key Vault Using Managed Identities</strong></p><p><strong>Problem:</strong></p><p>You want your Azure App Service to retrieve secrets from Azure Key Vault without exposing API keys in code.</p><p><strong>Solution:</strong></p><p>Use either a system-assigned or user-assigned managed identity to securely authenticate the App Service to the Key Vault.</p><p><strong>Step-by-Step Guide (System-Assigned Managed Identity):</strong></p><ol><li><strong>Enable Managed Identity</strong>:</li></ol><ul><li>Go to your App Service.</li><li>Under “Settings”, click on Identity and enable System-Assigned Managed Identity.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*ADeCYLqtw6hKV6_4E8YqOQ.png" /><figcaption>Figure 1.1</figcaption></figure><p><strong>2. Configure Key Vault Access</strong>:</p><ul><li>Go to your Key Vault, under “Access policies”.</li><li>Add a new access policy that grants “Get” permissions for secrets to the App Service’s managed identity.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*PTEgsrtwl6vu6jq3AX4A2w.png" /><figcaption>Figure 1.2</figcaption></figure><p><strong>3. App Configuration</strong>:</p><ul><li>In your application code, use the Key Vault SDK or REST API without needing to specify credentials. Azure automatically handles authentication for you.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*0nXmb8GVTng03Z7LlVXXpA.png" /><figcaption>Figure 1.3</figcaption></figure><p><strong>2. Accessing Azure Storage with Managed Identities</strong></p><p><strong>Problem:</strong></p><p>You want to grant a Virtual Machine access to a Blob Storage account without embedding access keys in scripts.</p><p><strong>Solution:</strong></p><p>Use a system-assigned managed identity on the VM to authenticate against Azure Blob Storage.</p><p><strong>Step-by-Step Guide (User-Assigned Managed Identity):</strong></p><ol><li><strong>Create Managed Identity</strong>:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*qmz4DLxb5VPbskT6bcz5Ug.png" /><figcaption>Figure 2.1</figcaption></figure><p><strong>2. Assign Managed Identity to VM:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*_ylSCvZWR-yfjEzyF3_PMg.png" /><figcaption>Figure 2.2</figcaption></figure><p><strong>3. Grant Blob Storage Access</strong>:</p><p>· Go to the Storage Account, under “Access Control (IAM)”.</p><p>· Assign the role “Storage Blob Data Reader” to the managed identity.</p><p><strong>4.</strong> <strong>VM Script to Access Blob Storage</strong>: You can now use Azure’s DefaultAzureCredential to authenticate and access blobs without any hardcoded credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*ONg3bA2CdoEhslah-jUOsw.png" /><figcaption>Figure 2.3</figcaption></figure><p><strong>Best Practices for Using Managed Identities</strong></p><ol><li><strong>Use System-Assigned Identities for Single Resource Use</strong>: If you need an identity tied to the lifecycle of a single resource, system-assigned managed identities are simpler and easier to manage.</li><li><strong>Leverage User-Assigned Identities for Shared Access</strong>: If multiple resources need the same identity and role assignment, user-assigned managed identities offer more flexibility.</li><li><strong>Audit and Review RBAC Assignments Regularly</strong>: Ensure that managed identities have the least privilege necessary by regularly reviewing role assignments in Azure RBAC.</li><li><strong>Rotate Access Policies</strong>: Regularly update access policies, especially when resources are no longer using managed identities.</li></ol><p><strong>Conclusion</strong></p><p>Azure Managed Identities simplify authentication for your services, eliminating the need for storing secrets in your code and providing a seamless way to manage resource access. System-assigned identities are perfect for single-resource use, while user-assigned identities shine when you need to reuse the same identity across multiple resources. With these tools in hand, you can improve security, streamline authentication, and maintain consistent access control across your Azure resources.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9b2b06ae586" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>