You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export ELEPHANT_PREPARE_CONTINUE_BUTTON=""# CSS selector for continue button
84
+
76
85
# Optional (Browser flow template - both must be provided together)
77
86
export ELEPHANT_PREPARE_BROWSER_FLOW_TEMPLATE=""# Browser flow template name
78
87
export ELEPHANT_PREPARE_BROWSER_FLOW_PARAMETERS=""# Browser flow parameters as JSON string
@@ -100,12 +109,13 @@ This creates the VPC, S3 buckets, SQS queues, Lambdas, and the Express Step Func
100
109
101
110
The `DownloaderFunction` uses the `prepare` command from `@elephant-xyz/cli` to fetch and process data. You can control its behavior using environment variables that map to CLI flags:
**Note:** County names in environment variables should match exactly as they appear in `county_jurisdiction` field (case-sensitive). For example, if the JSON contains `"county_jurisdiction": "Alachua"`, use `_Alachua` suffix.
204
+
**Important naming convention for counties with spaces:**
205
+
206
+
For counties with spaces in their names, replace spaces with underscores in the environment variable name:
Using county-specific: ELEPHANT_PREPARE_BROWSER_FLOW_PARAMETERS_Alachua='continue_button_selector:.btn.btn-primary.button-1,search_form_selector:#ctlBodyPane_ctl03_ctl01_txtParcelID,search_result_selector:#ctlBodyPane_ctl10_ctl01_lstBuildings_ctl00_dynamicBuildingDataRightColumn_divSummary'
This query tool uses CloudWatch Logs Insights to efficiently analyze large volumes of log data and provides actionable metrics for monitoring post-processing performance across different counties.
448
480
481
+
## Proxy Rotation
482
+
483
+
The system supports automatic proxy rotation for the prepare function. This helps distribute load across multiple proxies and prevents rate limiting or IP blocking.
484
+
485
+
### Setup Proxies
486
+
487
+
**1. Create a proxy file:**
488
+
489
+
Create a text file with one proxy per line in format: `username:password@ip:port`
490
+
491
+
```bash
492
+
# Create proxies.txt
493
+
cat > proxies.txt <<EOF
494
+
user1:password123@192.168.1.100:8080
495
+
user2:password456@192.168.1.101:8080
496
+
user3:password789@192.168.1.102:8080
497
+
EOF
498
+
```
499
+
500
+
You can use `proxies.example.txt` as a template.
501
+
502
+
**2. Deploy with proxies:**
503
+
504
+
```bash
505
+
# Initial deployment with proxies
506
+
export PROXY_FILE=proxies.txt
507
+
./scripts/deploy-infra.sh
508
+
```
509
+
510
+
**3. Update proxies later (without full deployment):**
511
+
512
+
```bash
513
+
# Update or add proxies anytime
514
+
./scripts/update-proxies.sh proxies.txt
515
+
```
516
+
517
+
### How It Works
518
+
519
+
- Each Lambda invocation automatically selects the **least recently used** proxy
520
+
- Proxies are rotated automatically based on usage timestamps
521
+
- Failed proxies are tracked but remain available for retry
522
+
- No configuration needed - just provide the proxy file
523
+
524
+
### Verify Proxies
525
+
526
+
Check which proxies are configured:
527
+
528
+
```bash
529
+
./scripts/update-proxies.sh --list
530
+
```
531
+
532
+
### Remove All Proxies
533
+
534
+
```bash
535
+
./scripts/update-proxies.sh --clear
536
+
```
537
+
538
+
### Notes
539
+
540
+
- Empty lines and lines starting with `#` are ignored (comments)
541
+
- Proxy format must be: `username:password@ip:port`
542
+
- Port must be numeric
543
+
- If no proxies are configured, the system works normally without them
544
+
449
545
That's it — set env vars, deploy, start, monitor, and tune concurrency.
0 commit comments