<?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: Adrian Hornsby</title>
    <description>The latest articles on DEV Community by Adrian Hornsby (@adhorn).</description>
    <link>https://dev.to/adhorn</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%2F87155%2Fd8e66770-684c-42d6-89bc-dbc75db8f17b.jpg</url>
      <title>DEV Community: Adrian Hornsby</title>
      <link>https://dev.to/adhorn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/adhorn"/>
    <language>en</language>
    <item>
      <title>AWS re:Invent 2020 digest — Part 2</title>
      <dc:creator>Adrian Hornsby</dc:creator>
      <pubDate>Thu, 07 Jan 2021 12:22:56 +0000</pubDate>
      <link>https://dev.to/aws/aws-re-invent-2020-digest-part-2-27pn</link>
      <guid>https://dev.to/aws/aws-re-invent-2020-digest-part-2-27pn</guid>
      <description>&lt;h3&gt;
  
  
  AWS re:Invent 2020 digest — Part 2
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Curated list of my favorite AWS updates from re:Invent 2020
&lt;/h4&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%2Fcwo3w86g4pyh637cgulb.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%2Fcwo3w86g4pyh637cgulb.png" width="800" height="362"&gt;&lt;/a&gt;&lt;a href="https://reinvent.awsevents.com/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://reinvent.awsevents.com/" rel="noopener noreferrer"&gt;https://reinvent.awsevents.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://reinvent.awsevents.com/" rel="noopener noreferrer"&gt;reInvent&lt;/a&gt; 2020 is coming to an end. A lot of&lt;a href="https://aws.amazon.com/new/?whats-new-content-all.sort-by=item.additionalFields.postDateTime&amp;amp;whats-new-content-all.sort-order=desc" rel="noopener noreferrer"&gt;new launches&lt;/a&gt; have happened since I published &lt;a href="https://dev.to/aws/aws-re-invent-2020-digest-part-1-31li"&gt;Part 1&lt;/a&gt;of this series. Because digesting all the different updates takes time and a lot of coffee, I thought I’d help you out a little.&lt;/p&gt;

&lt;p&gt;Following is a curated list of things that I found most important; matters related to architecture, scalability, reliability, performance, resiliency, devops, and security — anything that caught my eye, and I hope will satisfy yours.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://aws.amazon.com/fis/" rel="noopener noreferrer"&gt;AWS Fault Injection Simulator (coming in 2021)&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/fis/" rel="noopener noreferrer"&gt;AWS Fault Injection Simulator&lt;/a&gt; is a fully managed chaos engineering service that makes it easier for teams to discover an application’s weaknesses at scale in order to improve performance, observability, and resiliency. Chaos engineering is the process of stressing an application in testing or production environments by creating disruptive events, such as server outages or API throttling, observing how the system responds, and implementing improvements. Chaos engineering helps teams create the real-world conditions needed to uncover the hidden issues, monitoring blind spots, and performance bottlenecks that are difficult to find in distributed systems.&lt;/p&gt;

&lt;p&gt;As you can imagine, this is my favorite launch and it looks like I am not the only one thinking like that :)&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1338896040200708097-524" src="https://platform.twitter.com/embed/Tweet.html?id=1338896040200708097"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1338896040200708097-524');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1338896040200708097&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1338908145125650434-231" src="https://platform.twitter.com/embed/Tweet.html?id=1338908145125650434"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1338908145125650434-231');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1338908145125650434&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;Go watch Laura Thomson, Sr. Product Mgr for AWS FIS, launching the service live on twitch!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/media/2e8f5a5d424f73adb2479662523ad904/href" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://medium.com/media/2e8f5a5d424f73adb2479662523ad904/href" rel="noopener noreferrer"&gt;https://medium.com/media/2e8f5a5d424f73adb2479662523ad904/href&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also check my reInvent session &lt;a href="https://virtual.awsevents.com/esearch/search?keyword=Fault%20Injection%20Simulator" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1338915399300239362-114" src="https://platform.twitter.com/embed/Tweet.html?id=1338915399300239362"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1338915399300239362-114');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1338915399300239362&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;To learn more about chaos engineering, check my &lt;a href="https://adhorn.medium.com/the-chaos-engineering-collection-5e188d6a90e2" rel="noopener noreferrer"&gt;collection of articles&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/aws-lambda-now-supports-self-managed-apache-kafka-as-an-event-source/" rel="noopener noreferrer"&gt;AWS Lambda now supports self-managed Apache Kafka as an event source&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;If you love event-driven architecture, this one is for you! &lt;a href="http://aws.amazon.com/lambda/" rel="noopener noreferrer"&gt;AWS Lambda&lt;/a&gt; lets customers build applications that can be triggered by messages in an Apache Kafka cluster hosted on any infrastructure. It is now easier than ever to build Kafka consumer applications with Lambda without needing to worry about provisioning or managing servers.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1294178133164339200-205" src="https://platform.twitter.com/embed/Tweet.html?id=1294178133164339200"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1294178133164339200-205');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1294178133164339200&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS announces Amazon Managed Service for Grafana and Prometheus in Preview
&lt;/h3&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1338902037644206081-384" src="https://platform.twitter.com/embed/Tweet.html?id=1338902037644206081"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1338902037644206081-384');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1338902037644206081&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/grafana/" rel="noopener noreferrer"&gt;&lt;strong&gt;Amazon Managed Service for Grafana&lt;/strong&gt;&lt;/a&gt; is a fully managed and secure data visualization service that lets customers instantly query, correlate, and visualize operational metrics, logs, and traces for their applications from multiple data sources. Developed in partnership with Grafana Labs, Amazon Managed Service for Grafana manages the provisioning, setup, scaling, and maintenance of Grafana servers, eliminating the need for customers to do this themselves.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1338910979317526529-364" src="https://platform.twitter.com/embed/Tweet.html?id=1338910979317526529"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1338910979317526529-364');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1338910979317526529&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/prometheus/" rel="noopener noreferrer"&gt;&lt;strong&gt;Amazon Managed Service for Prometheus (AMP)&lt;/strong&gt;&lt;/a&gt; is a fully managed Prometheus**-compatible monitoring service that makes it easy to monitor containerized applications at scale by automatically scaling the ingestion, storage, and querying of operational metrics.&lt;/p&gt;

&lt;p&gt;** &lt;em&gt;The&lt;/em&gt; &lt;a href="https://prometheus.io/" rel="noopener noreferrer"&gt;&lt;em&gt;Cloud Native Computing Foundation’s Prometheus&lt;/em&gt;&lt;/a&gt; &lt;em&gt;project is a popular open source and alerting monitoring solution optimized for container environments.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Customers can now use the open source Prometheus Query Language (PromQL) to monitor the performance of containerized workloads on AWS or on-premises, without having to manage the underlying infrastructure for scalability, availability, and security.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1338901818810699780-525" src="https://platform.twitter.com/embed/Tweet.html?id=1338901818810699780"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1338901818810699780-525');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1338901818810699780&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/aws-global-accelerator-launches-custom-routing/" rel="noopener noreferrer"&gt;AWS Global Accelerator launches custom routing&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/global-accelerator/" rel="noopener noreferrer"&gt;AWS Global Accelerator released&lt;/a&gt; custom routing accelerator, a new type of accelerator that lets you use your own application logic to route user traffic to a specific Amazon EC2 destination.&lt;/p&gt;

&lt;p&gt;With a custom routing accelerator, you can route multiple users to a specific EC2 destination in a single or multiple AWS Regions by directing them to a unique port on your accelerator. This feature makes it easier to integrate Global Accelerator with your application logic, such as matchmaking servers or session border controllers (network devices that protect and regulate IP traffic flows for real-time communication workflows).&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1337467445880221697-11" src="https://platform.twitter.com/embed/Tweet.html?id=1337467445880221697"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1337467445880221697-11');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1337467445880221697&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;With custom routing accelerators, you can now leverage AWS Global Accelerator as the single point of entry for your application while deterministically sending your user traffic to specific EC2 destinations in any AWS Region.&lt;/p&gt;

&lt;p&gt;And customers are already embracing this feature to build multiplayer game architectures!&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1337479605037518851-793" src="https://platform.twitter.com/embed/Tweet.html?id=1337479605037518851"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1337479605037518851-793');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1337479605037518851&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h3&gt;
  
  
  Other noticeable launches
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/severless-batch-scheduling-with-aws-batch-and-aws-fargate/" rel="noopener noreferrer"&gt;Serverless Batch Scheduling with AWS Batch and AWS Fargate&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/introducing-aws-cloudshell/" rel="noopener noreferrer"&gt;Introducing AWS CloudShell&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/aws-lambda-launches-checkpointing-for-amazon-kinesis-and-amazon-dynamodb-streams/" rel="noopener noreferrer"&gt;AWS Lambda launches checkpointing for Amazon Kinesis and Amazon DynamoDB Streams&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/aws-cost-anomaly-detection-now-generally-available/" rel="noopener noreferrer"&gt;AWS Cost Anomaly Detection is now generally available&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;-Adrian&lt;/p&gt;




</description>
      <category>aws</category>
      <category>computerscience</category>
      <category>architecture</category>
      <category>cloudskills</category>
    </item>
    <item>
      <title>AWS re:Invent 2020 digest — Part 1</title>
      <dc:creator>Adrian Hornsby</dc:creator>
      <pubDate>Thu, 10 Dec 2020 07:01:49 +0000</pubDate>
      <link>https://dev.to/aws/aws-re-invent-2020-digest-part-1-31li</link>
      <guid>https://dev.to/aws/aws-re-invent-2020-digest-part-1-31li</guid>
      <description>&lt;h3&gt;
  
  
  AWS re:Invent 2020 digest — Part 1
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Curated list of my favorite AWS updates from re:Invent 2020
&lt;/h4&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%2F26080qkke0ahbvusjtfo.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%2F26080qkke0ahbvusjtfo.png" width="800" height="357"&gt;&lt;/a&gt;&lt;a href="https://reinvent.awsevents.com/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://reinvent.awsevents.com/" rel="noopener noreferrer"&gt;https://reinvent.awsevents.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While &lt;a href="https://reinvent.awsevents.com/" rel="noopener noreferrer"&gt;reInvent&lt;/a&gt; just started, the first keynote from Andy Jassy has had a lot of new launches. I know that digesting all the updates takes time and a lot of coffee, so let me help you.&lt;/p&gt;

&lt;p&gt;Following is a curated list of things that I found most important; matters related to architecture, scalability, reliability, performance, resiliency, DevOps, and security — anything that caught my eye, and I hope will satisfy yours.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/amazon-s3-now-delivers-strong-read-after-write-consistency-automatically-for-all-applications/" rel="noopener noreferrer"&gt;Amazon S3 now delivers strong read-after-write consistency automatically for all applications&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;This is hands-down my favorite launch!&lt;/p&gt;

&lt;p&gt;Amazon S3 now delivers strong read-after-write consistency automatically for all applications for any storage request, without changes to performance or availability, without sacrificing regional isolation for applications, and at no additional cost.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/amazon-s3-now-delivers-strong-read-after-write-consistency-automatically-for-all-applications/" rel="noopener noreferrer"&gt;Amazon S3 now delivers strong read-after-write consistency automatically for all applications&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  OK — but what does strong read-after-write consistency mean?
&lt;/h4&gt;

&lt;p&gt;After successfully writing a new object or overwriting an existing one, any subsequent read request immediately receives the object’s latest version. S3 also provides strong consistency for list operations, so after a write, you can directly perform a listing of the objects in a bucket with any changes reflected.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1333929339541352448-691" src="https://platform.twitter.com/embed/Tweet.html?id=1333929339541352448"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1333929339541352448-691');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1333929339541352448&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;To learn more, hear the GM of Amazon S3, &lt;a href="https://twitter.com/kevinmiller" rel="noopener noreferrer"&gt;Kevin Miller&lt;/a&gt;, and Ashish Gandhi with Dropbox, discuss the benefits of strong consistency for S3.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/osFmiT_EYtg"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Continuing with S3, they were a couple more updates that you might find useful for your DR or multi-region strategy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/amazon-s3-replication-adds-support-for-multiple-destinations-in-the-same-or-different-aws-regions/" rel="noopener noreferrer"&gt;Amazon S3 Replication adds support for multiple destinations in the same, or different AWS Regions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/amazon-s3-replication-adds-support-two-way-replication/" rel="noopener noreferrer"&gt;Amazon S3 Replication adds support for two-way replication&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/aws-lambda-now-supports-container-images-as-a-packaging-format/" rel="noopener noreferrer"&gt;AWS Lambda now supports container images as a packaging format&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;This one is interesting —even controversial — because I know some of the &lt;strong&gt;&lt;em&gt;serverless&lt;/em&gt;&lt;/strong&gt; purists out there are feeling betrayed :) But to me, it is a testament of AWS’ obsession to listening to customers. And customers wanted that.&lt;/p&gt;

&lt;p&gt;You can now package and deploy &lt;a href="https://aws.amazon.com/lambda/" rel="noopener noreferrer"&gt;AWS Lambda&lt;/a&gt; functions as a container image of up to 10 GB.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/aws-lambda-now-supports-container-images-as-a-packaging-format/" rel="noopener noreferrer"&gt;AWS Lambda now supports container images as a packaging format&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It means that you can now build Lambda-based applications using your familiar container tooling &amp;amp; workflows, using either a set of AWS base images for Lambda, or using your preferred community or enterprise images.&lt;/p&gt;

&lt;p&gt;Suppose you are familiar with container development tools such as the Docker CLI. In that case, you can locally build and test your Lambda based application and push your container image to &lt;a href="https://aws.amazon.com/ecr/" rel="noopener noreferrer"&gt;Amazon ECR&lt;/a&gt;. You can then deploy your Lambda function by specifying your Amazon ECR image tag or digest from the repository.&lt;/p&gt;

&lt;p&gt;And by the way, Amazon ECR just launched &lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/announcing-amazon-ecr-public-and-amazon-ecr-public-gallery/" rel="noopener noreferrer"&gt;Amazon ECR Public&lt;/a&gt;. This fully managed registry makes it easy for a developer to share container software worldwide for anyone to download publicly.&lt;/p&gt;

&lt;p&gt;For more information and a deep dive on container image support for Lambda, please &lt;a href="https://aws.amazon.com/blogs/aws/new-for-aws-lambda-container-image-support/" rel="noopener noreferrer"&gt;read this very detailed post&lt;/a&gt; from &lt;a href="https://twitter.com/danilop" rel="noopener noreferrer"&gt;Danilo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1333822129020792839-703" src="https://platform.twitter.com/embed/Tweet.html?id=1333822129020792839"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1333822129020792839-703');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1333822129020792839&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/babelfish-amazon-aurora-postgresql-available-preview/" rel="noopener noreferrer"&gt;Babelfish for Amazon Aurora PostgreSQL is Available for Preview&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/rds/aurora/babelfish/" rel="noopener noreferrer"&gt;Babelfish for Amazon Aurora&lt;/a&gt; is a new translation layer for Amazon Aurora that enables Aurora to understand queries from applications written for Microsoft SQL Server.&lt;/p&gt;

&lt;p&gt;By using Babelfish, your applications running on SQL Server can now run directly on Aurora PostgreSQL with little to no code changes. Babelfish understands the SQL Server wire-protocol and T-SQL, the Microsoft SQL Server query language, so you don’t have to switch database drivers or re-write all of your application queries.&lt;/p&gt;

&lt;p&gt;This announcement is huge for many of our customers!&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1333826995130486784-47" src="https://platform.twitter.com/embed/Tweet.html?id=1333826995130486784"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1333826995130486784-47');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1333826995130486784&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;And by the way, AWS is open-sourcing Babelfish in 2021. Until then, you can use Babelfish on Amazon Aurora in a preview to see how it works and to get a sense of whether this is the right approach for you.&lt;/p&gt;

&lt;p&gt;Here is a full write-up of the launch by &lt;a href="https://twitter.com/mjasay" rel="noopener noreferrer"&gt;Matt Asay&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/blogs/opensource/want-more-postgresql-you-just-might-like-babelfish/" rel="noopener noreferrer"&gt;Want more PostgreSQL? You just might like Babelfish | Amazon Web Services&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/introducing-the-next-version-of-amazon-aurora-serverless-in-preview/" rel="noopener noreferrer"&gt;Introducing the next version of Amazon Aurora Serverless in preview&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;No secrets here — I love Amazon Aurora, so I am biased.&lt;/p&gt;

&lt;p&gt;For those not knowing what Amazon Aurora is, it is a MySQL and PostgreSQL-compatible &lt;a href="https://aws.amazon.com/relational-database/" rel="noopener noreferrer"&gt;relational database&lt;/a&gt; built for the cloud.&lt;/p&gt;

&lt;p&gt;Amazon Serverless Aurora is — as the name implies — the serverless version of Aurora. AWS is now releasing its version 2, with supports for the full breadth of Aurora features, including Global Database, Multi-AZ deployments, and read replicas.&lt;/p&gt;

&lt;p&gt;Amazon Aurora Serverless v2, currently in preview, scales instantly from hundreds to hundreds-of-thousands of transactions in a fraction of a second. As Aurora Serverless scales, it adjusts its capacity in fine-grained increments to provide just the right amount of database resources that the application needs. There is no database capacity for you to manage; you pay only for the capacity your application consumes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; : Aurora Serverless v2 (Preview) is currently available in preview for Aurora with MySQL compatibility.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1333845197000634370-221" src="https://platform.twitter.com/embed/Tweet.html?id=1333845197000634370"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1333845197000634370-221');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1333845197000634370&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/amazon-eks-support-ec2-spot-instances-managed-node-groups/" rel="noopener noreferrer"&gt;Amazon EKS adds support for EC2 Spot Instances in managed node groups&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;First, for those that don’t know what a &lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances.html" rel="noopener noreferrer"&gt;Spot Instance&lt;/a&gt; is, a Spot Instance is an &lt;em&gt;unused&lt;/em&gt; EC2 instance that is available for less than the on-demand price, often at steep discounts, which lets you lower your EC2 bill significantly. Amazon EC2 sets each instance type’s spot price in each Availability Zone and adjusts it gradually based on the long-term supply and demand for Spot Instances.&lt;/p&gt;

&lt;p&gt;Second, Amazon EKS is a managed service that makes it easy for you to run Kubernetes on AWS.&lt;/p&gt;

&lt;p&gt;And now, Amazon EKS supports creating and managing Amazon EC2 Spot Instances using Amazon EKS managed node groups. This lets you take advantage of the steep savings and scale that Spot Instances provide.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/amazon-eks-support-ec2-spot-instances-managed-node-groups/" rel="noopener noreferrer"&gt;Amazon EKS adds support for EC2 Spot Instances in managed node groups&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Until now, Amazon EKS customers had to configure Amazon EC2 Auto Scaling groups manually, manage graceful draining of Spot nodes, and upgrade the Spot nodes to the latest Kubernetes versions. With managed node groups, customers get native support for Spot Instances.&lt;/p&gt;

&lt;p&gt;Talking of EKS, the &lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/introducing-amazon-eks-distro/" rel="noopener noreferrer"&gt;new Amazon EKS Distro&lt;/a&gt; — an open-source Kubernetes distribution used by Amazon EKS was launched too!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/introducing-amazon-eks-distro/" rel="noopener noreferrer"&gt;Introducing Amazon EKS Distro - an open source Kubernetes distribution used by Amazon EKS.&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Other noticeable launches
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/blogs/aws/preview-aws-proton-automated-management-for-container-and-serverless-deployments/" rel="noopener noreferrer"&gt;Preview: AWS Proton - Automated Management for Container and Serverless Deployments | Amazon Web Services&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/introducing-amazon-ec2-m5zn-instances/" rel="noopener noreferrer"&gt;Introducing Amazon EC2 M5zn instances, with high frequency processors and 100 Gbps networking&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/introducing-new-amazon-ec2-r5b-instances-featuring-60-gbps-of-ebs-bandwidth-and-260K-iops/" rel="noopener noreferrer"&gt;Introducing new Amazon EC2 R5b instances featuring 60 Gbps of EBS Bandwidth and 260K IOPS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2020/12/introducing-new-amazon-ebs-general-purpose-volumes-gp3/" rel="noopener noreferrer"&gt;Introducing new Amazon EBS general purpose volumes, gp3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;-Adrian&lt;/p&gt;




