> 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-engineering/use-chaos-engineering/probes/probe-templates/aws/index.md).

# AWS Command Probe Templates

Pre-built Command Probe templates for validating AWS infrastructure health and status during chaos experiments. These templates help you quickly set up probes to monitor AWS resources like EC2 instances, ECS services, Lambda functions, and more.

Here are AWS probe templates that you can use in your chaos experiments.

<table data-view="cards"><thead><tr><th></th><th></th><th><select multiple><option value="eh55iyDy" label="ec2" color="blue"></option><option value="Odzdw_we" label="instance" color="blue"></option><option value="BrP24jeL" label="status" color="blue"></option><option value="a-73vZxF" label="health-check" color="blue"></option><option value="SxFin_jv" label="ecs" color="blue"></option><option value="wGvDIXPI" label="service" color="blue"></option><option value="PgIzjo02" label="scaling" color="blue"></option><option value="ocPoW46Z" label="lambda" color="blue"></option><option value="-kC-yHVk" label="function" color="blue"></option><option value="26UfrtuG" label="serverless" color="blue"></option><option value="Fez5tJ3m" label="load-balancer" color="blue"></option><option value="w5lHn4Nk" label="alb" color="blue"></option><option value="aq2VBN3U" label="clb" color="blue"></option><option value="qdIKp7Uy" label="availability-zone" color="blue"></option><option value="cuV7NC-4" label="security-group" color="blue"></option><option value="W_ie0fmq" label="rules" color="blue"></option><option value="OK0izN82" label="network" color="blue"></option><option value="rqjhyYwH" label="access-control" color="blue"></option></select></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>AWS EC2 Instance Status Check</strong></td><td>Validates the current state of an EC2 instance. This probe checks if the specified EC2 instance(s) are in the expected state.</td><td><span data-option="eh55iyDy">ec2, </span><span data-option="Odzdw_we">instance, </span><span data-option="BrP24jeL">status, </span><span data-option="a-73vZxF">health-check</span></td><td><a href="#aws-ec2-instance-status-check">#aws-ec2-instance-status-check</a></td></tr><tr><td><strong>AWS ECS Service Status Check</strong></td><td>Validates the status of an Amazon ECS service. This probe checks if the specified ECS service has reached the desired state.</td><td><span data-option="SxFin_jv">ecs, </span><span data-option="wGvDIXPI">service, </span><span data-option="BrP24jeL">status, </span><span data-option="PgIzjo02">scaling</span></td><td><a href="#aws-ecs-service-status-check">#aws-ecs-service-status-check</a></td></tr><tr><td><strong>AWS Lambda Function Status Check</strong></td><td>This probe checks if a Lambda function exists and is in the 'Active' state.</td><td><span data-option="ocPoW46Z">lambda, </span><span data-option="-kC-yHVk">function, </span><span data-option="BrP24jeL">status, </span><span data-option="26UfrtuG">serverless</span></td><td><a href="#aws-lambda-function-status-check">#aws-lambda-function-status-check</a></td></tr><tr><td><strong>AWS Load Balancer AZ Check</strong></td><td>Validates the availability of target availability zone(s) in the given ALB or CLB.</td><td><span data-option="Fez5tJ3m">load-balancer, </span><span data-option="w5lHn4Nk">alb, </span><span data-option="aq2VBN3U">clb, </span><span data-option="qdIKp7Uy">availability-zone</span></td><td><a href="#aws-load-balancer-az-check">#aws-load-balancer-az-check</a></td></tr><tr><td><strong>AWS Security Group Rule Check</strong></td><td>Validates the presence of rules in AWS security groups.</td><td><span data-option="cuV7NC-4">security-group, </span><span data-option="W_ie0fmq">rules, </span><span data-option="OK0izN82">network, </span><span data-option="rqjhyYwH">access-control</span></td><td><a href="#aws-security-group-rule-check">#aws-security-group-rule-check</a></td></tr></tbody></table>

### AWS EC2 Instance Status Check <a href="#aws-ec2-instance-status-check" id="aws-ec2-instance-status-check"></a>

Validates the current state of an EC2 instance. This probe checks if the specified EC2 instance(s) are in the expected state. At least one of `EC2_INSTANCE_ID` or `EC2_INSTANCE_TAG` must be provided.

**Required Environment Variables:**

* `EC2_INSTANCE_ID`: Comma-separated list of EC2 instance IDs (either this or `EC2_INSTANCE_TAG` required)
* `EC2_INSTANCE_TAG`: Comma-separated list of EC2 instance tags (either this or `EC2_INSTANCE_ID` required)
* `REGION`: AWS region where the EC2 instances are located

<details>

<summary>Use cases</summary>

* Verify EC2 instances remain running during chaos experiments
* Validate instance state transitions after fault injection
* Monitor instance health in multi-AZ deployments
* Ensure auto-scaling groups maintain healthy instances

</details>

### AWS ECS Service Status Check <a href="#aws-ecs-service-status-check" id="aws-ecs-service-status-check"></a>

Validates the status of an Amazon ECS service. This probe checks if the specified ECS service has reached the desired state (e.g., running tasks count matches desired count) within the given timeout.

**Required Environment Variables:**

* `CLUSTER_NAME`: Name of the ECS cluster containing the service
* `SERVICE_NAMES`: Comma-separated list of ECS service names to check
* `REGION`: AWS region where the ECS cluster is located

<details>

<summary>Use cases</summary>

* Ensure ECS services maintain desired task count during failures
* Validate service auto-scaling behavior during load changes
* Monitor service health during container chaos experiments
* Verify service deployment and rollback operations

</details>

### AWS Lambda Function Status Check <a href="#aws-lambda-function-status-check" id="aws-lambda-function-status-check"></a>

This probe checks if a Lambda function exists and is in the 'Active' state.

**Required Environment Variables:**

* `FUNCTION_NAME`: Name of the Lambda function to check
* `REGION`: AWS region where the Lambda function is located

<details>

<summary>Use cases</summary>

* Verify Lambda functions remain active during chaos experiments
* Validate function availability after configuration changes
* Monitor serverless application health and readiness
* Ensure functions are deployable and invocable

</details>

### AWS Load Balancer AZ Check <a href="#aws-load-balancer-az-check" id="aws-load-balancer-az-check"></a>

Validates the availability of target availability zone(s) in the given ALB or CLB.

**Required Environment Variables:**

* `LOAD_BALANCER_ARN`: ARN of the ALB to check (required for ALB)
* `LOAD_BALANCER_NAME`: Name of the CLB to check (required for CLB)
* `REGION`: AWS region where the load balancer is located
* `ZONES`: Comma-separated list of Availability Zones to check

<details>

<summary>Use cases</summary>

* Verify load balancer AZ configuration during AZ failures
* Validate traffic distribution across availability zones
* Monitor load balancer health during network chaos experiments
* Ensure multi-AZ redundancy is maintained

</details>

### AWS Security Group Rule Check <a href="#aws-security-group-rule-check" id="aws-security-group-rule-check"></a>

Validates the presence of rules in AWS security groups. This probe checks if the specified security groups have any rules configured. It can be used to verify that security groups are not left open.

**Required Environment Variables:**

* `SECURITY_GROUP_IDS`: Comma-separated list of security group IDs to check
* `REGION`: AWS region where the security groups are located

<details>

<summary>Use cases</summary>

* Validate security group configurations remain intact during chaos
* Verify network access rules are properly configured
* Monitor security posture during infrastructure changes
* Ensure security groups are not accidentally left without rules

</details>
