<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: will peixoto</title>
    <description>The latest articles on DEV Community by will peixoto (@_willpeixoto).</description>
    <link>https://dev.clauneck.workers.dev/_willpeixoto</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F500557%2F90d05836-31da-4959-86f5-ae678b03b74d.jpeg</url>
      <title>DEV Community: will peixoto</title>
      <link>https://dev.clauneck.workers.dev/_willpeixoto</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.clauneck.workers.dev/feed/_willpeixoto"/>
    <language>en</language>
    <item>
      <title>AWS Lambda MicroVMs: run untrusted code with VM-level isolation (no infra to manage)</title>
      <dc:creator>will peixoto</dc:creator>
      <pubDate>Wed, 24 Jun 2026 12:44:14 +0000</pubDate>
      <link>https://dev.clauneck.workers.dev/aws-builders/aws-lambda-microvms-run-untrusted-code-with-vm-level-isolation-no-infra-to-manage-3i3</link>
      <guid>https://dev.clauneck.workers.dev/aws-builders/aws-lambda-microvms-run-untrusted-code-with-vm-level-isolation-no-infra-to-manage-3i3</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;AWS just shipped &lt;strong&gt;Lambda MicroVMs&lt;/strong&gt;, a new serverless primitive that gives each user or session a &lt;strong&gt;VM-level isolated sandbox&lt;/strong&gt;, with near-instant launch and &lt;strong&gt;state preserved for up to 8 hours&lt;/strong&gt;, all on Firecracker. Here is what it is, when to reach for it instead of a plain Lambda Function, and how to architect on top of it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;🇧🇷 &lt;a href="https://willpeixoto.dev/aws-lambda-microvms-codigo-isolado-serverless" rel="noopener noreferrer"&gt;Leia em português&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let me put you in a situation. You need to run a piece of code you did not write. Maybe it is the script your user pasted into your platform, maybe it is the snippet an AI agent just generated and wants to execute. And then comes the question that keeps anyone working with multi-tenant up at night: how do I run this without handing a stranger the keys to the house?&lt;/p&gt;

&lt;p&gt;Until last week you had three paths, each with a catch. A VM gives you strong isolation but takes minutes to boot. A container starts in seconds but shares a kernel, so running untrusted code there takes a pile of hardening. And the Lambda Function was built for short request-response, not for a session that has to keep live state between one interaction and the next (externalizing it to DynamoDB stores the data, not the live runtime: the running process, the loaded packages, the memory). In the end you chose between performance and isolation. No way around it. Or there was.&lt;/p&gt;

&lt;h2&gt;
  
  
  Container, VM, or Lambda: the trade-off none of them solved alone
&lt;/h2&gt;

&lt;p&gt;This pattern got common: AI coding assistants, interactive code environments, analytics, vulnerability scanners, game servers running player scripts. They all need the same thing: give each user their own environment to run code the team did not write, safely and without lag.&lt;/p&gt;

&lt;p&gt;The knot is that real isolation and low latency pull in opposite directions. From a security angle you want a hard boundary between tenants (the Security pillar of the Well-Architected Framework: isolate what is not trusted). From an experience angle you want that environment up the instant the user shows up. Reconciling the two was the expensive work.&lt;/p&gt;

&lt;p&gt;And there is a nice irony in this story. We spent years learning to build stateless apps, and now state is a requirement again.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The solution to the future was hiding in the past.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is a line a friend dropped in a conversation, and it has not left my head since. Ever felt that way? Because I have. And it is roughly what Lambda MicroVMs does: it brings state back, without handing you the weight of a full VM.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Lambda MicroVMs is
&lt;/h2&gt;

&lt;p&gt;Lambda MicroVMs is a new primitive &lt;strong&gt;inside&lt;/strong&gt; Lambda, built exactly for that gap. Each MicroVM gives a single user or session its own isolated environment that boots fast, keeps memory and disk for the whole session, and pauses to a low cost when the user steps away.&lt;/p&gt;

&lt;p&gt;The magic comes from &lt;strong&gt;Firecracker&lt;/strong&gt;, the same lightweight virtualization that already runs over 15 trillion Lambda invocations a month. This is not raw new tech, it is the mature foundation of Lambda itself, exposed in a new way.&lt;/p&gt;

&lt;p&gt;The model is &lt;strong&gt;image-then-launch&lt;/strong&gt;:&lt;/p&gt;

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

&lt;p&gt;You build the &lt;strong&gt;image&lt;/strong&gt; once (AWS runs your Dockerfile, initializes the app, and takes a snapshot of memory and disk). After that, every MicroVM you launch resumes from that snapshot instead of cold-booting. That is why launch and resume are near-instant, even for a multi-gigabyte session.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it is actually for (with examples you will recognize)
&lt;/h2&gt;

