Skip to content

Commit 13559c2

Browse files
committed
Apply technical requirements (R1, R2, R9, R10, R13)
- R1: Add AWS_REGION to region fallback chain - R2: Replace openssl rand with /dev/urandom - R9: Remove Appendix/Generation details from READMEs - R10: Remove internal references - R13: Add REVISION-HISTORY.md
1 parent ab4d060 commit 13559c2

10 files changed

Lines changed: 45 additions & 17 deletions

File tree

tuts/115-aws-backup-gs/README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,3 @@ No cost until a backup actually runs. This tutorial creates a plan and vault but
3939
- [Creating a backup plan](https://docs.aws.amazon.com/aws-backup/latest/devguide/creating-a-backup-plan.html)
4040
- [AWS Backup pricing](https://aws.amazon.com/backup/pricing/)
4141
- [Supported resources](https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#supported-resources)
42-
43-
---
44-
45-
## Appendix: Generation details
46-
47-
| Field | Value |
48-
|-------|-------|
49-
| Generation date | 2026-04-14 |
50-
| Source script | New, 83 lines |
51-
| Script test result | EXIT 0, 6s, 5 steps, suppressed delete-backup-plan JSON output |
52-
| Issues encountered | None |
53-
| Iterations | v1 |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Revision History: 115-aws-backup-gs
2+
3+
## Shell (CLI script)
4+
5+
### 2026-04-14 v1 published
6+
- Type: functional
7+
- Initial version
8+

tuts/115-aws-backup-gs/aws-backup-gs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fi
1414
export AWS_DEFAULT_REGION="$REGION"
1515
echo "Region: $REGION"
1616

17-
RANDOM_ID=$(openssl rand -hex 4)
17+
RANDOM_ID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 8 | head -n 1)
1818
VAULT_NAME="tut-vault-${RANDOM_ID}"
1919
PLAN_NAME="tut-plan-${RANDOM_ID}"
2020

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Revision History: 121-aws-organizations-gs
2+
3+
## Shell (CLI script)
4+
5+
### 2026-04-14 v1 published
6+
- Type: functional
7+
- Initial version
8+

tuts/121-aws-organizations-gs/aws-organizations-gs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
WORK_DIR=$(mktemp -d)
33
exec > >(tee -a "$WORK_DIR/orgs-$(date +%Y%m%d-%H%M%S).log") 2>&1
4-
REGION=${AWS_DEFAULT_REGION:-$(aws configure get region 2>/dev/null)}
4+
REGION=${AWS_DEFAULT_REGION:-${AWS_REGION:-$(aws configure get region 2>/dev/null))}
55
[ -z "$REGION" ] && echo "ERROR: No region" && exit 1
66
export AWS_DEFAULT_REGION="$REGION"
77
echo "Region: $REGION"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Revision History: 122-aws-health-gs
2+
3+
## Shell (CLI script)
4+
5+
### 2026-04-14 v1 published
6+
- Type: functional
7+
- Initial version
8+

tuts/122-aws-health-gs/aws-health-gs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
WORK_DIR=$(mktemp -d)
33
exec > >(tee -a "$WORK_DIR/health-$(date +%Y%m%d-%H%M%S).log") 2>&1
4-
REGION=${AWS_DEFAULT_REGION:-$(aws configure get region 2>/dev/null)}
4+
REGION=${AWS_DEFAULT_REGION:-${AWS_REGION:-$(aws configure get region 2>/dev/null))}
55
[ -z "$REGION" ] && echo "ERROR: No region" && exit 1
66
export AWS_DEFAULT_REGION=us-east-1
77
echo "Region: us-east-1 (Health API is global)"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Revision History: 124-aws-ssm-gs
2+
3+
## Shell (CLI script)
4+
5+
### 2026-04-14 v1 published
6+
- Type: functional
7+
- Initial version
8+

tuts/124-aws-ssm-gs/aws-ssm-gs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22
WORK_DIR=$(mktemp -d)
33
exec > >(tee -a "$WORK_DIR/ssm-$(date +%Y%m%d-%H%M%S).log") 2>&1
4-
REGION=${AWS_DEFAULT_REGION:-$(aws configure get region 2>/dev/null)}
4+
REGION=${AWS_DEFAULT_REGION:-${AWS_REGION:-$(aws configure get region 2>/dev/null))}
55
[ -z "$REGION" ] && echo "ERROR: No region" && exit 1
66
export AWS_DEFAULT_REGION="$REGION"
77
echo "Region: $REGION"
8-
RANDOM_ID=$(openssl rand -hex 4)
8+
RANDOM_ID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 8 | head -n 1)
99
handle_error() { echo "ERROR on line $1"; trap - ERR; cleanup; exit 1; }
1010
trap 'handle_error $LINENO' ERR
1111
cleanup() { echo ""; echo "Cleaning up..."; aws ssm delete-parameter --name "/tutorial/$RANDOM_ID/db-host" 2>/dev/null; aws ssm delete-parameter --name "/tutorial/$RANDOM_ID/db-password" 2>/dev/null; aws ssm delete-parameter --name "/tutorial/$RANDOM_ID/app-config" 2>/dev/null; echo " Deleted parameters"; rm -rf "$WORK_DIR"; echo "Done."; }
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Revision History: 140-aws-trustedadvisor-gs
2+
3+
## Shell (CLI script)
4+
5+
### 2026-04-14 v1 published
6+
- Type: functional
7+
- Initial version
8+

0 commit comments

Comments
 (0)