Skip to content

Commit 6d95915

Browse files
committed
Standardize region handling for Trusted Advisor
1 parent 8fc06f0 commit 6d95915

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tuts/140-aws-trustedadvisor-gs/aws-trustedadvisor-gs.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/ta.log") 2>&1
3-
export AWS_DEFAULT_REGION=us-east-1; echo "Region: us-east-1 (Trusted Advisor is global)"
3+
REGION=us-east-1 # Trusted Advisor requires us-east-1
4+
export AWS_DEFAULT_REGION="$REGION"; export AWS_REGION="$REGION"; echo "Region: $REGION (Trusted Advisor is global)"
45
echo "Step 1: Listing checks"
56
aws support describe-trusted-advisor-checks --language en --query 'checks[:10].{Id:id,Name:name,Category:category}' --output table 2>/dev/null || echo " Trusted Advisor requires Business or Enterprise Support plan"
67
echo "Step 2: Getting check results"

0 commit comments

Comments
 (0)