&lt;p&gt;The main cue: this only enters the picture if you are &lt;strong&gt;building a platform that runs third-party code&lt;/strong&gt;. If your app does not execute outside code, you do not need it. It is a building block for people who build that kind of product:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Replit, CodeSandbox, "VS Code in the browser":&lt;/strong&gt; the user types code in the browser and it runs isolated, per user, holding state while the tab is open. That "runs isolated" is the MicroVM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code interpreter (like ChatGPT's or Claude's):&lt;/strong&gt; you ask "plot this CSV", the AI writes Python and &lt;strong&gt;runs it&lt;/strong&gt; to answer you. The runtime that executes that generated code, isolated per conversation, is the use case.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI/CD runner (and relatives):&lt;/strong&gt; a job runs the code of a Pull Request that may come from any stranger's fork, untrusted by definition, so you want an isolated, disposable runner per job. Same family: a scanner that runs a suspicious binary, a coding-interview platform (the candidate's code runs isolated), an AI agent that runs shell commands.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The thread tying it all together: &lt;strong&gt;each user, session, or job needs its own isolated environment, and the code running there is not code you wrote.&lt;/strong&gt; That is the cue to use a MicroVM instead of a Lambda Function.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lambda Function or Lambda MicroVM?
&lt;/h2&gt;

&lt;p&gt;They do not compete, they complete each other. The official comparison:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Lambda Functions&lt;/th&gt;
&lt;th&gt;Lambda MicroVMs&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Best for&lt;/td&gt;
&lt;td&gt;request-response or event-driven (APIs, data processing, automation)&lt;/td&gt;
&lt;td&gt;persistent environments running user or AI-produced untrusted code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Programming model&lt;/td&gt;
&lt;td&gt;function handler invoked in a supported runtime&lt;/td&gt;
&lt;td&gt;any application: run your own binaries, listen on ports, use Linux OS capabilities&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Duration&lt;/td&gt;
&lt;td&gt;up to 15 min per invocation; multi-step workflows up to a year with Lambda Durable Functions&lt;/td&gt;
&lt;td&gt;up to 8 hours per session; suspend and resume across sessions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Runtime&lt;/td&gt;
&lt;td&gt;service-provided runtimes (or customer-provided)&lt;/td&gt;
&lt;td&gt;customer-provided MicroVM images&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Inbound networking&lt;/td&gt;
&lt;td&gt;direct invocations or event-source integrations; response streaming&lt;/td&gt;
&lt;td&gt;inbound access to any port using OSI Layer 7 protocols&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Concurrency&lt;/td&gt;
&lt;td&gt;one request per execution environment at a time&lt;/td&gt;
&lt;td&gt;multiple concurrent connections per MicroVM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Environment state&lt;/td&gt;
&lt;td&gt;warm starts may reuse the environment, but state may not persist across invocations&lt;/td&gt;
&lt;td&gt;memory and disk state preserved on suspend, restored on resume&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scaling&lt;/td&gt;
&lt;td&gt;automatic: Lambda creates and destroys environments in response to traffic&lt;/td&gt;
&lt;td&gt;developer-controlled: you create, suspend, resume, and terminate via API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lifecycle&lt;/td&gt;
&lt;td&gt;fully managed by Lambda&lt;/td&gt;
&lt;td&gt;developer-controlled, with optional idle policies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pricing&lt;/td&gt;
&lt;td&gt;per-request + GB-seconds&lt;/td&gt;
&lt;td&gt;per-second of compute while running + snapshot storage while suspended&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The most common confusion: people assume the duration is the same as Lambda's. The startup is similar (both resume from a snapshot), but a Function dies at 15 minutes while a MicroVM holds a session for up to 8 hours with state intact. The real design: your app keeps Lambda Functions for the event-driven backbone, and &lt;strong&gt;calls&lt;/strong&gt; MicroVMs only for the steps that need to run untrusted code in isolation.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works in practice: from endpoint to orchestration
&lt;/h2&gt;

