<?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>Forem: Ryan Batchelder</title>
    <description>The latest articles on Forem by Ryan Batchelder (@rdbatch).</description>
    <link>https://forem.com/rdbatch</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F212549%2F229200fb-f887-4dce-be2c-fbdb8340ba89.jpg</url>
      <title>Forem: Ryan Batchelder</title>
      <link>https://forem.com/rdbatch</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/rdbatch"/>
    <language>en</language>
    <item>
      <title>AWS ECS Managed Instances</title>
      <dc:creator>Ryan Batchelder</dc:creator>
      <pubDate>Mon, 06 Oct 2025 01:53:56 +0000</pubDate>
      <link>https://forem.com/aws-builders/aws-ecs-managed-instances-25</link>
      <guid>https://forem.com/aws-builders/aws-ecs-managed-instances-25</guid>
      <description>&lt;p&gt;If you've been particularly focused in the Kubernetes world, you may have missed AWS continuing to roll out new features to their (imo) excellent ECS service with &lt;a href="https://aws.amazon.com/blogs/aws/announcing-amazon-ecs-managed-instances-for-containerized-applications/" rel="noopener noreferrer"&gt;ECS Managed Instances&lt;/a&gt;. Let's take a look at who this feature is for and why you may (or may not) want to use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who is this for?
&lt;/h2&gt;

&lt;p&gt;At the highest level, ECS Managed Instances offloads the management of EC2 resources in your clusters to AWS. This might sound like the value proposition of Fargate, but Managed Instances takes a different, complementary approach. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc2g1rhdoc4jk1m1vjjaq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc2g1rhdoc4jk1m1vjjaq.png" alt="Serverless Spectrum showing serverful compute to the left starting with EC2 and moving toward serverless Lambda on the right. AWS ECS Managed Instances is placed in the middle." width="800" height="251"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fargate brings the serverless experience to container orchestration - running your workloads on compute that's entirely outside of your purview and charging you only for the compute time that your container uses. As a trade off, you have effectively no control over the compute that's provisioned behind the scenes to run your containers. This is totally fine for many general purpose workloads that don't have particular hardware requirements or aren't sensitive to where they're running. &lt;/p&gt;

&lt;h2&gt;
  
  
  But what if you did need specific hardware...?
&lt;/h2&gt;

&lt;p&gt;Unfortunately, not all web services are simple apps serving up memes and cat videos. Sometimes you might need to run a workload that needs access to GPUs, high-throughput networking, or really fast local storage.&lt;/p&gt;

&lt;p&gt;Historically, the only answer to this would be to manage your own fleet of EC2 instances and bring them into an ECS cluster. While this allows you to have all of the nice benefits of the ECS container orchestration platform, it comes with all the downsides of managing your own infrastructure. OS configuration, patching, security, etc. are all your responsibility using EC2 directly to back ECS clusters. &lt;a href="https://aws.amazon.com/about-aws/whats-new/2019/12/amazon-ecs-capacity-providers-now-available/" rel="noopener noreferrer"&gt;Capacity Providers&lt;/a&gt; were eventually released to make scaling clusters easier, but they still relied on you maintaining Launch Templates for the compute that they... provided.&lt;/p&gt;

&lt;h2&gt;
  
  
  I don't need specific hardware, should I just use Fargate?
&lt;/h2&gt;

&lt;p&gt;Maybe! Fargate is excellent at providing a way to run containers without having to really think about the compute underneath, but that management doesn't come for free. Fargate tends to be more expensive per vCPU and GB of memory than the equivalent capacity on EC2, with the benefit being that you get to save yourself (or your ops/infra teams) time not worrying about management. For a small number of containers this price premium is probably a welcome trade off, but the math doesn't always work out as you scale up. Being able to bin-pack a number of containers onto one instance can make EC2-backed ECS clusters quite cost-efficient, and Fargate generally can't keep up on this front at least for containers that need to run 24/7.&lt;/p&gt;

&lt;p&gt;Fargate has a few other drawbacks as well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No access to the underlying host means you can't run daemon tasks in the background. This means you need to configure things like log or metric collection per-task rather than having it run at the instance-level like you can with EC2-backed clusters.&lt;/li&gt;
&lt;li&gt;Privileged containers aren't supported on Fargate.&lt;/li&gt;
&lt;li&gt;Fargate compute isn't always on the latest generation hardware. A vCPU on an m5 instance has very different performance characteristics from an m7i or m7a vCPU, and Fargate can schedule your tasks to run on any sort of compute that AWS chooses.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Best of Both Worlds - ECS Managed Instances
&lt;/h2&gt;

&lt;p&gt;ECS Managed Instances slides further down the serverless spectrum and solves the problem of needing to manage compute whenever your workloads call for more specific hardware requirements, while allowing you to offload management to AWS. On top of that, the compute that's provisioned and managed on your behalf are still regular EC2 instances joined to your cluster. This means that they can run as many containers as reasonably fit, dividing the cost between multiple workloads and likely saving you money on top of Fargate. Layer on the fact that managed instances take advantage of all your existing EC2 reservations and savings plans, and you can potentially be looking at significant savings.&lt;/p&gt;

&lt;p&gt;It's important to note that ECS Managed Instances aren't necessarily free. There is an additional cost overhead over the EC2 sticker price to cover the management, but all in all it's still cheaper than Fargate is. How much cheaper? For most scenarios I checked, only about 3% on the face, but given that EC2 savings plans can have stronger discounts than Fargate that difference can grow significantly depending on your particular scenario. As part of this management fee, you get security patching every 14 days and behind the scenes ECS will still try to cost-optimize your compute by consolidating containers into underutilized instances.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where can I learn more?
&lt;/h2&gt;

&lt;p&gt;I'd highly recommend taking a read of the &lt;a href="https://aws.amazon.com/blogs/aws/announcing-amazon-ecs-managed-instances-for-containerized-applications/" rel="noopener noreferrer"&gt;official AWS launch announcement&lt;/a&gt; first. Thankfully this release came with &lt;a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-ecs-capacityprovider-managedinstancesprovider.html" rel="noopener noreferrer"&gt;CloudFormation&lt;/a&gt; and &lt;a href="https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ManagedInstancesCapacityProvider.html" rel="noopener noreferrer"&gt;CDK&lt;/a&gt; support right away, so you can start playing with this right away via infrastructure-as-code.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>containers</category>
      <category>ecs</category>
      <category>ec2</category>
    </item>
    <item>
      <title>Passing the AWS Solutions Architect Pro Exam</title>
      <dc:creator>Ryan Batchelder</dc:creator>
      <pubDate>Sat, 26 Jul 2025 23:34:12 +0000</pubDate>
      <link>https://forem.com/aws-builders/passing-the-aws-solutions-architect-pro-exam-alg</link>
      <guid>https://forem.com/aws-builders/passing-the-aws-solutions-architect-pro-exam-alg</guid>
      <description>&lt;p&gt;After many years of telling myself "I should take the SA Pro exam," I finally made the leap to take (and pass!) the exam this morning. While there's no shortage of exam prep info out there, one thing that helped me feel comfortable going in was finding similar stories to mine. So in the interest of giving that back: here's mine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some Context - Why did I take the test in the first place?