</description>
      <category>cloud</category>
      <category>aws</category>
      <category>computerscience</category>
      <category>architecture</category>
    </item>
    <item>
      <title>The Resilient Architecture Collection</title>
      <dc:creator>Adrian Hornsby</dc:creator>
      <pubDate>Thu, 12 Nov 2020 07:28:03 +0000</pubDate>
      <link>https://dev.to/aws/the-resilient-architecture-collection-52ko</link>
      <guid>https://dev.to/aws/the-resilient-architecture-collection-52ko</guid>
      <description>&lt;p&gt;A list of my resiliency related blog posts.&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%2Fapsxtw0dk95thvbgeo7i.jpeg" 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%2Fapsxtw0dk95thvbgeo7i.jpeg" width="800" height="410"&gt;&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%2Fz37nm3y3xabs4f4x303p.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%2Fz37nm3y3xabs4f4x303p.png" width="800" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Series on Resilient Architecture
&lt;/h3&gt;

&lt;p&gt;Resilient systems embrace the idea that failures are typical, and that it’s entirely OK to run applications in what we call &lt;strong&gt;partially failing mode&lt;/strong&gt;. While not suitable for life-critical applications, running in a partially failing mode is a viable option for most web applications. Of course, I’m not saying it doesn’t matter if your system fails. It does, and it might result in lost revenue. But, it’s probably not life-critical.&lt;/p&gt;

&lt;p&gt;Building resilient architectures has had its ups-and-downs, some 1 am wake-up calls, some Christmases spent debugging, some “I’m done, I quit” … but most of all, it’s been an incredible learning experience and journey.&lt;/p&gt;

&lt;p&gt;This blog post is a collection of tips and tricks that have served me well throughout this journey, and I hope they will help you well too.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://medium.com/@adhorn/patterns-for-resilient-architecture-part-1-d3b60cd8d2b6" rel="noopener noreferrer"&gt;Part 1: Embracing failure at scale&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;In part 1 of this series, I focus on the infrastructure layer, redundancy, immutability, and the concept of infrastructure as code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@adhorn/patterns-for-resilient-architecture-part-1-d3b60cd8d2b6" rel="noopener noreferrer"&gt;Patterns for Resilient Architecture — Part 1&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://medium.com/@adhorn/patterns-for-resilient-architecture-part-2-9b51a7e2f10f" rel="noopener noreferrer"&gt;Part 2 — Avoiding Cascading Failures&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;In part 2, I focus on cascading failure prevention. Cascading failure happen when one part of a system experiences a local failure and takes down the entire system through inter-connections and failure propagation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@adhorn/patterns-for-resilient-architecture-part-2-9b51a7e2f10f" rel="noopener noreferrer"&gt;Patterns for Resilient Architecture — Part 2&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://medium.com/@adhorn/patterns-for-resilient-architecture-part-3-16e8601c488e" rel="noopener noreferrer"&gt;Part 3 — Preventing Service Failures with Health Check&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;In part 3, I discuss the importance and the challenge of health checks — striking a balance between failure detection and reaction.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@adhorn/patterns-for-resilient-architecture-part-3-16e8601c488e" rel="noopener noreferrer"&gt;Patterns for Resilient Architecture — Part 3&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://medium.com/@adhorn/patterns-for-resilient-architecture-part-4-85afa66d6341" rel="noopener noreferrer"&gt;Part 4 — Caching for Resiliency&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;In part 4, I talk about caching. While caching is often associated with accelerating content delivery, it is also essential from a resiliency standpoint.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@adhorn/patterns-for-resilient-architecture-part-4-85afa66d6341" rel="noopener noreferrer"&gt;Patterns for Resilient Architecture — Part 4&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>sre</category>
      <category>computerscience</category>
      <category>devops</category>
    </item>
    <item>
      <title>The Operational Excellence Collection</title>
      <dc:creator>Adrian Hornsby</dc:creator>
      <pubDate>Thu, 12 Nov 2020 07:05:21 +0000</pubDate>
      <link>https://dev.to/aws/the-operational-excellence-collection-1ppm</link>
      <guid>https://dev.to/aws/the-operational-excellence-collection-1ppm</guid>
      <description>&lt;p&gt;A list of my operational excellence related blog posts.&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%2Fdj7b7i4ghh5pf4j27qw7.jpeg" 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%2Fdj7b7i4ghh5pf4j27qw7.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Series on Operational Excellence
&lt;/h3&gt;

&lt;p&gt;It takes three interconnecting elements to operate the technology we build successfully. First, you need to have the &lt;strong&gt;right culture&lt;/strong&gt;. Second, you need &lt;strong&gt;great tools&lt;/strong&gt;. And third, you need complete &lt;strong&gt;processes.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@adhorn/towards-operational-excellence-35ba6298b12f" rel="noopener noreferrer"&gt;Part 1&lt;/a&gt; of the series covers the cultural side of Operational Excellence (OE) and examined Amazon’s culture in the context of its &lt;a href="https://www.amazon.jobs/en/principles" rel="noopener noreferrer"&gt;Leadership Principles&lt;/a&gt; (LPs). &lt;a href="https://medium.com/@adhorn/towards-operational-excellence-c9fe298e27e7" rel="noopener noreferrer"&gt;Part 2&lt;/a&gt; discusses the role that tools play in achieving OE. &lt;a href="https://adhorn.medium.com/towards-operational-excellence-part-3-8b727f06a4b6" rel="noopener noreferrer"&gt;Part 3&lt;/a&gt; covers the final aspect to operational excellence — processes — or what we call mechanisms.&lt;/p&gt;

&lt;p&gt;Below is the AWS Summit 2020 recording of my &lt;a href="https://speakerdeck.com/adhorn/towards-operational-excellence" rel="noopener noreferrer"&gt;presentation on this topic&lt;/a&gt;. For more details, read the blog posts :)&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/uQOwblJjIbE"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Part 1 — Customers, Culture, and why you should care.
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://medium.com/@adhorn/towards-operational-excellence-35ba6298b12f" rel="noopener noreferrer"&gt;Towards Operational Excellence— Part 1&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Part 2 — On the importance of tools
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://medium.com/@adhorn/towards-operational-excellence-c9fe298e27e7" rel="noopener noreferrer"&gt;Towards Operational Excellence — Part 2&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Part 3 — Mechanisms
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://medium.com/@adhorn/towards-operational-excellence-part-3-8b727f06a4b6" rel="noopener noreferrer"&gt;Towards Operational Excellence — Part 3&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Incident Postmortem Template
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://adhorn.medium.com/incident-postmortem-template-7b0e0a04f7a8" rel="noopener noreferrer"&gt;Incident Postmortem Template&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Operational Readiness Review Template
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://adhorn.medium.com/operational-readiness-review-template-e23a4bfd8d79" rel="noopener noreferrer"&gt;Operational Readiness Review Template&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>sre</category>
      <category>tutorial</category>
      <category>devops</category>
    </item>
    <item>
      <title>Operational Readiness Review Template</title>
      <dc:creator>Adrian Hornsby</dc:creator>
      <pubDate>Thu, 12 Nov 2020 06:58:29 +0000</pubDate>
      <link>https://dev.to/aws/operational-readiness-review-template-1dha</link>
      <guid>https://dev.to/aws/operational-readiness-review-template-1dha</guid>
      <description>&lt;h4&gt;
  
  
  Towards Operational Excellence
&lt;/h4&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%2Fx6p5wrqkulvwdrrxhcag.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%2Fx6p5wrqkulvwdrrxhcag.png" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I want to express my gratitude to my colleagues and friends&lt;/em&gt; &lt;a href="https://twitter.com/094459" rel="noopener noreferrer"&gt;&lt;em&gt;Ricardo Sueiras&lt;/em&gt;&lt;/a&gt;&lt;em&gt;,&lt;/em&gt; &lt;a href="https://www.linkedin.com/in/matt-fitzgerald-b7b4523/" rel="noopener noreferrer"&gt;&lt;em&gt;Matt Fitzerald&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, and&lt;/em&gt; &lt;a href="https://twitter.com/ziniman" rel="noopener noreferrer"&gt;&lt;em&gt;Boaz Ziniman&lt;/em&gt;&lt;/a&gt; &lt;em&gt;for their valuable feedback.&lt;/em&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%2Fy5nsv7l3i8qz73cvg0o5.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%2Fy5nsv7l3i8qz73cvg0o5.png" width="800" height="117"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since I published my blog series &lt;a href="https://adhorn.medium.com/the-operational-excellence-collection-6b657135e586" rel="noopener noreferrer"&gt;&lt;strong&gt;Towards Operational Excellence&lt;/strong&gt;&lt;/a&gt;, I received a relatively large amount of feedback and requests. One, in particular, stood out:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;“Can you share an operational excellence review template?”&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Operational Readiness Review
&lt;/h3&gt;

&lt;p&gt;In this blog post, I will share with you my “lightweight” &lt;em&gt;(but not so lightweight)&lt;/em&gt; &lt;strong&gt;Operational Readiness Review (ORR) template.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An ORR is a rigorous, evidence-based assessment that evaluates a particular service’s operational state and is often very specific to a specific company, its culture, and its tools. Yet, ORRs all have the same goal: help you find blind spots in your operations.&lt;/p&gt;

&lt;p&gt;This template, which I hope will help you get started, is based on my two-decades of experience writing application software, deploying servers, and managing large-scale architectures. I have refined it over the years, helping customers operating software systems in the AWS cloud.&lt;/p&gt;

&lt;p&gt;This ORR template is by no mean a complete one. Instead, treat it as a starting point for you and your company to get the ball rolling. The most important thing is to make you think about the different aspects of software operations to minimize the risks of failure once the code hits production.&lt;/p&gt;

&lt;h4&gt;
  
  
  How to use this ORR template?
&lt;/h4&gt;

&lt;p&gt;As mentioned previously, this is not THE template — it is A template — so treat it more as a mechanism for regularly evaluating your workloads, identifying high-risk issues, and recording your improvements.&lt;/p&gt;

&lt;p&gt;More importantly, make it yours. Add your own experience to it. Adapt it to your culture, to your needs.&lt;/p&gt;

&lt;h4&gt;
  
  
  Can you have the right answers to all questions?
&lt;/h4&gt;

&lt;p&gt;Very unlikely at first, but over time it should be your goal. Again, it is more a learning path to support continuous improvement. Having ORR reviews makes it easy to save point-in-time milestones and track improvements to your operations.&lt;/p&gt;

&lt;h4&gt;
  
  
  Who should do an ORR?
&lt;/h4&gt;

&lt;p&gt;ORR should preferably be done with the entire service team: the product owner, the technical product manager, backend and frontend developers, designers, architects, etc. Everyone who was involved in one way or another with the service. The more diversity, the better. We want to avoid &lt;a href="https://en.wikipedia.org/wiki/Confirmation_bias" rel="noopener noreferrer"&gt;confirmation bias&lt;/a&gt; as much as possible.&lt;/p&gt;

&lt;h4&gt;
  
  
  When should you do an ORR?
&lt;/h4&gt;

&lt;p&gt;A formal ORR should be done before the initial service launch and after any significant technological change. It should be repeated periodically (about once per year) to ensure that things haven’t drifted away from operational expectations but instead improved over time.&lt;/p&gt;

&lt;h4&gt;
  
  
  How does an ORR differ from an &lt;a href="https://aws.amazon.com/architecture/well-architected" rel="noopener noreferrer"&gt;AWS Well-Architected review&lt;/a&gt;?
&lt;/h4&gt;

&lt;p&gt;While there are some overlaps, the AWS Well-Architected review provides customers and partners a means to evaluate &lt;strong&gt;architectures&lt;/strong&gt; and implement designs that can scale over time. It describes the key concepts, design principles, and &lt;strong&gt;architectural best practices&lt;/strong&gt; for designing and running workloads in the cloud. ORR addresses and focuses on the operational aspect of a particular service.&lt;/p&gt;

&lt;h3&gt;
  
  
  Operational Readiness Review Template
&lt;/h3&gt;

