From 57e61524545bed47f2414aa2982bb514af2a6d57 Mon Sep 17 00:00:00 2001 From: Michael Wunderlich Date: Tue, 14 Apr 2026 16:35:01 +0000 Subject: [PATCH 1/3] Add integration tutorials (batch 22) --- tuts/138-amazon-amp-gs/amazon-amp-gs.sh | 17 ++++++++++++++ tuts/139-aws-fis-gs/aws-fis-gs.sh | 22 +++++++++++++++++++ .../aws-cleanrooms-gs.sh | 19 ++++++++++++++++ .../aws-entityresolution-gs.sh | 14 ++++++++++++ .../aws-mediaconvert-gs.sh | 14 ++++++++++++ 5 files changed, 86 insertions(+) create mode 100644 tuts/138-amazon-amp-gs/amazon-amp-gs.sh create mode 100644 tuts/139-aws-fis-gs/aws-fis-gs.sh create mode 100644 tuts/146-aws-cleanrooms-gs/aws-cleanrooms-gs.sh create mode 100644 tuts/147-aws-entityresolution-gs/aws-entityresolution-gs.sh create mode 100644 tuts/148-aws-mediaconvert-gs/aws-mediaconvert-gs.sh diff --git a/tuts/138-amazon-amp-gs/amazon-amp-gs.sh b/tuts/138-amazon-amp-gs/amazon-amp-gs.sh new file mode 100644 index 00000000..997f48cc --- /dev/null +++ b/tuts/138-amazon-amp-gs/amazon-amp-gs.sh @@ -0,0 +1,17 @@ +#!/bin/bash +WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/amp.log") 2>&1 +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" +RANDOM_ID=$(openssl rand -hex 4); WS_ALIAS="tut-ws-${RANDOM_ID}" +handle_error() { echo "ERROR on line $1"; trap - ERR; cleanup; exit 1; }; trap 'handle_error $LINENO' ERR +cleanup() { echo ""; echo "Cleaning up..."; [ -n "$WS_ID" ] && aws amp delete-workspace --workspace-id "$WS_ID" 2>/dev/null && echo " Deleted workspace"; rm -rf "$WORK_DIR"; echo "Done."; } +echo "Step 1: Creating workspace: $WS_ALIAS" +WS_ID=$(aws amp create-workspace --alias "$WS_ALIAS" --query 'workspaceId' --output text) +echo " Workspace ID: $WS_ID" +echo "Step 2: Waiting for workspace..." +for i in $(seq 1 15); do STATUS=$(aws amp describe-workspace --workspace-id "$WS_ID" --query 'workspace.status.statusCode' --output text); echo " $STATUS"; [ "$STATUS" = "ACTIVE" ] && break; sleep 3; done +echo "Step 3: Workspace details" +aws amp describe-workspace --workspace-id "$WS_ID" --query 'workspace.{Id:workspaceId,Alias:alias,Status:status.statusCode,Endpoint:prometheusEndpoint}' --output table +echo "Step 4: Listing workspaces" +aws amp list-workspaces --alias "$WS_ALIAS" --query 'workspaces[].{Id:workspaceId,Alias:alias,Status:status.statusCode}' --output table +echo ""; echo "Tutorial complete." +echo "Do you want to clean up? (y/n): "; read -r CHOICE; [[ "$CHOICE" =~ ^[Yy]$ ]] && cleanup diff --git a/tuts/139-aws-fis-gs/aws-fis-gs.sh b/tuts/139-aws-fis-gs/aws-fis-gs.sh new file mode 100644 index 00000000..0fcb54f6 --- /dev/null +++ b/tuts/139-aws-fis-gs/aws-fis-gs.sh @@ -0,0 +1,22 @@ +#!/bin/bash +WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/fis.log") 2>&1 +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" +RANDOM_ID=$(openssl rand -hex 4); ROLE_NAME="fis-tut-role-${RANDOM_ID}" +handle_error() { echo "ERROR on line $1"; trap - ERR; cleanup; exit 1; }; trap 'handle_error $LINENO' ERR +cleanup() { echo ""; echo "Cleaning up..."; [ -n "$TEMPLATE_ID" ] && aws fis delete-experiment-template --id "$TEMPLATE_ID" > /dev/null 2>&1 && echo " Deleted template"; aws iam delete-role-policy --role-name "$ROLE_NAME" --policy-name fis-policy 2>/dev/null; aws iam delete-role --role-name "$ROLE_NAME" 2>/dev/null && echo " Deleted role"; rm -rf "$WORK_DIR"; echo "Done."; } +echo "Step 1: Creating IAM role" +ROLE_ARN=$(aws iam create-role --role-name "$ROLE_NAME" --assume-role-policy-document '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":"fis.amazonaws.com"},"Action":"sts:AssumeRole"}]}' --query 'Role.Arn' --output text) +aws iam put-role-policy --role-name "$ROLE_NAME" --policy-name fis-policy --policy-document '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":["ec2:DescribeInstances","ec2:StopInstances","ec2:StartInstances"],"Resource":"*"}]}' +echo " Role: $ROLE_ARN"; sleep 10 +echo "Step 2: Listing available actions" +aws fis list-actions --query 'actions[:5].{Id:id,Description:description}' --output table +echo "Step 3: Creating experiment template" +TEMPLATE_ID=$(aws fis create-experiment-template --description "Tutorial: stop EC2 instance" --role-arn "$ROLE_ARN" --stop-conditions '[{"source":"none"}]' --actions '{"stopInstances":{"actionId":"aws:ec2:stop-instances","parameters":{"startInstancesAfterDuration":"PT1M"},"targets":{"Instances":"tutorialInstances"}}}' --targets '{"tutorialInstances":{"resourceType":"aws:ec2:instance","selectionMode":"COUNT(1)","resourceTags":{"tutorial":"fis-test"}}}' --query 'experimentTemplate.id' --output text) +echo " Template ID: $TEMPLATE_ID" +echo "Step 4: Describing template" +aws fis get-experiment-template --id "$TEMPLATE_ID" --query 'experimentTemplate.{Id:id,Description:description,Actions:actions|length(@),Targets:targets|length(@)}' --output table +echo "Step 5: Listing templates" +aws fis list-experiment-templates --query 'experimentTemplates[?starts_with(id, `EXT`)].{Id:id,Description:description}' --output table +echo " (Not starting experiment — would require tagged EC2 instances)" +echo ""; echo "Tutorial complete." +echo "Do you want to clean up? (y/n): "; read -r CHOICE; [[ "$CHOICE" =~ ^[Yy]$ ]] && cleanup diff --git a/tuts/146-aws-cleanrooms-gs/aws-cleanrooms-gs.sh b/tuts/146-aws-cleanrooms-gs/aws-cleanrooms-gs.sh new file mode 100644 index 00000000..7eb5163e --- /dev/null +++ b/tuts/146-aws-cleanrooms-gs/aws-cleanrooms-gs.sh @@ -0,0 +1,19 @@ +#!/bin/bash +WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/cr.log") 2>&1 +REGION=${AWS_DEFAULT_REGION:-$(aws configure get region 2>/dev/null)}; [ -z "$REGION" ] && echo "ERROR: No region" && exit 1; export AWS_DEFAULT_REGION="$REGION"; ACCOUNT=$(aws sts get-caller-identity --query 'Account' --output text); echo "Region: $REGION" +RANDOM_ID=$(openssl rand -hex 4); COLLAB_NAME="tut-collab-${RANDOM_ID}" +handle_error() { echo "ERROR on line $1"; trap - ERR; cleanup; exit 1; }; trap 'handle_error $LINENO' ERR +cleanup() { echo ""; echo "Cleaning up..."; [ -n "$MEMBERSHIP_ID" ] && aws cleanrooms delete-membership --membership-identifier "$MEMBERSHIP_ID" 2>/dev/null && echo " Deleted membership"; [ -n "$COLLAB_ID" ] && aws cleanrooms delete-collaboration --collaboration-identifier "$COLLAB_ID" 2>/dev/null && echo " Deleted collaboration"; rm -rf "$WORK_DIR"; echo "Done."; } +echo "Step 1: Creating collaboration: $COLLAB_NAME" +RESULT=$(aws cleanrooms create-collaboration --name "$COLLAB_NAME" --description "Tutorial collaboration" --creator-member-abilities '["CAN_QUERY","CAN_RECEIVE_RESULTS"]' --creator-display-name "TutorialCreator" --query-log-status DISABLED --members '[]') +COLLAB_ID=$(echo "$RESULT" | python3 -c "import sys,json;print(json.load(sys.stdin)['collaboration']['id'])") +echo " Collaboration ID: $COLLAB_ID" +echo "Step 2: Creating membership" +MEMBERSHIP_ID=$(aws cleanrooms create-membership --collaboration-identifier "$COLLAB_ID" --query-log-status DISABLED --query 'membership.id' --output text) +echo " Membership ID: $MEMBERSHIP_ID" +echo "Step 3: Describing collaboration" +aws cleanrooms get-collaboration --collaboration-identifier "$COLLAB_ID" --query 'collaboration.{Name:name,Id:id,Status:memberStatus}' --output table +echo "Step 4: Listing collaborations" +aws cleanrooms list-collaborations --query 'collaborationList[?starts_with(name, `tut-`)].{Name:name,Id:id}' --output table +echo ""; echo "Tutorial complete." +echo "Do you want to clean up? (y/n): "; read -r CHOICE; [[ "$CHOICE" =~ ^[Yy]$ ]] && cleanup diff --git a/tuts/147-aws-entityresolution-gs/aws-entityresolution-gs.sh b/tuts/147-aws-entityresolution-gs/aws-entityresolution-gs.sh new file mode 100644 index 00000000..b68ef77d --- /dev/null +++ b/tuts/147-aws-entityresolution-gs/aws-entityresolution-gs.sh @@ -0,0 +1,14 @@ +#!/bin/bash +WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/er.log") 2>&1 +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" +RANDOM_ID=$(openssl rand -hex 4); SCHEMA_NAME="tut-schema-${RANDOM_ID}" +handle_error() { echo "ERROR on line $1"; trap - ERR; cleanup; exit 1; }; trap 'handle_error $LINENO' ERR +cleanup() { echo ""; echo "Cleaning up..."; aws entityresolution delete-schema-mapping --schema-name "$SCHEMA_NAME" 2>/dev/null && echo " Deleted schema"; rm -rf "$WORK_DIR"; echo "Done."; } +echo "Step 1: Creating schema mapping: $SCHEMA_NAME" +aws entityresolution create-schema-mapping --schema-name "$SCHEMA_NAME" --mapped-input-fields '[{"fieldName":"id","type":"UNIQUE_ID"},{"fieldName":"name","type":"NAME"},{"fieldName":"email","type":"EMAIL_ADDRESS"}]' --query 'schemaArn' --output text +echo "Step 2: Describing schema" +aws entityresolution get-schema-mapping --schema-name "$SCHEMA_NAME" --query '{Name:schemaName,Fields:mappedInputFields|length(@)}' --output table +echo "Step 3: Listing schemas" +aws entityresolution list-schema-mappings --query 'schemaList[?starts_with(schemaName, `tut-`)].{Name:schemaName}' --output table +echo ""; echo "Tutorial complete." +echo "Do you want to clean up? (y/n): "; read -r CHOICE; [[ "$CHOICE" =~ ^[Yy]$ ]] && cleanup diff --git a/tuts/148-aws-mediaconvert-gs/aws-mediaconvert-gs.sh b/tuts/148-aws-mediaconvert-gs/aws-mediaconvert-gs.sh new file mode 100644 index 00000000..639cb94c --- /dev/null +++ b/tuts/148-aws-mediaconvert-gs/aws-mediaconvert-gs.sh @@ -0,0 +1,14 @@ +#!/bin/bash +WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/mc.log") 2>&1 +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" +echo "Step 1: Getting MediaConvert endpoint" +ENDPOINT=$(aws mediaconvert describe-endpoints --query 'Endpoints[0].Url' --output text) +echo " Endpoint: $ENDPOINT" +echo "Step 2: Listing job templates" +aws mediaconvert list-job-templates --endpoint-url "$ENDPOINT" --query 'JobTemplates[:5].{Name:Name,Type:Type}' --output table 2>/dev/null || echo " No custom templates" +echo "Step 3: Listing presets" +aws mediaconvert list-presets --endpoint-url "$ENDPOINT" --list-by SYSTEM --query 'Presets[:5].{Name:Name,Category:Category}' --output table 2>/dev/null || echo " No presets" +echo "Step 4: Listing queues" +aws mediaconvert list-queues --endpoint-url "$ENDPOINT" --query 'Queues[].{Name:Name,Status:Status,Type:Type}' --output table +echo ""; echo "Tutorial complete. No resources created — MediaConvert is job-based." +rm -rf "$WORK_DIR" From adb4015d195d6943ba3ff5693ca246c890a90cae Mon Sep 17 00:00:00 2001 From: Michael Wunderlich Date: Tue, 21 Apr 2026 05:17:16 +0000 Subject: [PATCH 2/3] 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 --- tuts/138-amazon-amp-gs/REVISION-HISTORY.md | 8 ++++++++ tuts/138-amazon-amp-gs/amazon-amp-gs.sh | 4 ++-- tuts/139-aws-fis-gs/REVISION-HISTORY.md | 8 ++++++++ tuts/139-aws-fis-gs/aws-fis-gs.sh | 4 ++-- tuts/146-aws-cleanrooms-gs/REVISION-HISTORY.md | 8 ++++++++ tuts/146-aws-cleanrooms-gs/aws-cleanrooms-gs.sh | 4 ++-- tuts/147-aws-entityresolution-gs/REVISION-HISTORY.md | 8 ++++++++ .../aws-entityresolution-gs.sh | 4 ++-- tuts/148-aws-mediaconvert-gs/REVISION-HISTORY.md | 8 ++++++++ tuts/148-aws-mediaconvert-gs/aws-mediaconvert-gs.sh | 2 +- 10 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 tuts/138-amazon-amp-gs/REVISION-HISTORY.md create mode 100644 tuts/139-aws-fis-gs/REVISION-HISTORY.md create mode 100644 tuts/146-aws-cleanrooms-gs/REVISION-HISTORY.md create mode 100644 tuts/147-aws-entityresolution-gs/REVISION-HISTORY.md create mode 100644 tuts/148-aws-mediaconvert-gs/REVISION-HISTORY.md diff --git a/tuts/138-amazon-amp-gs/REVISION-HISTORY.md b/tuts/138-amazon-amp-gs/REVISION-HISTORY.md new file mode 100644 index 00000000..b4788a69 --- /dev/null +++ b/tuts/138-amazon-amp-gs/REVISION-HISTORY.md @@ -0,0 +1,8 @@ +# Revision History: 138-amazon-amp-gs + +## Shell (CLI script) + +### 2026-04-14 v1 published +- Type: functional +- Initial version + diff --git a/tuts/138-amazon-amp-gs/amazon-amp-gs.sh b/tuts/138-amazon-amp-gs/amazon-amp-gs.sh index 997f48cc..f87e9f1c 100644 --- a/tuts/138-amazon-amp-gs/amazon-amp-gs.sh +++ b/tuts/138-amazon-amp-gs/amazon-amp-gs.sh @@ -1,7 +1,7 @@ #!/bin/bash WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/amp.log") 2>&1 -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" -RANDOM_ID=$(openssl rand -hex 4); WS_ALIAS="tut-ws-${RANDOM_ID}" +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" +RANDOM_ID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 8 | head -n 1); WS_ALIAS="tut-ws-${RANDOM_ID}" handle_error() { echo "ERROR on line $1"; trap - ERR; cleanup; exit 1; }; trap 'handle_error $LINENO' ERR cleanup() { echo ""; echo "Cleaning up..."; [ -n "$WS_ID" ] && aws amp delete-workspace --workspace-id "$WS_ID" 2>/dev/null && echo " Deleted workspace"; rm -rf "$WORK_DIR"; echo "Done."; } echo "Step 1: Creating workspace: $WS_ALIAS" diff --git a/tuts/139-aws-fis-gs/REVISION-HISTORY.md b/tuts/139-aws-fis-gs/REVISION-HISTORY.md new file mode 100644 index 00000000..933008a9 --- /dev/null +++ b/tuts/139-aws-fis-gs/REVISION-HISTORY.md @@ -0,0 +1,8 @@ +# Revision History: 139-aws-fis-gs + +## Shell (CLI script) + +### 2026-04-14 v1 published +- Type: functional +- Initial version + diff --git a/tuts/139-aws-fis-gs/aws-fis-gs.sh b/tuts/139-aws-fis-gs/aws-fis-gs.sh index 0fcb54f6..618c8c11 100644 --- a/tuts/139-aws-fis-gs/aws-fis-gs.sh +++ b/tuts/139-aws-fis-gs/aws-fis-gs.sh @@ -1,7 +1,7 @@ #!/bin/bash WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/fis.log") 2>&1 -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" -RANDOM_ID=$(openssl rand -hex 4); ROLE_NAME="fis-tut-role-${RANDOM_ID}" +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" +RANDOM_ID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 8 | head -n 1); ROLE_NAME="fis-tut-role-${RANDOM_ID}" handle_error() { echo "ERROR on line $1"; trap - ERR; cleanup; exit 1; }; trap 'handle_error $LINENO' ERR cleanup() { echo ""; echo "Cleaning up..."; [ -n "$TEMPLATE_ID" ] && aws fis delete-experiment-template --id "$TEMPLATE_ID" > /dev/null 2>&1 && echo " Deleted template"; aws iam delete-role-policy --role-name "$ROLE_NAME" --policy-name fis-policy 2>/dev/null; aws iam delete-role --role-name "$ROLE_NAME" 2>/dev/null && echo " Deleted role"; rm -rf "$WORK_DIR"; echo "Done."; } echo "Step 1: Creating IAM role" diff --git a/tuts/146-aws-cleanrooms-gs/REVISION-HISTORY.md b/tuts/146-aws-cleanrooms-gs/REVISION-HISTORY.md new file mode 100644 index 00000000..453033ee --- /dev/null +++ b/tuts/146-aws-cleanrooms-gs/REVISION-HISTORY.md @@ -0,0 +1,8 @@ +# Revision History: 146-aws-cleanrooms-gs + +## Shell (CLI script) + +### 2026-04-14 v1 published +- Type: functional +- Initial version + diff --git a/tuts/146-aws-cleanrooms-gs/aws-cleanrooms-gs.sh b/tuts/146-aws-cleanrooms-gs/aws-cleanrooms-gs.sh index 7eb5163e..ad325bb4 100644 --- a/tuts/146-aws-cleanrooms-gs/aws-cleanrooms-gs.sh +++ b/tuts/146-aws-cleanrooms-gs/aws-cleanrooms-gs.sh @@ -1,7 +1,7 @@ #!/bin/bash WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/cr.log") 2>&1 -REGION=${AWS_DEFAULT_REGION:-$(aws configure get region 2>/dev/null)}; [ -z "$REGION" ] && echo "ERROR: No region" && exit 1; export AWS_DEFAULT_REGION="$REGION"; ACCOUNT=$(aws sts get-caller-identity --query 'Account' --output text); echo "Region: $REGION" -RANDOM_ID=$(openssl rand -hex 4); COLLAB_NAME="tut-collab-${RANDOM_ID}" +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"; ACCOUNT=$(aws sts get-caller-identity --query 'Account' --output text); echo "Region: $REGION" +RANDOM_ID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 8 | head -n 1); COLLAB_NAME="tut-collab-${RANDOM_ID}" handle_error() { echo "ERROR on line $1"; trap - ERR; cleanup; exit 1; }; trap 'handle_error $LINENO' ERR cleanup() { echo ""; echo "Cleaning up..."; [ -n "$MEMBERSHIP_ID" ] && aws cleanrooms delete-membership --membership-identifier "$MEMBERSHIP_ID" 2>/dev/null && echo " Deleted membership"; [ -n "$COLLAB_ID" ] && aws cleanrooms delete-collaboration --collaboration-identifier "$COLLAB_ID" 2>/dev/null && echo " Deleted collaboration"; rm -rf "$WORK_DIR"; echo "Done."; } echo "Step 1: Creating collaboration: $COLLAB_NAME" diff --git a/tuts/147-aws-entityresolution-gs/REVISION-HISTORY.md b/tuts/147-aws-entityresolution-gs/REVISION-HISTORY.md new file mode 100644 index 00000000..204879a3 --- /dev/null +++ b/tuts/147-aws-entityresolution-gs/REVISION-HISTORY.md @@ -0,0 +1,8 @@ +# Revision History: 147-aws-entityresolution-gs + +## Shell (CLI script) + +### 2026-04-14 v1 published +- Type: functional +- Initial version + diff --git a/tuts/147-aws-entityresolution-gs/aws-entityresolution-gs.sh b/tuts/147-aws-entityresolution-gs/aws-entityresolution-gs.sh index b68ef77d..00c6998e 100644 --- a/tuts/147-aws-entityresolution-gs/aws-entityresolution-gs.sh +++ b/tuts/147-aws-entityresolution-gs/aws-entityresolution-gs.sh @@ -1,7 +1,7 @@ #!/bin/bash WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/er.log") 2>&1 -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" -RANDOM_ID=$(openssl rand -hex 4); SCHEMA_NAME="tut-schema-${RANDOM_ID}" +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" +RANDOM_ID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 8 | head -n 1); SCHEMA_NAME="tut-schema-${RANDOM_ID}" handle_error() { echo "ERROR on line $1"; trap - ERR; cleanup; exit 1; }; trap 'handle_error $LINENO' ERR cleanup() { echo ""; echo "Cleaning up..."; aws entityresolution delete-schema-mapping --schema-name "$SCHEMA_NAME" 2>/dev/null && echo " Deleted schema"; rm -rf "$WORK_DIR"; echo "Done."; } echo "Step 1: Creating schema mapping: $SCHEMA_NAME" diff --git a/tuts/148-aws-mediaconvert-gs/REVISION-HISTORY.md b/tuts/148-aws-mediaconvert-gs/REVISION-HISTORY.md new file mode 100644 index 00000000..4ed10bfc --- /dev/null +++ b/tuts/148-aws-mediaconvert-gs/REVISION-HISTORY.md @@ -0,0 +1,8 @@ +# Revision History: 148-aws-mediaconvert-gs + +## Shell (CLI script) + +### 2026-04-14 v1 published +- Type: functional +- Initial version + diff --git a/tuts/148-aws-mediaconvert-gs/aws-mediaconvert-gs.sh b/tuts/148-aws-mediaconvert-gs/aws-mediaconvert-gs.sh index 639cb94c..b611f7bf 100644 --- a/tuts/148-aws-mediaconvert-gs/aws-mediaconvert-gs.sh +++ b/tuts/148-aws-mediaconvert-gs/aws-mediaconvert-gs.sh @@ -1,6 +1,6 @@ #!/bin/bash WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/mc.log") 2>&1 -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" +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" echo "Step 1: Getting MediaConvert endpoint" ENDPOINT=$(aws mediaconvert describe-endpoints --query 'Endpoints[0].Url' --output text) echo " Endpoint: $ENDPOINT" From 8d35f2a658222a51d0ea1e55301c9faf51a58d42 Mon Sep 17 00:00:00 2001 From: Michael Wunderlich Date: Tue, 21 Apr 2026 05:38:00 +0000 Subject: [PATCH 3/3] Add README.md and tutorial walkthrough for script-only tutorials --- tuts/138-amazon-amp-gs/README.md | 37 +++++++++++++++++ tuts/138-amazon-amp-gs/amazon-amp-gs.md | 27 ++++++++++++ tuts/139-aws-fis-gs/README.md | 41 +++++++++++++++++++ tuts/139-aws-fis-gs/aws-fis-gs.md | 31 ++++++++++++++ tuts/146-aws-cleanrooms-gs/README.md | 38 +++++++++++++++++ .../aws-cleanrooms-gs.md | 27 ++++++++++++ tuts/147-aws-entityresolution-gs/README.md | 36 ++++++++++++++++ .../aws-entityresolution-gs.md | 23 +++++++++++ tuts/148-aws-mediaconvert-gs/README.md | 29 +++++++++++++ .../aws-mediaconvert-gs.md | 23 +++++++++++ 10 files changed, 312 insertions(+) create mode 100644 tuts/138-amazon-amp-gs/README.md create mode 100644 tuts/138-amazon-amp-gs/amazon-amp-gs.md create mode 100644 tuts/139-aws-fis-gs/README.md create mode 100644 tuts/139-aws-fis-gs/aws-fis-gs.md create mode 100644 tuts/146-aws-cleanrooms-gs/README.md create mode 100644 tuts/146-aws-cleanrooms-gs/aws-cleanrooms-gs.md create mode 100644 tuts/147-aws-entityresolution-gs/README.md create mode 100644 tuts/147-aws-entityresolution-gs/aws-entityresolution-gs.md create mode 100644 tuts/148-aws-mediaconvert-gs/README.md create mode 100644 tuts/148-aws-mediaconvert-gs/aws-mediaconvert-gs.md diff --git a/tuts/138-amazon-amp-gs/README.md b/tuts/138-amazon-amp-gs/README.md new file mode 100644 index 00000000..ae922938 --- /dev/null +++ b/tuts/138-amazon-amp-gs/README.md @@ -0,0 +1,37 @@ +# Amazon Amp Gs + +An AWS CLI tutorial that demonstrates Amp operations. + +## Running + +```bash +bash amazon-amp-gs.sh +``` + +To auto-run with cleanup: + +```bash +echo 'y' | bash amazon-amp-gs.sh +``` + +## What it does + +1. Creating workspace: $WS_ALIAS +2. Waiting for workspace... +3. Workspace details +4. Listing workspaces + +## Resources created + +- Workspace + +The script prompts you to clean up resources when it finishes. + +## Cost + +Free tier eligible for most operations. Clean up resources after use to avoid charges. + +## Related docs + +- [AWS CLI amp reference](https://docs.aws.amazon.com/cli/latest/reference/amp/index.html) + diff --git a/tuts/138-amazon-amp-gs/amazon-amp-gs.md b/tuts/138-amazon-amp-gs/amazon-amp-gs.md new file mode 100644 index 00000000..5d1ff2a5 --- /dev/null +++ b/tuts/138-amazon-amp-gs/amazon-amp-gs.md @@ -0,0 +1,27 @@ +# Amazon Amp Gs + +## Prerequisites + +1. AWS CLI installed and configured (`aws configure`) +2. Appropriate IAM permissions for the AWS services used + +## Step 1: Creating workspace: $WS_ALIAS + +The script handles this step automatically. See `amazon-amp-gs.sh` for the exact CLI commands. + +## Step 2: Waiting for workspace... + +The script handles this step automatically. See `amazon-amp-gs.sh` for the exact CLI commands. + +## Step 3: Workspace details + +The script handles this step automatically. See `amazon-amp-gs.sh` for the exact CLI commands. + +## Step 4: Listing workspaces + +The script handles this step automatically. See `amazon-amp-gs.sh` for the exact CLI commands. + +## Cleanup + +The script prompts you to clean up all created resources. If you need to clean up manually, check the script log for the resource names that were created. + diff --git a/tuts/139-aws-fis-gs/README.md b/tuts/139-aws-fis-gs/README.md new file mode 100644 index 00000000..bf437d84 --- /dev/null +++ b/tuts/139-aws-fis-gs/README.md @@ -0,0 +1,41 @@ +# Aws Fis Gs + +An AWS CLI tutorial that demonstrates Fis operations. + +## Running + +```bash +bash aws-fis-gs.sh +``` + +To auto-run with cleanup: + +```bash +echo 'y' | bash aws-fis-gs.sh +``` + +## What it does + +1. Creating IAM role +2. Listing available actions +3. Creating experiment template +4. Describing template +5. Listing templates + +## Resources created + +- Experiment Template +- Role +- Role Policy + +The script prompts you to clean up resources when it finishes. + +## Cost + +Free tier eligible for most operations. Clean up resources after use to avoid charges. + +## Related docs + +- [AWS CLI fis reference](https://docs.aws.amazon.com/cli/latest/reference/fis/index.html) +- [AWS CLI iam reference](https://docs.aws.amazon.com/cli/latest/reference/iam/index.html) + diff --git a/tuts/139-aws-fis-gs/aws-fis-gs.md b/tuts/139-aws-fis-gs/aws-fis-gs.md new file mode 100644 index 00000000..40a6dfb0 --- /dev/null +++ b/tuts/139-aws-fis-gs/aws-fis-gs.md @@ -0,0 +1,31 @@ +# Aws Fis Gs + +## Prerequisites + +1. AWS CLI installed and configured (`aws configure`) +2. Appropriate IAM permissions for the AWS services used + +## Step 1: Creating IAM role + +The script handles this step automatically. See `aws-fis-gs.sh` for the exact CLI commands. + +## Step 2: Listing available actions + +The script handles this step automatically. See `aws-fis-gs.sh` for the exact CLI commands. + +## Step 3: Creating experiment template + +The script handles this step automatically. See `aws-fis-gs.sh` for the exact CLI commands. + +## Step 4: Describing template + +The script handles this step automatically. See `aws-fis-gs.sh` for the exact CLI commands. + +## Step 5: Listing templates + +The script handles this step automatically. See `aws-fis-gs.sh` for the exact CLI commands. + +## Cleanup + +The script prompts you to clean up all created resources. If you need to clean up manually, check the script log for the resource names that were created. + diff --git a/tuts/146-aws-cleanrooms-gs/README.md b/tuts/146-aws-cleanrooms-gs/README.md new file mode 100644 index 00000000..ae51b284 --- /dev/null +++ b/tuts/146-aws-cleanrooms-gs/README.md @@ -0,0 +1,38 @@ +# Aws Cleanrooms Gs + +An AWS CLI tutorial that demonstrates Cleanrooms operations. + +## Running + +```bash +bash aws-cleanrooms-gs.sh +``` + +To auto-run with cleanup: + +```bash +echo 'y' | bash aws-cleanrooms-gs.sh +``` + +## What it does + +1. Creating collaboration: $COLLAB_NAME +2. Creating membership +3. Describing collaboration +4. Listing collaborations + +## Resources created + +- Collaboration +- Membership + +The script prompts you to clean up resources when it finishes. + +## Cost + +Free tier eligible for most operations. Clean up resources after use to avoid charges. + +## Related docs + +- [AWS CLI cleanrooms reference](https://docs.aws.amazon.com/cli/latest/reference/cleanrooms/index.html) + diff --git a/tuts/146-aws-cleanrooms-gs/aws-cleanrooms-gs.md b/tuts/146-aws-cleanrooms-gs/aws-cleanrooms-gs.md new file mode 100644 index 00000000..b82c64fe --- /dev/null +++ b/tuts/146-aws-cleanrooms-gs/aws-cleanrooms-gs.md @@ -0,0 +1,27 @@ +# Aws Cleanrooms Gs + +## Prerequisites + +1. AWS CLI installed and configured (`aws configure`) +2. Appropriate IAM permissions for the AWS services used + +## Step 1: Creating collaboration: $COLLAB_NAME + +The script handles this step automatically. See `aws-cleanrooms-gs.sh` for the exact CLI commands. + +## Step 2: Creating membership + +The script handles this step automatically. See `aws-cleanrooms-gs.sh` for the exact CLI commands. + +## Step 3: Describing collaboration + +The script handles this step automatically. See `aws-cleanrooms-gs.sh` for the exact CLI commands. + +## Step 4: Listing collaborations + +The script handles this step automatically. See `aws-cleanrooms-gs.sh` for the exact CLI commands. + +## Cleanup + +The script prompts you to clean up all created resources. If you need to clean up manually, check the script log for the resource names that were created. + diff --git a/tuts/147-aws-entityresolution-gs/README.md b/tuts/147-aws-entityresolution-gs/README.md new file mode 100644 index 00000000..407b5d12 --- /dev/null +++ b/tuts/147-aws-entityresolution-gs/README.md @@ -0,0 +1,36 @@ +# Aws Entityresolution Gs + +An AWS CLI tutorial that demonstrates Entityresolution operations. + +## Running + +```bash +bash aws-entityresolution-gs.sh +``` + +To auto-run with cleanup: + +```bash +echo 'y' | bash aws-entityresolution-gs.sh +``` + +## What it does + +1. Creating schema mapping: $SCHEMA_NAME +2. Describing schema +3. Listing schemas + +## Resources created + +- Schema Mapping + +The script prompts you to clean up resources when it finishes. + +## Cost + +Free tier eligible for most operations. Clean up resources after use to avoid charges. + +## Related docs + +- [AWS CLI entityresolution reference](https://docs.aws.amazon.com/cli/latest/reference/entityresolution/index.html) + diff --git a/tuts/147-aws-entityresolution-gs/aws-entityresolution-gs.md b/tuts/147-aws-entityresolution-gs/aws-entityresolution-gs.md new file mode 100644 index 00000000..39a4f024 --- /dev/null +++ b/tuts/147-aws-entityresolution-gs/aws-entityresolution-gs.md @@ -0,0 +1,23 @@ +# Aws Entityresolution Gs + +## Prerequisites + +1. AWS CLI installed and configured (`aws configure`) +2. Appropriate IAM permissions for the AWS services used + +## Step 1: Creating schema mapping: $SCHEMA_NAME + +The script handles this step automatically. See `aws-entityresolution-gs.sh` for the exact CLI commands. + +## Step 2: Describing schema + +The script handles this step automatically. See `aws-entityresolution-gs.sh` for the exact CLI commands. + +## Step 3: Listing schemas + +The script handles this step automatically. See `aws-entityresolution-gs.sh` for the exact CLI commands. + +## Cleanup + +The script prompts you to clean up all created resources. If you need to clean up manually, check the script log for the resource names that were created. + diff --git a/tuts/148-aws-mediaconvert-gs/README.md b/tuts/148-aws-mediaconvert-gs/README.md new file mode 100644 index 00000000..5191519e --- /dev/null +++ b/tuts/148-aws-mediaconvert-gs/README.md @@ -0,0 +1,29 @@ +# Aws Mediaconvert Gs + +A read-only script that queries Mediaconvert resources and displays information. + +## Running + +```bash +bash aws-mediaconvert-gs.sh +``` + +## What it does + +1. Getting MediaConvert endpoint +2. Listing job templates +3. Listing presets +4. Listing queues + +## Resources created + +None — this script is read-only. + +## Cost + +No cost. This script only reads existing resources. + +## Related docs + +- [AWS CLI mediaconvert reference](https://docs.aws.amazon.com/cli/latest/reference/mediaconvert/index.html) + diff --git a/tuts/148-aws-mediaconvert-gs/aws-mediaconvert-gs.md b/tuts/148-aws-mediaconvert-gs/aws-mediaconvert-gs.md new file mode 100644 index 00000000..75940b05 --- /dev/null +++ b/tuts/148-aws-mediaconvert-gs/aws-mediaconvert-gs.md @@ -0,0 +1,23 @@ +# Aws Mediaconvert Gs + +## Prerequisites + +1. AWS CLI installed and configured (`aws configure`) +2. Appropriate IAM permissions for the AWS services used + +## Step 1: Getting MediaConvert endpoint + +The script handles this step automatically. See `aws-mediaconvert-gs.sh` for the exact CLI commands. + +## Step 2: Listing job templates + +The script handles this step automatically. See `aws-mediaconvert-gs.sh` for the exact CLI commands. + +## Step 3: Listing presets + +The script handles this step automatically. See `aws-mediaconvert-gs.sh` for the exact CLI commands. + +## Step 4: Listing queues + +The script handles this step automatically. See `aws-mediaconvert-gs.sh` for the exact CLI commands. +