Skip to content

Commit 9074b33

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 4cd466d commit 9074b33

11 files changed

Lines changed: 48 additions & 20 deletions

File tree

tuts/093-amazon-eventbridge-gs/README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,3 @@ Free tier eligible. Lambda and EventBridge invocations stay well within free tie
5656
- [Creating a rule that runs on a schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule-schedule.html)
5757
- [Tutorial: Use EventBridge to relay events to a Lambda function](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-log-ec2-instance-state.html)
5858
- [Schedule expressions using rate or cron](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-scheduled-rule-pattern.html)
59-
60-
---
61-
62-
## Appendix: Generation details
63-
64-
| Field | Value |
65-
|-------|-------|
66-
| Generation date | 2026-04-14 |
67-
| Script lines | 130 |
68-
| Script test result | EXIT 0, 91s, 6 steps, clean teardown |
69-
| Issues encountered | None |
70-
| Iterations | v1 direct to publish |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Revision History: 093-amazon-eventbridge-gs
2+
3+
## Shell (CLI script)
4+
5+
### 2026-04-14 v1 published
6+
- Type: functional
7+
- Initial version
8+

tuts/093-amazon-eventbridge-gs/amazon-eventbridge-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
RULE_NAME="eb-tut-rule-${RANDOM_ID}"
1919
FUNCTION_NAME="eb-tut-handler-${RANDOM_ID}"
2020
ROLE_NAME="eb-tut-role-${RANDOM_ID}"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Revision History: 110-amazon-sqs-gs
2+
3+
## Shell (CLI script)
4+
5+
### 2026-04-14 v1 published
6+
- Type: functional
7+
- Initial version
8+

tuts/110-amazon-sqs-gs/amazon-sqs-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
QUEUE_NAME="tut-queue-${RANDOM_ID}"
1919
DLQ_NAME="tut-dlq-${RANDOM_ID}"
2020
FIFO_NAME="tut-fifo-${RANDOM_ID}.fifo"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Revision History: 159-sns-message-filtering
2+
3+
## Shell (CLI script)
4+
5+
### 2026-04-14 v1 published
6+
- Type: functional
7+
- Initial version
8+

tuts/159-sns-message-filtering/sns-filtering.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/sns-filter.log") 2>&1
3-
REGION=${AWS_DEFAULT_REGION:-$(aws configure get region 2>/dev/null)}; [ -z "$REGION" ] && echo "ERROR: No region" && exit 1; export AWS_DEFAULT_REGION="$REGION"; echo "Region: $REGION"
4-
RANDOM_ID=$(openssl rand -hex 4); TOPIC="tut-filter-${RANDOM_ID}"; Q1="tut-orders-${RANDOM_ID}"; Q2="tut-alerts-${RANDOM_ID}"
3+
REGION=${AWS_DEFAULT_REGION:-${AWS_REGION:-$(aws configure get region 2>/dev/null))}; [ -z "$REGION" ] && echo "ERROR: No region" && exit 1; export AWS_DEFAULT_REGION="$REGION"; echo "Region: $REGION"
4+
RANDOM_ID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 8 | head -n 1); TOPIC="tut-filter-${RANDOM_ID}"; Q1="tut-orders-${RANDOM_ID}"; Q2="tut-alerts-${RANDOM_ID}"
55
handle_error() { echo "ERROR on line $1"; trap - ERR; cleanup; exit 1; }; trap 'handle_error $LINENO' ERR
66
cleanup() { echo ""; echo "Cleaning up..."; [ -n "$SUB1_ARN" ] && aws sns unsubscribe --subscription-arn "$SUB1_ARN" 2>/dev/null; [ -n "$SUB2_ARN" ] && aws sns unsubscribe --subscription-arn "$SUB2_ARN" 2>/dev/null; aws sns delete-topic --topic-arn "$TOPIC_ARN" 2>/dev/null && echo " Deleted topic"; [ -n "$Q1_URL" ] && aws sqs delete-queue --queue-url "$Q1_URL" 2>/dev/null; [ -n "$Q2_URL" ] && aws sqs delete-queue --queue-url "$Q2_URL" 2>/dev/null; echo " Deleted queues"; rm -rf "$WORK_DIR"; echo "Done."; }
77
echo "Step 1: Creating topic and queues"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Revision History: 165-ses-email-identity
2+
3+
## Shell (CLI script)
4+
5+
### 2026-04-14 v1 published
6+
- Type: functional
7+
- Initial version
8+

tuts/165-ses-email-identity/ses-identity.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/ses.log") 2>&1
3-
REGION=${AWS_DEFAULT_REGION:-$(aws configure get region 2>/dev/null)}; [ -z "$REGION" ] && echo "ERROR: No region" && exit 1; export AWS_DEFAULT_REGION="$REGION"; echo "Region: $REGION"
4-
RANDOM_ID=$(openssl rand -hex 4); DOMAIN="tutorial-${RANDOM_ID}.example.com"
3+
REGION=${AWS_DEFAULT_REGION:-${AWS_REGION:-$(aws configure get region 2>/dev/null))}; [ -z "$REGION" ] && echo "ERROR: No region" && exit 1; export AWS_DEFAULT_REGION="$REGION"; echo "Region: $REGION"
4+
RANDOM_ID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 8 | head -n 1); DOMAIN="tutorial-${RANDOM_ID}.example.com"
55
handle_error() { echo "ERROR on line $1"; trap - ERR; cleanup; exit 1; }; trap 'handle_error $LINENO' ERR
66
cleanup() { echo ""; echo "Cleaning up..."; aws sesv2 delete-email-identity --email-identity "$DOMAIN" 2>/dev/null && echo " Deleted identity"; rm -rf "$WORK_DIR"; echo "Done."; }
77
echo "Step 1: Creating email identity (domain): $DOMAIN"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Revision History: 182-sqs-dead-letter-queues
2+
3+
## Shell (CLI script)
4+
5+
### 2026-04-14 v1 published
6+
- Type: functional
7+
- Initial version
8+

0 commit comments

Comments
 (0)