&lt;p&gt;The ORR template is organized as follows:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1 — Service Definition and Goals&lt;br&gt;&lt;br&gt;
2 — Architecture&lt;br&gt;&lt;br&gt;
3 — Failures and Impact&lt;br&gt;&lt;br&gt;
4 — Risk Assessment&lt;br&gt;&lt;br&gt;
5 — Metrics and Alarms&lt;br&gt;&lt;br&gt;
6 — Testing&lt;br&gt;&lt;br&gt;
7 — Deployment&lt;br&gt;&lt;br&gt;
8 — Operations&lt;br&gt;&lt;br&gt;
9 — Disaster Recovery&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;NOTE 1: As you may have noticed, I didn’t include security in there! And for a good reason — security must have it’s own, in-depth, review.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1 — Service Definition and Goals
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Describe what your service does from the customer’s point of view.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Describe your operational goals for the service.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Service-level_agreement" rel="noopener noreferrer"&gt;&lt;strong&gt;SLA&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;of the service?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are the business scaling drivers correlated with your services? (&lt;/strong&gt;e.g. number of users, sales, marketing, ad-hoc, …)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are you conducting an in-depth security review of your service?&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2 — Architecture
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Describe the architecture of your service.&lt;/strong&gt; Call out the critical functionalities. Identify the different components of the system and how they interact with one another.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Describe each component of your system.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does your service support&lt;/strong&gt; &lt;a href="https://aws.amazon.com/autoscaling/" rel="noopener noreferrer"&gt;&lt;strong&gt;auto-scaling&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;?&lt;/strong&gt; Describe the mechanisms and expectations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does your architecture handle a sudden surge of traffic?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What parts of your architectural design reduces the blast radius of failures?&lt;/strong&gt; (discuss bulkheads, cells, shards, etc.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you have any single-points of failure?&lt;/strong&gt; If you do, explain why and what is done to minimize the impact of failure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explain the different database and storage choices.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;List all customer-facing endpoints, explain what each does and what components and dependencies they have.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;List all dependencies that your service takes.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the anticipated request volume for each component and dependencies of your system?&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3 — Failures and Impact
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Explain how your service will be impacted based on the failure of each of your components and dependencies.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the failure mode for each of the components?&lt;/strong&gt; (fail-open vs. fail-closed)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explain the impact on customer experience for the failure of each component and each dependency.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are the limits imposed on your service by your dependencies? How are these limits tracked?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you communicate your scaling requirements to teams that own services you’ve taken dependencies on?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does your service impose limits on customer resources?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can you increase limits without making a deployment?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can you increase limits on a per-customer basis?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Describe the resilience to failure of each of your components&lt;/strong&gt; (discuss in particular multi-AZ, self-healing, retries, timeouts, back-off, throttles, and limits put in place)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can the service tolerate an availability zone (AZ) failure without impact?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can your service sustain production traffic with one AZ down?&lt;/strong&gt; (ref. static stability)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the retry/back-off strategy for each of your dependencies?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens when your customers hit limits and get throttled? Can they raise them? How?&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4 — Risk Assessment
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What are your operational risks?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What scalability concerns are you worried about?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What features did you cut to meet your deadline?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are the top three things that you believe will catch fire first?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you keep track of your dependencies and their criticality? Do you review them regularly?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you understand the cost/economics relationship of the service to scaling?&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5 — Monitoring, Metrics &amp;amp; Alarms
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;How do you measure and monitor the end-to-end customer experience?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you monitor for single-customer experience?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you alarm on poor overall customer experience?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you alarm on poor single-customer experience?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do you trace customer requests in your system?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are you alarming on?&lt;/strong&gt; List all of your alarms, with period and threshold, and the severity of each.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are you dashboard clear? Does everyone know what to look at?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are there metrics you monitor that don’t have alarms? Which? Why?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What kind of health-checks does your system monitor?&lt;/strong&gt; (discuss in particular if it is shallow or deep if it uses cache, async vs. sync, etc., and the risks associated)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you monitor each external dependency and alarm on failure conditions?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you monitor your dependency usage and remaining allowance?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you monitor the hosts for disk failure?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you monitor disk space utilization?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you have log-rotation in place?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you monitor for host CPU and memory utilization?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you monitor for certificate expiration?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you monitor the latency of synchronous and asynchronous calls?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you auto-cut tickets on alarms?&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  6 — Testing
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Describe the overall test strategy should follow.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When do you run tests?&lt;/strong&gt; Do you have tests before and after conducting code review? Do they run automatically, or are developers running tests manually?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you test using “fake” accounts?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What’s the percentage of public-facing APIs covered by tests?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you test your dependencies?&lt;/strong&gt; What assumptions do you make on these?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do you verify that your service’s monitoring and alarming function as expected?&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  7 — Deployment
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;How does your deployment procedure work?&lt;/strong&gt; Lists actions and estimated time in the deployment pipeline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are the manual touch-points in your system?&lt;/strong&gt; Why aren’t they automated? What are the risks associate with each of the touch-points?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is your procedure to define and approve a change in production?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you have a mandatory code review for each change?&lt;/strong&gt; How do these changes get approved? Do you have several people approving changes?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do you roll back a change?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you test the rollback procedures before deployment?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do you deploy the configuration to different stages?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you error-and-syntax check your configuration before deployment?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are the dependencies for deployment?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does your deployment support&lt;/strong&gt; &lt;a href="https://dev.to/adhorn/immutable-infrastructure-1ko"&gt;&lt;strong&gt;immutability&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;? Does your deployment update/upgrade software in-place?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you perform load testing before deploying to production?&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  8 — Operations
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Describe how the on-call rotation for your service looks like.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you have easily available and complete links to the documentation for the service?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you have well defined, documented, and accessible recovery procedures?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Describe the escalation path in the event of an outage&lt;/strong&gt; (include timing expectations).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does the trouble-ticketing system integrates with the monitoring system?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does the paging system integrates with the monitoring system?&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  9 — Disaster Recovery
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Do your on-calls have full access to connect to, debug, and configure the service?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are you preventing/discouraging your team from using full-admin access roles except when absolutely necessary?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you have read-only roles for your team to use for non-critical situations?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you have up-to-date escalation policies easily accessible by anyone in the company?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do you keep the escalation policies up-to-date?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you have platform-wide locks that prevent or delay routine tasks in case of an active disaster?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you have a well-defined process for DR situations?&lt;/strong&gt; (e.g., war rooms, isolation, calls, internal &amp;amp; external communication)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are you practicing your disaster recovery procedure?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you have measured and verified RTO and RPO?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are your DNS TTLs set to sane values?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you have verified and tested tools deployed to query logs to measure the impact on customers?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you have a process for identifying the causes of outages?&lt;/strong&gt; (e.g., postmortem, correction-of-error, etc.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you back up critical data?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you practice backup restoration regularly?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you regularly practice fail-overs?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can your on-call team enable throttles to protect the service from user load?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can your on-call team increase limits in case of emergencies?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you update run-books as the service changes?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That’s all for now, folks. If you want to download, fork, or suggest some changes, this template is on my GitHub account &lt;a href="https://github.com/adhorn/operational-excellence" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Please contribute and help me improve it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/adhorn/operational-excellence" rel="noopener noreferrer"&gt;adhorn/operational-excellence&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you’ve enjoyed this post. &lt;strong&gt;I would love to hear what works and what doesn’t work for you, so please don’t hesitate to share your feedback and opinions.&lt;/strong&gt; Thanks a lot for reading :-)&lt;/p&gt;

&lt;p&gt;— Adrian&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>sre</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Building resilient services at Prime Video with chaos engineering</title>
      <dc:creator>Adrian Hornsby</dc:creator>
      <pubDate>Tue, 25 Aug 2020 07:22:08 +0000</pubDate>
      <link>https://dev.to/aws/building-resilient-services-at-prime-video-with-chaos-engineering-2hka</link>
      <guid>https://dev.to/aws/building-resilient-services-at-prime-video-with-chaos-engineering-2hka</guid>
      <description>&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%2Fsbeddmwjf6gj8sdn2v4r.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%2Fsbeddmwjf6gj8sdn2v4r.png" width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Large-scale distributed software systems are composed of several individual sub-systems-such as CDNs, load balancers, and databases-and their interactions. These interactions sometimes have unpredictable outcomes caused by unforeseen turbulent events (for example, a network failure). These events can lead to system-wide failures.&lt;/p&gt;

&lt;p&gt;Chaos engineering is the discipline of experimenting on a distributed system to build confidence in the system’s capability to withstand turbulent events. Chaos engineering requires adopting practices to identify interactions in distributed systems and related failures proactively, and also needs implementing and validating countermeasures. The key to chaos engineering is injecting failure in a controlled manner.&lt;/p&gt;

&lt;p&gt;In this post, we present a simple approach for fault injection in systems utilizing &lt;a href="https://aws.amazon.com/ec2/" rel="noopener noreferrer"&gt;Amazon Elastic Compute Cloud&lt;/a&gt; (Amazon EC2) and &lt;a href="https://aws.amazon.com/ecs/" rel="noopener noreferrer"&gt;Amazon Elastic Container Service&lt;/a&gt; (Amazon ECS), and its integration with a load-testing suite to validate the countermeasures put in place to prevent dependency and resource exhaustion failures. A typical chaos experiment could be generating baseline load (traffic) against the system, adding latency to all network calls to the underlying database, and then validating timeouts and retries. We will explain how to inject such failure (addition of latency to database calls), why validating countermeasures (timeouts and retries) under load is essential, and how to execute it in an Amazon EC2-based system.&lt;/p&gt;

&lt;p&gt;We will start with a brief introduction to chaos engineering, then dive deep into failure injection using the &lt;a href="https://aws.amazon.com/systems-manager/" rel="noopener noreferrer"&gt;AWS Systems Manager&lt;/a&gt;. We will then present our open source library, &lt;a href="https://github.com/amzn/awsssmchaosrunner" rel="noopener noreferrer"&gt;AWSSSMChaosRunner&lt;/a&gt;. This was inspired by Adrian Hornsby’s &lt;a href="https://medium.com/@adhorn/injecting-chaos-to-amazon-ec2-using-amazon-system-manager-ca95ee7878f5" rel="noopener noreferrer"&gt;“Injecting Chaos to Amazon EC2 using AWS System Manager”&lt;/a&gt; blog post.&lt;/p&gt;

&lt;p&gt;Finally, we will provide an example of integration and explain how &lt;a href="https://www.primevideo.com/" rel="noopener noreferrer"&gt;Prime Video&lt;/a&gt; used this library to prevent potentially customer-impacting outages.&lt;/p&gt;

&lt;h3&gt;
  
  
  Chaos engineering introduction
&lt;/h3&gt;

&lt;p&gt;Software testing commonly involves implementing and automating unit tests, integration tests, and end-to-end tests. Although these tests are critical, they do not encompass the broader spectrum of disruptions possible in a distributed system (e.g., Availability Zone outage, dependency failure, network outage, etc.).&lt;/p&gt;

&lt;p&gt;Generally, the behavior of software systems to these scenarios remains unknown. For example, what happens if an Amazon EC2 instance in the service fleet sustains high CPU consumption? Such a situation can occur because of an unexpected increase in traffic or an incorrectly implemented loop in the code. Building confidence in software systems is hard without putting them under stress. Questions to consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Have you tested how the system behaves when the underlying instances have a sustained CPU spike?&lt;/li&gt;
&lt;li&gt;Is the system behavior understood under different stress?&lt;/li&gt;
&lt;li&gt;Is there sufficient monitoring?&lt;/li&gt;
&lt;li&gt;Have the alarms been validated?&lt;/li&gt;
&lt;li&gt;Are there any countermeasures implemented? For example, is auto-scaling set up, and does it behave as expected? Are timeouts and retries appropriate?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As mentioned previously, chaos engineering requires adopting practices to identify interactions in distributed systems and related failures proactively, and also needs implementing and validating countermeasures. These can be implemented using chaos engineering experiments.&lt;/p&gt;

&lt;p&gt;Typical chaos engineering experiments are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Resource exhaustion&lt;/strong&gt; : For example, exhaustion of CPU, virtual memory, disk space, and so on. These failures occur frequently and are often caused by failed deployments, memory leaks, or unexpected traffic spikes. Chaos experiments that control resource exhaustion verify that there is sufficient monitoring to detect such failures and proper countermeasures (for example, auto-scaling, auto-restart, etc.) for the system to recover automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Failing or slow network dependency&lt;/strong&gt; : For example, a database accessed over the network is slow to respond, or its failure rate is high. These failures can happen when the network is experiencing intermittent issues or when dependencies are in a degraded state. &lt;a href="https://en.wikipedia.org/wiki/Timeout_(computing)" rel="noopener noreferrer"&gt;Timeouts&lt;/a&gt;, &lt;a href="https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/" rel="noopener noreferrer"&gt;retry policies&lt;/a&gt;, and &lt;a href="https://en.wikipedia.org/wiki/Circuit_breaker_design_pattern" rel="noopener noreferrer"&gt;circuit breakers&lt;/a&gt; are typical countermeasures to these failures; however, they are rarely adequately tested, as unit or integration tests generally can’t validate them with high confidence. Chaos experiments that inject latency or faults in the dependency code path are good at proving the countermeasures’ effectiveness-timeouts, retries, and circuit breakers.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For a more in-depth review of chaos engineering, please see the resources at the end of this article.&lt;/p&gt;

&lt;h3&gt;
  
  
  AWSSSMChaosRunner: Library for failure injection using AWS Systems Manager
&lt;/h3&gt;

&lt;p&gt;Next, let’s review essential AWS Systems Manager concepts: the &lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-agent.html" rel="noopener noreferrer"&gt;AWS Systems Manager Agent&lt;/a&gt; (SSM Agent), the &lt;a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_SendCommand.html" rel="noopener noreferrer"&gt;SendCommand&lt;/a&gt; API, and the &lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-ssm-docs.html" rel="noopener noreferrer"&gt;AWS Systems Manager&lt;/a&gt; documents.&lt;/p&gt;

&lt;h4&gt;
  
  
  AWS Systems Manager
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/what-is-systems-manager.html" rel="noopener noreferrer"&gt;AWS Systems Manager&lt;/a&gt; is a service used to view operational data from multiple AWS services and to automate operational tasks across your AWS resources. A full list of Systems Manager capabilities can be found in &lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/features.html" rel="noopener noreferrer"&gt;the user guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For Amazon EC2 instances, AWS Systems Manager offers the &lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/prereqs-ssm-agent.html" rel="noopener noreferrer"&gt;SSM Agent&lt;/a&gt; to perform actions inside instances or servers. This capability is generally used on most Amazon EC2 instances for operating system patching and for &lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager.html" rel="noopener noreferrer"&gt;managing SSH sessions&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  AWS Systems Manager Agent
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/aws/amazon-ssm-agent/" rel="noopener noreferrer"&gt;SSM Agent is open source&lt;/a&gt; Amazon software, released under the Apache License 2.0, that can be installed and configured on an Amazon EC2 instance. SSM Agent makes it possible for Systems Manager to update, manage, and configure these resources. SSM Agent is preinstalled by default on instances created from the following Amazon Machine Images (AMIs): Windows Server 2008–2012 R2 AMIs published in November 2016 or later, Windows Server 2016 and 2019, Amazon Linux, Amazon Linux 2, Ubuntu Server 16.04, Ubuntu Server 18.04, and Amazon ECS-Optimized.&lt;/p&gt;

&lt;p&gt;For installation and configuration instructions, refer to the &lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/prereqs-ssm-agent.html" rel="noopener noreferrer"&gt;user guide&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  SendCommand API
&lt;/h4&gt;

&lt;p&gt;AWS SSM &lt;a href="https://docs.aws.amazon.com/cli/latest/reference/ssm/send-command.html" rel="noopener noreferrer"&gt;SendCommand API&lt;/a&gt; enables running commands programmatically on one or more instances through the SSM Agent.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/cli/latest/reference/ssm/send-command.html#examples" rel="noopener noreferrer"&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;: ‘Hello, World!’ SendCommand using the AWS CLI&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The specified instance, instanceid=i-1234567890abcdef0, will run "echo Hello, World!" as a shell script. Targets can be used to specify single instances or groups of instances by using instance tags (for example, Auto Scaling group).&lt;/li&gt;
&lt;li&gt;The SendCommand execution will time out in 10 seconds.&lt;/li&gt;
&lt;li&gt;Any logs from the command will be sent to the &lt;a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html" rel="noopener noreferrer"&gt;CloudWatch log group&lt;/a&gt; named test.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws ssm send-command \ 
    --document-name "AWS-RunShellScript" \ 
    --parameters 'commands=["echo Hello, World!"]' \ 
    --targets "Key=instanceids,Values=i-1234567890abcdef0" \ 
    --comment "echo Hello, World!" 
    --timeout-seconds 10 
    --cloud-watch-output-config "CloudWatchOutputEnabled=true,CloudWatchLogGroupName=test"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  SSM command documents
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-ssm-docs.html" rel="noopener noreferrer"&gt;AWS Systems Manager document&lt;/a&gt; (SSM document) can be used to specify complex commands in the form of shell scripts to be executed on an instance or groups of instances. You can run SSM documents via the AWS Systems Manager console or the SendCommand API.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/adhorn/chaos-ssm-documents/blob/master/run-command/blackhole-stress.yml" rel="noopener noreferrer"&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;: An SSM document for&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Black_hole_(networking)" rel="noopener noreferrer"&gt;&lt;strong&gt;black hole routing&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;all outgoing traffic on a given UDP or TCP port&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This document is specified in YAML format, but also can be specified with JSON.&lt;/li&gt;
&lt;li&gt;Command parameters are defined separately, as variables.&lt;/li&gt;
&lt;li&gt;action: aws:runShellScript specifies that the steps (mainSteps) are a part of a shell script.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
schemaVersion: '2.2'
description: Blackhole a protocol/port on an instance
parameters:
  prtl:
    type: String
    description: Specify the protocol to blackhole. (Required)
    allowedValues:
      - tcp
      - udp
  port:
    type: String
    description: Specify the port to blackhole. (Required)
  duration:
    type: String
    description: The duration - in seconds - of the blackhole. (Required)
    default: "60"
mainSteps:
- action: aws:runShellScript
  name: ChaosBlackholeAttack
  inputs:
    runCommand:
    - iptables -A OUTPUT -p {{ prtl }} --dport {{ port }} -j DROP
    - sleep {{ duration }}
    - iptables -D OUTPUT -p {{ prtl }} --dport {{ port }} -j DROP
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  AWSSSMChaosRunner
&lt;/h3&gt;

&lt;p&gt;Assuming that SSM Agent is installed on the Amazon EC2 instances and configured with correct permissions, AWS Systems Manager can be used for failure injection on Amazon EC2 instances in the following way:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Create the SSM document via the AWS Systems Manager Console or the AWS CLI.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;The shell script included in the SSM document must be executable on the underlying instances.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Call the SSM SendCommand API via the AWS Systems Manager Console or the AWS CLI.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Amazon EC2 fleet can be defined by using appropriate tags to the target parameter.&lt;/li&gt;
&lt;li&gt;The parameters of the underlying shell script must be specified (duration/port/protocol in the above example).&lt;/li&gt;
&lt;li&gt;The CloudWatch log group must be configured and specified to view logs from the whole Amazon EC2 fleet in a single location.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the above steps are successful, all specified Amazon EC2 hosts will be injecting failure. For example, EC2 hosts will black-hole outgoing traffic to a given UDP/TCP port. However, no requests may be hitting the service you are injecting failure into; either it is a period of low traffic or a development fleet. In which case, the effect of the failure injection might be minimal, or worse, not perceived at all. Thus, it will be difficult to validate the countermeasures put in place. A third step is needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Generate traffic to the service using load generators to simulate real-life high traffic on the system.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Running the above steps manually is prone to configuration errors, is risky, and is time consuming. These steps can be automated with the recently released &lt;a href="https://github.com/amzn/awsssmchaosrunner" rel="noopener noreferrer"&gt;AWSSSMChaosRunner library&lt;/a&gt;, as illustrated in the image below.&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%2Fvfzytv41bpeocvzjcz7z.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%2Fvfzytv41bpeocvzjcz7z.png" width="507" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This library abstracts the creation of SSM documents and calling the SSM SendCommand, and provides tried and tested SSM documents for your chaos experiments. This library is open sourced under the &lt;a href="https://www.apache.org/licenses/LICENSE-2.0" rel="noopener noreferrer"&gt;Apache-2.0 License&lt;/a&gt; and is available on &lt;a href="https://github.com/amzn/awsssmchaosrunner" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; and &lt;a href="https://search.maven.org/artifact/software.amazon.awsssmchaosrunner/awsssmchaosrunner/1.2.0/jar" rel="noopener noreferrer"&gt;Maven Central&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/amzn/awsssmchaosrunner" rel="noopener noreferrer"&gt;amzn/awsssmchaosrunner&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Failure injections
&lt;/h4&gt;

&lt;p&gt;The failure injections currently available in the AWSSSMChaosRunner library are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/amzn/awsssmchaosrunner/blob/master/src/main/kotlin/software/amazon/awsssmchaosrunner/attacks/NetworkInterfaceLatencyAttack.kt" rel="noopener noreferrer"&gt;&lt;strong&gt;NetworkInterfaceLatency&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;:&lt;/strong&gt; Adds latency to all inbound/outbound calls to a given network interface.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/amzn/awsssmchaosrunner/blob/master/src/main/kotlin/software/amazon/awsssmchaosrunner/attacks/DependencyLatencyAttack.kt" rel="noopener noreferrer"&gt;&lt;strong&gt;DependencyLatency&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;:&lt;/strong&gt; Adds latency to inbound/outbound calls to a given external dependency.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/amzn/awsssmchaosrunner/blob/master/src/main/kotlin/software/amazon/awsssmchaosrunner/attacks/DependencyPacketLossAttack.kt" rel="noopener noreferrer"&gt;&lt;strong&gt;DependencyPacketLossAttack&lt;/strong&gt;&lt;/a&gt;: Drops packets on inbound/outbound calls to a given external dependency.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/amzn/awsssmchaosrunner/blob/master/src/main/kotlin/software/amazon/awsssmchaosrunner/attacks/MemoryHogAttack.kt" rel="noopener noreferrer"&gt;&lt;strong&gt;MemoryHog&lt;/strong&gt;&lt;/a&gt;: Hogs virtual memory on the fleet.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/amzn/awsssmchaosrunner/blob/master/src/main/kotlin/software/amazon/awsssmchaosrunner/attacks/CPUHogAttack.kt" rel="noopener noreferrer"&gt;&lt;strong&gt;CPUHog&lt;/strong&gt;&lt;/a&gt;: Hogs CPU on the fleet.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/amzn/awsssmchaosrunner/blob/master/src/main/kotlin/software/amazon/awsssmchaosrunner/attacks/DiskHogAttack.kt" rel="noopener noreferrer"&gt;&lt;strong&gt;DiskHog&lt;/strong&gt;&lt;/a&gt;: Hogs disk space on the fleet.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/amzn/awsssmchaosrunner/blob/master/src/main/kotlin/software/amazon/awsssmchaosrunner/attacks/AWSServiceLatencyAttack" rel="noopener noreferrer"&gt;&lt;strong&gt;AWSServiceLatencyAttack&lt;/strong&gt;&lt;/a&gt;: Adds latency to an AWS service using the CIDR ranges returned from &lt;a href="https://ip-ranges.amazonaws.com/ip-ranges.json" rel="noopener noreferrer"&gt;ip-ranges.amazonaws.com&lt;/a&gt;. This is necessary for services like such as &lt;a href="https://aws.amazon.com/s3/" rel="noopener noreferrer"&gt;Amazon Simple Storage Service&lt;/a&gt; (Amazon S3) or &lt;a href="https://aws.amazon.com/dynamodb/" rel="noopener noreferrer"&gt;Amazon DynamoDB&lt;/a&gt;, where the resolved IP address can change during the chaos experiment.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/amzn/awsssmchaosrunner/blob/master/src/main/kotlin/software/amazon/awsssmchaosrunner/attacks/AWSServicePacketLossAttack.kt" rel="noopener noreferrer"&gt;&lt;strong&gt;AWSServicePacketLossAttack&lt;/strong&gt;&lt;/a&gt;: Drops packets to an AWS service using the CIDR ranges returned from &lt;a href="https://ip-ranges.amazonaws.com/ip-ranges.json" rel="noopener noreferrer"&gt;ip-ranges.amazonaws.com&lt;/a&gt;. This is necessary for services like Amazon S3 or Amazon DynamoDB, where the resolved IP address can change during the chaos experiment.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/amzn/awsssmchaosrunner/blob/master/src/main/kotlin/software/amazon/awsssmchaosrunner/attacks/MultiIPAddressLatencyAttack.kt" rel="noopener noreferrer"&gt;&lt;strong&gt;MultiIPAddressLatencyAttack&lt;/strong&gt;&lt;/a&gt;: Adds latencies to all calls to a list of IPAddress. This could be useful for a router → host kind of a setup.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/amzn/awsssmchaosrunner/blob/master/src/main/kotlin/software/amazon/awsssmchaosrunner/attacks/MultiIPAddressPacketLossAttack.kt" rel="noopener noreferrer"&gt;&lt;strong&gt;MultiIPAddressPacketLossAttack&lt;/strong&gt;&lt;/a&gt;: Drops packets from all calls to a list of IPAddress. This could be useful for a router → host kind of a setup.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Chaos testing an EC2 service
&lt;/h3&gt;

&lt;p&gt;Take, for example, a service running in Amazon EC2. (Commonly recommended components, such as CDNs, load balancers, and VPCs have been omitted for simplification).&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%2Fpbnfr4fh7qfq5o81kjn3.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%2Fpbnfr4fh7qfq5o81kjn3.png" width="500" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This service receives client requests, applies business logic, and accesses a database (or any external dependency). Let’s learn how to apply the AWSSSMChaosRunner library to this service.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prerequisites
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Familiarity with &lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id.html" rel="noopener noreferrer"&gt;IAM concepts&lt;/a&gt;, such as IAM policies, roles, and users.&lt;/li&gt;
&lt;li&gt;Tests for the service are written in Java, Kotlin, or Scala. AWSSSMChaosRunner library is only available for these languages.&lt;/li&gt;
&lt;li&gt;Service health and behavior must be instrumented and monitored with &lt;a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Metric" rel="noopener noreferrer"&gt;metrics&lt;/a&gt; or &lt;a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogsConcepts.html" rel="noopener noreferrer"&gt;logs&lt;/a&gt;. Without monitoring, the effect of failure injections can not be observed.&lt;/li&gt;
&lt;li&gt;Some baseline traffic (load) is generated to the service from the tests while the chaos experiment is executed. Generating traffic will help validate the experiment hypothesis.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 1. Set up permissions for calling AWS Systems Manager from the tests package.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Although implementing this part in different ways is possible, the approach described here generates temporary credentials for AWS Systems Manager on each run of the tests.&lt;/p&gt;

&lt;p&gt;First you must create an IAM user and an IAM role it can assume. The following &lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html" rel="noopener noreferrer"&gt;IAM policy&lt;/a&gt; must be attached to this role.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "sts:AssumeRole",
                "ssm:CancelCommand",
                "ssm:CreateDocument",
                "ssm:DeleteDocument",
                "ssm:DescribeDocument",
                "ssm:DescribeInstanceInformation",
                "ssm:DescribeDocumentParameters",
                "ssm:DescribeInstanceProperties",
                "ssm:GetDocument",
                "ssm:ListTagsForResource",
                "ssm:ListDocuments",
                "ssm:ListDocumentVersions",
                "ssm:SendCommand"
            ],
            "Resource": [
                "\*"
            ],
            "Effect": "Allow"
        },
        {
            "Action": [
                "ec2:DescribeInstances",
                "iam:PassRole",
                "iam:ListRoles"
            ],
            "Resource": [
                "\*"
            ],
            "Effect": "Allow"
        },
        {
            "Action": [
                "ssm:StopAutomationExecution",
                "ssm:StartAutomationExecution",
                "ssm:DescribeAutomationExecutions",
                "ssm:GetAutomationExecution"
            ],
            "Resource": [
                "\*"
            ],
            "Effect": "Allow"
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2. Initialize the AWS Systems Manager client.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This code should be invoked during the initialization of the tests (i.e., wherever the singletons are created).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Kotlin
@Bean
open fun awsSecurityTokenService(
   credentialsProvider: AWSCredentialsProvider, 
   awsRegion: String
   ): AWSSecurityTokenService {
    return AWSSecurityTokenServiceClientBuilder.standard()
        .withCredentials(credentialsProvider)
        .withRegion(awsRegion)
        .build()
}

@Bean
open fun awsSimpleSystemsManagement(
   securityTokenService: AWSSecurityTokenService,
   awsAccountId: String,
   chaosRunnerRoleName: String
   ): AWSSimpleSystemsManagement {
    val chaosRunnerRoleArn = "arn:aws:iam::$awsAccountId:role/$chaosRunnerRoleName"
    val credentialsProvider = STSAssumeRoleSessionCredentialsProvider
        .Builder(chaosRunnerRoleArn, "ChaosRunnerSession")
        .withStsClient(securityTokenService).build()

    return AWSSimpleSystemsManagementClientBuilder.standard()
        .withCredentials(credentialsProvider)
        .build()
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3. Start the fault injection attack before starting the test, and stop it after the test.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The given test sends traffic to the service.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Kotlin
@Before
override fun initialise(args: Array) {
    if (shouldExecuteChaosRunner()) {
        ssm = applicationContext.getBean(AWSSimpleSystemsManagement::class.java)
        ssmAttack = getAttack(ssm, attackConfiguration)
        command = ssmAttack.start()
    }
}

@Test
fun `given failure injection generate calls to the service`(int: duration) {
 // This test should call an endpoint of the service and keep repeating this for the duration of the test.
 // Additional logging can be added or service dashboards can be monitored for an overview.
 val startTime = LocalDateTime.now()
 while(getElapsedSeconds(startTime) &amp;lt;= duration){
    serviceClient.callEndpoint()
 }
}

@After
override fun destroy() {
    ssmAttack.stop(command)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4. Run the test.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Execute the command to run the above test.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: AWSSSMChaosRunner can also be used for an EC2+ECS based service with one setup step prior to the above steps. Please see the&lt;/em&gt; &lt;a href="https://github.com/amzn/awsssmchaosrunner/blob/master/README.md" rel="noopener noreferrer"&gt;&lt;em&gt;Github README&lt;/em&gt;&lt;/a&gt; &lt;em&gt;for more details.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Prime Video uses AWSSSMChaosRunner to prevent a potential outage
&lt;/h3&gt;

&lt;p&gt;In March 2020 Prime Video launched &lt;a href="https://www.primevideo.com/help/ref=atv_nb_lcl_en_US?_encoding=UTF8&amp;amp;nodeId=GD8VJD2EDJ2GSNEC" rel="noopener noreferrer"&gt;Prime Video profiles&lt;/a&gt; which lets Prime Video users access separate recommendations, season progress, and Watchlist, as these are based on individual profile activity. This new customer experience required the design and implementation of new services using Amazon EC2.&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%2Fddco5kvkf3r7hdej3wag.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%2Fddco5kvkf3r7hdej3wag.png" width="800" height="167"&gt;&lt;/a&gt;Prime Video Profiles&lt;/p&gt;

&lt;p&gt;These services are part of a distributed system, and they call other internal Amazon services over the network. Testing the timeouts, retries, and circuit-breaker configurations used by this service was considered critical because:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;These code paths are hard to validate through unit, integration, and end-to-end tests.&lt;/li&gt;
&lt;li&gt;Issues in configurations are usually discovered during an outage when these countermeasures-timeouts, retries, and circuit breaker-would be needed.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Prime Video implemented this chaos engineering experiment using the AWSSSMChaosRunner’s &lt;a href="https://github.com/amzn/awsssmchaosrunner/blob/master/src/main/kotlin/software/amazon/awsssmchaosrunner/attacks/DependencyLatencyAttack.kt" rel="noopener noreferrer"&gt;DependencyLatency&lt;/a&gt; attack, and by generating load against the service, thus simulating traffic when dependencies exhibit high latency.&lt;/p&gt;

&lt;p&gt;The service-to-service call metrics were observed and, as a result, timeouts, retries, and circuit-breaker configuration were validated.&lt;/p&gt;

&lt;p&gt;Now let’s review the result of one of these chaos experiments and find out how it helped us proactively discover a potentially customer-impacting issue.&lt;/p&gt;

&lt;h4&gt;
  
  
  Experiment: Validate ElastiCache timeout
&lt;/h4&gt;

&lt;p&gt;The chaos experiment is set up as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Experiment hypothesis&lt;/strong&gt; : The timeout for Service → ElastiCache call is set as 40 milliseconds. This will be validated by observing the Service → ElastiCache latency metric during the experiment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Failure injection&lt;/strong&gt; : Two seconds of latency is added to the Service → ElastiCache call using AWSSSMChaosRunner.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generate baseline load against the service&lt;/strong&gt; : 1000 requests per second are generated against the service. As discussed previously, running chaos engineering experiments while loading the system is critical.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Experiment outcome
&lt;/h4&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%2F0qclz31jgduzp8n5u7ew.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%2F0qclz31jgduzp8n5u7ew.png" width="800" height="252"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above image shows that the Service → ElastiCache latency is going beyond the configured 40ms timeout. Thus, the &lt;strong&gt;ElastiCache timeout configuration is failing&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Following these results, we fixed a bug in the timeout configuration.&lt;/p&gt;

&lt;p&gt;To validate our fix, we subsequently re-run the same experiment.&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%2F1qsqy3tlm05igmg5hal1.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%2F1qsqy3tlm05igmg5hal1.png" width="800" height="258"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The illustration shows that the maximum of Service → ElastiCache latency is capped at 40 milliseconds, the configured timeout value. This happens despite the extra latency of two seconds injected into this call path by the experiment. This result validates that the service will time out quickly if ElastiCache is slow to respond or if that network path has some issue.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Running this chaos experiment led to the discovery of a bug in the countermeasure for dependency degradation (i.e., ElastiCache timeout). The bug fix prevented a potential customer-impacting failure from happening.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Testing service dependency timeouts, retries, and circuit-breaker configurations is essential. In this post, we presented an open source approach to failure injection on &lt;a href="https://aws.amazon.com/ec2/" rel="noopener noreferrer"&gt;Amazon EC2&lt;/a&gt; using AWS Systems Manager, and we demonstrated how Prime Video combines it with load testing to achieve higher levels of resiliency. This Prime Video case study shows how chaos engineering helps prevent potentially customer-impacting issues that are difficult to pinpoint using traditional testing methods.&lt;/p&gt;

&lt;h4&gt;
  
  
  Resources
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://principlesofchaos.org/" rel="noopener noreferrer"&gt;PrinciplesOfChaos.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://medium.com/@adhorn/chaos-engineering-ab0cc9fbd12a" rel="noopener noreferrer"&gt;Chaos Engineering: The art of breaking things purposefully&lt;/a&gt; blog collection on Medium&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/dastergon/awesome-chaos-engineering" rel="noopener noreferrer"&gt;Awesome chaos engineering&lt;/a&gt; collection of reading resources on GitHub&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Originally published at&lt;/em&gt; &lt;a href="https://aws.amazon.com/blogs/opensource/building-resilient-services-at-prime-video-with-chaos-engineering/" rel="noopener noreferrer"&gt;&lt;em&gt;https://aws.amazon.com&lt;/em&gt;&lt;/a&gt; &lt;em&gt;on August 18, 2020.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>opensource</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Ten lessons from twelve years of AWS</title>
      <dc:creator>Adrian Hornsby</dc:creator>
      <pubDate>Tue, 07 Jul 2020 15:05:02 +0000</pubDate>
      <link>https://dev.to/aws/ten-lessons-from-twelve-years-of-aws-59b2</link>
      <guid>https://dev.to/aws/ten-lessons-from-twelve-years-of-aws-59b2</guid>
      <description>&lt;h4&gt;
  
  
  Recording and redacted transcript from my keynote at the &lt;a href="https://aws-community-day-online.splashthat.com/" rel="noopener noreferrer"&gt;AWS Community Day Australia and New Zealand.&lt;/a&gt;
&lt;/h4&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%2Fikgx1u5dp7j4z37g2kgg.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%2Fikgx1u5dp7j4z37g2kgg.png" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/oTRo90F4EpA"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;First of all, I would like to thank everyone in the AWS Community in Australia and New Zealand and the AWS Heroes who have helped put this event together.&lt;/p&gt;

&lt;p&gt;In particular, &lt;a href="https://www.linkedin.com/in/agustinus-nalwan/" rel="noopener noreferrer"&gt;Augustino&lt;/a&gt; (aka Gus), &lt;a href="https://twitter.com/sbarski" rel="noopener noreferrer"&gt;Peter&lt;/a&gt;, and &lt;a href="https://twitter.com/nathangloverAUS" rel="noopener noreferrer"&gt;Nathan&lt;/a&gt; , the &lt;a href="https://aws.amazon.com/developer/community/heroes" rel="noopener noreferrer"&gt;AWS Heroes&lt;/a&gt;, and &lt;a href="https://twitter.com/jrotenstein/status/1280332827133792259" rel="noopener noreferrer"&gt;John&lt;/a&gt; our OBS Ninja. All have done an amazing work building this Community.&lt;/p&gt;

&lt;p&gt;Thank you!&lt;/p&gt;

&lt;p&gt;A little reminder that if you plan to share your day with others on social media, please use the hashtag:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;#AWSCommunityDayANZ&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A few years ago, I did a talk called ten lessons from ten years on AWS.&lt;/p&gt;

&lt;p&gt;That was at the Community Day in Bangalore, India. Back then, there wasn’t any COVID virus, so I traveled there — and I loved it.&lt;/p&gt;

&lt;p&gt;I wish I could be on site with you today, but instead, I am virtual with you this early morning, live from Finland.&lt;/p&gt;

&lt;p&gt;It is 4 am here, so bear with me if I am a little slow :)&lt;/p&gt;

&lt;p&gt;So, I did that talk two years ago, but it feels like it was already ten years ago.&lt;/p&gt;

&lt;p&gt;J. R . Rim said&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“In the information age, one tech year is equivalent to one person’s lifetime.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;While that is true, I recently found myself highly influenced by a dog.&lt;/p&gt;

&lt;p&gt;Her name is &lt;strong&gt;&lt;em&gt;Hilma&lt;/em&gt;&lt;/strong&gt; , and as you can see, she likes kissing.&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%2Fxr7wbzwkjzcgx3ap6izl.jpeg" 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%2Fxr7wbzwkjzcgx3ap6izl.jpeg" width="350" height="610"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And so, I now see tech years like dog years, with a ratio of approximately 1 to 7.&lt;/p&gt;

&lt;p&gt;I am trying to say that time flies — fast — and for today, I thought it would be interesting to look back at the past again, and see what went well, and what didn’t.&lt;/p&gt;

&lt;p&gt;So, as I said, I did a similar talk two and half years ago, and looking at it now feels like I need to make some corrections.&lt;/p&gt;

&lt;p&gt;That is the summary slide of it.&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%2F8przbr9gxn6fzz937obn.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%2F8przbr9gxn6fzz937obn.png" width="770" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Do you notice the problem?&lt;/p&gt;

&lt;p&gt;The biggest mistake I did back then was to focus mostly on technology.&lt;/p&gt;

&lt;p&gt;Not that what is on that slide is wrong, quite the opposite, but these lessons don’t all qualify as life lessons — lessons that make you grow as a person.&lt;/p&gt;

&lt;p&gt;So today, I will try to do a better job and share some of the lessons that changed me as a person.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;#1 — It’s the customers and the information you give them that’s important, not the technology.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;WAP, ASP, Instant messaging, Grid computing, Portals, Biometrics, AR, VR, Web2.0, P2P, IoT, 4G, 5G, InternetTV, DVB, NFC, BigData, wearable, NLP, ML, Autonomous Vehicle, Connected homes, Deep learning, Neural network, Deep learning, digital twin, crypto, serverless, k8s, blockchain, …&lt;/p&gt;

&lt;p&gt;These are all examples of hypes I have lived in since 2000.&lt;/p&gt;

&lt;p&gt;While hypes come and go, the bigger picture remains the same.&lt;/p&gt;

&lt;p&gt;More important than the technology itself are the customers, especially how good an experience you give them.&lt;/p&gt;

&lt;p&gt;Technology is irrelevant if your customers aren’t happy!&lt;/p&gt;

&lt;p&gt;Whether you use Ruby, Python, Node, Haskell, or Clojure, K8S or serverless, a monolith or micro-services, customers’ happiness is making the final call.&lt;/p&gt;

&lt;p&gt;I have seen fantastic customer experience, and genuinely successful businesses run on less than polished software systems.&lt;/p&gt;

&lt;p&gt;And honestly, technology is moving too fast always to make sound technological decisions.&lt;/p&gt;

&lt;p&gt;How many front-end frameworks will be released during this talk? :)&lt;/p&gt;

&lt;p&gt;Most of the time, successful teams guess and take a shot at it. What they do differently is being fast at adjusting the course.&lt;/p&gt;

&lt;p&gt;And to me, this has become the best measure for success:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“How fast can you correct course once you have customer feedback.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Notice that first, you need to have that feedback, and only then can you correct course. Otherwise, you go blind.&lt;/p&gt;

&lt;p&gt;So, focus on that feedback loop. And it means a few things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Listen to your customers.&lt;/li&gt;
&lt;li&gt;Forget your ego.&lt;/li&gt;
&lt;li&gt;Invest in automation — early! (CI/CD).&lt;/li&gt;
&lt;li&gt;Repeat.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most of what we build in the cloud is organized around Data, with a big D.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We store Data.&lt;/li&gt;
&lt;li&gt;We Process it.&lt;/li&gt;
&lt;li&gt;And we move it around.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Easy right? :)&lt;/p&gt;

