Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions tuts/138-amazon-amp-gs/README.md
Original file line number Diff line number Diff line change
@@ -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)

8 changes: 8 additions & 0 deletions tuts/138-amazon-amp-gs/REVISION-HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Revision History: 138-amazon-amp-gs

## Shell (CLI script)

### 2026-04-14 v1 published
- Type: functional
- Initial version

27 changes: 27 additions & 0 deletions tuts/138-amazon-amp-gs/amazon-amp-gs.md
Original file line number Diff line number Diff line change
@@ -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.

17 changes: 17 additions & 0 deletions tuts/138-amazon-amp-gs/amazon-amp-gs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/amp.log") 2>&1
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"
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
41 changes: 41 additions & 0 deletions tuts/139-aws-fis-gs/README.md
Original file line number Diff line number Diff line change
@@ -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)

8 changes: 8 additions & 0 deletions tuts/139-aws-fis-gs/REVISION-HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Revision History: 139-aws-fis-gs

## Shell (CLI script)

### 2026-04-14 v1 published
- Type: functional
- Initial version

31 changes: 31 additions & 0 deletions tuts/139-aws-fis-gs/aws-fis-gs.md
Original file line number Diff line number Diff line change
@@ -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.

22 changes: 22 additions & 0 deletions tuts/139-aws-fis-gs/aws-fis-gs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/fis.log") 2>&1
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"
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
38 changes: 38 additions & 0 deletions tuts/146-aws-cleanrooms-gs/README.md
Original file line number Diff line number Diff line change
@@ -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)

8 changes: 8 additions & 0 deletions tuts/146-aws-cleanrooms-gs/REVISION-HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Revision History: 146-aws-cleanrooms-gs

## Shell (CLI script)

### 2026-04-14 v1 published
- Type: functional
- Initial version

27 changes: 27 additions & 0 deletions tuts/146-aws-cleanrooms-gs/aws-cleanrooms-gs.md
Original file line number Diff line number Diff line change
@@ -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.

19 changes: 19 additions & 0 deletions tuts/146-aws-cleanrooms-gs/aws-cleanrooms-gs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/cr.log") 2>&1
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"
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
36 changes: 36 additions & 0 deletions tuts/147-aws-entityresolution-gs/README.md
Original file line number Diff line number Diff line change
@@ -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)

8 changes: 8 additions & 0 deletions tuts/147-aws-entityresolution-gs/REVISION-HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Revision History: 147-aws-entityresolution-gs

## Shell (CLI script)

### 2026-04-14 v1 published
- Type: functional
- Initial version

23 changes: 23 additions & 0 deletions tuts/147-aws-entityresolution-gs/aws-entityresolution-gs.md
Original file line number Diff line number Diff line change
@@ -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.

14 changes: 14 additions & 0 deletions tuts/147-aws-entityresolution-gs/aws-entityresolution-gs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/er.log") 2>&1
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"
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
Loading
Loading