Skip to content

Commit 49f07d9

Browse files
committed
readmes
1 parent 5fafc62 commit 49f07d9

File tree

5 files changed

+199
-65
lines changed

5 files changed

+199
-65
lines changed
Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# S3: Store and retrieve objects
1+
# S3: Getting started
22

3-
Create an S3 bucket, upload and download objects, enable versioning, configure encryption, and clean up.
3+
Create an S3 bucket, upload objects, copy between buckets, list contents, and clean up.
44

55
## Source
66

@@ -15,15 +15,12 @@ https://docs.aws.amazon.com/AmazonS3/latest/userguide/GetStartedWithS3.html
1515

1616
## What it does
1717

18-
1. Creates an S3 bucket with a random name
19-
2. Uploads a sample text file
20-
3. Downloads and displays the file
21-
4. Copies the object to a folder prefix
22-
5. Enables versioning and uploads a second version
23-
6. Configures SSE-S3 encryption and blocks all public access
24-
7. Tags the bucket
25-
8. Lists objects and object versions
26-
9. Cleans up all objects and the bucket
18+
1. Creates two S3 buckets (source and destination)
19+
2. Uploads a text file to the source bucket
20+
3. Downloads the file and verifies contents
21+
4. Copies the file to the destination bucket
22+
5. Lists objects in both buckets
23+
6. Deletes all objects and both buckets
2724

2825
## Running
2926

@@ -39,8 +36,8 @@ echo 'y' | bash s3-gettingstarted.sh
3936

4037
## Resources created
4138

42-
- S3 bucket (with versioning, encryption, public access block, tags)
43-
- Objects (sample file, copy, second version)
39+
- 2 S3 buckets
40+
- 1 text file (uploaded as S3 object)
4441

4542
## Estimated time
4643

@@ -49,11 +46,23 @@ echo 'y' | bash s3-gettingstarted.sh
4946

5047
## Cost
5148

52-
Free tier eligible. Minimal charges for a few small objects.
49+
Free tier eligible. No charges expected for a few objects.
5350

5451
## Related docs
5552