&lt;p&gt;How fast you process it and move it around influences the price and the accuracy of the information you extract from Data.&lt;/p&gt;

&lt;p&gt;The rest is mostly operations. How much time you spend on operations influences the price, but most importantly, the amount of time you spend listening and adjusting course for your customers — so choose wisely.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;#2 — You can’t know everything.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Technology changes too fast to keep track of all of it while maintaining a balanced life.&lt;/p&gt;

&lt;p&gt;Trying to keep up with technological changes is like trying to make sense of AWS services naming convention — it’s impossible :)&lt;/p&gt;

&lt;p&gt;As a developer advocate for AWS, I often get asked&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“How do you keep up with everything?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here is a news for you — I actually don’t :)&lt;/p&gt;

&lt;p&gt;Everyone is struggling to keep up, worried about being left behind the waves of technological evolution.&lt;/p&gt;

&lt;p&gt;Even people who seem to have it all together. They are more like you and me than you would believe.&lt;/p&gt;

&lt;p&gt;There is a weird paradox to knowledge:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“the more you know, the more you realize you don’t know.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And of course, we feel bad about it. We feel like imposters — I certainly felt and continue to feel like one.&lt;/p&gt;

&lt;p&gt;To me, the imposters’ syndrome was and continues to be one of the hardest things to deal with, and I am 40yo white male, so imagine what it must be for women in tech or other minorities.&lt;/p&gt;

&lt;p&gt;Communities like this have helped me a lot overcome my fears a lot — Communities where I could discuss and practice, often without being judged.&lt;/p&gt;

&lt;p&gt;Another weird paradox exists:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“As you become more senior, you know less and less about new technologies.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Yet, the most inspiring engineering reviews I have participated in while working at Amazon were with very senior engineers — the senior principals. There are about 70 or so of them at Amazon.&lt;/p&gt;

&lt;p&gt;What’s their secret?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They listen.&lt;/li&gt;
&lt;li&gt;They ask questions — a lot of them.&lt;/li&gt;
&lt;li&gt;And, they challenge ideas and biases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I will come back to biases later — but do you notice something?&lt;/p&gt;

&lt;p&gt;These are all people skills — they listen, are curious, and they dive deep.&lt;/p&gt;

&lt;p&gt;Seniors engineers are more people engineers rather than technology engineers, which leads me to lesson three.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;#3 — Invest in people skills&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;… as much as you invest time learning about the latest NodeJS framework, k8s or serverless.&lt;/p&gt;

&lt;p&gt;No one’s technical skill is irreplaceable. I learned it the hard way.&lt;/p&gt;

&lt;p&gt;One day, after three years of working heart and soul for a startup which I was number two employee, I was fired.&lt;/p&gt;

&lt;p&gt;I arrived one morning at work with a smile on my face. A coffee later, I was walking out of the door, with all my books, but without a job.&lt;/p&gt;

&lt;p&gt;And it was terrifying.&lt;/p&gt;

&lt;p&gt;Sure, we had financial difficulties, but I had built everything from scratch. I knew every line of code, and I never thought that I would be the first to go.&lt;/p&gt;

&lt;p&gt;But I was, and my technical skills that I thought were irreplaceable, were in fact, fast covered for by the new, very good and cheaper work force just hired out from college.&lt;/p&gt;

&lt;p&gt;The only option you have to stand out and stay relevant is to invest in people skills.&lt;/p&gt;

&lt;p&gt;And I get it, for many of us it is difficult, even more now — but it is critical.&lt;/p&gt;

&lt;p&gt;There are many skills necessary, of course — but one stands out: Empathy.&lt;/p&gt;

&lt;p&gt;Bill Billard correctly said:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“Opinion is really the lowest form of human knowledge. It requires no accountability, no understanding. The highest form of knowledge … is empathy, for it requires us to suspend our egos and live in another’s world. It requires profound purpose larger than the self kind of understanding.”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When I got fired over a coffee cup, I had a lot of opinions. I was a lead developer, so I had a lot of empathy for the team of developers I managed but a lot of opinions towards the management team.&lt;/p&gt;

&lt;p&gt;Opinions that cost me my job.&lt;/p&gt;

&lt;p&gt;While I understood our developers, I failed to communicate upward and failed to understand the different business needs.&lt;/p&gt;

&lt;p&gt;Like most things in life, you have to find the right balance to be successful.&lt;/p&gt;

&lt;p&gt;But the more people skills you have, the easier it will be.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;#4 — Embrace failure.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;I got that one right the first time! :)&lt;/p&gt;

&lt;p&gt;While we have learned that almost everything will work again if you reboot it, including you, sometimes, things just fail.&lt;/p&gt;

&lt;p&gt;Ask Murphy about it!&lt;/p&gt;

&lt;p&gt;Brian Tracy, beautifully, said:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“It is not failure itself that holds you back; it is the fear of failure that paralyzes you.”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let me start by saying that scared developers won’t:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Try things out.&lt;/li&gt;
&lt;li&gt;Won’t innovate as fast as your business would need to.&lt;/li&gt;
&lt;li&gt;Won’t dare to jump in and fix things when (pardon my French) shit hits the fan.&lt;/li&gt;
&lt;li&gt;Won’t do more than ask for.&lt;/li&gt;
&lt;li&gt;And, won’t stay long in the job.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I know!! I was one of them.&lt;/p&gt;

&lt;p&gt;Failure should not be seen as &lt;strong&gt;“you are a failure”&lt;/strong&gt; but merely as moving along the path of experimentation.&lt;/p&gt;

&lt;p&gt;If you don’t fail, you are probably not trying things hard enough nor pushing the limits of the &lt;a href="https://www.ted.com/talks/steven_johnson_where_good_ideas_come_from" rel="noopener noreferrer"&gt;“adjacent possible.”&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Innovations flourish in a community where ideas are exchanged, discussed, tried, and improved over time — a community like this one.&lt;/p&gt;

&lt;p&gt;But most of all, innovations flourish in an environment that embraces failure.&lt;/p&gt;