&lt;/h2&gt;

&lt;p&gt;I hate tests. I've never been a good test taker, and the thought of sitting for a three-hour exam on a Saturday morning isn't exactly my idea of a nice weekend activity. I'm also not someone who particularly chases certifications. For me, it's more of a way to validate that I have the skills at a particular level, especially when I can't always apply that full skillset in my day-to-day work.&lt;/p&gt;

&lt;p&gt;That said, I've taken the Solutions Architect Associate exam twice in the past, and with my associate certification coming up for renewal, I felt that I couldn't just take the associate-level exam a third time. I've been working with AWS for the past 10 years and have helped teach an exam prep cohort internally at my company three times over, so it felt like I was overdue for a professional-level certification.&lt;/p&gt;

&lt;p&gt;Solutions Architect best reflects the work that I do "in my day job," so that felt like a natural choice (plus I needed to renew that associate-level cert). I'm exposed to many, but not all, of the concepts and services that the solutions architect track covers. At this stage, I'm not sure if I'll also pursue the DevOps Engineer track, but I haven't ruled out trying some of the specialty certifications.&lt;/p&gt;

&lt;h2&gt;
  
  
  What did my prep look like?
&lt;/h2&gt;

&lt;p&gt;Effective test prep looks different for everyone, and I think a good way to plan your exam prep is by looking around at how others have tackled it. I spent just over one month preparing for my exam, and heavily weighted most of my practice in the 2 weeks leading up to exam day.&lt;/p&gt;

&lt;p&gt;No matter what, I think the best place to start any AWS Certification exam prep is by reviewing the &lt;a href="https://d1.awsstatic.com/onedam/marketing-channels/website/aws/en_US/certification/approved/pdfs/docs-sa-pro/AWS-Certified-Solutions-Architect-Professional_Exam-Guide.pdf" rel="noopener noreferrer"&gt;AWS-provided Exam Guide&lt;/a&gt;. From there, I opted to review using Stephane Maarek's excellent &lt;a href="https://www.udemy.com/share/102IMA3@P3JheebLG8p-b3_67Lbc6h9tL3JwCkgbb1NsdP7CLUdZnhdF1kUkezVeNX-JY44p/" rel="noopener noreferrer"&gt;Ultimate AWS Certified Solutions Architect Professional 2025&lt;/a&gt; course on Udemy. I watched through all of the lectures, even for the services that I thought I was very comfortable with (just in case).&lt;/p&gt;

&lt;p&gt;The only section I didn't spend a lot of time with was the "Exam Preparation" section, which deep-dives on a handful of sample questions. If you haven't taken an AWS Certification exam in a while, this is a great walkthrough on the mindset that you should take into answering the questions. I instead opted to replace this section with &lt;a href="https://portal.tutorialsdojo.com/courses/aws-certified-solutions-architect-professional-practice-exams/" rel="noopener noreferrer"&gt;Jon Bonso's practice exams&lt;/a&gt; on Tutorials Dojo. In helping people prepare for the associate-level exam, I've found that Jon's practice exams are some of the best in terms of reflecting the difficulty level of the real exam, and sometimes are even more difficult. I was really glad to see that the professional-level practice exams were no different.&lt;/p&gt;

&lt;p&gt;Now that's not to say that I was confident walking into that exam... The practice exam questions were challenging, and working through them in "Review Mode" was a great learning tool, but I got a lot of questions wrong in the process. Ultimately, I did one final walkthrough in timed mode the day before, which I passed comfortably, and then decided to stop thinking about AWS for the rest of the day. 😅&lt;/p&gt;

&lt;h2&gt;
  
  
  Exam day
&lt;/h2&gt;

&lt;p&gt;If you're reading this and preparing for the SA Pro exam, you've certainly taken an AWS Certification exam before. Structurally, this one isn't much different from SA Associate, but of course it's longer and more difficult. The high-level specs are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;75 questions, where 10 unidentified questions are not scored&lt;/li&gt;
&lt;li&gt;180 minutes total, with a few extra minutes allotted for reading the terms and completing a survey at the end&lt;/li&gt;
&lt;li&gt;Tests can either be taken in-person at a Pearson Vue testing center or proctored virtually on your own device&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The vast majority of the questions involve reading through a fairly involved scenario with lots of detail. Sometimes you need to lean on all of the provided detail; other times it's given as "fluff" and you need to see through it. Many of the answers will be mostly or nearly correct, and you need to find the key detail that makes a given answer "most correct." Working through all of this in the time allotment &lt;em&gt;can&lt;/em&gt; be a challenge, but I personally found that there were a few questions with shorter scenarios that I could answer quickly to earn back some time to invest in others.&lt;/p&gt;

&lt;p&gt;I always choose to take my tests at a testing center. I've heard too many stories of people having accidental situations like background noises or someone walking into their testing room, causing virtually proctored tests to be invalidated. I also feel that I can mentally focus better when I'm in a purpose-built testing setting. The only downside that I ran into is that the machines used at my testing center were quite old and used what seemed to be 720p displays that were a little annoying to read the dense questions from for 3 hours, especially after being spoiled with nice 4K displays at home.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;I walked away feeling decent about my exam, but I definitely wasn't confident that I had passed. Considering that Jon's practice exams seemed to trend more difficult, it made me feel like I'd taken an easier test on exam day. AWS tells you that most exam results are delivered within 24 hours, with some taking up to 5 days. My results came about 5 hours later, so thankfully I didn't have to wait in suspense for too long.&lt;/p&gt;

