> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws.md). Agents can also search and read this documentation through its [MCP server](https://developer.harness.io/~gitbook/mcp).

# AWS

AWS chaos faults that stop, stress, or disrupt EC2, ECS, Lambda, RDS, EBS, load balancers, and networking, grouped by service.

AWS faults act on AWS resources through the AWS API, AWS Systems Manager, or AWS Fault Injection Service. The faults run on a Kubernetes chaos infrastructure, which can sit in the same AWS account as the targets or reach other accounts through an assumed role.

***

## Before you begin

* **Chaos infrastructure:** A Kubernetes chaos infrastructure that can reach the AWS API endpoints for the target region. Go to [Get started](https://developer.harness.io/resilience-testing/chaos-testing/get-started.md) to install one.
* **Authentication:** The fault needs AWS credentials: a Harness file secret, an IAM role for the chaos service account (IRSA), or a role to assume. Go to [AWS fault authentication](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/authentication.md) to set one up.
* **Permissions:** The credentials need the IAM actions each fault uses. Go to [AWS fault permissions](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/permissions.md) for the combined policy.
* **SSM agent for in-instance faults:** EC2 stress, network, HTTP, DNS, and process faults, and the Windows EC2 faults, run commands on the instance through AWS Systems Manager. The SSM agent must be running on the target instances, and the instances need an instance profile that allows SSM.

***

## Supported environments

AWS faults target resources in every AWS commercial region. Each fault sets its region with `REGION`. A fault page lists any environment below that it does not support.

| Environment                                                         | Faults that target it                                                         |
| ------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| Amazon EC2 Linux instances                                          | EC2 and SSM faults. In-instance faults need the SSM agent.                    |
| Amazon EC2 Windows instances                                        | Windows EC2 faults, EC2 stop faults, and SSM faults                           |
| Amazon EKS managed and self-managed worker nodes                    | EC2 faults, which treat worker nodes as EC2 instances                         |
| Amazon ECS on the EC2 launch type                                   | ECS faults                                                                    |
| Amazon ECS on the Fargate launch type                               | Fargate faults, and ECS faults that change the task definition or the service |
| AWS Lambda functions, zip and container image                       | Lambda faults                                                                 |
| Amazon RDS and Amazon Aurora                                        | RDS faults                                                                    |
| Amazon EBS volumes attached to EC2 instances                        | EBS faults and ECS container volume detach                                    |
| Application, Network, and Classic Load Balancers                    | Load balancer faults                                                          |
| Amazon DynamoDB global tables                                       | DynamoDB faults                                                               |
| Amazon VPC subnets, route tables, network ACLs, and security groups | Networking faults and ECS network restrict                                    |

***

## Faults

| Group                                                                                                              | What the faults target                                   |
| ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------- |
| [EC2](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/ec2.md)                       | EC2 instances, including Windows instances               |
| [ECS](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/ecs.md)                       | ECS tasks, services, container instances, and containers |
| [Fargate](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/fargate.md)               | ECS tasks running on Fargate                             |
| [Lambda](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/lambda.md)                 | Lambda functions and their event source mappings         |
| [RDS](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/rds.md)                       | RDS database instances                                   |
| [EBS](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/ebs.md)                       | EBS volumes attached to EC2 instances                    |
| [Load balancers](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/load-balancers.md) | Availability zones of ALB, NLB, and CLB load balancers   |
| [DynamoDB](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/dynamodb.md)             | DynamoDB global table replication                        |
| [Networking](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/networking.md)         | Subnets, route tables, network ACLs, and security groups |
| [SSM](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/ssm.md)                       | EC2 instances, through SSM documents you provide         |
| [FIS](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/fis.md)                       | AWS Fault Injection Service experiment templates         |

***

## Troubleshooting

<details>

<summary>An AWS fault fails with an AccessDenied or UnauthorizedOperation error</summary>

The IAM principal the fault authenticates as is missing an action the fault calls. The error names the action. Add it to the policy attached to that principal, or attach the combined policy. Go to [AWS fault permissions](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/permissions.md) for the actions each fault needs.

</details>

<details>

<summary>An AWS fault cannot find credentials</summary>

The fault has no file secret set in `AWS_AUTHENTICATION_SECRET`, and the chaos service account has no IRSA role annotation. Configure one of the two. Go to [AWS fault authentication](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/authentication.md) for both methods.

</details>

<details>

<summary>An AWS fault finds no target resources</summary>

The resources are in a different region or account than the fault is looking in. Check that `REGION` matches the region of the targets, and, for cross-account targets, that `ASSUME_ROLE_ARN` points to a role in the target account.

</details>

***

## Next steps

* Go to [AWS fault authentication](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/authentication.md) to give faults access to your AWS accounts.
* Go to [AWS fault permissions](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/permissions.md) to grant the IAM actions the faults use.
* Go to [EC2](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/aws/ec2.md) to start with the most common AWS faults.

{% @harness-feedback/feedback %}
