# ElastiCache Redis/Valkey Network Analysis Tools
Scripts to audit AWS ElastiCache Redis and Valkey clusters for network exposure.
## Prerequisites
- AWS CLI configured with appropriate credentials
- `jq` installed: `brew install jq`
## Scripts
### list-elasticache-clusters.sh
Lists all Redis/Valkey clusters across specified regions.
```bash
./list-elasticache-clusters.sh
```
### check-elasticache-network.sh
Analyzes network configuration for Redis/Valkey clusters in a single AWS account.
```bash
./check-elasticache-network.sh
```
**Output columns:**
- Region, ClusterName, Version, ARN, VPC, Subnet, Has_IGW_Route
### check-elasticache-network-multi-account.sh
Same analysis across multiple AWS accounts.
```bash
./check-elasticache-network-multi-account.sh accounts.txt
```
**accounts.txt format:** One AWS account ID per line. Requires AWS profiles configured matching account IDs.
### check-elasticache-network-by-arn.sh
Analyzes specific clusters by ARN.
```bash
./check-elasticache-network-by-arn.sh arns.txt
```
**arns.txt format:** One ElastiCache ARN per line. Non-Redis/Valkey engines flagged in Notes column.
## Configuration
**Regions checked:** ap-southeast-2, eu-central-1, eu-west-1, us-east-1, us-west-1, us-west-2
Edit the `regions` variable in scripts to modify.
## Output
All scripts output pipe-delimited tables. For better formatting:
```bash
./check-elasticache-network.sh | column -t -s '|'
```
[4.0K] /data/pocs/fc76099e15d745f98f834c7d15406d7bbb576fe6
├── [ 222] accounts.txt.example
├── [5.2K] check-elasticache-network-by-arn.sh
├── [8.7K] check-elasticache-network-multi-account.sh
├── [7.4K] check-elasticache-network.sh
├── [2.2K] list-elasticache-clusters.sh
├── [2.2K] list-elasticache-clusters.txt
├── [3.5K] list-elasticache-with-vpc.sh
├── [1.4K] README.md
└── [ 256] test-arns.txt
1 directory, 9 files