&lt;p&gt;As I mentioned before, I'm not particularly chasing all of the certification exams, so I'm not sure what I'll tackle next. For now, I'm happy to have this one in the bag for the next three years.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>awscertified</category>
    </item>
    <item>
      <title>Resilience in the Cloud - Making Things Better</title>
      <dc:creator>Ryan Batchelder</dc:creator>
      <pubDate>Mon, 31 Mar 2025 23:24:23 +0000</pubDate>
      <link>https://forem.com/aws-builders/resilience-in-the-cloud-making-things-better-2egp</link>
      <guid>https://forem.com/aws-builders/resilience-in-the-cloud-making-things-better-2egp</guid>
      <description>&lt;p&gt;If you've read my last two posts in this series, you might be starting to reflect on systems that you manage or are currently building and how resilient they really are. If you haven't read the other posts in my AWS Resilience Series, here's where you can find them:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://dev.to/rdbatch/resilience-in-the-cloud-availability-vs-recoverability-4jkp"&gt;Availability vs. Recoverability&lt;/a&gt; discusses the difference between making a system highly available and being able to recover from a failure when one inevitably does happen.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/rdbatch/resilience-in-the-cloud-fault-isolation-boundaries-4nid"&gt;Fault Isolation Boundaries&lt;/a&gt; covers what these boundaries are, how AWS uses them to provide us resilient cloud services, and how we can leverage that architecture to improve our own systems.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now this third and final post in the series will discuss how you can take the learnings from the previous two and turn them into actionable improvements in your workloads.&lt;/p&gt;

&lt;p&gt;Cloud resilience is one of those topics where lots of people have their own idea of what "good" looks like, and all of their paths to get there look a bit different. Along these paths there tend to be a number of different mistakes and misconceptions that are made, though not without good reason. Building resilient applications is complex, but an even greater challenge is that measuring success in resilience often requires an even greater level of investment and maturity than many applications require. Because of this, system resilience can be an elusive topic fraught with false senses of security and frustration. &lt;/p&gt;

&lt;p&gt;So how do you evaluate your applications as they stand today, and make a plan for where you want your architecture to be tomorrow? How do you ultimately know what "good" should look like for you? &lt;/p&gt;

&lt;p&gt;I've spoken on this topic a few times in the past (at least &lt;a href="https://www.youtube.com/watch?v=chm396TYELc" rel="noopener noreferrer"&gt;once publicly&lt;/a&gt;), and historically I've answered this question with the following four steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start with backups&lt;/li&gt;
&lt;li&gt;Identify potential failure points&lt;/li&gt;
&lt;li&gt;Implement mitigations and redundancies&lt;/li&gt;
&lt;li&gt;Plan for disaster and test&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you do just one thing, it should be addressing your backup strategy. Today's technology landscape has a huge focus and emphasis on data; data is the foundation of today's business and it's crucial to ensure that data is protected. Data loss can happen in a number of different ways, but you can distill the problem down by looking at every data storage resource in your application and asking yourself: "what would I do if this data disappeared tomorrow?". If the answer is anything besides "I could easily recreate it", you almost certainly need to back it up. &lt;/p&gt;

&lt;p&gt;AWS has services with some amazingly good data durability SLAs, but those serve the AWS side of the shared responsibility model, not ours as customers. Having a well-designed backup strategy should protect you against all data loss: storage medium failure/corruption, inadvertent modification or deletion, or even ransomware attacks. Ensure that you're thinking of all of these when designing a data protection strategy and don't just rely on vendor durability SLAs.&lt;/p&gt;

&lt;p&gt;Moving beyond backups, next up is to identify other potential failure points in your architecture. For a long time, I've generally followed a similar methodical approach to backups: walk your infrastructure, identify how each component could possibly fail, then mitigate that failure. It turns out that some of the brilliant minds at AWS wrote up similar guidance with way more structure and rigor than I ever did in their prescriptive guidance titled: &lt;a href="https://docs.aws.amazon.com/prescriptive-guidance/latest/resilience-analysis-framework/introduction.html" rel="noopener noreferrer"&gt;Resilience analysis framework&lt;/a&gt;. If you're working to improve system reliability at any level of scale, I would &lt;em&gt;highly&lt;/em&gt; recommend reading about this framework and understanding how it can be best applied in your own organization. &lt;/p&gt;

&lt;p&gt;At a high-level, the Resilience analysis framework focuses on the following characteristics of highly available systems: &lt;strong&gt;redundancy&lt;/strong&gt;, &lt;strong&gt;sufficient capacity&lt;/strong&gt;, &lt;strong&gt;timely and correct output&lt;/strong&gt;, and &lt;strong&gt;fault isolation&lt;/strong&gt;. The expectation is that a system that exhibits these characteristics would be considered "resilient". For each of these characteristics, the framework prescribes failure categories which help connect the dots from your infrastructure itself and actually embodying these characteristics.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdei7gyrkgq0xizspeost.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdei7gyrkgq0xizspeost.png" alt="Relationships of the desired resilience properties reprinted from Resilience analysis framework - Overview of the framework" width="737" height="627"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Relationships of the desired resilience properties reprinted from &lt;a href="https://docs.aws.amazon.com/prescriptive-guidance/latest/resilience-analysis-framework/overview.html" rel="noopener noreferrer"&gt;Resilience analysis framework - Overview of the framework&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When it comes to applying the framework, the first step that I always recommend to teams is to start with an up-to-date architecture context diagram that shows all of the pertinent components of your system. I believe that the most value of framework application is had when it &lt;em&gt;prompts conversations amongst teams&lt;/em&gt; (versus a solo effort), and having a diagram that everyone can use as a frame of reference is key to keeping the dialogue focused and productive.&lt;/p&gt;

&lt;p&gt;From this point, the framework discusses focusing on user stories to evaluate individual business processes with the focus on the value to the end user. For many applications I think this is a great approach since ultimately your users care whether or not they can use your system for useful work; they're usually not concerned with the specifics of your API server. One of the understated benefits of the framework is that it easily scales up and down to systems of all different sizes and scopes. For larger (and particularly older) systems where ownership doesn't necessarily lie with folks that built all of that functionality, attempting to focus on user stories might be a challenge. In these cases, you can still get a ton of value out of evaluating at the component and interaction level instead.&lt;/p&gt;