&lt;p&gt;Three things that trip people up at first, together.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The endpoint has a status.&lt;/strong&gt; When you call &lt;code&gt;run-microvm&lt;/code&gt;, you get an ID and a dedicated HTTPS endpoint for that MicroVM. But it is not ready instantly: it goes through states, from launch to &lt;code&gt;RUNNING&lt;/code&gt; (about 2 seconds), and when idle it moves to suspended, coming back on resume. The endpoint is per MicroVM, per session.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One image, many MicroVMs.&lt;/strong&gt; You build the image once (&lt;code&gt;create-microvm-image&lt;/code&gt;) and each MicroVM is a &lt;code&gt;run-microvm&lt;/code&gt;. Want two? Call it twice, and you get two independent instances. Idle behavior is governed by the &lt;code&gt;idle-policy&lt;/code&gt;: &lt;code&gt;maxIdleDurationSeconds&lt;/code&gt; (suspend after X idle) and &lt;code&gt;autoResumeEnabled&lt;/code&gt; (the next request wakes the MicroVM on its own, in about 1s, no manual restart). When you are done, &lt;code&gt;terminate-microvm&lt;/code&gt; releases everything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You become the orchestrator.&lt;/strong&gt; Since the endpoint is per session, something has to decide when to launch and where to route. Typically a Lambda Function in the backbone does it: it keeps a &lt;code&gt;session -&amp;gt; MicroVM&lt;/code&gt; map (a store like DynamoDB in production), calls &lt;code&gt;RunMicrovm&lt;/code&gt; on a user's first access, stores the ID and endpoint, mints a short-lived token with &lt;code&gt;CreateMicrovmAuthToken&lt;/code&gt;, and proxies the request to the MicroVM's endpoint with the &lt;code&gt;X-aws-proxy-auth&lt;/code&gt; header. If the instance is suspended and &lt;code&gt;autoResume&lt;/code&gt; is on, the request itself wakes it. Add a routine to terminate orphan MicroVMs and you have the skeleton. The backbone code is in the next post in the series. And do not confuse this with Step Functions: MicroVM is the execution environment, Step Functions is an orchestrator, different layers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cost, limits, and what is still missing
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Cost is a decision, not a detail.&lt;/strong&gt; Werner Vogels keeps hammering in the &lt;strong&gt;Frugal Architect&lt;/strong&gt; that cost is an architecture requirement, not a number you discover on the bill. The suspend is exactly that in practice: you pay a lot for VM-level isolation, but only while the user is active. When they leave, the MicroVM suspends and the cost drops, with no loss of state. Designing your &lt;code&gt;idle-policy&lt;/code&gt; on purpose is a cost decision. The model, from the official table: you pay &lt;strong&gt;per second of compute while it runs&lt;/strong&gt;, and only &lt;strong&gt;snapshot storage while it is suspended&lt;/strong&gt;. Unit prices are on the &lt;a href="https://aws.amazon.com/lambda/pricing/" rel="noopener noreferrer"&gt;Lambda pricing page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Limits:&lt;/strong&gt; ARM64, up to 16 vCPUs, 32 GB of memory, and 32 GB of disk per MicroVM, and up to 8 hours of total runtime. Provisioning is flexible: you set a baseline and burst up to 4x at peak, paying the baseline while it runs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IaC:&lt;/strong&gt; you can use the console, CloudFormation, and CDK.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Dockerfile + zip, and not a prebuilt ECR image?&lt;/strong&gt; Aidan Steele dug into it: Lambda builds two copies of the image, one for Graviton 3 and one for Graviton 4, so it needs the source to recompile. The base comes from ECR Public, but pushing your own prebuilt image from a private ECR as the artifact is not the path. One thing that confuses people coming from containers: ECR does not leave your life. You do not &lt;strong&gt;deliver&lt;/strong&gt; the MicroVM image via ECR, but &lt;strong&gt;inside&lt;/strong&gt; the running MicroVM you can run Docker and &lt;code&gt;docker pull&lt;/code&gt; your private ECR images at runtime. ECR is for consumption inside, not for delivering the image itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Networking and region:&lt;/strong&gt; inbound traffic on configurable ports (HTTP/2, gRPC, WebSockets), service-provided JWE auth, outbound to the internet or your VPC. And it is available so far only in US East (N. Virginia, Ohio), US West (Oregon), Europe (Ireland), and Asia Pacific (Tokyo).&lt;/p&gt;

&lt;h2&gt;
  
  
  When NOT to use it
&lt;/h2&gt;

&lt;p&gt;If the workload is short request-response with no state, it stays a Lambda Function. A MicroVM there is a cannon for a mosquito. And if you just need &lt;strong&gt;more than 15 minutes with your own (trusted) code&lt;/strong&gt;, a MicroVM is also overkill: for a long job, look at Fargate; for a multi-step workflow, Lambda Durable Functions (up to a year, as the table shows). MicroVMs are for when the differentiator is &lt;strong&gt;isolating untrusted code&lt;/strong&gt;, not just going past 15 minutes.&lt;/p&gt;