&lt;p&gt;Remember, Thomas Edison tested more than 6000 different materials before settling on a light bulb using carbonized bamboo.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Failure tends to teach you lessons that reading books or blog posts can’t teach you.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The most successful teams I have worked with are those I failed the hardest with, but we were prepared to fail, and especially we were not afraid of losing our jobs.&lt;/p&gt;

&lt;p&gt;The best way to learn from failure is to practice failure — you know I had to mention chaos engineering at least once in this talk :)&lt;/p&gt;

&lt;p&gt;You also have to work on minimizing the blast radius of failures. Techniques like bulkheads, sharding, isolation, load shedding, graceful degradation, immutability, etc., will come handy — so you probably should get familiar with them.&lt;/p&gt;

&lt;p&gt;But again, technology itself won’t make your system more robust; people will — which brings me to point five.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;#5 — Don’t blame people when things fail.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Sidney_Dekker" rel="noopener noreferrer"&gt;Sidney Dekker&lt;/a&gt;, one of the most critical writer in the field of safety engineering, rightly said:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“The question […] is not who is responsible for failure; rather, it asks what is responsible for things going wrong. What is the set of engineered and organized circumstances that is responsible for putting people in a position where they end up doing things that go wrong?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Everyone screws up, and one day, so will you!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I screwed up several times — big time!!&lt;/p&gt;

&lt;p&gt;I deleted databases in production — twice — while trying to recover from an outage. But that is the topic for another talk :)&lt;/p&gt;

&lt;p&gt;Do you think I woke up that morning thinking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Today, I will come to work, delete some databases, and do a shitty job!”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Of course not — Everyone has good intentions, even when we screw up.&lt;/p&gt;

&lt;p&gt;So don’t blame individuals or teams. Similarly, don’t assign or imply blame to others, individuals, groups, or organizations. Instead, identify what happened and question &lt;strong&gt;why&lt;/strong&gt; those things happened.&lt;/p&gt;

&lt;p&gt;Stopping at people’s errors isn’t right. It is a sign that you haven’t gone deep enough.&lt;/p&gt;

&lt;p&gt;Think about the situation that led the operator to trigger the event? Why was the operator able to do such a thing? Was it a lack of proper tools, a problem in the culture, or a missing process&lt;/p&gt;

&lt;p&gt;[…]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Continuing on databases —&lt;/strong&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;# 6 — Route53 is NOT a database.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;… regardless of what &lt;a href="https://twitter.com/QuinnyPig/status/1120653859561459712" rel="noopener noreferrer"&gt;QuinnyPig&lt;/a&gt; says on Twitter or Reddit.&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%2F1om8pqcz8u7l48b3pr30.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%2F1om8pqcz8u7l48b3pr30.png" width="531" height="163"&gt;&lt;/a&gt;&lt;a href="https://twitter.com/QuinnyPig/status/1120653859561459712" rel="noopener noreferrer"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nor are tags :)&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%2Ftvxwnoio2nox1sadedd9.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%2Ftvxwnoio2nox1sadedd9.png" width="767" height="602"&gt;&lt;/a&gt;&lt;a href="https://www.reddit.com/r/aws/comments/d68v3g/use_route53_as_a_keyvalue_db/" rel="noopener noreferrer"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;#7 — Watch out for heuristics and biases!&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Being aware of cognitive biases when performing your job is a superpower that will often make the difference between becoming an inspiring leader or not.&lt;/p&gt;

&lt;p&gt;Cognitive biases impact our perception of reality, driving us into making incorrect conclusions and often, irrational decisions.&lt;/p&gt;

&lt;p&gt;While I don’t think removing biases is possible, it definitely will help you if you can identify them and properly adjust your perception and question your assumptions.&lt;/p&gt;

&lt;p&gt;Some of the biases and heuristics to watch out for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Confirmation_bias" rel="noopener noreferrer"&gt;&lt;strong&gt;confirmation bias&lt;/strong&gt;&lt;/a&gt; — “the tendency to search for, interpret, favor, and recall information that confirms or supports one’s prior personal beliefs or values.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Sunk_cost" rel="noopener noreferrer"&gt;&lt;strong&gt;sunk cost fallacy&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt; &lt;/strong&gt; — “the tendency for people to believe that investments (i.e., sunk costs) justify further expenditures.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Argumentum_ad_populum" rel="noopener noreferrer"&gt;&lt;strong&gt;common belief fallacy&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt; &lt;/strong&gt; — “If many believe so, it is so.” you know, blockchain …&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Hindsight_bias" rel="noopener noreferrer"&gt;&lt;strong&gt;hindsight bias&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt; &lt;/strong&gt; — “the tendency for people to perceive events that have already occurred as having been more predictable than they were before the events took place.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Fundamental_attribution_error" rel="noopener noreferrer"&gt;&lt;strong&gt;fundamental attribution error&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt; &lt;/strong&gt; — “the tendency to believe that what people do reflects who they are.”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And, there is more!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;a href="https://en.wikipedia.org/wiki/Optimism_bias" rel="noopener noreferrer"&gt;optimistic bias&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://en.wikipedia.org/wiki/Overconfidence_effect" rel="noopener noreferrer"&gt;overconfidence effect&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Wishful_thinking" rel="noopener noreferrer"&gt;Wishful thinking&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://en.wikipedia.org/wiki/Anchoring_(cognitive_bias)" rel="noopener noreferrer"&gt;anchoring bias&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://en.wikipedia.org/wiki/Bandwagon_effect" rel="noopener noreferrer"&gt;bandwagon effect&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://en.wikipedia.org/wiki/Cargo_cult" rel="noopener noreferrer"&gt;cargo cult&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You get the idea — we are full of imperfections :)&lt;/p&gt;

&lt;p&gt;So, spend some time reading about it — it will make you a better developer, a more understanding manager, and eventually an inspiring leader.&lt;/p&gt;

&lt;p&gt;It will make you a better person overall.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;#8 — Writing.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;I started writing my blog on &lt;a href="https://medium.com/@adhorn/10-lessons-from-10-years-of-aws-part-1-258b56703fcf?source=post_page-----258b56703fcf----------------------" rel="noopener noreferrer"&gt;Jan 9, 2018&lt;/a&gt; — after I gave the first version of this talk in India — two and a half years ago.&lt;/p&gt;

&lt;p&gt;Julien Simon, the ML principal developer advocate, tried to convince me for a year before I wrote my first words down.&lt;/p&gt;

&lt;p&gt;I was worried I had nothing to say. So afraid that I deleted words as fast as I was writing them down.&lt;/p&gt;

&lt;p&gt;You know, the fear of failing does paralyze you.&lt;/p&gt;

&lt;p&gt;But eventually, I took Julien’s advice, published my first blog post, and the second, the third, etc.&lt;/p&gt;

&lt;p&gt;Today, and with approximately 60 blog posts published and nearly 300 thousand visitors a year, I can easily say that writing that first blog post was one of the most important thing I did in my career.&lt;/p&gt;

&lt;p&gt;One crucial thing l learned along the way:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Every writer you know writes terrible first drafts. And second drafts. And third.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Every. Single. Writer.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Eventually, after tens of iterations, words start to make sense.&lt;/p&gt;

&lt;p&gt;But it takes time! So don’t give up.&lt;/p&gt;

&lt;p&gt;The funny thing is that I hated writing most of my school life, and long after.&lt;/p&gt;

&lt;p&gt;It still takes me an absurd amount of time to put my thoughts into words. But in the process, it also clarifies them, put them in order, crystallizes them.&lt;/p&gt;

&lt;p&gt;The key to writing is to start, and then do it word by word.&lt;/p&gt;

&lt;p&gt;If you are like me, you are probably often wondering what to write about.&lt;/p&gt;

&lt;p&gt;One of my favorite writer — Anne Lamott- said:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Remember that every single thing that happened to you is yours, and you get to tell it.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And that is so true.&lt;/p&gt;

&lt;p&gt;What problem did you solve lately? Why? How?&lt;/p&gt;

&lt;p&gt;What happened to you a few days, months, or years ago, is probably happening to someone today.&lt;/p&gt;

&lt;p&gt;So, tell your stories, for only you, with your own words, can tell it!&lt;/p&gt;

&lt;p&gt;My favorite part of writing is the review process.&lt;/p&gt;

&lt;p&gt;As soon as I have some sort of draft, I select several victims in my team or broader network, and I ask them to review it — to challenge my ideas, my opinions, and surface biases.&lt;/p&gt;

&lt;p&gt;The review process was initially very challenging, as I had to deal with critics.&lt;/p&gt;

&lt;p&gt;You know, the same critics when a developer gets her or his code reviewed in a pull request.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“How dare you criticize my baby?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Getting critics is humbling, very humbling — and for the better — It forces you to listen, learn, and eventually improve.&lt;/p&gt;

&lt;p&gt;Of course, you need to find competent reviewers, reviewers that care about your success. Reviewers that aren’t scared of telling you the truth.&lt;/p&gt;

&lt;p&gt;So, make sure you have some of them in your network of influence.&lt;/p&gt;

&lt;p&gt;And, if one day you decide to start writing, I would happily become one of them.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;#9 — Mentoring.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Throughout my career, I’ve had the chance to have amazing mentors.&lt;/p&gt;

&lt;p&gt;Whether in my work or outside of my career aspirations, I have had few key people who have helped me move forward.&lt;/p&gt;

&lt;p&gt;Sometimes, this is as simple as bouncing my ideas back-and-forth to see a clearer picture.&lt;/p&gt;

&lt;p&gt;Other times, it’s getting encouragement, a supportive tap on the shoulder, and advice on what to do next.&lt;/p&gt;

&lt;p&gt;A good mentor can help you be your best self.&lt;/p&gt;

&lt;p&gt;Everyone needs mentors. All my mentors have mentors themselves.&lt;/p&gt;

&lt;p&gt;Mentoring others has been really important to me, especially in the past few years.&lt;/p&gt;

&lt;p&gt;Most people enter their professional lives with little understanding of the complex landscape and expectations for excellence required for a successful career.&lt;/p&gt;

&lt;p&gt;I certainly had no idea what I was doing when I started!&lt;/p&gt;

&lt;p&gt;It is is not a problem per-se, for it is the normal unrolling of life, but it is scary at times, and a rather excellent opportunity for mentoring.&lt;/p&gt;

&lt;p&gt;Mentoring is essential, not only because of the knowledge and skills one can learn from mentors but also because mentoring provides professional and personal support that facilitates success.&lt;/p&gt;

&lt;p&gt;Research shows that people with good mentors have a higher chance of success and more significant career advancement potential.&lt;/p&gt;

&lt;p&gt;So, open yourself for mentoring others and look out for your own, personal mentor as well.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;#10 — Learn from others.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Learning from others is the single most important thing I have learned. And I have to admit, sometimes I still have to remind myself &lt;em&gt;to shut up and listen.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;There is always someone in the room that knows more than you do. That person is just not necessarily broadcasting it.&lt;/p&gt;

&lt;p&gt;Be open and ready to be challenged and change opinion.&lt;/p&gt;

&lt;p&gt;Share your ideas with others, challenge them and especially let others do so.&lt;/p&gt;

&lt;p&gt;Fortunately, there are myriads ways to do this — participating in this community is, of course, one of them.&lt;/p&gt;

&lt;p&gt;A few weeks ago, while preparing for this talk, I asked the developer advocate team to share with me their lessons — and few of them kindly answered.&lt;/p&gt;

&lt;p&gt;But as I didn’t really know what I was going to talk about a few weeks ago, I asked my question with a heavy bias towards getting technical answers — so despite my first lesson not to focus on technology, the following is mainly about technology — but I am the one to blame for that :)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/supercoco9" rel="noopener noreferrer"&gt;&lt;strong&gt;Javier Ramirez&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Don’t use the AWS as a traditional Data Center. Have a consistent naming/tagging strategy early on. Especially for everything that has unique names (s3 buckets, for example).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/alex_casalboni" rel="noopener noreferrer"&gt;&lt;strong&gt;Alex Casalboni:&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Learn IAM before you do anything serious. Master Infrastructure as Code (IaC), either CloudFormation or Terraform. Use the management console only to build prototypes, or the first time you try out a new service, switch to IaC for anything else.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/ziniman" rel="noopener noreferrer"&gt;&lt;strong&gt;Boaz Ziniman:&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Account security — don’t use the root account. Always enable MFA. Set IAM users for every developer, with different roles. Tag everything!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/eduvos/" rel="noopener noreferrer"&gt;&lt;strong&gt;Enrique Duvos:&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Security, Security, Security.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/dtraub" rel="noopener noreferrer"&gt;&lt;strong&gt;Dennis Traub:&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Turn on CloudTrail. Turn on Guard Duty. Don’t assume that development teams will consider security when building on AWS. So, I’m with Enrique here —think security.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/mavi888uy" rel="noopener noreferrer"&gt;&lt;strong&gt;Marcia Villalba:&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Try to see if there is a managed service before building it yourself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/danilop" rel="noopener noreferrer"&gt;&lt;strong&gt;Danilo Poccia:&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Adopt the right mindset: With on-prem virtualization and hosting, you have a finite set of resources where you try to squeeze as many things as possible. With the cloud, you have access to a virtually unlimited set of resources, and you should use the minimum you need at any point in time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/sebsto" rel="noopener noreferrer"&gt;&lt;strong&gt;Sebastien Stormacq:&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Use EC2 only if you have exhausted all other possibilities. This is not because of EC2, but because no machine to manage is better than one machine to manage. So, go serverless as much as possible. And serverless is not only Lambda, but it is also RDS, Cognito, S3, API Gateway, etc.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/094459" rel="noopener noreferrer"&gt;&lt;strong&gt;Ricardo Sueiras:&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Shift the conversation around AWS from technology to business outcomes (Agility, etc.). It will help you get the exec sponsor/support required for success. From a technical point of view, bet on automation. Resist being obsessed with the console.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/isahuerga" rel="noopener noreferrer"&gt;&lt;strong&gt;Isabel Huerga Ayza:&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Governance — everything that is not clearly defined will be done by no one. Or best case it will be, but not consistently. Goes to accountability and ownership, which is not good to leave to good faith when what is at risk is your business. Don’t wait until a production disruption to enable support. Setup budget alerts!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/steven_bryen" rel="noopener noreferrer"&gt;&lt;strong&gt;Steven Bryen:&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My advice is to think differently about things like the dynamic allocation of resources. An example would be security groups. You can create a rule referencing another security group, which means new instances automatically match the rule and have access as they scale. It is very different from the traditional on-prem mindset but is so valuable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/cobusbernard" rel="noopener noreferrer"&gt;&lt;strong&gt;Cobus Bernard:&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Read the pricing page for a service and set up billing alerts.&lt;/p&gt;

&lt;p&gt;Feel free to connect with them and challenge them on their ideas. I am sure they would love that!&lt;/p&gt;

&lt;p&gt;That’s it for now, folks! Again, thanks for inviting me and have a lovely rest of the day.&lt;/p&gt;

&lt;p&gt;-Adrian&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/media/4971e7d7ca309f5a367c1cfbbd5651ee/href" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://medium.com/media/4971e7d7ca309f5a367c1cfbbd5651ee/href" rel="noopener noreferrer"&gt;https://medium.com/media/4971e7d7ca309f5a367c1cfbbd5651ee/href&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>leadership</category>
      <category>techtalks</category>
      <category>devrel</category>
    </item>
    <item>
      <title>Incident Postmortem Template</title>
      <dc:creator>Adrian Hornsby</dc:creator>
      <pubDate>Fri, 26 Jun 2020 10:58:44 +0000</pubDate>
      <link>https://dev.to/aws/incident-postmortem-template-18m7</link>
      <guid>https://dev.to/aws/incident-postmortem-template-18m7</guid>
      <description>&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%2Fss9ylrx98c7oyoupay84.jpeg" 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%2Fss9ylrx98c7oyoupay84.jpeg" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since I published my blog series &lt;a href="https://medium.com/@adhorn/towards-operational-excellence-35ba6298b12f" rel="noopener noreferrer"&gt;&lt;strong&gt;Towards Operational Excellence&lt;/strong&gt;&lt;/a&gt;, I received a relatively large amount of feedback. But one question, in particular, stood out.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Can you share an incident postmortem template?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this blog post, I will share an example &lt;strong&gt;incident postmortem template,&lt;/strong&gt; which I hope will help you get started. I will also share some &lt;strong&gt;DOs&lt;/strong&gt; and &lt;strong&gt;DON’Ts&lt;/strong&gt; that I have seen work across a wide variety of customers — both internally in Amazon, and externally.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is a postmortem?
&lt;/h3&gt;

&lt;p&gt;A postmortem is a process where a team reflects on a problem — for example, an unexpected loss of redundancy, or perhaps a failed software deployment — and documents what the problem was and how to avoid it in the future.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Postmortems are not about figuring out who to blame for an incident that happened. They are about figuring out, through data and analysis, what happened, why it happened, and how it can be stopped from happening again.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At Amazon, we call that process Correction-Of-Errors (COE), and we use it to learn from our mistakes, whether they’re flaws in tools, processes, or the organization.&lt;/p&gt;

&lt;p&gt;We use the COE to identify contributing factors to failures and, more importantly, drive continuous improvement.&lt;/p&gt;

&lt;p&gt;To learn more about our COE process, please check out my favorite re:Invent 2019 talk from Becky Weiss, a senior principal engineer at AWS.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/yQiRli2ZPxU"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Incident Postmortem Template
&lt;/h3&gt;

&lt;p&gt;Below is an &lt;strong&gt;example&lt;/strong&gt; of an incident postmortem template.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I do not claim that this template is perfect — just that it’s an example that can help get started.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you think something is missing, if you agree or disagree strongly about a particular part of that template, please share your feedback with me by leaving a comment below.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bare-bone version
&lt;/h3&gt;

&lt;p&gt;For all the &lt;strong&gt;&lt;em&gt;let-me-get-straight-to-the-point&lt;/em&gt;&lt;/strong&gt; champions out there — here is a bare-bone template.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/media/3af3e1c22e9bc3f9a51b18a56145b994/href" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://medium.com/media/3af3e1c22e9bc3f9a51b18a56145b994/href" rel="noopener noreferrer"&gt;https://medium.com/media/3af3e1c22e9bc3f9a51b18a56145b994/href&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Extended-cut version
&lt;/h3&gt;