&lt;p&gt;This blog post is not intended to get into all of the detail of the framework, you should &lt;em&gt;really&lt;/em&gt; go read what &lt;a href="https://docs.aws.amazon.com/prescriptive-guidance/latest/resilience-analysis-framework/introduction.html" rel="noopener noreferrer"&gt;the experts have to say here&lt;/a&gt;, but this does get us to another really important discussion point: how far do I go with my mitigations? The framework has an entire page titled &lt;a href="https://docs.aws.amazon.com/prescriptive-guidance/latest/resilience-analysis-framework/tradeoffs.html" rel="noopener noreferrer"&gt;"Understanding trade-offs and risks"&lt;/a&gt; which discusses this, but I have some of my own thoughts to add on top of that. In my &lt;a href="https://dev.to/rdbatch/resilience-in-the-cloud-fault-isolation-boundaries-4nid"&gt;discussions on this topic in the past&lt;/a&gt;, I've talked about the notion of resilience being a spectrum. As you move to higher availability (and thus, higher levels of resilience), the cost in both cloud spend and operations overhead increases dramatically. In-fact, AWS even includes a spectrum in their &lt;a href="https://docs.aws.amazon.com/whitepapers/latest/disaster-recovery-workloads-on-aws/disaster-recovery-options-in-the-cloud.html" rel="noopener noreferrer"&gt;Disaster Recovery of Workloads on AWS: Recovery in the Cloud&lt;/a&gt; whitepaper.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fflo110ht093l98bzvjkf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fflo110ht093l98bzvjkf.png" alt="Disaster recovery strategies figure 6 reprinted from Disaster Recovery of Workloads on AWS: Recovery in the Cloud" width="800" height="360"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Disaster recovery strategies figure 6 reprinted from &lt;a href="https://docs.aws.amazon.com/whitepapers/latest/disaster-recovery-workloads-on-aws/disaster-recovery-options-in-the-cloud.html" rel="noopener noreferrer"&gt;Disaster Recovery of Workloads on AWS: Recovery in the Cloud&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Taking the point I made earlier about cost, you should expect that as you move to the right on this spectrum that your costs will increase. This means that you should consider the criticality of your system when thinking about the appropriate level of mitigations to apply. Many companies use a tiering system to classify the criticality of their applications. If yours does, you will probably be best suited to mapping that tiering into a certain type of resilience configuration.&lt;/p&gt;

&lt;p&gt;For &lt;em&gt;most&lt;/em&gt; applications, multi-region active/active configurations is going to be the most expensive &lt;em&gt;and&lt;/em&gt; the most complex to implement. Especially for systems that aren't "cloud native", it's more rare to find a system that supports running in a multi-active configuration really well. Newer AWS capabilities such as &lt;a href="https://www.google.com/search?client=safari&amp;amp;rls=en&amp;amp;q=dynamodb+global+tables&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8" rel="noopener noreferrer"&gt;DynamoDB Global Tables&lt;/a&gt; and &lt;a href="https://docs.aws.amazon.com/aurora-dsql/latest/userguide/what-is-aurora-dsql.html" rel="noopener noreferrer"&gt;Aurora DSQL&lt;/a&gt; are making this easier for applications that can build for this from the beginning, however. Even if you aren't using these technologies, you can still make your systems more resilient by applying mitigations at the appropriate level of investment for the value a system is providing to your customers or business.&lt;/p&gt;

&lt;p&gt;The final point that I'll make is that you should always test any recovery plans and mitigation strategies that you implement on a regular basis. Just like you would test a piece of software to ensure it behaves the way you intend, you should ensure that your resilience strategy is actually working for you. The last thing you want in the midst of an outage is to discover that your recovery plan relies on some IAM permission or security group configuration that you didn't account for, and now you're fighting two fires instead of one. Test as close to production as you possibly can, and test often. &lt;a href="https://docs.aws.amazon.com/fis/latest/userguide/what-is.html" rel="noopener noreferrer"&gt;AWS Fault Injection Service&lt;/a&gt; can help with this step by making it easy to setup fault experiments and seeing both how your infrastructure and runbooks behave to address a real failure in a safe manner.&lt;/p&gt;

&lt;p&gt;Are you really confident that you've done everything you can to ensure your on-call pager never rings, or are you worrying that the next big incident could be right around the corner? Hopefully the information in this series have helped you answer these questions and make things better for both your users and your operations team. How do you and your teams handle this? Let me know in the comments!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>resilience</category>
    </item>
    <item>
      <title>My (non-AI) AWS re:Invent 24 picks</title>
      <dc:creator>Ryan Batchelder</dc:creator>
      <pubDate>Tue, 10 Dec 2024 13:17:15 +0000</pubDate>
      <link>https://forem.com/rdbatch/my-non-ai-aws-reinvent-24-picks-5bdh</link>
      <guid>https://forem.com/rdbatch/my-non-ai-aws-reinvent-24-picks-5bdh</guid>
      <description>&lt;p&gt;re:Invent 24 has come to a close and as predicted, a huge portion of the event was devoted to generative AI. While there were some pretty interesting announcements surrounding Bedrock and Q, hidden amongst the RAGs were a few of my favorite releases that had nothing to do with AI.&lt;/p&gt;

&lt;p&gt;Starting with the data-oriented announcements from Matt Garman's keynote, what better service to talk about than the biggest home for your data: S3. Everyone's favorite blob store got some really interesting data science-oriented features this year that reinforced something that I've come to realize over the past few years: data lakes live in S3. First up is &lt;a href="https://aws.amazon.com/blogs/aws/new-amazon-s3-tables-storage-optimized-for-analytics-workloads/" rel="noopener noreferrer"&gt;&lt;strong&gt;S3 Table Buckets&lt;/strong&gt;&lt;/a&gt;, a new bucket type that brings a number of improvements for buckets storing &lt;a href="https://iceberg.apache.org" rel="noopener noreferrer"&gt;Apache Iceberg&lt;/a&gt; files. &lt;/p&gt;

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

&lt;p&gt;This enables higher performance for queries against Parquet files stored in S3 automatically just by using a different bucket type. In addition, table buckets automatically take care of compaction and cleanup of unreferenced files to help keep your data lake optimized with continued scale.&lt;/p&gt;

&lt;p&gt;S3 Metadata solves a problem that many of us have probably implemented custom solutions for in the past, likely through some separate "sidecar" datastore that works in conjunction with your S3 bucket blobs. &lt;/p&gt;

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

&lt;p&gt;This feature builds on the S3 Table Buckets feature to make blob metadata easily queryable and S3 will keep that metadata up to date for you as bucket contents change. While this might seem like one of the less "flashy" announcements of this year's re:Invent, I think this is one of the most broadly applicable for a large swath of S3 users. This is also a classic example of AWS identifying a piece of undifferentiated workload that their customers are building and finding ways to remove that burden. We like this, AWS. Do more of this, please!&lt;/p&gt;

&lt;p&gt;Moving away from S3 for the last of the keynote announcements: Aurora DSQL. This is the closest we have as of now to a SQL version of DynamoDB, and that alone is a pretty exciting prospect. &lt;/p&gt;

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

