Home / Companies / LocalStack / Blog / Post Details
Content Deep Dive

Testing AWS Fault Injection Service (FIS) templates using LocalStack

Blog post from LocalStack

Post Details
Company
Date Published
Author
Harsh Mishra
Word Count
2,301
Language
English
Hacker News Points
-
Summary

AWS Fault Injection Service (FIS) enables users to conduct controlled chaos experiments on AWS infrastructures to test system resilience by introducing faults, such as stopping instances or network disruptions. However, direct testing on AWS can be costly and risky, leading to the use of LocalStack for local emulation of these experiments. LocalStack allows for quick and safe iteration without incurring cloud costs, using Terraform to provision test environments. The guide explains setting up a local environment, running fault injection experiments, and validating outcomes through LocalStack, which supports various FIS actions like stopping EC2 instances and sending commands via Systems Manager. The process involves creating a Terraform configuration to launch EC2 instances, deploying the setup with tflocal, defining an FIS experiment template, and executing the experiment to observe system behavior during faults. This method provides a replicable way to ensure application fault tolerance in a controlled setting while highlighting some limitations, such as the inability to support advanced selection modes and the ignoring of the roleArn field in LocalStack. Additionally, LocalStack's Chaos API offers further customization of fault injection, allowing for the simulation of API failures and network effects across AWS services.