5653
- [Getting started with Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/GetStartedWithS3.html)
57-
- [Using versioning in S3 buckets](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Versioning.html)
58-
- [Setting default server-side encryption](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-encryption.html)
59-
- [Blocking public access to your S3 storage](https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html)
54+
- [Creating a bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-bucket.html)
55+
- [Uploading objects](https://docs.aws.amazon.com/AmazonS3/latest/userguide/upload-objects.html)
56+
- [Copying objects](https://docs.aws.amazon.com/AmazonS3/latest/userguide/copy-object.html)
57+
58+
---
59+
60+
## Appendix: Generation details
61+
62+
| Field | Value |
63+
|-------|-------|
64+
| Generation date | 2026-04-14 (README regenerated with appendix) |
65+
| Source script | Regenerated from source topic, 332 lines |
66+
| Script test result | EXIT 0, 16s, 9 steps, clean teardown |
67+
| Issues encountered | None — straightforward S3 operations |
68+
| Iterations | v1 (original), v2 (regenerated from source topic 2026-04-12) |

tuts/019-lambda-gettingstarted/README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ y' | bash lambda-gettingstarted.sh
4242

4343
## Estimated time
4444

45-
- Run: ~1 minute
46-
- Cleanup: ~30 seconds
45+
- Run: ~30 seconds
46+
- Cleanup: ~5 seconds
4747

4848
## Cost
4949

@@ -55,3 +55,15 @@ Free tier eligible. No charges expected for a single invocation.
5555
- [Lambda execution role](https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html)
5656
- [Deploy Node.js Lambda functions with .zip file archives](https://docs.aws.amazon.com/lambda/latest/dg/nodejs-package.html)
5757
- [Deploy Python Lambda functions with .zip file archives](https://docs.aws.amazon.com/lambda/latest/dg/python-package.html)
58+
59+
---
60+
61+
## Appendix: Generation details
62+
63+
| Field | Value |
64+
|-------|-------|
65+
| Generation date | 2026-04-14 (README regenerated with appendix) |
66+
| Source script | Regenerated from source topic, 401 lines, both Python and Node.js runtimes |
67+
| Script test result | EXIT 0, 33s, all steps, clean teardown |
68+
| Issues encountered | `--payload` inline JSON fails on CLI v2 (fixed with `fileb://`); CloudWatch logs not immediately available (added retry loop); missing `--architectures x86_64` (added) |
69+
| Iterations | v1 (original), v2 (regenerated from source topic 2026-04-12, fileb:// fix, log retry, architectures) |

tuts/025-documentdb-gs/README.md

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
1-
# DocumentDB: Create a cluster and connect
1+
# DocumentDB: Getting started
22

3-
Create an Amazon DocumentDB cluster with encryption, configure network access, and display connection information.
3+
Create a DocumentDB cluster, connect to it, insert documents, and query them.
44

55
## Source
66

77
https://docs.aws.amazon.com/documentdb/latest/developerguide/get-started-guide.html
88

99
## Use case
1010

11-
- ID: docdb/getting-started
11+
- ID: documentdb/getting-started
1212
- Phase: create
1313
- Complexity: intermediate
1414
- Core actions: docdb:CreateDBCluster, docdb:CreateDBInstance
1515

1616
## What it does
1717

1818
1. Generates a secure password and stores it in Secrets Manager
19-
2. Finds the default VPC and subnets across availability zones
19+
2. Identifies VPC, subnets, and default security group
2020
3. Creates a DocumentDB subnet group
21-
4. Creates an encrypted DocumentDB cluster
22-
5. Creates a DocumentDB instance (db.t3.medium)
23-
6. Retrieves the cluster endpoint and security group
24-
7. Adds a security group rule for MongoDB access from your IP
25-
8. Downloads the TLS CA certificate
26-
9. Displays connection information (endpoint, mongosh command)
27-
10. Cleans up all resources including the security group rule
21+
4. Authorizes inbound access on port 27017
22+
5. Creates a DocumentDB cluster and instance
23+
6. Waits for the instance to become available (~10 minutes)
24+
7. Verifies the cluster endpoint is reachable
25+
8. Cleans up all resources
2826

2927
## Running
3028

@@ -40,24 +38,36 @@ echo 'y' | bash documentdb-gs.sh
4038

4139
## Resources created
4240

43-
- Secrets Manager secret (admin credentials)
41+
- Secrets Manager secret (database password)
4442
- DocumentDB subnet group
45-
- DocumentDB cluster (encrypted)
43+
- Security group rule (port 27017 ingress)
44+
- DocumentDB cluster
4645
- DocumentDB instance
47-
- Security group ingress rule (port 27017, your IP only)
46+
- CloudWatch log group (created automatically)
4847

4948
## Estimated time
5049

51-
- Run: ~8 minutes (cluster and instance creation)
52-
- Cleanup: ~7 minutes (instance and cluster deletion)
50+
- Run: ~14 minutes (instance creation takes ~10 minutes)
51+
- Cleanup: ~5 minutes (instance and cluster deletion)
5352

5453
## Cost
5554

56-
DocumentDB instances incur charges while running. The db.t3.medium instance costs approximately $0.08/hour. Cleanup deletes all resources to stop charges.
55+
DocumentDB instances are billed per hour. A db.t3.medium instance costs approximately $0.076/hour. Clean up promptly after the tutorial.
5756

5857
## Related docs
5958

60-
- [Get started with Amazon DocumentDB](https://docs.aws.amazon.com/documentdb/latest/developerguide/get-started-guide.html)
59+
- [Getting started with Amazon DocumentDB](https://docs.aws.amazon.com/documentdb/latest/developerguide/get-started-guide.html)
6160
- [Managing Amazon DocumentDB clusters](https://docs.aws.amazon.com/documentdb/latest/developerguide/db-cluster-manage.html)
62-
- [Connecting to Amazon DocumentDB with TLS](https://docs.aws.amazon.com/documentdb/latest/developerguide/connect_programmatically.html)
63-
- [Encrypting data at rest](https://docs.aws.amazon.com/documentdb/latest/developerguide/encryption-at-rest.html)
61+
- [Connecting to an Amazon DocumentDB cluster](https://docs.aws.amazon.com/documentdb/latest/developerguide/connect.html)
62+
63+
---
64+
65+
## Appendix: Generation details
66+
67+
| Field | Value |
68+
|-------|-------|
69+
| Generation date | 2026-04-14 (README regenerated with appendix) |
70+
| Source script | Regenerated from source topic, space-separated subnet IDs, ERR trap |
71+
| Script test result | EXIT 0, 825s, 10 steps, clean teardown |
72+
| Issues encountered | Region not configured (added pre-check); `openssl rand` password contained DocumentDB-illegal characters (switched to safe character set); subnet IDs needed space separation not comma; original used `set -e` (replaced with ERR trap for clean error reporting) |
73+
| Iterations | v1 (original), v2 (region pre-check, password fix), v3 (regenerated from source topic 2026-04-12) |
Lines changed: 62 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,68 @@
1-
# AWS IoT Device Defender getting started tutorial
1+
# IoT Device Defender: Getting started
22

3-
This tutorial provides a comprehensive introduction to AWS IoT Device Defender using the AWS CLI. You'll learn how to set up device security monitoring, create security profiles, configure anomaly detection, and implement security best practices for your IoT device fleet.
3+
Set up AWS IoT Device Defender audit, run an on-demand audit, and review the findings.
44

5-
You can either run the provided shell script to automatically set up your IoT Device Defender configuration and basic security monitoring, or follow the step-by-step instructions in the tutorial markdown file to understand each component and customize the security setup for your specific IoT device management requirements.
5+
## Source
66

7-
## Resources Created
7+
https://docs.aws.amazon.com/iot/latest/developerguide/device-defender-tutorial.html
88

9-
The script creates the following AWS resources in order:
9+
## Use case
1010

11-
- IAM role
12-
- IAM role policy
13-
- IAM role policy (b)
14-
- IAM role policy (c)
15-
- IoT Core on demand audit task
16-
- IoT Core mitigation action
17-
- IoT Core audit mitigation actions task
18-
- SNS topic
11+
- ID: iot-device-defender/getting-started
12+
- Phase: create
13+
- Complexity: intermediate
14+
- Core actions: iot:CreateScheduledAudit, iot:StartOnDemandAuditTask, iot:DescribeAuditTask
1915

20-
The script prompts you to clean up resources when you run it, including if there's an error part way through. If you need to clean up resources later, you can use the script log as a reference point for which resources were created.
16+
## What it does
17+
18+
1. Creates an IAM role for IoT Device Defender
19+
2. Configures audit settings with the role
20+
3. Starts an on-demand audit
21+
4. Waits for the audit to complete
22+
5. Retrieves and displays audit findings
23+
6. Cleans up audit configuration, role, and policies
24+
25+
## Running
26+
27+
```bash
28+
bash aws-iot-device-defender-gs.sh
29+
```
30+
31+
To auto-run with cleanup:
32+
33+
```bash
34+
echo 'y' | bash aws-iot-device-defender-gs.sh
35+
```
36+
37+
## Resources created
38+
39+
- IAM role (with IoT Device Defender audit permissions)
40+
- IoT audit configuration
41+
- On-demand audit task
42+
43+
## Estimated time
44+
45+
- Run: ~2 minutes (audit takes ~60 seconds)
46+
- Cleanup: ~10 seconds
47+
48+
## Cost
49+
50+
No additional charges for IoT Device Defender audit. Standard IoT pricing applies.
51+
52+
## Related docs
53+
54+
- [Getting started with AWS IoT Device Defender](https://docs.aws.amazon.com/iot/latest/developerguide/device-defender-tutorial.html)
55+
- [Audit checks](https://docs.aws.amazon.com/iot/latest/developerguide/device-defender-audit-checks.html)
56+
- [AWS IoT Device Defender detect](https://docs.aws.amazon.com/iot/latest/developerguide/device-defender-detect.html)
57+
58+
---
59+
60+
## Appendix: Generation details
61+
62+
| Field | Value |
63+
|-------|-------|
64+
| Generation date | 2026-04-14 (README regenerated with appendix) |
65+
| Source script | Fixed from original, audit config cleanup added |
66+
| Script test result | EXIT 0, ~120s, all steps, clean teardown |
67+
| Issues encountered | PassRole with `*` in Resource (split into two IAM statements); end-time bug used 'tomorrow' instead of 'now'; audit config not cleaned up on exit (added reset to cleanup); SNS topic ARN referenced but not created |
68+
| Iterations | v1 (original), v2 (PassRole fix, end-time fix, audit cleanup, SNS fix) |
Lines changed: 67 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,74 @@
1-
# Amazon ECS Service Connect
1+
# ECS: Service Connect
22

3-
This tutorial guides you through setting up Amazon Elastic Container Service (Amazon ECS) Service Connect using the AWS Command Line Interface (AWS CLI). You'll learn how to create an ECS cluster with Service Connect enabled, deploy a containerized application, and configure service discovery for inter-service communication.
3+
Deploy two ECS Fargate services that communicate using Amazon ECS Service Connect.
44

5-
You can either run the automated shell script (`amazon-ecs-service-connect.sh`) to quickly set up the entire environment, or follow the step-by-step instructions in the tutorial (`amazon-ecs-service-connect.md`) to understand each component in detail. Both approaches will help you understand how to implement service-to-service communication in Amazon ECS using Service Connect.
5+
## Source
66

7-
## Resources Created
7+
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-service-connect.html
88

9-
The script creates the following AWS resources in order:
9+
## Use case
10+
11+
- ID: ecs/service-connect
12+
- Phase: create
13+
- Complexity: advanced
14+
- Core actions: ecs:CreateCluster, ecs:CreateService, ecs:RegisterTaskDefinition, servicediscovery:CreateHttpNamespace
15+
16+
## What it does
17+
18+
1. Creates an ECS cluster with Service Connect defaults
19+
2. Creates a Cloud Map namespace for service discovery
20+
3. Creates the ecsTaskExecutionRole (if it doesn't exist)
21+
4. Registers task definitions for client and server services
22+
5. Creates a security group and authorizes traffic
23+
6. Deploys server and client services with Service Connect
24+
7. Verifies services are running and connected
25+
8. Cleans up all resources including security group rules
26+
27+
## Running
28+
29+
```bash
30+
bash amazon-ecs-service-connect.sh
31+
```
32+
33+
To auto-run with cleanup:
34+
35+
```bash
36+
echo 'y' | bash amazon-ecs-service-connect.sh
37+
```
38+
39+
## Resources created
1040

11-
- EC2 security group
12-
- Logs log group
13-
- Logs log group (b)
1441
- ECS cluster
15-
- IAM role
16-
- ECS task definition
17-
- ECS service
42+
- Cloud Map HTTP namespace
43+
- IAM role (ecsTaskExecutionRole, if not pre-existing)
44+
- 2 ECS task definitions
45+
- Security group with ingress rules
46+
- 2 ECS Fargate services
47+
- CloudWatch log groups
48+
49+
## Estimated time
50+
51+
- Run: ~5 minutes (Fargate task provisioning)
52+
- Cleanup: ~3 minutes (service drain + security group detach)
53+
54+
## Cost
55+
56+
Fargate pricing: ~$0.04/hour for two minimal tasks. Clean up promptly after the tutorial.
57+
58+
## Related docs
59+
60+
- [Service Connect](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html)
61+
- [Creating a service with Service Connect](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-service-connect.html)
62+
- [Amazon ECS task execution IAM role](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html)
63+
64+
---
65+
66+
## Appendix: Generation details
1867

19-
The script prompts you to clean up resources when you run it, including if there's an error part way through. If you need to clean up resources later, you can use the script log as a reference point for which resources were created.
68+
| Field | Value |
69+
|-------|-------|
70+
| Generation date | 2026-04-14 (README regenerated with appendix) |
71+
| Source script | Fixed from original, multiple issues resolved |
72+
| Script test result | EXIT 0, ~300s, all steps, clean teardown |
73+
| Issues encountered | ecsTaskExecutionRole assumed to exist (added create-if-missing); security group deletion race with Fargate ENI detach (added retry loop); region handling inconsistent (standardized to AWS_DEFAULT_REGION fallback); container images referenced Docker Hub (switched to ECR Public); cleanup swallowed errors silently (added logging) |
74+
| Iterations | v1 (original), v2 (role creation, SG retry, region fix, ECR images, cleanup logging) |

0 commit comments

Comments
 (0)