&lt;p&gt;Aurora DSQL leverages Amazon's Time Sync service to eliminate clock drift across regions enabling strong consistency even on multi-region tables. As fancy as this sounds, there are some necessary tradeoffs that come with building a globally available datastore. Note that the slide says "PostgreSQL-compatible" rather than implying that Aurora DSQL perfectly implements PostgreSQL. There are a number of PostgreSQL features that &lt;a href="https://docs.aws.amazon.com/aurora-dsql/latest/userguide/working-with-postgresql-compatibility-unsupported-features.html" rel="noopener noreferrer"&gt;remain unsupported&lt;/a&gt; and only a subset of the &lt;a href="https://docs.aws.amazon.com/aurora-dsql/latest/userguide/working-with-postgresql-compatibility-supported-sql-features.html" rel="noopener noreferrer"&gt;SQL dialect that's supported&lt;/a&gt;. I suspect both of these lists will change slightly as the service moves toward general availability, though some omissions are almost certainly required as a byproduct of enabling this level of consistent multi-region operation. As someone who's been focused quite a bit on resilience lately, I'll be very interested to see how this service evolves. For workloads that can operate within the constraints, Aurora DSQL could be a game changer for systems that are looking for multi-region active/active operations.&lt;/p&gt;

&lt;p&gt;If you're looking for some deep-dive content on Aurora DSQL, Marc Brooker has some &lt;a href="https://brooker.co.za/blog/2024/12/03/aurora-dsql.html" rel="noopener noreferrer"&gt;fantastic&lt;/a&gt; &lt;a href="https://brooker.co.za/blog/2024/12/04/inside-dsql.html" rel="noopener noreferrer"&gt;content&lt;/a&gt; &lt;a href="https://brooker.co.za/blog/2024/12/05/inside-dsql-writes.html" rel="noopener noreferrer"&gt;on his&lt;/a&gt; &lt;a href="https://brooker.co.za/blog/2024/12/06/inside-dsql-cap.html" rel="noopener noreferrer"&gt;blog&lt;/a&gt;. He also has two great breakout sessions from re:Invent on the topic: &lt;a href="https://www.youtube.com/watch?v=9wx5qNUJdCE" rel="noopener noreferrer"&gt;DAT424&lt;/a&gt; and &lt;a href="https://www.youtube.com/watch?v=huGmR_mi5dQ" rel="noopener noreferrer"&gt;DAT427&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That wraps up the major announcements that came out of the keynotes this year. Werner's keynote on Thursday morning didn't contain a single announcement, instead inspiring us builders to embrace "simplexity". To me this seems like a by-product of cloud becoming "boring", and this isn't a bad thing! As the technology continues to mature, I'd expect to see fewer big announcements and instead a continued refinement of the services that we're all building on today. It's clear that Generative AI is the current industry trend, and I applaud AWS for taking a full-stack approach to supporting that space from the custom-built training hardware all the way up to providing tools such as Q.&lt;/p&gt;

&lt;p&gt;As is tradition for re:Invent, there were also a number of announcements that came in the weeks leading up to the event in Vegas (known as "pre:Invent"). &lt;/p&gt;

&lt;p&gt;One that I've been really excited for is the ability to now &lt;a href="https://aws.amazon.com/blogs/compute/implementing-custom-domain-names-for-private-endpoints-with-amazon-api-gateway/" rel="noopener noreferrer"&gt;setup custom domain names for private API Gateways&lt;/a&gt;. This is a feature that has been sorely needed to make API Gateway easier to use without exposing the gateway to the internet. Previously private gateways could only use their auto-assigned URL that had the format &lt;code&gt;https://{rest-api-id}-{vpce-id}.execute-api.{region}.amazonaws.com/{stage}&lt;/code&gt;, or one of the other variations that involved passing special headers as part of the request. I know that I personally have implemented a number of different workarounds in the past to get friendlier URLs for my endpoints, and it will be really nice to be able to do this natively now.&lt;/p&gt;

&lt;p&gt;Serverless services got a host of nice features and improvements to continue rounding out their offerings. Aurora Serverless v2 can now &lt;a href="https://aws.amazon.com/about-aws/whats-new/2024/11/amazon-aurora-serverless-v2-scaling-zero-capacity/" rel="noopener noreferrer"&gt;scale all the way down to zero ACUs&lt;/a&gt; which finally addresses one of the chief complaints about that service. Previously the minimum was 0.5 ACUs which meant the baseline ACU cost was nearly $44/month, generally running counter to the serverless tenant of only paying for execution time.&lt;/p&gt;

&lt;p&gt;Speaking of price savings in serverless-land, &lt;a href="https://aws.amazon.com/blogs/database/new-amazon-dynamodb-lowers-pricing-for-on-demand-throughput-and-global-tables/" rel="noopener noreferrer"&gt;DynamoDB on-demand got significant price cuts&lt;/a&gt; with no changes needed for users. AWS doesn't get into details as to &lt;em&gt;why&lt;/em&gt; this price cut has come about, but presumably they've found ways to make significant price savings to their operating costs for the service and are passing that savings along to us as the customer. Benefitting from the optimizations that the awesome engineers over at AWS make is an understated perk of building on a public cloud, and this is once again the type of announcement that I think everyone will agree is a great thing.&lt;/p&gt;

&lt;p&gt;Finally it wouldn't be a discussion about serverless without including everyone's favorite compute service: Lambda! The improvements to Lambda are smaller but great to see nonetheless. For Python and .NET users, &lt;a href="https://aws.amazon.com/blogs/aws/aws-lambda-snapstart-for-python-and-net-functions-is-now-generally-available/" rel="noopener noreferrer"&gt;SnapStart is now available&lt;/a&gt;. &lt;a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html" rel="noopener noreferrer"&gt;SnapStart&lt;/a&gt; was announced last year for Java as a way to reduce cold start times by pre-warming and caching a function just after initialization so that invocations could load the cached state rather than re-running initialization on every cold start. Unlike the Java implementation, Python and .NET come with some additional cost so you'll need to do some evaluation to determine if it's worth it for your functions. That said, I can see this being useful for certain applications particularly in the Python world where certain data science libraries can get quite large. The last main Lambda announcement was the release of the &lt;a href="https://aws.amazon.com/blogs/compute/python-3-13-runtime-now-available-in-aws-lambda/" rel="noopener noreferrer"&gt;Python 3.13&lt;/a&gt; and &lt;a href="https://aws.amazon.com/blogs/compute/node-js-22-runtime-now-available-in-aws-lambda/" rel="noopener noreferrer"&gt;Node 22&lt;/a&gt; runtimes. New runtimes come all the time as languages get updated so this isn't groundbreaking, but still nice to see for users of both languages who haven't otherwise moved onto providing their own runtimes.&lt;/p&gt;

&lt;p&gt;While this was certainly not an exhaustive list (that post would be far too long!), these are some of the announcements that I'm personally really excited about from this year's re:Invent cycle. If you're looking for more, I recommend checking out &lt;a href="https://aws-news.com" rel="noopener noreferrer"&gt;https://aws-news.com&lt;/a&gt; for all the good stuff that's been announced over the last few weeks. &lt;/p&gt;

