From 1a1c4629e61de38d602e0fcfed5e000e5cb6e0a5 Mon Sep 17 00:00:00 2001 From: Michael Wunderlich Date: Tue, 14 Apr 2026 16:35:00 +0000 Subject: [PATCH 1/3] Add compute tutorials (batch 6) --- tuts/197-ec2-describe-instances/ec2-describe-instances.sh | 6 ++++++ tuts/200-ec2-vpc-subnets/ec2-vpc-subnets.sh | 8 ++++++++ tuts/201-lambda-logging/lambda-logging.sh | 8 ++++++++ tuts/204-ec2-network-interfaces/ec2-network-interfaces.sh | 6 ++++++ tuts/207-ec2-volumes/ec2-volumes.sh | 6 ++++++ 5 files changed, 34 insertions(+) create mode 100644 tuts/197-ec2-describe-instances/ec2-describe-instances.sh create mode 100644 tuts/200-ec2-vpc-subnets/ec2-vpc-subnets.sh create mode 100644 tuts/201-lambda-logging/lambda-logging.sh create mode 100644 tuts/204-ec2-network-interfaces/ec2-network-interfaces.sh create mode 100644 tuts/207-ec2-volumes/ec2-volumes.sh diff --git a/tuts/197-ec2-describe-instances/ec2-describe-instances.sh b/tuts/197-ec2-describe-instances/ec2-describe-instances.sh new file mode 100644 index 00000000..ddbd35f0 --- /dev/null +++ b/tuts/197-ec2-describe-instances/ec2-describe-instances.sh @@ -0,0 +1,6 @@ +#!/bin/bash +WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/tut.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: Listing all instances"; aws ec2 describe-instances --query 'Reservations[].Instances[].{Id:InstanceId,Type:InstanceType,State:State.Name,Name:Tags[?Key==`Name`].Value|[0]}' --output table 2>/dev/null || echo " No instances" +echo "Step 2: Counting by state"; aws ec2 describe-instances --query 'Reservations[].Instances[].State.Name' --output text | tr '\t' '\n' | sort | uniq -c +echo ""; echo "Tutorial complete. Read-only."; rm -rf "$WORK_DIR" diff --git a/tuts/200-ec2-vpc-subnets/ec2-vpc-subnets.sh b/tuts/200-ec2-vpc-subnets/ec2-vpc-subnets.sh new file mode 100644 index 00000000..19b47705 --- /dev/null +++ b/tuts/200-ec2-vpc-subnets/ec2-vpc-subnets.sh @@ -0,0 +1,8 @@ +#!/bin/bash +WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/tut.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: Listing VPCs"; aws ec2 describe-vpcs --query 'Vpcs[].{Id:VpcId,CIDR:CidrBlock,Default:IsDefault}' --output table +echo "Step 2: Listing subnets"; aws ec2 describe-subnets --query 'Subnets[:10].{Id:SubnetId,VPC:VpcId,AZ:AvailabilityZone,CIDR:CidrBlock}' --output table +echo "Step 3: Listing route tables"; aws ec2 describe-route-tables --query 'RouteTables[:5].{Id:RouteTableId,VPC:VpcId,Routes:Routes|length(@)}' --output table +echo "Step 4: Listing internet gateways"; aws ec2 describe-internet-gateways --query 'InternetGateways[:5].{Id:InternetGatewayId,VPC:Attachments[0].VpcId}' --output table +echo ""; echo "Tutorial complete. Read-only."; rm -rf "$WORK_DIR" diff --git a/tuts/201-lambda-logging/lambda-logging.sh b/tuts/201-lambda-logging/lambda-logging.sh new file mode 100644 index 00000000..1eac2fa2 --- /dev/null +++ b/tuts/201-lambda-logging/lambda-logging.sh @@ -0,0 +1,8 @@ +#!/bin/bash +WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/tut.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: Listing Lambda log groups"; aws logs describe-log-groups --log-group-name-prefix /aws/lambda --query 'logGroups[:10].{Name:logGroupName,Stored:storedBytes,Retention:retentionInDays}' --output table +echo "Step 2: Getting recent log events from a function" +LG=$(aws logs describe-log-groups --log-group-name-prefix /aws/lambda --query 'logGroups[0].logGroupName' --output text 2>/dev/null) +[ -n "$LG" ] && [ "$LG" != "None" ] && { LS=$(aws logs describe-log-streams --log-group-name "$LG" --order-by LastEventTime --descending --limit 1 --query 'logStreams[0].logStreamName' --output text); aws logs get-log-events --log-group-name "$LG" --log-stream-name "$LS" --limit 5 --query 'events[].message' --output text; } || echo " No Lambda log groups" +echo ""; echo "Tutorial complete. Read-only."; rm -rf "$WORK_DIR" diff --git a/tuts/204-ec2-network-interfaces/ec2-network-interfaces.sh b/tuts/204-ec2-network-interfaces/ec2-network-interfaces.sh new file mode 100644 index 00000000..1fe3b52b --- /dev/null +++ b/tuts/204-ec2-network-interfaces/ec2-network-interfaces.sh @@ -0,0 +1,6 @@ +#!/bin/bash +WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/tut.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: Listing network interfaces"; aws ec2 describe-network-interfaces --query 'NetworkInterfaces[:10].{Id:NetworkInterfaceId,Type:InterfaceType,Status:Status,SubnetId:SubnetId}' --output table +echo "Step 2: Counting by type"; aws ec2 describe-network-interfaces --query 'NetworkInterfaces[].InterfaceType' --output text | tr '\t' '\n' | sort | uniq -c | sort -rn +echo ""; echo "Tutorial complete. Read-only."; rm -rf "$WORK_DIR" diff --git a/tuts/207-ec2-volumes/ec2-volumes.sh b/tuts/207-ec2-volumes/ec2-volumes.sh new file mode 100644 index 00000000..c49614f9 --- /dev/null +++ b/tuts/207-ec2-volumes/ec2-volumes.sh @@ -0,0 +1,6 @@ +#!/bin/bash +WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/tut.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: Listing volumes"; aws ec2 describe-volumes --query 'Volumes[:10].{Id:VolumeId,Type:VolumeType,Size:Size,State:State,AZ:AvailabilityZone}' --output table +echo "Step 2: Volume summary"; echo " Total: $(aws ec2 describe-volumes --query 'Volumes | length(@)' --output text) volumes" +echo ""; echo "Tutorial complete. Read-only."; rm -rf "$WORK_DIR" From 195bb150d11d9c9c5d6761f022f544502ec3945f 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/197-ec2-describe-instances/REVISION-HISTORY.md | 8 ++++++++ tuts/197-ec2-describe-instances/ec2-describe-instances.sh | 2 +- tuts/200-ec2-vpc-subnets/REVISION-HISTORY.md | 8 ++++++++ tuts/200-ec2-vpc-subnets/ec2-vpc-subnets.sh | 2 +- tuts/201-lambda-logging/REVISION-HISTORY.md | 8 ++++++++ tuts/201-lambda-logging/lambda-logging.sh | 2 +- tuts/204-ec2-network-interfaces/REVISION-HISTORY.md | 8 ++++++++ tuts/204-ec2-network-interfaces/ec2-network-interfaces.sh | 2 +- tuts/207-ec2-volumes/REVISION-HISTORY.md | 8 ++++++++ tuts/207-ec2-volumes/ec2-volumes.sh | 2 +- 10 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 tuts/197-ec2-describe-instances/REVISION-HISTORY.md create mode 100644 tuts/200-ec2-vpc-subnets/REVISION-HISTORY.md create mode 100644 tuts/201-lambda-logging/REVISION-HISTORY.md create mode 100644 tuts/204-ec2-network-interfaces/REVISION-HISTORY.md create mode 100644 tuts/207-ec2-volumes/REVISION-HISTORY.md diff --git a/tuts/197-ec2-describe-instances/REVISION-HISTORY.md b/tuts/197-ec2-describe-instances/REVISION-HISTORY.md new file mode 100644 index 00000000..ecb820d4 --- /dev/null +++ b/tuts/197-ec2-describe-instances/REVISION-HISTORY.md @@ -0,0 +1,8 @@ +# Revision History: 197-ec2-describe-instances + +## Shell (CLI script) + +### 2026-04-14 v1 published +- Type: functional +- Initial version + diff --git a/tuts/197-ec2-describe-instances/ec2-describe-instances.sh b/tuts/197-ec2-describe-instances/ec2-describe-instances.sh index ddbd35f0..d7259699 100644 --- a/tuts/197-ec2-describe-instances/ec2-describe-instances.sh +++ b/tuts/197-ec2-describe-instances/ec2-describe-instances.sh @@ -1,6 +1,6 @@ #!/bin/bash WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/tut.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: Listing all instances"; aws ec2 describe-instances --query 'Reservations[].Instances[].{Id:InstanceId,Type:InstanceType,State:State.Name,Name:Tags[?Key==`Name`].Value|[0]}' --output table 2>/dev/null || echo " No instances" echo "Step 2: Counting by state"; aws ec2 describe-instances --query 'Reservations[].Instances[].State.Name' --output text | tr '\t' '\n' | sort | uniq -c echo ""; echo "Tutorial complete. Read-only."; rm -rf "$WORK_DIR" diff --git a/tuts/200-ec2-vpc-subnets/REVISION-HISTORY.md b/tuts/200-ec2-vpc-subnets/REVISION-HISTORY.md new file mode 100644 index 00000000..b6608a25 --- /dev/null +++ b/tuts/200-ec2-vpc-subnets/REVISION-HISTORY.md @@ -0,0 +1,8 @@ +# Revision History: 200-ec2-vpc-subnets + +## Shell (CLI script) + +### 2026-04-14 v1 published +- Type: functional +- Initial version + diff --git a/tuts/200-ec2-vpc-subnets/ec2-vpc-subnets.sh b/tuts/200-ec2-vpc-subnets/ec2-vpc-subnets.sh index 19b47705..41397a54 100644 --- a/tuts/200-ec2-vpc-subnets/ec2-vpc-subnets.sh +++ b/tuts/200-ec2-vpc-subnets/ec2-vpc-subnets.sh @@ -1,6 +1,6 @@ #!/bin/bash WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/tut.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: Listing VPCs"; aws ec2 describe-vpcs --query 'Vpcs[].{Id:VpcId,CIDR:CidrBlock,Default:IsDefault}' --output table echo "Step 2: Listing subnets"; aws ec2 describe-subnets --query 'Subnets[:10].{Id:SubnetId,VPC:VpcId,AZ:AvailabilityZone,CIDR:CidrBlock}' --output table echo "Step 3: Listing route tables"; aws ec2 describe-route-tables --query 'RouteTables[:5].{Id:RouteTableId,VPC:VpcId,Routes:Routes|length(@)}' --output table diff --git a/tuts/201-lambda-logging/REVISION-HISTORY.md b/tuts/201-lambda-logging/REVISION-HISTORY.md new file mode 100644 index 00000000..1bac2e51 --- /dev/null +++ b/tuts/201-lambda-logging/REVISION-HISTORY.md @@ -0,0 +1,8 @@ +# Revision History: 201-lambda-logging + +## Shell (CLI script) + +### 2026-04-14 v1 published +- Type: functional +- Initial version + diff --git a/tuts/201-lambda-logging/lambda-logging.sh b/tuts/201-lambda-logging/lambda-logging.sh index 1eac2fa2..12588388 100644 --- a/tuts/201-lambda-logging/lambda-logging.sh +++ b/tuts/201-lambda-logging/lambda-logging.sh @@ -1,6 +1,6 @@ #!/bin/bash WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/tut.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: Listing Lambda log groups"; aws logs describe-log-groups --log-group-name-prefix /aws/lambda --query 'logGroups[:10].{Name:logGroupName,Stored:storedBytes,Retention:retentionInDays}' --output table echo "Step 2: Getting recent log events from a function" LG=$(aws logs describe-log-groups --log-group-name-prefix /aws/lambda --query 'logGroups[0].logGroupName' --output text 2>/dev/null) diff --git a/tuts/204-ec2-network-interfaces/REVISION-HISTORY.md b/tuts/204-ec2-network-interfaces/REVISION-HISTORY.md new file mode 100644 index 00000000..ddcc3935 --- /dev/null +++ b/tuts/204-ec2-network-interfaces/REVISION-HISTORY.md @@ -0,0 +1,8 @@ +# Revision History: 204-ec2-network-interfaces + +## Shell (CLI script) + +### 2026-04-14 v1 published +- Type: functional +- Initial version + diff --git a/tuts/204-ec2-network-interfaces/ec2-network-interfaces.sh b/tuts/204-ec2-network-interfaces/ec2-network-interfaces.sh index 1fe3b52b..80bcae25 100644 --- a/tuts/204-ec2-network-interfaces/ec2-network-interfaces.sh +++ b/tuts/204-ec2-network-interfaces/ec2-network-interfaces.sh @@ -1,6 +1,6 @@ #!/bin/bash WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/tut.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: Listing network interfaces"; aws ec2 describe-network-interfaces --query 'NetworkInterfaces[:10].{Id:NetworkInterfaceId,Type:InterfaceType,Status:Status,SubnetId:SubnetId}' --output table echo "Step 2: Counting by type"; aws ec2 describe-network-interfaces --query 'NetworkInterfaces[].InterfaceType' --output text | tr '\t' '\n' | sort | uniq -c | sort -rn echo ""; echo "Tutorial complete. Read-only."; rm -rf "$WORK_DIR" diff --git a/tuts/207-ec2-volumes/REVISION-HISTORY.md b/tuts/207-ec2-volumes/REVISION-HISTORY.md new file mode 100644 index 00000000..9b264404 --- /dev/null +++ b/tuts/207-ec2-volumes/REVISION-HISTORY.md @@ -0,0 +1,8 @@ +# Revision History: 207-ec2-volumes + +## Shell (CLI script) + +### 2026-04-14 v1 published +- Type: functional +- Initial version + diff --git a/tuts/207-ec2-volumes/ec2-volumes.sh b/tuts/207-ec2-volumes/ec2-volumes.sh index c49614f9..a7f95fd7 100644 --- a/tuts/207-ec2-volumes/ec2-volumes.sh +++ b/tuts/207-ec2-volumes/ec2-volumes.sh @@ -1,6 +1,6 @@ #!/bin/bash WORK_DIR=$(mktemp -d); exec > >(tee -a "$WORK_DIR/tut.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: Listing volumes"; aws ec2 describe-volumes --query 'Volumes[:10].{Id:VolumeId,Type:VolumeType,Size:Size,State:State,AZ:AvailabilityZone}' --output table echo "Step 2: Volume summary"; echo " Total: $(aws ec2 describe-volumes --query 'Volumes | length(@)' --output text) volumes" echo ""; echo "Tutorial complete. Read-only."; rm -rf "$WORK_DIR" From 84dfe7c20b50f50ce7100f3c1c4f3921b98c1c45 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/197-ec2-describe-instances/README.md | 27 +++++++++++++++++ .../ec2-describe-instances.md | 15 ++++++++++ tuts/200-ec2-vpc-subnets/README.md | 29 +++++++++++++++++++ tuts/200-ec2-vpc-subnets/ec2-vpc-subnets.md | 23 +++++++++++++++ tuts/201-lambda-logging/README.md | 27 +++++++++++++++++ tuts/201-lambda-logging/lambda-logging.md | 15 ++++++++++ tuts/204-ec2-network-interfaces/README.md | 27 +++++++++++++++++ .../ec2-network-interfaces.md | 15 ++++++++++ tuts/207-ec2-volumes/README.md | 27 +++++++++++++++++ tuts/207-ec2-volumes/ec2-volumes.md | 15 ++++++++++ 10 files changed, 220 insertions(+) create mode 100644 tuts/197-ec2-describe-instances/README.md create mode 100644 tuts/197-ec2-describe-instances/ec2-describe-instances.md create mode 100644 tuts/200-ec2-vpc-subnets/README.md create mode 100644 tuts/200-ec2-vpc-subnets/ec2-vpc-subnets.md create mode 100644 tuts/201-lambda-logging/README.md create mode 100644 tuts/201-lambda-logging/lambda-logging.md create mode 100644 tuts/204-ec2-network-interfaces/README.md create mode 100644 tuts/204-ec2-network-interfaces/ec2-network-interfaces.md create mode 100644 tuts/207-ec2-volumes/README.md create mode 100644 tuts/207-ec2-volumes/ec2-volumes.md diff --git a/tuts/197-ec2-describe-instances/README.md b/tuts/197-ec2-describe-instances/README.md new file mode 100644 index 00000000..3adc1cf1 --- /dev/null +++ b/tuts/197-ec2-describe-instances/README.md @@ -0,0 +1,27 @@ +# Ec2 Describe Instances + +A read-only script that queries Ec2 resources and displays information. + +## Running + +```bash +bash ec2-describe-instances.sh +``` + +## What it does + +1. Listing all instances"; aws ec2 describe-instances --query 'Reservations[].Instances[].{Id:InstanceId,Type:InstanceType,State:State.Name,Name:Tags[?Key==`Name`].Value|[0]}' --output table 2>/dev/null || echo " No instances +2. Counting by state + +## Resources created + +None — this script is read-only. + +## Cost + +No cost. This script only reads existing resources. + +## Related docs + +- [AWS CLI ec2 reference](https://docs.aws.amazon.com/cli/latest/reference/ec2/index.html) + diff --git a/tuts/197-ec2-describe-instances/ec2-describe-instances.md b/tuts/197-ec2-describe-instances/ec2-describe-instances.md new file mode 100644 index 00000000..3cee4da3 --- /dev/null +++ b/tuts/197-ec2-describe-instances/ec2-describe-instances.md @@ -0,0 +1,15 @@ +# Ec2 Describe Instances + +## Prerequisites + +1. AWS CLI installed and configured (`aws configure`) +2. Appropriate IAM permissions for the AWS services used + +## Step 1: Listing all instances"; aws ec2 describe-instances --query 'Reservations[].Instances[].{Id:InstanceId,Type:InstanceType,State:State.Name,Name:Tags[?Key==`Name`].Value|[0]}' --output table 2>/dev/null || echo " No instances + +The script handles this step automatically. See `ec2-describe-instances.sh` for the exact CLI commands. + +## Step 2: Counting by state + +The script handles this step automatically. See `ec2-describe-instances.sh` for the exact CLI commands. + diff --git a/tuts/200-ec2-vpc-subnets/README.md b/tuts/200-ec2-vpc-subnets/README.md new file mode 100644 index 00000000..74fc0232 --- /dev/null +++ b/tuts/200-ec2-vpc-subnets/README.md @@ -0,0 +1,29 @@ +# Ec2 Vpc Subnets + +A read-only script that queries Ec2 resources and displays information. + +## Running + +```bash +bash ec2-vpc-subnets.sh +``` + +## What it does + +1. Listing VPCs +2. Listing subnets +3. Listing route tables +4. Listing internet gateways + +## Resources created + +None — this script is read-only. + +## Cost + +No cost. This script only reads existing resources. + +## Related docs + +- [AWS CLI ec2 reference](https://docs.aws.amazon.com/cli/latest/reference/ec2/index.html) + diff --git a/tuts/200-ec2-vpc-subnets/ec2-vpc-subnets.md b/tuts/200-ec2-vpc-subnets/ec2-vpc-subnets.md new file mode 100644 index 00000000..94bad504 --- /dev/null +++ b/tuts/200-ec2-vpc-subnets/ec2-vpc-subnets.md @@ -0,0 +1,23 @@ +# Ec2 Vpc Subnets + +## Prerequisites + +1. AWS CLI installed and configured (`aws configure`) +2. Appropriate IAM permissions for the AWS services used + +## Step 1: Listing VPCs + +The script handles this step automatically. See `ec2-vpc-subnets.sh` for the exact CLI commands. + +## Step 2: Listing subnets + +The script handles this step automatically. See `ec2-vpc-subnets.sh` for the exact CLI commands. + +## Step 3: Listing route tables + +The script handles this step automatically. See `ec2-vpc-subnets.sh` for the exact CLI commands. + +## Step 4: Listing internet gateways + +The script handles this step automatically. See `ec2-vpc-subnets.sh` for the exact CLI commands. + diff --git a/tuts/201-lambda-logging/README.md b/tuts/201-lambda-logging/README.md new file mode 100644 index 00000000..a38c4515 --- /dev/null +++ b/tuts/201-lambda-logging/README.md @@ -0,0 +1,27 @@ +# Lambda Logging + +A read-only script that queries Logs resources and displays information. + +## Running + +```bash +bash lambda-logging.sh +``` + +## What it does + +1. Listing Lambda log groups +2. Getting recent log events from a function + +## Resources created + +None — this script is read-only. + +## Cost + +No cost. This script only reads existing resources. + +## Related docs + +- [AWS CLI logs reference](https://docs.aws.amazon.com/cli/latest/reference/logs/index.html) + diff --git a/tuts/201-lambda-logging/lambda-logging.md b/tuts/201-lambda-logging/lambda-logging.md new file mode 100644 index 00000000..5e318b77 --- /dev/null +++ b/tuts/201-lambda-logging/lambda-logging.md @@ -0,0 +1,15 @@ +# Lambda Logging + +## Prerequisites + +1. AWS CLI installed and configured (`aws configure`) +2. Appropriate IAM permissions for the AWS services used + +## Step 1: Listing Lambda log groups + +The script handles this step automatically. See `lambda-logging.sh` for the exact CLI commands. + +## Step 2: Getting recent log events from a function + +The script handles this step automatically. See `lambda-logging.sh` for the exact CLI commands. + diff --git a/tuts/204-ec2-network-interfaces/README.md b/tuts/204-ec2-network-interfaces/README.md new file mode 100644 index 00000000..c4c068c8 --- /dev/null +++ b/tuts/204-ec2-network-interfaces/README.md @@ -0,0 +1,27 @@ +# Ec2 Network Interfaces + +A read-only script that queries Ec2 resources and displays information. + +## Running + +```bash +bash ec2-network-interfaces.sh +``` + +## What it does + +1. Listing network interfaces +2. Counting by type + +## Resources created + +None — this script is read-only. + +## Cost + +No cost. This script only reads existing resources. + +## Related docs + +- [AWS CLI ec2 reference](https://docs.aws.amazon.com/cli/latest/reference/ec2/index.html) + diff --git a/tuts/204-ec2-network-interfaces/ec2-network-interfaces.md b/tuts/204-ec2-network-interfaces/ec2-network-interfaces.md new file mode 100644 index 00000000..1a139bf3 --- /dev/null +++ b/tuts/204-ec2-network-interfaces/ec2-network-interfaces.md @@ -0,0 +1,15 @@ +# Ec2 Network Interfaces + +## Prerequisites + +1. AWS CLI installed and configured (`aws configure`) +2. Appropriate IAM permissions for the AWS services used + +## Step 1: Listing network interfaces + +The script handles this step automatically. See `ec2-network-interfaces.sh` for the exact CLI commands. + +## Step 2: Counting by type + +The script handles this step automatically. See `ec2-network-interfaces.sh` for the exact CLI commands. + diff --git a/tuts/207-ec2-volumes/README.md b/tuts/207-ec2-volumes/README.md new file mode 100644 index 00000000..6880a39a --- /dev/null +++ b/tuts/207-ec2-volumes/README.md @@ -0,0 +1,27 @@ +# Ec2 Volumes + +A read-only script that queries Ec2 resources and displays information. + +## Running + +```bash +bash ec2-volumes.sh +``` + +## What it does + +1. Listing volumes +2. Volume summary"; echo " Total: $(aws ec2 describe-volumes --query 'Volumes | length(@)' --output text) volumes + +## Resources created + +None — this script is read-only. + +## Cost + +No cost. This script only reads existing resources. + +## Related docs + +- [AWS CLI ec2 reference](https://docs.aws.amazon.com/cli/latest/reference/ec2/index.html) + diff --git a/tuts/207-ec2-volumes/ec2-volumes.md b/tuts/207-ec2-volumes/ec2-volumes.md new file mode 100644 index 00000000..5055e869 --- /dev/null +++ b/tuts/207-ec2-volumes/ec2-volumes.md @@ -0,0 +1,15 @@ +# Ec2 Volumes + +## Prerequisites + +1. AWS CLI installed and configured (`aws configure`) +2. Appropriate IAM permissions for the AWS services used + +## Step 1: Listing volumes + +The script handles this step automatically. See `ec2-volumes.sh` for the exact CLI commands. + +## Step 2: Volume summary"; echo " Total: $(aws ec2 describe-volumes --query 'Volumes | length(@)' --output text) volumes + +The script handles this step automatically. See `ec2-volumes.sh` for the exact CLI commands. +