-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdemo_validation.sh
More file actions
executable file
·46 lines (39 loc) · 1.73 KB
/
demo_validation.sh
File metadata and controls
executable file
·46 lines (39 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
echo "========================================================================"
echo "AWS Cloud Engineer Agent - Environment Validation Demo"
echo "========================================================================"
echo ""
echo "Demo 1: Testing with MISSING environment variables"
echo "--------------------------------------------------------------------"
# Clear AWS environment variables
unset AWS_REGION AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN
python3 env_validator.py
echo ""
echo "Result: Validation failed as expected (exit code: $?)"
echo ""
echo "========================================================================"
echo ""
echo "Demo 2: Testing with ALL required environment variables"
echo "--------------------------------------------------------------------"
export AWS_REGION=us-east-1
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
python3 env_validator.py
echo ""
echo "Result: Validation passed (exit code: $?)"
echo ""
echo "========================================================================"
echo ""
echo "Demo 3: Testing with required + optional environment variables"
echo "--------------------------------------------------------------------"
export AWS_REGION=us-east-1
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_SESSION_TOKEN=FwoGZXIvYXdzEBExample
python3 env_validator.py
echo ""
echo "Result: Validation passed with all variables (exit code: $?)"
echo ""
echo "========================================================================"
echo "Demo Complete!"
echo "========================================================================"