</description>
      <category>aws</category>
      <category>awsreinvent</category>
      <category>lambda</category>
      <category>s3</category>
    </item>
    <item>
      <title>Resilience in the Cloud - Fault Isolation Boundaries</title>
      <dc:creator>Ryan Batchelder</dc:creator>
      <pubDate>Tue, 08 Oct 2024 00:12:03 +0000</pubDate>
      <link>https://forem.com/rdbatch/resilience-in-the-cloud-fault-isolation-boundaries-4nid</link>
      <guid>https://forem.com/rdbatch/resilience-in-the-cloud-fault-isolation-boundaries-4nid</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Unlike the previous post in this series, this one will get deeper into AWS-specific nuances and all the points here here will not be directly translatable to other infrastructure providers. That said, the concept of fault isolation boundaries is broadly applicable across many types of software and infrastructure designs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After my &lt;a href="https://dev.to/rdbatch02/resilience-in-the-cloud-availability-vs-recoverability-4jkp"&gt;last post&lt;/a&gt;, hopefully you're at least devoting some thought to your application's recoverability. While I tried to stress the importance of being prepared to recover your application in the event of a failure, availability is still a key trait for many applications.&lt;/p&gt;

&lt;p&gt;For many folks there's likely a thought that high availability = run more than one instance of my application. On the surface, that's true! The more instances that are available to handle your workload means more things that have to fail before your workload cannot be handled. Perfect, so this means that optimizing availability is an exercise in adding as many instances as possible without going bankrupt, right?&lt;/p&gt;

&lt;p&gt;Well, your infrastructure provider would be certainly thrilled with this approach...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6og3qeb5jv8qvomu1t9l.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6og3qeb5jv8qvomu1t9l.jpg" alt="Popular cloud providers cast as Scrooge McDuck and his grand-nephews" width="800" height="400"&gt;&lt;/a&gt;&lt;em&gt;(This is what I'm guessing cloud providers look like when you run lots of redundant instances for resilience without corresponding traffic)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;What if we could instead be smarter about adding redundancy while stretching the utility of your infrastructure dollars? Fault isolation boundaries give us a means to ensure that we're building workloads that are "redundant enough" to mitigate entire classes of failures without being cost-inefficient.&lt;/p&gt;

&lt;p&gt;But first, what are fault isolation boundaries?&lt;/p&gt;

&lt;h2&gt;
  
  
  What's in a Name?
&lt;/h2&gt;

&lt;p&gt;At a high level, fault isolation boundaries are logical divisions within your infrastructure that are intended to contain the impact of component failure. If you've ever had a conversation about "limiting the blast radius" of a potential failure in your application, you've likely implemented a fault isolation boundary to do it. AWS provides us with a number of infrastructure-level fault isolation boundaries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Availability Zones​&lt;/li&gt;
&lt;li&gt;Regions​&lt;/li&gt;
&lt;li&gt;Accounts​&lt;/li&gt;
&lt;li&gt;Partitions​&lt;/li&gt;
&lt;li&gt;Local Zones&lt;/li&gt;
&lt;li&gt;Control Plane vs. Data Plane Separation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These boundaries serve multiple purposes. Regions and local zones can enable operations in certain jurisdictions which have legal requirements around where data is processed and stored. Accounts (and to an extent, partitions) are important security boundaries which ensure that access is scoped appropriately. But how do these boundaries fit into a conversation around resilience? &lt;/p&gt;

&lt;p&gt;From a resilience perspective, AWS &lt;a href="https://youtu.be/es9527rA_8I?si=jcm2P6h1OQZyfRvK&amp;amp;t=2361" rel="noopener noreferrer"&gt;uses them internally to roll out new capabilities in a safe manner&lt;/a&gt; so that any failed changes can not only be rolled back quickly, but also only impact a small number of users. When a new feature is being rolled out, availability zones will get the update one at a time (meeting certain success metrics at each step) until it is rolled to the entire region. More than just feature releases though, availability zones and regions in particular are designed with specific constraints to ensure they provide resilience value to us as the customer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Infrastructure Designed for Reliability
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9vw31tr4w5izwuoi9mir.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9vw31tr4w5izwuoi9mir.png" alt="Map of the world showing where AWS regions are located" width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AWS has &lt;a href="https://aws.amazon.com/about-aws/global-infrastructure/regions_az/" rel="noopener noreferrer"&gt;regions all over the globe&lt;/a&gt; and they're constantly working to add new ones. If you're new to AWS, it might be easy to view regions as simply a way to choose where your workloads run. Whether it's to provide lower latency by putting your workload physically closer to your users or ensuring that data stays where it is legally required to, regions dictate the physical location of your infrastructure. Regions are more than this though; they are a key resilience feature for AWS. They are deliberately designed to be hundreds of miles apart (within the same partition) such that a natural disaster impacting one region should not impact its neighbors. If one does experience a failure, each region is designed with independent control planes such that any outages should remain isolated (with some notable exceptions for &lt;a href="https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/global-services.html" rel="noopener noreferrer"&gt;global services&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The next smaller boundary within regions are &lt;a href="https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/availability-zones.html" rel="noopener noreferrer"&gt;availability zones&lt;/a&gt; (often abbreviated AZs). In contrast to regions, availability zones are separated by just tens of miles to ensure that data replication between them remains fast. In spite of availability zones being closer together, they are designed to avoid "shared fate" failure scenarios such as localized natural disasters or power disruptions. AZs are interconnected by redundant fiber connections so data replication between them is super fast. Many applications should be able to operate across multiple availability zones within the same region without inter-zone latency concerns.&lt;/p&gt;

&lt;h2&gt;
  
  
  Planar Separation and Static Stability
&lt;/h2&gt;

&lt;p&gt;Now that we've covered physical infrastructure, let's talk about what it means to actually &lt;em&gt;run&lt;/em&gt; something on that. AWS services are implemented with a division between their control and data planes. The former is what allows us to create, update, or delete resource in our AWS accounts. Control planes provide the APIs that the Console, CLI, SDKs, and infrastructure as code interact with. Conversely, data planes are what provide the ongoing service by a given resource. Think of a control plane as the component that facilitates the creation of an EC2 instance and the data plane is what keeps the instance going and able to serve traffic.&lt;/p&gt;