&lt;p&gt;In this extended-cut version, I will expand on each of the different parts of the template, suggesting what could belong to each section.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Title:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Descriptive title (Service XYZ failed, affecting customers in the EU region)&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Incident date:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Date of the event.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Owner&lt;/strong&gt; :
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Name of the owner of the postmortem process.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;em&gt;Peer-review&lt;/em&gt; &lt;strong&gt;committee&lt;/strong&gt; :
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;List of people that will verify the quality of the postmortem before publishing it.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Tags&lt;/strong&gt; :
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;List of tags or keywords to classify the event and facilitate future search and analysis.&lt;br&gt;&lt;br&gt;
Example: Configuration, Database, Dependency, Latent&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Summary:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;A summary of the event.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Supporting data:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Metric graphs, tables, or other data, that best illustrate the impact of this event.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Customer Impact:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Discuss customer-impact during the event. Explicitly mention the number of impacted customers.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Incident Response Analysis:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Example of questions you could address:&lt;br&gt;&lt;br&gt;
Was the event detected within the expected time?&lt;br&gt;&lt;br&gt;
How was it detected? (e.g., alarm, customer ticket)&lt;br&gt;&lt;br&gt;
How could time to detection be improved?&lt;br&gt;&lt;br&gt;
Did the escalation work appropriately?&lt;br&gt;&lt;br&gt;
Would earlier escalation have reduced or prevented the event?&lt;br&gt;&lt;br&gt;
How did you know how to mitigate the event?&lt;br&gt;&lt;br&gt;
How could time to mitigation be improved?&lt;br&gt;&lt;br&gt;
How did you confirm the event was entirely mitigated?&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Post-Incident Analysis:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Example of questions you could address:&lt;br&gt;&lt;br&gt;
How were the contributing factors diagnosed?&lt;br&gt;&lt;br&gt;
How could time to diagnosis be improved?&lt;br&gt;&lt;br&gt;
Did you have an actual backlog item that could’ve prevented or reduced the impact of this event? If yes, why was this item not done?&lt;br&gt;&lt;br&gt;
Could a programmatic verification rule (e.g.,&lt;/em&gt; &lt;a href="https://aws.amazon.com/config/" rel="noopener noreferrer"&gt;&lt;em&gt;AWS Config&lt;/em&gt;&lt;/a&gt;&lt;em&gt;) be used to prevent this event?&lt;br&gt;&lt;br&gt;
Did a change trigger this event?&lt;br&gt;&lt;br&gt;
How was that change deployed — automatically or manually?&lt;br&gt;&lt;br&gt;
Could safeguards in the deployment have prevented or reduced the impact of this event?&lt;br&gt;&lt;br&gt;
Could this have been caught and rolled back during the deployment?&lt;br&gt;&lt;br&gt;
Was this tested in a staging environment? If yes, why did this pass through? Could more tests have prevented or reduced the impact of this event?&lt;br&gt;&lt;br&gt;
If this change was manual, was there a playbook? Was that playbook practiced, tested, and reviewed recently?&lt;br&gt;&lt;br&gt;
Did a specific tool/command trigger the event? Could safeguards have prevented or reduced the impact of this event? Was there any safeguard triggered? If not, why none were in place?&lt;br&gt;&lt;br&gt;
Was a production operation readiness or well-architected review performed on the system(s)? If not, why? When was the last evaluation done?&lt;br&gt;&lt;br&gt;
Could a review have prevented or reduced the impact of the event?&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Timeline:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Detail all major event points with their time (included the timezone) with a short description.&lt;br&gt;&lt;br&gt;
Example: 09:19 EEST — database run out of connections. Link graph &amp;amp; log&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Diving deep on contributing factors:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Start with the problem.&lt;br&gt;&lt;br&gt;
Keep asking questions (e.g., why?) until you get to multiple contributing factors.&lt;/em&gt; &lt;strong&gt;&lt;em&gt;There is no single cause for failure&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;. So, keeping going!&lt;br&gt;&lt;br&gt;
Probe into different directions — tools, culture, and processes.&lt;/em&gt; &lt;strong&gt;&lt;em&gt;NEVER stop at human errors&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;(e.g., if an operator enters a wrong command, ask why no safeguards were in place, or why wasn’t the action peer-reviewed, and why didn’t that command have roll-back?)&lt;br&gt;&lt;br&gt;
Define action items against all contributing factors.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Lessons Learned:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Describe what your team is taking away from this event.&lt;br&gt;&lt;br&gt;
What did you learn that will help you in the future to prevent similar events?&lt;br&gt;&lt;br&gt;
What unexpected things happened?&lt;br&gt;&lt;br&gt;
What process broke down?&lt;br&gt;&lt;br&gt;
Lessons learned should correlate directly, if possible, with an action item.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Action items:
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;List of action items with a title, an owner, due date, a priority, and a link to the backlog item created to follow up.&lt;br&gt;&lt;br&gt;
Example: Evaluate shorter timeout for GET API 123, adhorn, July 3rd- 2020, high priority, link to a backlog item.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Things to do when doing a postmortem
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Generally, select senior, experienced owners and reviewers to ensure the high-quality completion of the postmortem.&lt;/li&gt;
&lt;li&gt;Proper postmortems are diving deep on the issues. Nothing is left unanswered unless it becomes an action item.&lt;/li&gt;
&lt;li&gt;Questioning your assumptions, be-aware of heuristics, and fight biases &lt;strong&gt;**&lt;/strong&gt; (see below).&lt;/li&gt;
&lt;li&gt;Reviewers should be fully empowered to reject a postmortem for not meeting a high-quality bar.&lt;/li&gt;
&lt;li&gt;Review recent postmortems in meetings with the broader organization.&lt;/li&gt;
&lt;li&gt;Be smart about what can be accomplished in the short-term, don’t over-promise.&lt;/li&gt;
&lt;li&gt;Use existing postmortems and previous lessons learned to design new “best practice” patterns, and set mechanisms to share the knowledge with the rest of the organization (e.g., present postmortems in weekly operational reviews)&lt;/li&gt;
&lt;li&gt;Codify and automate lessons learned when possible.&lt;/li&gt;
&lt;li&gt;Don’t let postmortems drag on for a long time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;** Heuristics and biases to watch out for (in no particular order):&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Confirmation_bias" rel="noopener noreferrer"&gt;&lt;strong&gt;confirmation bias&lt;/strong&gt;&lt;/a&gt; — “the tendency to search for, interpret, favor, and recall information that confirms or supports one’s prior personal beliefs or values.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Sunk_cost" rel="noopener noreferrer"&gt;&lt;strong&gt;sunk cost fallacy&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt; &lt;/strong&gt; — “the tendency for people to believe that investments (i.e., sunk costs) justify further expenditures.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Argumentum_ad_populum" rel="noopener noreferrer"&gt;&lt;strong&gt;common belief fallacy&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt; &lt;/strong&gt; — “If many believe so, it is so.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Hindsight_bias" rel="noopener noreferrer"&gt;&lt;strong&gt;hindsight bias&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt; &lt;/strong&gt; — “the tendency for people to perceive events that have already occurred as having been more predictable than they actually were before the events took place.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Fundamental_attribution_error" rel="noopener noreferrer"&gt;&lt;strong&gt;fundamental attribution error&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt; &lt;/strong&gt; — “the tendency to believe that what people do reflects who they are.”&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Things to avoid when doing a postmortem
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Don’t blame individuals or teams. Similarly, don’t assign or imply blame to others, individuals, teams, or organizations. Instead, identify what happened and question &lt;strong&gt;why&lt;/strong&gt; those things happened.&lt;/li&gt;
&lt;li&gt;Stopping at an operator error isn’t right. It is a sign that you haven’t gone deep enough. Think about the situation that led the operator to trigger the event? Why was the operator able to do such a thing? Was it a lack of proper tools, a problem in the culture, or a missing process?&lt;/li&gt;
&lt;li&gt;Don’t do postmortems punitively. Don’t do a postmortem if no one is going to get value and find improvements.&lt;/li&gt;
&lt;li&gt;Avoid open-ended questions or action items. Action items such as “create training” and “improve documentation” aren’t useful. Either you didn’t go deep enough, or you didn’t need a postmortem.&lt;/li&gt;
&lt;li&gt;Action items should focus on what can be done in a shorter-term to mitigate the event.&lt;/li&gt;
&lt;li&gt;Don’t try to fix everything in your system in a single postmortem. “We need to change the overall architecture of our system now” or “we need to move to Fortran” aren’t the right action items.&lt;/li&gt;
&lt;li&gt;Do not spend an unreasonable amount of time on writing postmortems. They should be done relatively fast and with a high-quality bar.&lt;/li&gt;
&lt;li&gt;Do not write postmortems on weekends, or in a hurry. It can generally wait the next Monday.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s all for now, folks. I hope you’ve enjoyed this post. &lt;strong&gt;I would love to hear what works and what doesn’t work for you, so please don’t hesitate to share your feedback and opinions.&lt;/strong&gt; Thanks a lot for reading :-)&lt;/p&gt;

&lt;p&gt;— Adrian&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>sre</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>The Chaos Engineering Collection</title>
      <dc:creator>Adrian Hornsby</dc:creator>
      <pubDate>Tue, 16 Jun 2020 05:34:44 +0000</pubDate>
      <link>https://dev.to/aws/the-chaos-engineering-collection-5gdm</link>
      <guid>https://dev.to/aws/the-chaos-engineering-collection-5gdm</guid>
      <description>&lt;p&gt;A list of my chaos engineering related blog posts and open-source projects.&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%2Fi7ze1ei53cjeg6mggwcb.jpeg" 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%2Fi7ze1ei53cjeg6mggwcb.jpeg" width="800" height="450"&gt;&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%2F13c3c6inn2k13k69s8og.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%2F13c3c6inn2k13k69s8og.png" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Series on chaos engineering
&lt;/h3&gt;

&lt;p&gt;This is a collection of three articles on chaos engineering that present and discuss the different phases of the chaos engineering process.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://medium.com/@adhorn/chaos-engineering-ab0cc9fbd12a" rel="noopener noreferrer"&gt;Part 1: The art of breaking things purposefully&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;In &lt;a href="https://medium.com/@adhorn/chaos-engineering-ab0cc9fbd12a" rel="noopener noreferrer"&gt;Part 1 of this series&lt;/a&gt;, I introduce chaos engineering and explain how it helps uncover and fix unknowns in your system before they become outages in production; and also how it fosters positive cultural change inside organizations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@adhorn/chaos-engineering-ab0cc9fbd12a" rel="noopener noreferrer"&gt;Chaos Engineering — Part 1&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://medium.com/@adhorn/chaos-engineering-part-2-b9c78a9f3dde" rel="noopener noreferrer"&gt;Part 2: Planning your first experiment&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://medium.com/@adhorn/chaos-engineering-part-2-b9c78a9f3dde" rel="noopener noreferrer"&gt;In Part 2&lt;/a&gt;, I discuss areas to invest in to start designing your first chaos engineering experiments and pick up the right hypothesis.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@adhorn/chaos-engineering-part-2-b9c78a9f3dde" rel="noopener noreferrer"&gt;Chaos Engineering — Part 2&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://dev.to/adhorn/chaos-engineering-part-3-5c87-temp-slug-1097180"&gt;Part 3: Failure Injection — Tools and Methods&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://dev.to/adhorn/chaos-engineering-part-3-5c87-temp-slug-1097180"&gt;In Part 3&lt;/a&gt;, I focus on the experiment itself and present a collection of tools and methods that cover the broad spectrum of failure injection necessary for running chaos engineering experiments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/adhorn/chaos-engineering-part-3-5c87-temp-slug-1097180"&gt;Chaos Engineering — Part 3&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Practical Chaos Engineering
&lt;/h3&gt;

&lt;p&gt;A set of articles presenting practical implementations of chaos engineering experiments.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://medium.com/@adhorn/injecting-chaos-to-amazon-ec2-using-amazon-system-manager-ca95ee7878f5" rel="noopener noreferrer"&gt;Injecting Chaos to Amazon EC2 using AWS System Manager&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;In this article, I show how to &lt;a href="https://medium.com/@adhorn/injecting-chaos-to-amazon-ec2-using-amazon-system-manager-ca95ee7878f5" rel="noopener noreferrer"&gt;inject failure into your application using AWS System Manager&lt;/a&gt; and opened source plenty of &lt;a href="https://github.com/adhorn/chaos-ssm-documents" rel="noopener noreferrer"&gt;ready-made failure injection&lt;/a&gt; to get started. Try it — it’s pretty awesome!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://medium.com/@adhorn/injecting-chaos-to-amazon-ec2-using-amazon-system-manager-ca95ee7878f5" rel="noopener noreferrer"&gt;Injecting Chaos to Amazon EC2 using AWS System Manager&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/adhorn/chaos-ssm-documents" rel="noopener noreferrer"&gt;adhorn/chaos-ssm-documents&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://medium.com/@adhorn/failure-injection-gain-confidence-in-your-serverless-application-ce6c0060f586" rel="noopener noreferrer"&gt;Injecting Chaos to AWS Lambda functions using Lambda Layers&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;In this article, I explain how to use AWS Lambda Layers to conduct chaos engineering experiments on Lambda functions.&lt;/p&gt;

&lt;p&gt;Original post:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@adhorn/injecting-chaos-to-aws-lambda-functions-using-lambda-layers-2963f996e0ba" rel="noopener noreferrer"&gt;Injecting Chaos to AWS Lambda functions using Lambda Layers&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Update:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://medium.com/@adhorn/failure-injection-gain-confidence-in-your-serverless-application-ce6c0060f586" rel="noopener noreferrer"&gt;Injecting Chaos to AWS Lambda functions with Lambda Layers- RELOADED&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/adhorn/aws-lambda-chaos-injection" rel="noopener noreferrer"&gt;adhorn/aws-lambda-chaos-injection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/adhorn/aws-lambda-layer-chaos-injection" rel="noopener noreferrer"&gt;adhorn/aws-lambda-layer-chaos-injection&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://github.com/adhorn/aws-chaos-scripts" rel="noopener noreferrer"&gt;Collection of python scripts to run failure injection on AWS infrastructure&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/adhorn/aws-chaos-scripts" rel="noopener noreferrer"&gt;adhorn/aws-chaos-scripts&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>sre</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>Creating your own Chaos Monkey with AWS Systems Manager Automation</title>
      <dc:creator>Adrian Hornsby</dc:creator>
      <pubDate>Tue, 16 Jun 2020 05:32:22 +0000</pubDate>
      <link>https://dev.to/aws/creating-your-own-chaos-monkey-with-aws-systems-manager-automation-1e3i</link>
      <guid>https://dev.to/aws/creating-your-own-chaos-monkey-with-aws-systems-manager-automation-1e3i</guid>
      <description>&lt;h4&gt;
  
  
  Chaos Engineering on AWS
&lt;/h4&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%2Fa2dkz0z5jnee94gpam29.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%2Fa2dkz0z5jnee94gpam29.png" width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I’d like to express my gratitude to my colleagues and friends Jason Byrne and Matt Fitzgerald for their valuable feedback.&lt;/em&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%2Fjqonjatipg9icjof94iy.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%2Fjqonjatipg9icjof94iy.png" width="800" height="157"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In a &lt;a href="https://medium.com/@adhorn/injecting-chaos-to-amazon-ec2-using-amazon-system-manager-ca95ee7878f5" rel="noopener noreferrer"&gt;recent post&lt;/a&gt;, I explained how to use &lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/execute-remote-commands.html" rel="noopener noreferrer"&gt;AWS SSM Run Command&lt;/a&gt; to &lt;a href="https://medium.com/@adhorn/injecting-chaos-to-amazon-ec2-using-amazon-system-manager-ca95ee7878f5" rel="noopener noreferrer"&gt;inject failures on EC2 instances&lt;/a&gt;. SSM Run Command is well-suited to execute custom scripts on EC2 instances, especially to inject &lt;a href="https://github.com/adhorn/chaos-ssm-documents/blob/master/run-command/latency-stress.yml" rel="noopener noreferrer"&gt;latency&lt;/a&gt; or &lt;a href="https://github.com/adhorn/chaos-ssm-documents/blob/master/run-command/blackhole-stress.yml" rel="noopener noreferrer"&gt;blackouts&lt;/a&gt; on the network interface, do resource exhaustion of &lt;a href="https://github.com/adhorn/chaos-ssm-documents/blob/master/run-command/cpu-stress.yml" rel="noopener noreferrer"&gt;CPUs&lt;/a&gt;, &lt;a href="https://github.com/adhorn/chaos-ssm-documents/blob/master/run-command/memory-stress.yml" rel="noopener noreferrer"&gt;memory&lt;/a&gt;, and &lt;a href="https://github.com/adhorn/chaos-ssm-documents/blob/master/run-command/io-stress.yml" rel="noopener noreferrer"&gt;IO&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;However, we need more than that. Failure injection should target &lt;strong&gt;resources, network characteristics&lt;/strong&gt; and &lt;strong&gt;dependencies, applications, processes and service&lt;/strong&gt; , and also the &lt;strong&gt;infrastructure&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We also need to have a broad set of controls and capabilities to perform chaos experiments safely. We might want to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Execute commands and scripts&lt;/strong&gt; directly into EC2 instances.&lt;/li&gt;
&lt;li&gt;Invoke Lambda functions to &lt;strong&gt;run custom scripts.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Orchestrate&lt;/strong&gt; several failure injections to form chaos scenarios.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Schedule&lt;/strong&gt; them for execution at specific times.&lt;/li&gt;
&lt;li&gt;Have &lt;strong&gt;automatic cancellations&lt;/strong&gt; if errors are detected.&lt;/li&gt;
&lt;li&gt;Have &lt;strong&gt;safety measures&lt;/strong&gt; in places with approvals.&lt;/li&gt;
&lt;li&gt;Apply velocity controls to &lt;strong&gt;limit the blast radius&lt;/strong&gt; of experiments.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is where &lt;a href="https://aws.amazon.com/systems-manager/features/#Automation" rel="noopener noreferrer"&gt;AWS System Manager Automation&lt;/a&gt; (SSM** Automation) comes in. So, let’s take a look!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;** Note: AWS Systems Manager was formerly known as Amazon Simple Systems Manager (SSM). The original abbreviated name of the service, SSM, is still used and reflected in various AWS resources.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  What is SSM Automation?
&lt;/h4&gt;

&lt;p&gt;SSM Automation was launched to simplify frequent maintenance and deployment tasks of AWS resources and, especially, codify them.&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%2Fn1w74cw48zd6lsy06cwx.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%2Fn1w74cw48zd6lsy06cwx.png" width="800" height="599"&gt;&lt;/a&gt;SSM Automation in a nutshell&lt;/p&gt;

&lt;p&gt;SSM Automation uses &lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-documents.html" rel="noopener noreferrer"&gt;document&lt;/a&gt;s (defined in YAML or JSON) to enable resource management across multiple accounts and AWS regions. You can execute AWS API calls as part of a document in combination with other SSM Automation actions such as running commands on your EC2 instances, invoking Lambda functions, and executing custom Python or Powershell scripts.&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%2Fpjc0om7yo3wncuyahen6.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%2Fpjc0om7yo3wncuyahen6.png" width="460" height="516"&gt;&lt;/a&gt;SSM Automation document&lt;/p&gt;

&lt;p&gt;While these documents can be executed directly via the &lt;a href="https://aws.amazon.com/console/" rel="noopener noreferrer"&gt;console&lt;/a&gt;, the &lt;a href="https://aws.amazon.com/cli/" rel="noopener noreferrer"&gt;CLI&lt;/a&gt;, and &lt;a href="https://aws.amazon.com/tools/" rel="noopener noreferrer"&gt;SDKs&lt;/a&gt;, you can also schedule and trigger them through &lt;a href="https://aws.amazon.com/cloudwatch/" rel="noopener noreferrer"&gt;CloudWatch Events&lt;/a&gt;. This scheduling capability makes the integration with CI/CD pipelines trivial.&lt;/p&gt;

&lt;h4&gt;
  
  
  SSM Automation Action types
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Action types&lt;/strong&gt; let you automate a wide variety of operations. For example, the aws:executeAwsApi action type used above enables you to run &lt;em&gt;any&lt;/em&gt; API operation on any AWS service, including creating or deleting AWS resources, starting processes, triggering notifications, etc.&lt;/p&gt;

&lt;p&gt;While SSM Automation supports a &lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-actions.html" rel="noopener noreferrer"&gt;wide variety of actions&lt;/a&gt;, the most notable ones for chaos engineering are the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-action-executeAwsApi.html" rel="noopener noreferrer"&gt;aws:executeAwsApi&lt;/a&gt; — Call and run AWS API actions&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-action-changestate.html" rel="noopener noreferrer"&gt;aws:changeInstanceState&lt;/a&gt; — Change instance state&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-action-runcommand.html" rel="noopener noreferrer"&gt;aws:runCommand&lt;/a&gt; — Run a command on an EC2 instance&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-action-executeScript.html" rel="noopener noreferrer"&gt;aws:executeScript&lt;/a&gt; — Run a Python or PowerShell script&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-action-lamb.html" rel="noopener noreferrer"&gt;aws:invokeLambdaFunction&lt;/a&gt; — Invoke an AWS Lambda function&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-action-assertAwsResourceProperty.html" rel="noopener noreferrer"&gt;aws:assertAwsResourceProperty&lt;/a&gt; — Assert a resource state or event state&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-action-waitForAwsResourceProperty.html" rel="noopener noreferrer"&gt;aws:waitForAwsResourceProperty&lt;/a&gt; — Wait on a resource property&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-action-pause.html" rel="noopener noreferrer"&gt;aws:pause&lt;/a&gt; — Pause an SSM Automation execution&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-action-sleep.html" rel="noopener noreferrer"&gt;aws:sleep&lt;/a&gt; — Delay an SSM Automation execution&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-action-approve.html" rel="noopener noreferrer"&gt;aws:approve&lt;/a&gt; — Pause an SSM Automation execution for manual approval&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;SSM Automation also includes safety and velocity features that help you control the execution and the roll-out of these documents across large groups of instances by using tags, limits, and error thresholds you define.&lt;/p&gt;