&lt;p&gt;There is also a gotcha AWS itself flags, and it rhymes with the determinism conversation: since the MicroVM boots from a pre-initialized snapshot (the equivalent of Lambda SnapStart, as Aidan Steele confirmed by testing), apps that generate unique content, open connections, or load ephemeral data at init may diverge. The snapshot froze a moment; whatever needs to be fresh per session cannot be frozen along with it. The fix has a name: &lt;strong&gt;lifecycle hooks&lt;/strong&gt; to re-initialize randomness when each MicroVM is created. Map that out before assuming it just works.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does it kill the container?
&lt;/h2&gt;

&lt;p&gt;No, and the reason is even better.&lt;/p&gt;

&lt;p&gt;The hype of the week is "containers are obsolete." They are not. Quite the opposite: Aidan Steele tested it and &lt;strong&gt;you can run Docker inside a MicroVM&lt;/strong&gt;, with OS capabilities enabled. So the MicroVM does not kill the container, it is more isolated and still runs containers inside. The honest cut is different: there is one specific spot, running untrusted code in isolation, where you will no longer want to harden a container by hand. There the MicroVM wins. Everywhere else, the container is still king.&lt;/p&gt;

&lt;h2&gt;
  
  
  The details the docs leave out
&lt;/h2&gt;

&lt;p&gt;Aidan Steele spent launch day poking at the service and found some really interesting things that are not in the official docs.&lt;br&gt;
I read it and figured it was worth bringing here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You can get a shell into the MicroVM&lt;/strong&gt;, via the &lt;code&gt;CreateMicrovmShellAuthToken&lt;/code&gt; API, with pty as a first-class citizen (Lambda Functions do not have it). Gold for IDE and coding-agent use cases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outbound UDP is blocked by default&lt;/strong&gt; and DNS is a local stub, so DNS inside a container falls back to 8.8.8.8 and fails. The fix is to run with Lambda's DNS: &lt;code&gt;docker run --dns 169.254.169.253&lt;/code&gt;, or go via VPC.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lambda network connectors:&lt;/strong&gt; a reified VPC config (subnets, security groups, an IAM role for the ENI) with its own lifecycle. The network team creates it, the developer just consumes it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt; (his tests): image build 2-3 min; &lt;code&gt;RunMicrovm&lt;/code&gt; to RUNNING about 2s, plus 2s to serve; suspend and resume about 1s each.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What you take away
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Lambda MicroVMs fills a real gap: VM-level isolation &lt;strong&gt;with&lt;/strong&gt; near-instant launch &lt;strong&gt;and&lt;/strong&gt; per-session state, which no single service delivered together.&lt;/li&gt;
&lt;li&gt;It does not replace the Lambda Function, it complements it. Function in the backbone, MicroVM for the untrusted code.&lt;/li&gt;
&lt;li&gt;The idle suspend is a deliberate cost lever, design your &lt;code&gt;idle-policy&lt;/code&gt; on purpose.&lt;/li&gt;
&lt;li&gt;Before locking in architecture: check the region (no São Paulo yet), the limits (ARM64, 16 vCPU, 32 GB, 8h), and the snapshot caveat.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This post was the map. In the next one in the series I actually spin up a MicroVM and we prove the isolation in practice, launching two MicroVMs and testing whether one can reach the other, with the repo on GitHub for you to run along.&lt;/p&gt;

&lt;p&gt;Got a case where you run user or AI code that today is duct-taped onto a container or a hand-rolled VM? Does this primitive fit? Drop a like, share it with whoever is building a multi-tenant platform, and let's talk. Cheers! =D&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://willpeixoto.dev" rel="noopener noreferrer"&gt;willpeixoto.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>serverless</category>
      <category>lambda</category>
      <category>firecracker</category>
    </item>
    <item>
      <title>High Availability Has a Price: Resilience Is a Decision, Not a Stack</title>
      <dc:creator>will peixoto</dc:creator>
      <pubDate>Thu, 23 Oct 2025 16:26:18 +0000</pubDate>
      <link>https://dev.clauneck.workers.dev/aws-builders/the-price-of-high-availability-resilience-in-architecture-decisions-are-strategic-not-just-4hhf</link>
      <guid>https://dev.clauneck.workers.dev/aws-builders/the-price-of-high-availability-resilience-in-architecture-decisions-are-strategic-not-just-4hhf</guid>
      <description>&lt;p&gt;&lt;strong&gt;The cost of high availability: resilience starts with strategic decisions, not technology.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://willpeixoto.hashnode.dev/resiliencia-custo-ha-multi-regiao-ou-on-premise" rel="noopener noreferrer"&gt;🇧🇷 Read in Portuguese&lt;/a&gt; →&lt;/p&gt;