&lt;p&gt;This planar separation is important for a number of reasons, one of which being that it enables a concept called &lt;strong&gt;static stability&lt;/strong&gt;. This is a pattern which aims to provide higher levels of reliability by designing applications that can recover from failure without the need to make any changes. In the case of an application that runs across multiple availability zones, static stability would mean having infrastructure ready to handle traffic provisioned and ready in each availability zone with no manual intervention needed to failover between them. In context this means that, since data planes are relatively simpler than control planes and thus less likely to fail, designing an application with static stability will help guard you against an outage when a control plane becomes unavailable.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does it all mean?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw4g50b1pd7vj0sex89to.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw4g50b1pd7vj0sex89to.jpg" alt="Meme of Dory and Marlin from Finding Nemo saying " width="600" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you've made it this far, you might be thinking "this all sounds great, but what should I do this all this?" Since we set out trying to work out how to make our systems more resilient while also remaining cost effective, we can look at the fault isolation boundaries as a way to quantify risk.&lt;/p&gt;

&lt;p&gt;Statistically speaking, failures of (or within) individual availability zones are more likely than entire regions. Fittingly, many services in AWS make it really easy to operate across multiple availability zones at once. Because of this, implementing statically stable workloads across multiple AZs in a single region is a good first step. Of course the additional infrastructure isn't free, but the added operational overhead is minimal. For many applications this might be enough, but the most critical workloads might demand multi-region operations. What's important here is that you're intentional with &lt;em&gt;where&lt;/em&gt; you're running your workloads. Running 3 redundant instances split across 3 AZs is far more reliable than running all 3 in the same AZ.&lt;/p&gt;

&lt;p&gt;If using more AZs is good, then more regions is surely better, right? Regional service failures tend to be more rare than AZ-level outages, though they are more impactful. Unlike AZ failovers, most services do not provide an easy way to operate out of multiple regions at the same time so there are usually more moving parts to account for in a regional failover. Because of this, it's best to account for multi-region operations early in the design process so you can choose services and patterns that are conducive to this level of resilience. It's not impossible to retrofit later on, but it can require a lot more refactoring than just adding multi-AZ resilience. The operational complexity combined with the additional infrastructure needed makes multi-region resilience significantly more expensive than multi-AZ.&lt;/p&gt;

&lt;p&gt;Think about AZs like having fire doors in a building. In the event of a fire, these doors help to prevent the fire from spreading to other parts of the building. Relative to the cost of the entire building, fire doors are a cheap way to help isolate the potential damage that a fire can cause (and help to keep occupants safer). Running in multiple regions is like constructing an entirely separate building to protect against a fire in the first. If one building burns down, you still have a second usable building, but the cost to do so is very high.&lt;/p&gt;

&lt;p&gt;If you want to read more on this topic, I highly recommend the entire &lt;a href="https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/abstract-and-introduction.html" rel="noopener noreferrer"&gt;AWS Whitepaper on Fault Isolation Boundaries&lt;/a&gt;. Even if you've been working in AWS for a long time, it is a great resource to dive deeper into how various AWS services are built for resilience (and some hidden gotchas that you may not be thinking about).&lt;/p&gt;

&lt;p&gt;In my &lt;a href="https://dev.to/rdbatch02/resilience-in-the-cloud-availability-vs-recoverability-4jkp"&gt;previous post&lt;/a&gt; I covered the difference between availability and recoverability. Fault isolation boundaries give us a way to quantify how we improve our availability. For the next and final post in this series, I'll cover the resilience spectrum and how we can effectively place our workloads on that spectrum.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>resilience</category>
    </item>
    <item>
      <title>Resilience in the Cloud - Availability vs Recoverability</title>
      <dc:creator>Ryan Batchelder</dc:creator>
      <pubDate>Tue, 24 Sep 2024 01:12:32 +0000</pubDate>
      <link>https://forem.com/rdbatch/resilience-in-the-cloud-availability-vs-recoverability-4jkp</link>
      <guid>https://forem.com/rdbatch/resilience-in-the-cloud-availability-vs-recoverability-4jkp</guid>
      <description>&lt;p&gt;&lt;em&gt;Note: the following post is going to focus on AWS in any discussion of examples, but the overall concepts here are meant to be vendor-agnostic and can be applied to any cloud environment.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;One of the biggest points of confusion I've run into when working with teams on their resilience strategies in the past is the difference between (high) availability and recoverability. I don't blame them, lots of the buzz around cloud apps focuses on building things that are highly available and often eschew the notion of recoverability entirely. I mean sure if your service never goes down, then there's never anything to recover, right?&lt;/p&gt;

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

&lt;p&gt;If there were true, I'd stop writing here and you all could close this tab and return to your regularly scheduled cat videos. You could certainly do that anyway, but when your video is over I'd recommend maybe coming back here and making sure you know how to keep those cat videos rolling even on the rainiest of days.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Shared Responsibility Model for Resiliency
&lt;/h2&gt;

&lt;p&gt;Before we get into the differences here, I think it's important to start with the &lt;a href="https://docs.aws.amazon.com/whitepapers/latest/disaster-recovery-workloads-on-aws/shared-responsibility-model-for-resiliency.html" rel="noopener noreferrer"&gt;Shared Responsibility Model for Resiliency&lt;/a&gt;.&lt;/p&gt;

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

&lt;p&gt;If you've worked in AWS for a while, you're probably aware of the &lt;a href="https://aws.amazon.com/compliance/shared-responsibility-model/" rel="noopener noreferrer"&gt;Shared Responsibility Model&lt;/a&gt; in the context of security. The resiliency model is thematically similar: AWS is responsible for the resilience "of" the cloud, while us as the customer are responsible for the resilience of our workloads "in" the cloud. I like to start with this because it helps to set the stage for debunking some of the myths around cloud resilience that can leave you in a tough position if you're not prepared for a disaster. The biggest culprits here are the durability and availability guarantees provided at the service level.&lt;/p&gt;

&lt;p&gt;Let me be clear that I'm not intending to imply that AWS (or any other cloud vendor) is attempting to mislead customers. The opposite is actually true, the fact that S3 has a 99.999999999% durability guarantee is an incredible feat of engineering that should be celebrated! But when using S3 keep in mind that the durability guarantee serves AWS' side of the shared responsibility model - it's extremely unlikely that data stored in S3 will be lost &lt;strong&gt;at the fault of AWS&lt;/strong&gt;. So our data is all safe in S3 and we don't need to worry about it, right...? &lt;/p&gt;

&lt;p&gt;Not quite. If you read that sentence over again, you'll notice that I said "...at the fault of AWS". Those impressive durability numbers will do nothing to protect you against a catastrophic bug in your code, ransomware attacks, or simple human error of your users or someone on your team. These types of failures fall on &lt;strong&gt;your&lt;/strong&gt; side of the shared responsibility model, and directly impact the &lt;strong&gt;recoverability&lt;/strong&gt; of data in your application.&lt;/p&gt;

