Use fault injection with your Amazon ECS and Fargate workloads - Amazon Elastic Container Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Use fault injection with your Amazon ECS and Fargate workloads

Customers can utilize fault injection with Amazon ECS on both Amazon EC2 and Fargate to test how their application responds to certain impairment scenarios. These tests provide information you can use to optimize your application's performance and resiliency.

When fault injection is enabled, the Amazon ECS container agent allows tasks access to new fault injection endpoints. Customers must opt-in in order to use fault injection by adding the optional enableFaultInjection parameter to their task definition and setting the value to true. The default value is false.

{ ... "enableFaultInjection": true }
Note

Fault injection only works with tasks using the awsvpc or host network modes.

Fault injection isn't available on Windows.

For information on how to enable fault injection in the Amazon Web Services Management Console, see Creating an Amazon ECS task definition using the console.

You'll need to enable the feature for testing in the Amazon Fault Injection Service. For more information, see Use the Amazon FIS aws:ecs:task actions.

Note

Customers who aren't using the new Amazon ECS optimized AMIs or are using custom AMIs need to have the following dependencies installed to use the fault injection feature:

  • tc

  • sch_netem kernel module