&lt;p&gt;After a major outage like the October 2025 event in AWS's us-east-1 region, the smoke clears and the same questions that haunt CTOs and architects always resurface:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Should we be multi-region?" Or worse (and a little nostalgic): "Should we go back to on-premises?"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;The truth is that the right answer is rarely technical.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It's strategic, first and foremost.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As Werner Vogels (Amazon CTO) likes to put it in his talks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Everything fails, all the time."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And that's exactly it. The central question isn't &lt;strong&gt;whether&lt;/strong&gt; it will fail, it's &lt;strong&gt;when&lt;/strong&gt; it will fail and &lt;strong&gt;how&lt;/strong&gt; prepared you'll be when that inevitable moment arrives. Because it will arrive. Whether you're in the cloud, on-premises, or running a complex multi-cloud setup.&lt;/p&gt;

&lt;p&gt;What really separates resilient teams isn't the absence of failure. It's the &lt;strong&gt;speed, clarity, and effectiveness&lt;/strong&gt; with which they respond and recover.&lt;/p&gt;

&lt;p&gt;And that's where real architectural maturity lives: resilience isn't about choosing "multi-region" or "on-premises." It's about &lt;strong&gt;understanding the inherent risk, documenting the choice transparently, and reacting with a plan&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;1. The Context Behind the Question: The Paradox of Visible Failure&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Every time there's a big outage, I notice technical teams and executives splitting into two extreme reactions, both driven by fear and pressure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"We need to go multi-region, now! Cost is secondary!"&lt;/li&gt;
&lt;li&gt;"See? The cloud isn't reliable. We should have stayed on-premises, where we had control!"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both extremes are dangerous shortcuts.&lt;/p&gt;

&lt;p&gt;Multi-region is not a vaccine against downtime, and going back to on-premises is not a synonym for control; it just moves the maintenance complexity onto you.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A Crucial Point of Reflection:&lt;/strong&gt; The cloud doesn't fail more than a traditional data center, it just fails in a way that is more &lt;strong&gt;visible, shared, and, ironically, democratic&lt;/strong&gt;. On AWS, problems scale globally and become trending topics in minutes. On-premises, they hide behind scattered logs, long repair times, and, often, they only hit you. &lt;strong&gt;Honestly: do you believe your company has a greater capacity than AWS (or any major cloud provider) to manage physical security, cabling, power, cooling, and, above all, the resilience of infrastructure at global scale?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Migrating or evolving an architecture, at its core, is not about "throwing everything away" or "buying the hype." It's about &lt;strong&gt;keeping what's good in the legacy and removing what limits growth&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This isn't a black-and-white fight of "Cloud vs. Data Center." It's a strategic game of &lt;strong&gt;Conscious Resilience vs. Comfort Zone&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;2. Cost vs. Continuity: The Economics Behind the 9s&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In the world of infrastructure, each additional "9" in your SLA (Service Level Agreement) doesn't just cost more. It costs &lt;strong&gt;exponentially&lt;/strong&gt; more.&lt;/p&gt;

&lt;p&gt;To illustrate the real impact of each availability tier, here's the maximum allowed downtime per year:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;99% (two 9s):&lt;/strong&gt; about &lt;strong&gt;3.65 days&lt;/strong&gt; of downtime per year. &lt;em&gt;Cost and complexity:&lt;/em&gt; baseline (1x).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;99.9% (three 9s):&lt;/strong&gt; about &lt;strong&gt;8 hours and 46 minutes&lt;/strong&gt; of downtime per year. &lt;em&gt;Cost and complexity:&lt;/em&gt; 1.5x to 2x the baseline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;99.99% (four 9s):&lt;/strong&gt; about &lt;strong&gt;52 minutes&lt;/strong&gt; of downtime per year. &lt;em&gt;Cost and complexity:&lt;/em&gt; 2x to 3x. Requires Multi-AZ and strong automation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;99.999% (five 9s):&lt;/strong&gt; about &lt;strong&gt;5 minutes&lt;/strong&gt; of downtime per year. &lt;em&gt;Cost and complexity:&lt;/em&gt; 3x and up. Requires flawless automation and, often, a Multi-Region architecture.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each tier jump means more than doubling or tripling infrastructure; it also demands &lt;strong&gt;operational review and sophistication&lt;/strong&gt;. And here's the catch: every additional &lt;strong&gt;9&lt;/strong&gt; has to be justified by &lt;strong&gt;ROI (Return on Investment)&lt;/strong&gt;, never by technical pride.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📢 &lt;strong&gt;The Non-Negotiable Factor: Regulation.&lt;/strong&gt; For sectors like finance, healthcare, or telecom, the SLA choice isn't always purely economic. Often, the availability requirement (and the data recovery capability, the RPO) is &lt;strong&gt;imposed by law or industry rules&lt;/strong&gt;. In those cases, the debate isn't &lt;em&gt;whether&lt;/em&gt; you can afford it, but &lt;em&gt;how&lt;/em&gt; to hit the legally mandated SLA at the lowest possible cost and complexity, because the cost of a regulatory fine outweighs any technical saving.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Rule of Thumb for Complexity:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;High availability (within a single region):&lt;/strong&gt; can cost 1.5x to 2x the baseline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Region (Active/Passive):&lt;/strong&gt; can cost 2.5x to 3x.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Cloud (Active/Active):&lt;/strong&gt; almost never reduces risk. On the contrary, it usually increases the &lt;strong&gt;failure surface&lt;/strong&gt; and operational complexity.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;3. Conscious Decisions: The Virtue of ADRs&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Every architectural choice is a commitment based on a &lt;strong&gt;context&lt;/strong&gt;, and that context is volatile. Without a record, the context is lost, which condemns us to redo decisions, revisit old discussions, and rack up unnecessary cost.&lt;/p&gt;