&lt;p&gt;There's a similar comparison to be made on the &lt;strong&gt;availability&lt;/strong&gt; side of the equation with the various service level agreements (SLAs) that apply. For example EC2 has an instance-level SLA of at least 99.95% uptime, but that SLA does not apply to scenarios in which your instance fails due to something on your side of the model. An example of this could be your workloads exhausting the available memory on and instance and causing a crash, or a &lt;a href="https://en.wikipedia.org/wiki/2024_CrowdStrike_incident" rel="noopener noreferrer"&gt;security vendor pushing an improperly tested patch to your machines&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Availability
&lt;/h2&gt;

&lt;p&gt;"High Availability" is one of the big buzzword concepts of modern cloud architectures. This is for good reason - the commoditization of compute resources has made it really easy to simply run more instances of your workloads to ensure that there's always a node available when needed. The cloud made it so that suddenly we could solve all sorts of performance and availability problems by simply throwing more computers at them. Sure you can make an argument that this has made it easier to write software poorly, but there's no denying that the ease of scale provided by cloud computing is a net-positive for service availability.&lt;/p&gt;

&lt;p&gt;Beyond sheer scale, cloud computing allows us to put our workloads in geographically disparate places which has its own share of benefits. By changing just a few lines of code, AWS (and other cloud providers) allow us to spread our workloads across different physical locations, insulating catastrophic failures in one location from impacting our workloads in their entirety.&lt;/p&gt;

&lt;p&gt;I could (and will) write an entire post on the different types of fault-isolation boundaries provided in AWS. For the purposes of this discussion however, it's important to consider that you generally want to reduce single points of failure in your applications whenever it's possible and feasible. This means running more than one instance of any compute resources, and at least leveraging database configurations that maintain availability across multiple zones. For data, this usually comes with some amount of replication as well to ensure that there are multiple copies of your data being kept synchronized and ready for use should a primary dataset become unavailable. &lt;/p&gt;

&lt;p&gt;The extent to which you configure your resources to be highly available has a direct correlation to your bill, so there's a constant balancing act to be performed to ensure you're not overspending but also not underdelivering on availability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recoverability
&lt;/h2&gt;

&lt;p&gt;If high availability is one of the hot buzzwords of cloud computing, recoverability is the complete opposite in that it's often ignored (or at least under-appreciated)! Despite this, I'm of the opinion that recoverability is actually &lt;em&gt;more important&lt;/em&gt; for most workloads.&lt;/p&gt;

&lt;p&gt;At the most fundamental level, recoverability is your ability to restore your workload and its data from any sort of incident which might cause it to be inconsistent with its desired state. For your running application, this can be a crash or performance degradation due to resource exhaustion, operator error, or a bad code change. For data, this can be data loss due to inadvertent deletion, ransomware (or some other security incident), or even accidental modification. In either scenario, it's important to keep in mind even the seemingly infinite realm of the cloud, there is still physical infrastructure behind the scenes that's &lt;a href="https://www.theregister.com/2021/03/10/ovh_strasbourg_fire/" rel="noopener noreferrer"&gt;susceptible to catastrophic failure&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Put simply: when something bad happens, recoverability represents your ability to make things good again.&lt;/p&gt;

&lt;p&gt;In a world where businesses are placing huge values on their data (and in many cases, data can be quite literally everything to a business), it doesn't matter how available a system is if the data contained within it can be lost at a moment's notice. From a data perspective, recoverability usually comes in the form of backups. It might be tempting to think that your data backup needs are covered by synchronized replicas (&lt;em&gt;surely you've just finished reading the section on availability, right?&lt;/em&gt;). Yes, synchronized replicas &lt;em&gt;do&lt;/em&gt; increase availability and durability (which serves the AWS side of the shared responsibility model!), but since they're synchronized it means that any failure condition of your data is immediately replicated to all of your copies. That table you just accidentally dropped in production was dropped from every replica within milliseconds, leaving you with just as much of a mess to clean up. To truly recover, you must have some sort of backup of that data that you can restore. &lt;/p&gt;

&lt;p&gt;If there's one thing you learn from this entire post, let it be this: &lt;a href="https://www.raidisnotabackup.com" rel="noopener noreferrer"&gt;like RAID&lt;/a&gt;, &lt;strong&gt;replicas are not backups&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Recovering compute is a different conversation entirely. Thanks to the &lt;a href="https://cloudscaling.com/blog/cloud-computing/the-history-of-pets-vs-cattle/" rel="noopener noreferrer"&gt;"treat your servers like cattle, not pets"&lt;/a&gt; analogy and the prevalance of &lt;a href="https://12factor.net" rel="noopener noreferrer"&gt;twelve-factor methodologies&lt;/a&gt;, modern cloud applications typically are built such that compute is fungible. That's to say: if your server somehow fails, you should be able to recover it by simply deploying another one. If your application is built in such a way that losing your compute is anything more than a minor annoyance, you may want to consider why that's the case and seek ways to improve your architecture. The best-case scenario (besides no failure) is that automation has you covered and compute is kept healthy without any intervention; this is overlapped right into the high availability camp. If you cannot get to that point for some reason, then you want to at least make sure any manual interventions are as quick, easy, and repeatable as possible. Automate and script as much as possible to minimize any potential for human error.&lt;/p&gt;

&lt;h2&gt;
  
  
  Putting it all together
&lt;/h2&gt;

&lt;p&gt;By this point I hope I've been able to make it clear that availability and recoverability are two separate but intertwined concepts. Well architected cloud applications need to consider both, especially when your application's data is business critical. Remember that it's easy to get lulled into a false sense of security by high durability numbers and an architecture that scatters replicas of your data across the globe. &lt;/p&gt;

&lt;p&gt;Always ask yourself: what would happen if I woke up and this data was gone tomorrow? If the answer is anything besides "nothing", back it up (and then &lt;a href="https://www.backblaze.com/blog/the-3-2-1-backup-strategy/" rel="noopener noreferrer"&gt;maybe copy that backup somewhere else&lt;/a&gt;, too). Of course you should also be doing &lt;a href="https://aws.amazon.com/architecture/well-architected" rel="noopener noreferrer"&gt;Well Architected&lt;/a&gt; evaluations periodically, which includes the &lt;a href="https://docs.aws.amazon.com/wellarchitected/latest/reliability-pillar/welcome.html" rel="noopener noreferrer"&gt;Reliability Pillar&lt;/a&gt; that covers this and more.&lt;/p&gt;

&lt;p&gt;Overall building highly available systems is a desirable trait - your systems should be available whenever a user needs them. Just keep in mind that even highly available systems can and will fail at some point, at which time the ease and efficacy of your systems' recoverability are far more important than any availability feature it has.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>backup</category>
      <category>cloud</category>
      <category>resilience</category>
    </item>
  </channel>
</rss>