&lt;p&gt;As you can probably guess by now, SSM Automation is also well-suited to execute chaos engineering experiments safely.&lt;/p&gt;

&lt;h4&gt;
  
  
  “Hello, World!”
&lt;/h4&gt;

&lt;p&gt;Let’s take a look at the “Hello, World!” of chaos engineering experiments —  &lt;strong&gt;Randomly stopping EC2 instances&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This experiment is famously known as &lt;a href="https://github.com/Netflix/chaosmonkey" rel="noopener noreferrer"&gt;Chaos Monkey&lt;/a&gt;, and was created by &lt;a href="https://netflixtechblog.com/" rel="noopener noreferrer"&gt;Netflix&lt;/a&gt; to enforce strong architectural guidelines; &lt;em&gt;Applications launched on the AWS cloud must be stateless auto-scaled micro-services.&lt;/em&gt; That means that applications running Netflix should tolerate random EC2 instance failures.&lt;/p&gt;

&lt;p&gt;Following is an SSM Automation document (described in YAML) randomly failing an EC2 instance in a particular AWS availability zone.&lt;/p&gt;

&lt;p&gt;To open that SSM Automation document in your favorite IDE, click &lt;a href="https://github.com/adhorn/chaos-ssm-documents/blob/master/automation/stop-instance/executeAPIAction/stop-random-instance-api.yml" rel="noopener noreferrer"&gt;here&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%2Fhfk87mcqi7y2tcu11fbs.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%2Fhfk87mcqi7y2tcu11fbs.png" width="800" height="2014"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Okay — so what do we have here?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: For readability purposes, I will now collapse irrelevant sections of the SSM Automation document.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The top section of this document is simple. It starts with a &lt;strong&gt;&lt;em&gt;description&lt;/em&gt;&lt;/strong&gt; , the &lt;strong&gt;&lt;em&gt;schemaVersion&lt;/em&gt;&lt;/strong&gt; (currently at 0.3 ), and &lt;strong&gt;&lt;em&gt;assumeRole,&lt;/em&gt;&lt;/strong&gt; which is the IAM role that SSM Automation needs to assume to run the actions defined below in the document.&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%2F3kvqz925gmv6tbtpiuxd.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%2F3kvqz925gmv6tbtpiuxd.png" width="800" height="657"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;&lt;em&gt;parameters&lt;/em&gt;&lt;/strong&gt; section — &lt;strong&gt;&lt;em&gt; AvailabilityZone&lt;/em&gt;&lt;/strong&gt; , &lt;strong&gt;&lt;em&gt;TagName&lt;/em&gt;&lt;/strong&gt; , &lt;strong&gt;&lt;em&gt;TagValue&lt;/em&gt;&lt;/strong&gt; , and &lt;strong&gt;&lt;em&gt;AutomationAssumeRole &lt;/em&gt;&lt;/strong&gt; — are parameters operators need to input for each experiment’s execution. The first three parameters are used in the first step &lt;strong&gt;&lt;em&gt; — ListInstances — &lt;/em&gt;&lt;/strong&gt; to filter EC2 instances, while the last one is the IAM role required to execute actions described in the document.&lt;/p&gt;

&lt;p&gt;These parameters are inputs of the experiment execution, in bold in the below AWS CLI &lt;strong&gt;&lt;em&gt;start-automation-execution&lt;/em&gt;&lt;/strong&gt; command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; aws ssm start-automation-execution --document-name "StopRandomInstances-API" --document-version "\$DEFAULT" --parameters '{" **AvailabilityZone**":["eu-west-1c"]," **TagName**":["SSMTag"]," **TagValue**":["chaos-ready"]," **AutomationAssumeRole**":["arn:aws:iam::01234567890:role/SSMAutomationChaosRole"]}' --region eu-west-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;&lt;em&gt;mainSteps&lt;/em&gt;&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;&lt;em&gt;mainSteps&lt;/em&gt;&lt;/strong&gt; section defines &lt;strong&gt;&lt;em&gt;actions&lt;/em&gt;&lt;/strong&gt; that SSM performs on AWS resources. In this document there are six steps that run in &lt;strong&gt;sequential&lt;/strong&gt; order — namely &lt;strong&gt;&lt;em&gt;listInstances&lt;/em&gt;&lt;/strong&gt; , &lt;strong&gt;&lt;em&gt;SelectRandomInstance&lt;/em&gt;&lt;/strong&gt; , &lt;strong&gt;&lt;em&gt;verifyInstanceStateRunning&lt;/em&gt;&lt;/strong&gt; , &lt;strong&gt;&lt;em&gt;stopInstances&lt;/em&gt;&lt;/strong&gt; , &lt;strong&gt;&lt;em&gt;forceStopInstances&lt;/em&gt;&lt;/strong&gt; , and &lt;strong&gt;&lt;em&gt;verifyInstanceStateStopped&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Each of these steps defines a single &lt;strong&gt;SSM Automation action type&lt;/strong&gt;. The output from one step can be used as input in the following step.&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%2Fubk8suslm2j7eks4v612.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%2Fubk8suslm2j7eks4v612.png" width="800" height="403"&gt;&lt;/a&gt;mainSteps (collapsed)&lt;/p&gt;

&lt;h4&gt;
  
  
  First step — listInstances
&lt;/h4&gt;

&lt;p&gt;Let’s take a look at the first step &lt;strong&gt;&lt;em&gt;listInstances&lt;/em&gt;&lt;/strong&gt;. This first step uses an action type &lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-action-executeAwsApi.html" rel="noopener noreferrer"&gt;aws:executeAwsApi&lt;/a&gt; to query the EC2 service for a list of instances filtered by availability-zone, the state of the EC2 instance, and its tags.&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%2F87vvfj9icmcg6nvoef8m.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%2F87vvfj9icmcg6nvoef8m.png" width="800" height="759"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Outputs
&lt;/h4&gt;

&lt;p&gt;As explained earlier, the output from one step can be used as input in the following step. SSM Automation uses a &lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-aws-apis-calling.html#automation-aws-apis-calling-json-path" rel="noopener noreferrer"&gt;JSONPath expression in the &lt;strong&gt;&lt;em&gt;selector&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; to help select the proper output.&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%2F6n9iyctwkqcbnedbr32p.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%2F6n9iyctwkqcbnedbr32p.png" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A JSONPath expression is a string beginning with “$.” used to select one or more components within a JSON element (e.g., the output of the DescribeInstances API call). The JSONPath operators that are supported by SSM Automation are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dot-notated child (.)&lt;/strong&gt;: This operator selects the value of a specific key from a JSON object.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deep-scan (..)&lt;/strong&gt;: This operator scans a JSON element level by level and selects a list of values with the specific key. The return type of this operator is always a JSON array. This operator can be either &lt;em&gt;StringList&lt;/em&gt; or &lt;em&gt;MapList&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Array-Index ([])&lt;/strong&gt;: This operator gets the value of a specific index from a JSON array.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this first step, the output “$.Reservations..Instances..InstanceId” returns a list of InstanceIds filtered by availability-zone, state, and tag.&lt;/p&gt;

&lt;h4&gt;
  
  
  Second step — SeletRandomInstance
&lt;/h4&gt;

&lt;p&gt;The second step of the document uses an action type &lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-action-executeScript.html" rel="noopener noreferrer"&gt;aws:executeScript&lt;/a&gt; that execute an inline Python script, which returns a random InstanceId from a list of InstanceIds.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: The function defined in the handler must have two parameters,&lt;/em&gt; &lt;em&gt;events and __context.&lt;/em&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%2Fl73eomeinis0rp6l7uq3.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%2Fl73eomeinis0rp6l7uq3.png" width="800" height="843"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The output of script execution is a &lt;strong&gt;&lt;em&gt;Payload&lt;/em&gt;&lt;/strong&gt; object on which you can execute the JSONPath selector. In this example, $.Payload.InstanceId.&lt;/p&gt;

&lt;h4&gt;
  
  
  Third step — verifyInstanceStateRunning
&lt;/h4&gt;

&lt;p&gt;The third step of the document uses another type of action, &lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-action-waitForAwsResourceProperty.html" rel="noopener noreferrer"&gt;aws:waitForAwsResourceProperty&lt;/a&gt;, that asserts the state of the random InstanceId returned from step two.&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%2F4uqw2qho39kcdiq9zb44.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%2F4uqw2qho39kcdiq9zb44.png" width="800" height="660"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In that step, the selector checks the state of the instances to make sure they are running. I want to make sure all instances are running before messing with them.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: As you may have noticed, the input is a StringList, but with a single item,&lt;/em&gt; &lt;em&gt;InstanceId. That allows us to easily modify the random function from the previous step to return several items instead, without having to change anything else in the document.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Fourth and Fifth step — stopInstances and forceStopInstances
&lt;/h4&gt;

&lt;p&gt;The fourth and fifth steps of the document use the action type aws:changeInstanceState. As you have probably guessed, these steps change the state of EC2 instances — in that example, to stopped. The input is again the InstanceId from step two.&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%2Ffep4pzdtumvz2rh228gn.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%2Ffep4pzdtumvz2rh228gn.png" width="800" height="728"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Why use &lt;strong&gt;&lt;em&gt;stopInstances&lt;/em&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;em&gt;forceStopInstances&lt;/em&gt;&lt;/strong&gt; steps?
&lt;/h4&gt;

&lt;p&gt;In the &lt;strong&gt;&lt;em&gt;stopInstances&lt;/em&gt;&lt;/strong&gt; step, the EC2 control plane attempts to gracefully shutdown the selected EC2 instance, allowing it to flush its file system caches or file system metadata. However, sometimes, there may be an issue with the underlying host computer, and the instance might get stuck in the stopping state. That is why the &lt;strong&gt;&lt;em&gt;forceStopInstances&lt;/em&gt;&lt;/strong&gt; step set Force to true, which forces the instances to stop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Note 1&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;: The second step,&lt;/em&gt; &lt;strong&gt;&lt;em&gt;forceStopInstances&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;, is not recommended for EC2 instances running Windows Server.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Note 2&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;: The default timeout value for the&lt;/em&gt; &lt;em&gt;aws:changeInstanceState action is 3600 seconds (one hour). You can limit or extend the timeout by specifying the&lt;/em&gt; &lt;em&gt;timeoutSeconds parameter.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For more information on EC2 stop-instances API, click &lt;a href="https://docs.aws.amazon.com/cli/latest/reference/ec2/stop-instances.html" rel="noopener noreferrer"&gt;here&lt;/a&gt;. For troubleshooting errors, click &lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Last step — verifyInstanceStateStopped
&lt;/h4&gt;

&lt;p&gt;Finally, the last step of this document is to verify the state of the instances to be stopped or terminated. This step is arguably redundant since aws:changeInstanceState also asserts on the desired value. However, for the sake of this example, I preferred to make that step explicit.&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%2F9hmq5m2jqv02op7ypnl0.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%2F9hmq5m2jqv02op7ypnl0.png" width="800" height="708"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Nuff said — Let’s demo this!
&lt;/h3&gt;

&lt;p&gt;For this example, I will assume that you already have some EC2 instances launched in your AWS account with appropriate tags (I use SSMTag:chaos-ready for the demo).&lt;/p&gt;

&lt;h4&gt;
  
  
  1- Create an IAM role for SSM Automation
&lt;/h4&gt;

&lt;p&gt;By default, SSM doesn’t have permission to perform actions on your AWS resources. Start by creating a role — e.g., &lt;strong&gt;SSMAutomationChaosRole&lt;/strong&gt; with the following policy.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "lambda:InvokeFunction"
            ],
            "Resource": [
                "arn:aws:lambda:\*:\*:function:ChaosAutomation\*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "ec2:StartInstances",
                "ec2:RunInstances",
                "ec2:StopInstances",
                "ec2:TerminateInstances",
                "ec2:DescribeInstances",
                "ec2:DescribeInstanceStatus"
            ],
            "Resource": [
                "\*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "ssm:\*"
            ],
            "Resource": [
                "\*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "sns:Publish"
            ],
            "Resource": [
                "arn:aws:sns:\*:\*:ChaosAutomation\*"
            ]
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It should give you enough to get started with actions calling EC2, SSM Run Command, and AWS Lambda. You should, of course, extend or restrict this policy to your own needs.&lt;/p&gt;

&lt;h4&gt;
  
  
  2- Fault injection documents
&lt;/h4&gt;

&lt;p&gt;To get you started, I created a few ready-to-use SSM Automation documents.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/adhorn/chaos-ssm-documents/tree/automation/automation" rel="noopener noreferrer"&gt;https://github.com/adhorn/chaos-ssm-documents/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Currently, the following chaos experiments are available — feel free to ask or contribute for more!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;1- Randomly stopping instances using EC2 API&lt;br&gt;&lt;br&gt;
2- Randomly stopping instances using AWS Lambda&lt;br&gt;&lt;br&gt;
3- Injecting multiple CPU stresses on EC2 instances using AWS Run Command&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To use any of them, you need to create a SSM Automation document using the AWS CLI as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; aws ssm create-document --content --name "[StopRandomInstances-API](https://eu-west-1.console.aws.amazon.com/systems-manager/documents/StopRandomInstances/description?region=eu-west-1)" file://stop\_random\_instance\_api.yml --document-type "Automation" --document-format YAML
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After uploading the document, you should see it under the Owned by me tab in &lt;a href="https://eu-west-1.console.aws.amazon.com/systems-manager/documents?region=eu-west-1" rel="noopener noreferrer"&gt;AWS System Manager Documents&lt;/a&gt; filtered by Document type: Automation .&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%2Fqsqth6tbg7g5z4jy9g3e.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%2Fqsqth6tbg7g5z4jy9g3e.png" width="800" height="243"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3- Executing the fault injection document
&lt;/h4&gt;

&lt;p&gt;Go to the &lt;a href="https://eu-west-1.console.aws.amazon.com/systems-manager/automation/executions?region=eu-west-1" rel="noopener noreferrer"&gt;Automation dashboard&lt;/a&gt; in the AWS System Manager and click &lt;strong&gt;&lt;em&gt;Execute automation&lt;/em&gt;&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.amazonaws.com%2Fuploads%2Farticles%2F9a8bhfr9uif7yat8tqng.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%2F9a8bhfr9uif7yat8tqng.png" width="800" height="310"&gt;&lt;/a&gt;SSM Automation dashboard&lt;/p&gt;

&lt;p&gt;Filter the documents by Owner: Owned by me, and you should see your newly uploaded document(s).&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%2F9z5ybh97x0jdh3pdyqo7.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%2F9z5ybh97x0jdh3pdyqo7.png" width="800" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Select the &lt;a href="https://eu-west-1.console.aws.amazon.com/systems-manager/documents/StopRandomInstances/description?region=eu-west-1" rel="noopener noreferrer"&gt;StopRandomInstances-API&lt;/a&gt; automation document and click  &lt;strong&gt;&lt;em&gt;Next.&lt;/em&gt;&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.amazonaws.com%2Fuploads%2Farticles%2Ffdal5nao49yzbgevq8pu.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%2Ffdal5nao49yzbgevq8pu.png" width="800" height="670"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: If you prefer using the AWS CLI, notice that the console outputs the AWS CLI command execution equivalent.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You enter the input parameters defined in the automation document here, namely AvailabilityZone, TagName, and TagValue (I use SSMTag:chaos-ready). Remember to select the correct role created earlier, in this demo SSMAutomationChaosRole, to allow the execution of the experiment.&lt;/p&gt;

&lt;p&gt;Before running the experiment, let’s take a look at my instances currently running in eu-west-1.&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%2F3aayhdgwttrf9gyxbdve.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%2F3aayhdgwttrf9gyxbdve.png" width="762" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, I have four instances in eu-west-1a but only three with the correct tag SSMTag:chaos-ready. I will use that information to verify that my filters are working correctly.&lt;/p&gt;

&lt;p&gt;Let’s execute the experiment.&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%2Fca4oswqyvud62pzb9czf.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%2Fca4oswqyvud62pzb9czf.png" width="800" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can follow the execution of each step from the AWS Console. Each step gets a &lt;strong&gt;&lt;em&gt;Step ID&lt;/em&gt;&lt;/strong&gt; that you can monitor independently. Following is a zoom on &lt;strong&gt;&lt;em&gt;Step 1: listInstances.&lt;/em&gt;&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.amazonaws.com%2Fuploads%2Farticles%2Fxwrqed4n9de3nw9q4six.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%2Fxwrqed4n9de3nw9q4six.png" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can now check and verify that our filters work. And indeed, we have three instances with the correct set of tags in eu-west-1a.&lt;/p&gt;

&lt;p&gt;A zoom on the second step shows us the randomly selected instance: i-01f069058c584b2bc.&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%2Fn9dg6df1gkewc9w0zvtt.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%2Fn9dg6df1gkewc9w0zvtt.png" width="800" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once all the steps completed successfully, we can verify that the correct instance stopped — i-01f069058c584b2bc&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%2F0mlxm803419l3h0s53a7.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%2F0mlxm803419l3h0s53a7.png" width="800" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, our EC2 fault injection worked.&lt;/p&gt;

&lt;h4&gt;
  
  
  4- Cancelling Executions
&lt;/h4&gt;

&lt;p&gt;You might have noticed the &lt;strong&gt;Cancel execution&lt;/strong&gt; in the execution status page.&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%2Fbdobra96tf5pbj2o8yf7.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%2Fbdobra96tf5pbj2o8yf7.png" width="800" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yes — that’s our Big Red Button right there!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CAUTION:&lt;/strong&gt; You can only &lt;strong&gt;attempt&lt;/strong&gt; to cancel an execution since SSM cannot guarantee that actions can be stopped or reverted. For example, you can’t undo an activity that is already happening, e.g., stopping and terminating an instance.&lt;/p&gt;

&lt;p&gt;As always, with chaos engineering, be extra careful with your experiments — plan carefully!&lt;/p&gt;

&lt;h4&gt;
  
  
  5 — Continuous Chaos testing
&lt;/h4&gt;

&lt;p&gt;What made Chaos Monkey so unique was that is was continuously running in Netflix’s environment, regularly shutting down EC2 instances, at a regular interval — it wasn’t just a one-off.&lt;/p&gt;

&lt;p&gt;Now that you have successfully executed your EC2 failure injection with SSM Automation, you might want to turn that into a continuous chaos test, or continuous verification.&lt;/p&gt;

&lt;p&gt;Continuous chaos testing simply means that you regularly execute the failure injection to verify the application repeatedly withstand failures.&lt;/p&gt;

&lt;p&gt;Luckily, it is straightforward to do!&lt;/p&gt;

&lt;p&gt;You can execute the above SSM Automation by specifying our SSM document as the target of an Amazon CloudWatch event.&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%2Fe1si47thurgz6501533g.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%2Fe1si47thurgz6501533g.png" width="800" height="399"&gt;&lt;/a&gt;Amazon CloudWatch — Create Rule&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the &lt;a href="https://console.aws.amazon.com/cloudwatch/" rel="noopener noreferrer"&gt;CloudWatch console&lt;/a&gt;, choose &lt;strong&gt;Events&lt;/strong&gt; in the left navigation pane, and click &lt;strong&gt;Create rule&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Choose &lt;strong&gt;Schedule&lt;/strong&gt; and specify the recurrence by using the cron format. For demo purposes, I choose to execute the SSM Automation document every 5 minutes, which is represented by the Cron expression 0/5 * * * ? * .&lt;/li&gt;
&lt;li&gt;Then click &lt;strong&gt;Add target&lt;/strong&gt; and choose &lt;strong&gt;SSM Automation&lt;/strong&gt; from the Select target type list. Choose the Automation document created above as your target- &lt;strong&gt;&lt;em&gt;StopRandomInstances-API&lt;/em&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Expand &lt;strong&gt;Configure automation parameter(s)&lt;/strong&gt;, and enter each of the required values — AvailabilityZone, TagName, TagValue and AutomationAssumeRole.&lt;/li&gt;
&lt;li&gt;In the permissions section, &lt;strong&gt;let CloudWatch create a new role&lt;/strong&gt; to call SSM Automation Execution, or select an existing one.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Configure details&lt;/strong&gt; , add a name and a description. Select Enabled state and click &lt;strong&gt;&lt;em&gt;Create rule&lt;/em&gt;&lt;/strong&gt;. Make sure you add a distinct name with an accurate description; you want to make it apparent what is it a chaos engineering rule!&lt;/li&gt;
&lt;/ol&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%2Fzmvxe1io09udjpqxzwuv.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%2Fzmvxe1io09udjpqxzwuv.png" width="800" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can verify, change, or disable the rule from the CloudWatch console afterward.&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%2Ftu9e6vqfnj7xe6f78py5.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%2Ftu9e6vqfnj7xe6f78py5.png" width="800" height="241"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After a while, you should start seeing executions of the SSM Automation document every 5 min.&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%2F87ifaqh4dy0rq1jkuoil.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%2F87ifaqh4dy0rq1jkuoil.png" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, the last four executions differ and hold the IAM role assumed by the CloudWatch event calling SSM Automation execution.&lt;/p&gt;