&lt;p&gt;That's where the practice of &lt;strong&gt;ADRs (Architecture Decision Records)&lt;/strong&gt; becomes crucial. These aren't 50-page documents. They're short records that capture the &lt;strong&gt;decision&lt;/strong&gt;, the &lt;strong&gt;reason&lt;/strong&gt;, and the &lt;strong&gt;accepted risk&lt;/strong&gt; at a specific point in time.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Example ADR (focused on the accepted risk):&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# ADR-014: Do not use multi-region replication in the MVP&lt;/span&gt;

Context:
&lt;span class="p"&gt;-&lt;/span&gt; Current traffic &amp;lt; 10 req/s.
&lt;span class="p"&gt;-&lt;/span&gt; Multi-region replication cost is estimated at &amp;gt; 3x current cost.

Decision:
Keep a single-region architecture (using Multi-AZ for intra-region HA),
with a daily cross-region backup.

Review Trigger:
After reaching an average of 100 req/s, or when the current SLA (99.95%)
starts causing business impact.

Accepted Risk / Consequence:
Risk of total service downtime if an outage affects the entire region
(estimated RTO of 4 hours for cross-region recovery).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An ADR doesn't prevent failure. But it prevents failure from catching the team by surprise, because the risk was mapped, accepted, and justified by the business. It's the map for future discussions.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;4. Selective Resilience: Not Everything Needs HA (and That's Fine)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Selective resilience is a &lt;strong&gt;virtue of economy and clarity&lt;/strong&gt;. Not every service needs global redundancy. Spending finite resources (money and engineering attention) on unnecessary redundancy is one of the biggest forms of waste in architecture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prioritize High Availability (HA) only for what truly matters:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Direct revenue functions:&lt;/strong&gt; components critical to the financial transaction (e.g., &lt;strong&gt;checkout&lt;/strong&gt; and &lt;strong&gt;payment APIs&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The critical customer journey:&lt;/strong&gt; functions that block the core value of the product (e.g., &lt;strong&gt;login&lt;/strong&gt; or the &lt;strong&gt;main catalog&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Regulatory and legal risk:&lt;/strong&gt; services where failure triggers &lt;strong&gt;legal fines&lt;/strong&gt; or breaches a &lt;strong&gt;penalizing contractual SLA&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integrity of critical data:&lt;/strong&gt; where data loss violates an acceptable &lt;strong&gt;RPO&lt;/strong&gt; (e.g., mandatory data retention systems).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything else? It can be restored through a well-defined recovery playbook. Batch jobs, internal back-office systems, and dashboards can tolerate minutes (or even hours) of downtime, as long as the reprocessing plan is clear.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;High availability with no purpose is like installing an airbag on a bicycle.&lt;/strong&gt; It's a sophisticated solution to a problem that doesn't exist in that context.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;5. Managed != Failure-Proof: The Serverless Mindset&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;A common mistake is believing that using serverless services (Lambda, DynamoDB, SQS, EventBridge) is a synonym for immunity to failure. It isn't.&lt;/p&gt;

&lt;p&gt;Failure will come, and often from where you least expect it, because the serverless paradigm shifts the &lt;strong&gt;risk surface&lt;/strong&gt;, it doesn't remove it.&lt;/p&gt;

&lt;p&gt;The key point is this:&lt;/p&gt;

&lt;p&gt;Managed services reduce your &lt;strong&gt;operational surface&lt;/strong&gt; (you don't manage the OS, patching, or capacity), but they &lt;strong&gt;don't replace good design and preparation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;During the October 2025 us-east-1 outage, plenty of 100% serverless applications went down. Not because serverless failed them, but because they leaned on a single region. When DNS resolution for the regional DynamoDB endpoint broke, anything pinned to us-east-1 (directly, or indirectly through a global control plane like IAM or STS) broke with it. Multi-AZ wouldn't have saved you here: the endpoint was regional, not zonal. And the applications that recovered slowest were frequently the ones whose code answered the failure with aggressive, unbounded retries, turning one outage into a self-inflicted retry storm.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Real resilience doesn't come from AWS. It comes from the architecture you design &lt;em&gt;on top&lt;/em&gt; of it.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;6. The Decision Belongs to the Business, the Clarity to the Architect&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The difference between "having an opinion" and "having influence" lies in your ability to translate technical complexity into &lt;strong&gt;strategic clarity&lt;/strong&gt;. Your job isn't to scare the board with jargon. It's to give them the visibility they need to decide consciously.&lt;/p&gt;

&lt;p&gt;Experience has taught me that a team's maturity can be measured precisely by its ability to ask the right question:&lt;/p&gt;

&lt;p&gt;❓ Where Is Your Team's Maturity?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Immature teams focus on the tool:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They ask: &lt;strong&gt;"Which stack solves this?"&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;They ask: &lt;strong&gt;"Should we use K8s or Serverless?"&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;They ask: &lt;strong&gt;"What does Netflix do?"&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Mature teams focus on risk and the business:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They ask: &lt;strong&gt;"What risk are we willing to accept for this cost?"&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;They ask: &lt;strong&gt;"What RTO/RPO does the end customer require from this service?"&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;They ask: &lt;strong&gt;"What does our business need to survive a disaster?"&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is that two teams can use the exact same &lt;strong&gt;cloud&lt;/strong&gt;: one scales predictably, the other lives in panic mode. The difference isn't the cloud. It's the level of understanding, documentation, and technical humility behind the decisions made.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The Common Trap:&lt;/strong&gt; Who hasn't heard an executive say, "Technical decisions are up to the Architecture team"? What they're actually doing is transferring responsibility for defining &lt;strong&gt;business risk&lt;/strong&gt;. Your team defines the &lt;strong&gt;HOW&lt;/strong&gt; (the stack), but the Business defines the &lt;strong&gt;HOW MUCH&lt;/strong&gt; (the acceptable RTO and RPO). It's your job to &lt;strong&gt;hand the question back&lt;/strong&gt;, so the risk decision belongs to the business.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Translating Resilience Concepts for Leadership:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;(After all, who hasn't heard: &lt;em&gt;"Now translate that so I can understand it!"&lt;/em&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Multi-Region Failover

   Translation: Insurance against catastrophe. It guarantees that a
                regional disaster won't take us offline for days,
                reducing revenue loss to a few hours.

   Question:    How many hours (or minutes) of downtime can the
                business accept for service X if an entire region goes down?
------------------------------------------------------------------
2. Active-Active Setup

   Translation: Maximum, uninterrupted availability. It lets us perform
                any maintenance or update without ever impacting the
                end customer.

   Question:    Does service X need to be 100% continuous? Can we afford
                a 15-minute maintenance window?
------------------------------------------------------------------
3. RTO / RPO

   Translation: Defining the limit of the damage. These are the numbers
                that tell us what we can lose, and for how long, before
                fines or reputation become unsustainable.

   Question:    How much data (RPO) can we lose, and how long (RTO) does
                the team have to restore the service before the business breaks?
------------------------------------------------------------------
4. SPOF (Single Point of Failure)

   Translation: The Achilles' heel of revenue. It's the weak point that,
                if broken, paralyzes the whole company. This is where the
                risk must be zero.

   Question:    If this component goes down, what's the financial loss
                in 1 hour?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  &lt;strong&gt;7. Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;There is no such thing as a &lt;strong&gt;failure-proof&lt;/strong&gt; architecture.&lt;/p&gt;

&lt;p&gt;But there is such a thing as an &lt;strong&gt;organization that is surprise-proof&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And it starts with conscious decisions, documentation (the ADRs), and the technical humility to accept that error and risk are part of the equation.&lt;/p&gt;

&lt;p&gt;Teams that understand the &lt;strong&gt;"why"&lt;/strong&gt; before diving into the &lt;strong&gt;"how"&lt;/strong&gt; build systems that don't just scale. They &lt;strong&gt;survive&lt;/strong&gt;, and grow predictably.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;8. Essential References&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;For anyone who wants to go deeper on risk decisions and architectural patterns, these are the documents we use as a foundation for resilience on any cloud (with a focus on AWS):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS Well-Architected Framework (Reliability Pillar):&lt;/strong&gt; the fundamental guide to understanding disaster recovery (DR) and high availability (HA) principles. &lt;a href="https://docs.aws.amazon.com/wellarchitected/latest/reliability-pillar/reliability.html" rel="noopener noreferrer"&gt;Reliability Pillar&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disaster Recovery of Workloads on AWS:&lt;/strong&gt; the key document for going deeper on RTO/RPO and choosing between patterns like Pilot Light and Active-Active. &lt;a href="https://docs.aws.amazon.com/whitepapers/latest/disaster-recovery-workloads-on-aws/introduction.html" rel="noopener noreferrer"&gt;DR Whitepaper&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DynamoDB Global Tables:&lt;/strong&gt; an excellent practical case study of HA at the data layer, abstracting away multi-region complexity. &lt;a href="https://aws.amazon.com/dynamodb/global-tables/" rel="noopener noreferrer"&gt;DynamoDB Global Tables&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EventBridge Resilience Guide:&lt;/strong&gt; essential for anyone working with serverless, focused on event-based resilience patterns. &lt;a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-resilience.html" rel="noopener noreferrer"&gt;EventBridge Resilience Guide&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AWS Post-Event Summary: Amazon DynamoDB Service Disruption in US-EAST-1 (Oct 19-20, 2025):&lt;/strong&gt; the primary source on the outage referenced in this article, straight from AWS. &lt;a href="https://aws.amazon.com/message/101925" rel="noopener noreferrer"&gt;Service Disruption Summary&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;9. Essential Resilience Glossary&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;So everyone is on the same page, here are some key terms used in this article, explained simply:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;High Availability (HA):&lt;/strong&gt; the ability of a system to keep operating even when one or more of its components fail. Measured in "9s" (e.g., 99.99%).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outage:&lt;/strong&gt; an unplanned interruption of a service: the service goes down.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-premises:&lt;/strong&gt; infrastructure and data centers you own, physically located at the company (not in the cloud).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Region:&lt;/strong&gt; using data centers in two or more different geographic cloud regions (e.g., US East and São Paulo) for maximum protection against regional disasters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-AZ (Multi-Availability Zone):&lt;/strong&gt; using two or more Availability Zones (isolated, nearby data centers) &lt;strong&gt;within&lt;/strong&gt; the same cloud region. This is the baseline HA pattern.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SLA (Service Level Agreement):&lt;/strong&gt; a formal agreement defining the level of service a provider is expected to deliver (usually measured in uptime).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ROI (Return on Investment):&lt;/strong&gt; a financial metric measuring the relationship between money earned (or saved) and money invested.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ADR (Architecture Decision Record):&lt;/strong&gt; a short document recording an architectural decision, the reasoning, and the accepted risk at a specific point in time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RTO (Recovery Time Objective):&lt;/strong&gt; the maximum acceptable &lt;strong&gt;time&lt;/strong&gt; a system can be down after a failure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RPO (Recovery Point Objective):&lt;/strong&gt; the amount of &lt;strong&gt;data&lt;/strong&gt; (measured in time, e.g., 5 minutes) that can be lost during a disaster event.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Serverless:&lt;/strong&gt; a cloud computing model where the provider manages all the infrastructure and the developer focuses only on the code, paying only for usage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Circuit Breaker:&lt;/strong&gt; a software pattern that, when a dependency starts failing repeatedly, "opens" the circuit to protect the rest of the application from cascading failures.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Want to go deeper on resilience, orchestration, and the architect's strategic role in the serverless era?&lt;/p&gt;

&lt;p&gt;I write about this kind of thing regularly. If this resonated, I'd like to hear it: how did your architecture hold up during the last regional outage, and, more importantly, which trade-offs had you already written down &lt;em&gt;before&lt;/em&gt; it happened? Find me on LinkedIn and let's compare notes.&lt;/p&gt;

&lt;p&gt;I'll be at &lt;strong&gt;&lt;a href="https://sdsp.io/" rel="noopener noreferrer"&gt;ServerlessDays São Paulo&lt;/a&gt;&lt;/strong&gt; on &lt;strong&gt;November 8th&lt;/strong&gt;, at &lt;strong&gt;Cubo Itaú&lt;/strong&gt;, discussing how to go beyond the stack and build systems that not only function — &lt;strong&gt;but thrive in chaos.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Come join the conversation! 🚀&lt;/p&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
      <category>architecture</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