&lt;p&gt;That’s it — We have successfully built our custom Chaos Monkey using SSM Automation! Hopefully, this blog post will inspire you to start your journey with chaos engineering. Feel free to comment, share your ideas, or submit &lt;a href="https://github.com/adhorn/chaos-ssm-documents/pulls" rel="noopener noreferrer"&gt;pull-requests&lt;/a&gt; if you want to add new functionalities to this &lt;a href="https://github.com/adhorn/chaos-ssm-documents" rel="noopener noreferrer"&gt;collection of SSM documents&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note for serverless fans:&lt;/strong&gt; If you are interested in doing the same experiment but with actions using AWS Lambda, use this &lt;a href="https://github.com/adhorn/chaos-ssm-documents/blob/master/automation/stop-instance/lambdaAction/stop-random-instance-lambda.yml" rel="noopener noreferrer"&gt;document&lt;/a&gt; with this &lt;a href="https://github.com/adhorn/chaos-ssm-documents/blob/master/automation/stop-instance/lambdaAction/stop-random-instance-lambda.yml" rel="noopener noreferrer"&gt;lambda function&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;-Adrian&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>sre</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>Chaos Engineering  — How to safely inject failure?</title>
      <dc:creator>Adrian Hornsby</dc:creator>
      <pubDate>Mon, 11 May 2020 07:37:16 +0000</pubDate>
      <link>https://dev.to/aws/chaos-engineering-q-a-how-to-safely-inject-failure-3n5e</link>
      <guid>https://dev.to/aws/chaos-engineering-q-a-how-to-safely-inject-failure-3n5e</guid>
      <description>&lt;h3&gt;
  
  
  Chaos Engineering — How to safely inject failure?
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Answering questions from my webinar
&lt;/h4&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%2F45eo8rnlcit6hdcc8wmq.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%2F45eo8rnlcit6hdcc8wmq.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I recently did a two-hour webinar dedicated to chaos engineering and got a lot of great questions from the audience. In this mini-series of posts, I take some time to answer them.&lt;/p&gt;

&lt;p&gt;If you missed the webinar, you could access it on-demand from the link below. And if you have questions you would like me to address, feel free to ask me directly on &lt;a href="https://twitter.com/adhorn" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; :-)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://anz-resources.awscloud.com/anz-webinars-on-demand-developer/applying-chaos-engineering-principles-for-building-fault-tolerant-applications" rel="noopener noreferrer"&gt;Dev Connect - Applying chaos engineering principles for building fault-tolerant applications&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  These are some of the question I was asked:
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Is it good practice to conduct a test for the whole system at once or segregate tests?&lt;br&gt;&lt;br&gt;
Is it best to do tests in a “copy-of-prod” like environment?&lt;br&gt;&lt;br&gt;
Is there a structured approach to experiment safely?&lt;br&gt;&lt;br&gt;
How do you experiment without risking breaking production?&lt;br&gt;&lt;br&gt;
How can chaos testing be conducted for Lambda (or serverless) services?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If I understand correctly, the synthesized question is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“How to deploy chaos experiments and safely inject failure in your environment.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Notice the deliberate usage of the word  &lt;strong&gt;deploy&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That is probably the most important question out there. And the answer is simple;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The safest way to inject failure in the environment is by using the&lt;/strong&gt; canary deployment pattern &lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Yes! And it is one of the essential things about experimenting safely:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chaos engineering experiments should be treated as a deployment pattern.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The difference with a traditional deployment is that once the experiment is over, we bring back the initial environment — in other words, we rollback the experiment.&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%2Fcdn-images-1.medium.com%2Fmax%2F640%2F0%2AcbivqZILyBt3kQ8d" 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%2Fcdn-images-1.medium.com%2Fmax%2F640%2F0%2AcbivqZILyBt3kQ8d" width="640" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Let’s rewind a bit — What is canary&lt;/strong&gt; (deployment) &lt;strong&gt;experiment?&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The canary deployment pattern is a technique used to reduce the risk of failure when new versions of applications enter production by creating a new environment with the latest version of the software. You then gradually roll out the change to a small subset of users, slowly making it available to everybody if no deployment errors are detected.&lt;/p&gt;

&lt;p&gt;The canary deployment pattern is one of the basic design in &lt;a href="https://medium.com/@adhorn/immutable-infrastructure-21f6613e7a23?source=friends_link&amp;amp;sk=515b0c4aa604ac1648e665a42f4c622c" rel="noopener noreferrer"&gt;immutable infrastructure&lt;/a&gt;, a model by which no updates, security patches, or configuration changes happen “in-place” on production systems. If any change is needed, a new version of the architecture is built and deployed instead.&lt;/p&gt;

&lt;p&gt;Immutable infrastructures are more &lt;strong&gt;consistent, reliable,&lt;/strong&gt; and &lt;strong&gt;predictable&lt;/strong&gt; , and they &lt;strong&gt;simplify&lt;/strong&gt; many aspects of software development and operations by preventing common issues related to mutability. Learn more about &lt;a href="https://medium.com/@adhorn/immutable-infrastructure-21f6613e7a23?source=friends_link&amp;amp;sk=515b0c4aa604ac1648e665a42f4c622c" rel="noopener noreferrer"&gt;immutable infrastructures here.&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%2Fbvq5okvktg63q7rtdq8g.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%2Fbvq5okvktg63q7rtdq8g.png" width="800" height="289"&gt;&lt;/a&gt;Canary Deployment applied to Chaos Engineering experiment.&lt;/p&gt;

&lt;h4&gt;
  
  
  Why is the canary pattern important for chaos engineering experiments?
&lt;/h4&gt;

&lt;p&gt;First, by isolating the chaos experiment from the primary production environment and progressively ramping up the traffic sent to it, you can better control the potential blast radius of failure.&lt;/p&gt;

&lt;p&gt;Second, having a dedicated environment to run your experiment makes it easier to deal with logs and monitoring information.&lt;/p&gt;

&lt;p&gt;Third, you can gradually increase the percentage of requests handled by the new canary chaos experiment and rollback if errors are detected. It gives us near-instant rollback — the big red button.&lt;/p&gt;

&lt;p&gt;Finally, you can more easily control what traffic is sent to the canary running the chaos experiment, further limiting the potential risk of customer nuisance.&lt;/p&gt;

&lt;p&gt;Consider several routing or partitioning mechanisms for your experiment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Internal teams vs. customers&lt;/li&gt;
&lt;li&gt;Paying customers vs. non-paying customers&lt;/li&gt;
&lt;li&gt;Geographic-based routing&lt;/li&gt;
&lt;li&gt;Feature flags (&lt;a href="https://martinfowler.com/bliki/FeatureToggle.html" rel="noopener noreferrer"&gt;FeatureToggle&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Random&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;How to do canary&lt;/strong&gt; chaos &lt;strong&gt;experiments on AWS?&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Following are my favorite ways:&lt;/p&gt;

&lt;h4&gt;
  
  
  (1) Canary with Route 53 weighted routing policy
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/route53/" rel="noopener noreferrer"&gt;Route 53&lt;/a&gt; lets you use &lt;a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html" rel="noopener noreferrer"&gt;a weighted routing policy&lt;/a&gt; to split the traffic between the different versions of the application you are deploying, one with the experiment, the other one without.&lt;/p&gt;

&lt;p&gt;Weighted routing enables you to associate multiple resources with a single domain name or subdomain name and choose how much traffic is routed to each resource.&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%2F107ezo5dr6kb3ctm0rvy.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%2F107ezo5dr6kb3ctm0rvy.png" width="800" height="358"&gt;&lt;/a&gt;Canary with Route 53 weighted routing policy&lt;/p&gt;

&lt;p&gt;To configure weighted routing for your canary chaos experiment, you assign each record a relative weight that corresponds with how much traffic you want to send to each resource — one of the resources being the application with the chaos experiment. Route 53 sends traffic to a resource based on the weight that you assign to the record as a proportion of the total weight for all records.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For example, if you want to send a tiny portion of the traffic to one resource and the rest to another resource, you might specify weights of 1 and 255. The resource with a weight of 1 gets 1/256th of the traffic (1/1+255), and the other resource gets 255/256ths (255/1+255).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To me, it is probably the simplest and safest way to deploy your chaos experiment since it separates the experiment from the rest of the production environment.&lt;/p&gt;

&lt;p&gt;The downside is that since you have to duplicate the entire environment, it is also the more expensive option.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Note: The speed of the rollback is directly related to the DNS TTL value. So, watch out for the default TTL values, and shorten them.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  (2) Canary with Application Load Balancer and Weighted Target Groups
&lt;/h4&gt;

&lt;p&gt;When creating an Application Load Balancer (ALB), you create one or more &lt;a href="https://docs.aws.amazon.com/en_pv/elasticloadbalancing/latest/application/load-balancer-listeners.html" rel="noopener noreferrer"&gt;listeners&lt;/a&gt; and configure &lt;a href="https://docs.aws.amazon.com/en_pv/elasticloadbalancing/latest/application/listener-update-rules.html" rel="noopener noreferrer"&gt;listener rules&lt;/a&gt; to direct the traffic to one target group. A &lt;a href="https://docs.aws.amazon.com/en_pv/elasticloadbalancing/latest/application/load-balancer-target-groups.html" rel="noopener noreferrer"&gt;target group&lt;/a&gt; tells a load balancer where to direct traffic to, e.g., EC2 instances, Lambda functions, etc.&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%2Ffp5h8jndifohrg8zjjfl.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%2Ffp5h8jndifohrg8zjjfl.png" width="800" height="273"&gt;&lt;/a&gt;Canary with Application Load Balancer and Weighted Target Groups&lt;/p&gt;

&lt;p&gt;To do canary chaos experiments with the ALB, you can use forward actions to route requests to one or more target groups. If you specify multiple target groups for forward action, you must specify a weight for each target group.&lt;/p&gt;

&lt;p&gt;Each target group’s weight is a value from 0 to 999. Requests that match a listener rule with weighted target groups are distributed to these target groups based on their weights. For example, if you specify two target groups, one with a weight of 10 and the other with a weight of 100, the target group with a weight of 100 receives ten times more requests than the other target group.&lt;/p&gt;

&lt;h4&gt;
  
  
  (3) Canary with API Gateway release deployments
&lt;/h4&gt;

&lt;p&gt;For your serverless applications, you have the option of using Amazon API Gateway since it supports &lt;a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/canary-release.html" rel="noopener noreferrer"&gt;canary release deployments&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%2Fdoia64knjgmzn37mz1h6.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%2Fdoia64knjgmzn37mz1h6.png" width="800" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using canaries, you can set the percentage of API requests that are handled by new API deployments to a stage. When canary settings are enabled for a stage, API Gateway will generate a new CloudWatch Logs group and CloudWatch metrics for the requests handled by the canary deployment API. You can use these metrics to monitor the performance and errors of the new API and react to them.&lt;/p&gt;

&lt;p&gt;Please note that currently, API Gateway canary deployment only works for &lt;a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-rest-api.html" rel="noopener noreferrer"&gt;REST APIs&lt;/a&gt;, not the new &lt;a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api.html" rel="noopener noreferrer"&gt;HTTP APIs&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  (4) Canary with AWS Lambda alias traffic shifting
&lt;/h4&gt;

&lt;p&gt;The second option for serverless applications is by using the AWS Lambda alias traffic shifting feature. Update the version weights on a particular alias, and the traffic will be routed to new function versions based on the specified weight. You can easily monitor the health of that new version using &lt;a href="http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html" rel="noopener noreferrer"&gt;CloudWatch metric&lt;/a&gt;s for that alias and rollback if errors are detected.&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%2F4el7nara0n71sv3wdpw3.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%2F4el7nara0n71sv3wdpw3.png" width="800" height="157"&gt;&lt;/a&gt;Canary with AWS Lambda alias traffic shifting&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations.html" rel="noopener noreferrer"&gt;AWS CodeDeploy&lt;/a&gt; can help using this feature as it can automatically update function alias weights based on a predefined set of preferences and automatically rollback if needed. Check out the &lt;a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/automating-updates-to-serverless-apps.html" rel="noopener noreferrer"&gt;AWS SAM&lt;/a&gt; or the &lt;a href="https://serverless.com/blog/manage-canary-deployments-lambda-functions-serverless-framework/" rel="noopener noreferrer"&gt;&lt;em&gt;serverless.com&lt;/em&gt; framework&lt;/a&gt; integration with CodeDeploy to automate alias traffic shifting.&lt;/p&gt;

&lt;h4&gt;
  
  
  Wrapping up
&lt;/h4&gt;

&lt;p&gt;Using the canary pattern to perform chaos engineering experiments is a great way to &lt;strong&gt;deploy and gain confidence&lt;/strong&gt; in your experiment, &lt;strong&gt;control&lt;/strong&gt; the potential &lt;strong&gt;blast radius&lt;/strong&gt; of its failure, have a &lt;strong&gt;fast rollback&lt;/strong&gt; , and better &lt;strong&gt;understand&lt;/strong&gt;  &lt;strong&gt;its&lt;/strong&gt;  &lt;strong&gt;impact&lt;/strong&gt; on the application.&lt;/p&gt;

&lt;p&gt;Of course it is not the only option, but it is the safest.&lt;/p&gt;

&lt;p&gt;More reading about chaos engineering:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/adhorn/the-chaos-engineering-collection-3kha-temp-slug-4019197"&gt;The Chaos Engineering Collection&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adrian&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>sre</category>
      <category>computerscience</category>
      <category>devops</category>
    </item>
    <item>
      <title>Chaos Engineering — What and who is a chaos engineer?</title>
      <dc:creator>Adrian Hornsby</dc:creator>
      <pubDate>Wed, 29 Apr 2020 06:01:07 +0000</pubDate>
      <link>https://dev.to/aws/chaos-engineering-q-a-part-1-4ffp</link>
      <guid>https://dev.to/aws/chaos-engineering-q-a-part-1-4ffp</guid>
      <description>&lt;h3&gt;
  
  
  Chaos Engineering Q&amp;amp;A — What and who is a chaos engineer?
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Answering questions from my webinar
&lt;/h4&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%2F75pt1irqwu9zpfvz29rl.jpeg" 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%2F75pt1irqwu9zpfvz29rl.jpeg" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I recently did a two-hour webinar dedicated to chaos engineering and got a lot of great questions from the audience. In this mini-series of posts, I will take some time to answer them.&lt;/p&gt;

&lt;p&gt;If you missed the webinar, you can access it on-demand from the link below. And if you have questions you would like me to address, feel free to ask me directly on &lt;a href="https://twitter.com/adhorn" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; :-)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://anz-resources.awscloud.com/anz-webinars-on-demand-developer/applying-chaos-engineering-principles-for-building-fault-tolerant-applications" rel="noopener noreferrer"&gt;Dev Connect - Applying chaos engineering principles for building fault-tolerant applications&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Questions
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Who’s the best set of people to start looking into chaos engineering in a team?&lt;br&gt;&lt;br&gt;
How can performance engineers drive chaos engineering ideas?&lt;br&gt;&lt;br&gt;
In general, whose responsibility is chaos engineering? Would this fall to the solutions architect/engineering team, a Business Continuity team, or a ‘virtual’ team that spans all teams involved in the application?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Great set of first questions! I grouped them since they are very similar to one another.&lt;/p&gt;

&lt;p&gt;First of all, let’s debunk a myth. The myth of the chaos engineer going around service teams and surprising them with breaking things randomly, without noticing them, and hoping developers will keep smiling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It is a myth!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Chaos engineers are more likely to be advocates, helping teams understand what chaos engineering is and how to prepare for it, explaining and even demoing how to do it, and in most cases, coordinating the execution of experiments and &lt;strong&gt;GameDays*&lt;/strong&gt;. But they work WITH the teams, not against them.&lt;/p&gt;

&lt;p&gt;I like to think of chaos engineers as program managers instead, with a strong background in software engineering, a good understanding of resiliency patterns, and, more importantly, a passion for the practice of chaos engineering — a contagious passion. Driving the adoption of chaos engineering practices happens through technical presentations and workshops, writing and sharing ideas, support meetings, brainstorming sessions, running GameDays, celebrating wins, etc. The chaos engineer is an evangelist of the discipline, not necessarily the one that pulls the trigger.&lt;/p&gt;

&lt;p&gt;Chaos engineering is a practice more than a job definition, and thus everyone in the software engineering or operation teams can use the chaos engineering methodology to improve their systems. Often the best person to do fault injections in a software system is the ones most intimate with the software system itself. Yes, I am talking about the developer!&lt;/p&gt;

&lt;p&gt;The best way to start a chaos engineering practice is thus to start a &lt;strong&gt;chaos engineering program&lt;/strong&gt; ** and elect a champion for the job. That &lt;em&gt;champion&lt;/em&gt; can be a new hire or not — the important is that the champion needs a strong background in software engineering and a passion for chaos engineering. The rest is like everything; it can be learned.&lt;/p&gt;

&lt;p&gt;If you can’t afford to hire someone dedicated to the role, you still will need a program and someone managing it. A program gives substances to an idea, something to show progress and hold onto when things get harder. The program needs some goals. Without goals, there isn’t accountability. However, setting goals requires the full awareness of the possible biases associated with setting goals and capturing metrics [1].&lt;br&gt;&lt;br&gt;
Goals like “reducing the number of sev1 tickets” are not suitable as they don’t focus on learning and can be fooled easily by merely not raising ticket severity (which will have a negative impact).&lt;/p&gt;

&lt;p&gt;Goals such as “conducting one GameDay a month, with each team” are better since they focus on the action, not the result. Remember, we are trying to setup a new practice, learn new ways of thinking about systems, and the outcome of that is hard to measure directly. Sure, you will see some short terms and long terms benefits, but they often differ between organizations.&lt;/p&gt;

&lt;p&gt;Ask yourself this simple question: “What do we want to learn?.” Then, create the program and goals around that simple idea. Have realistic goals too — chaos engineering will never remove all the risks and potential failures in your system.&lt;/p&gt;

&lt;p&gt;— Adrian&lt;/p&gt;

&lt;p&gt;[1] &lt;a href="https://hbr.org/2019/09/dont-let-metrics-undermine-your-business" rel="noopener noreferrer"&gt;https://hbr.org/2019/09/dont-let-metrics-undermine-your-business&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;* The term &lt;strong&gt;GameDay&lt;/strong&gt; was coined by Jesse Robbins when he worked at Amazon. A GameDay is an exercise during which teams practice responding to an incident in a “safe” environment by purposefully injecting failures in order to increase the availability of software systems. A GameDay is like a fire drill. His talk from 2011 is still my all-time favorite talk.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/zoz0ZjfrQ9s"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;** I will address the question “ &lt;strong&gt;how to start a chaos engineering program&lt;/strong&gt; ” in a later post since it deserves its own post.&lt;/p&gt;

&lt;p&gt;More reading about chaos engineering:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@adhorn/the-chaos-engineering-collection-5e188d6a90e2" rel="noopener noreferrer"&gt;The Chaos Engineering Collection&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>aws</category>
      <category>sre</category>
      <category>computerscience</category>
    </item>
  </channel>
</rss>
