diff --git a/docs/README.md b/docs/README.md index c6601fe..ef67518 100644 --- a/docs/README.md +++ b/docs/README.md @@ -55,7 +55,7 @@ The repository also comes preloaded with these GitHub files: - MIT License ## How to use -Click this button to create a new repository for your project, then clone the new repository. Enjoy! +Click the button below (or [use this link](https://github.com/amrabed/aws-lambda-templates/generate)) to create a new repository for your project, then clone the new repository. Enjoy! [![Use this template](https://img.shields.io/badge/Use%20this%20template-238636?style=for-the-badge)](https://github.com/amrabed/aws-lambda-templates/generate) diff --git a/docs/template/agent.md b/docs/template/agent.md index d906d88..ea15f70 100644 --- a/docs/template/agent.md +++ b/docs/template/agent.md @@ -50,9 +50,9 @@ def get_item(item_id: str) -> dict: Field | Type | Description --- | --- | --- -`id` | UUID string | Unique item identifier (auto-generated) -`name` | string | Human-readable item name -`description` | string | Human-readable item description +`id` | UUID string | Unique item identifier (auto-generated, 1-50 chars) +`name` | string | Human-readable item name (1-100 chars) +`description` | string | Human-readable item description (max 500 chars) ### Environment variables diff --git a/docs/template/api.md b/docs/template/api.md index 570117d..d7b8b06 100644 --- a/docs/template/api.md +++ b/docs/template/api.md @@ -29,15 +29,15 @@ mise run deploy api Endpoint | Description | Response codes --- | --- | --- -`GET /items/{id}` | Retrieve an item by ID | 200, 404, 500 -`POST /items` | Create a new item | 201, 422, 500 +`GET /items/{id}` | Retrieve an item by ID | 200 (OK), 404 (Not Found), 500 (Internal Server Error) +`POST /items` | Create a new item | 201 (Created), 422 (Unprocessable Entity), 500 (Internal Server Error) ### Item model Field | Type | Description --- | --- | --- -`id` | UUID string | Unique item identifier (auto-generated) -`name` | string | Human-readable item name +`id` | UUID string | Unique item identifier (auto-generated, 1-50 chars) +`name` | string | Human-readable item name (1-100 chars) ### Environment variables diff --git a/docs/template/eventbridge.md b/docs/template/eventbridge.md index cfb83ea..8234c05 100644 --- a/docs/template/eventbridge.md +++ b/docs/template/eventbridge.md @@ -31,9 +31,17 @@ mise run deploy eventbridge Model | Description --- | --- `EventBridgeEvent` | Incoming EventBridge event payload (`source`, `detail_type`, `detail`) -`ApiResponse` | Response from the external HTTP API (`status`) +`ApiResponse` | Response from the external HTTP API (`id`, `message`) `Settings` | Runtime configuration from environment variables +#### ApiResponse +Written to the DynamoDB table after calling the external API. + +Field | Type | Description +--- | --- | --- +`id` | string | Unique identifier of the API response record (1-50 chars) +`message` | string | Message returned by the external API (1-1000 chars) + ### Environment variables Variable | Description diff --git a/docs/template/graphql.md b/docs/template/graphql.md index 32a87cc..0fbf039 100644 --- a/docs/template/graphql.md +++ b/docs/template/graphql.md @@ -74,3 +74,10 @@ def create_item(name: str) -> dict: repository.put_item(item.model_dump()) return item.dump() ``` + +### Item model + +Field | Type | Description +--- | --- | --- +`id` | UUID string | Unique item identifier (auto-generated, 1-50 chars) +`name` | string | Human-readable item name (1-100 chars) diff --git a/docs/template/s3.md b/docs/template/s3.md index 62b3e89..75ed311 100644 --- a/docs/template/s3.md +++ b/docs/template/s3.md @@ -29,8 +29,8 @@ mise run deploy s3 Field | Type | Description --- | --- | --- -`bucket` | string | S3 bucket name -`key` | string | S3 object key +`bucket` | string | S3 bucket name (3-63 chars) +`key` | string | S3 object key (1-1024 chars) `event_time` | string | ISO-8601 event timestamp `source` | string | Origin event source (`s3`) diff --git a/docs/template/sqs.md b/docs/template/sqs.md index b0bff69..bb8660f 100644 --- a/docs/template/sqs.md +++ b/docs/template/sqs.md @@ -28,10 +28,22 @@ mise run deploy sqs ### Data models -Model | Description ---- | --- -`SqsMessage` | Parsed from the SQS message body (`id`, `content`) -`ProcessedItem` | Written to the DynamoDB table (`id`, `content`, `status`) +#### SqsMessage +Parsed from the SQS message body. + +Field | Type | Description +--- | --- | --- +`id` | string | Unique identifier for the message (1-50 chars) +`content` | string | The main content of the message (1-1000 chars) + +#### ProcessedItem +Written to the DynamoDB table. + +Field | Type | Description +--- | --- | --- +`id` | string | Unique identifier for the item (partition key, 1-50 chars) +`content` | string | The processed content (1-1000 chars) +`status` | string | Processing status (1-50 chars) ### Environment variables diff --git a/docs/template/stream.md b/docs/template/stream.md index 651b3d0..d364c96 100644 --- a/docs/template/stream.md +++ b/docs/template/stream.md @@ -30,10 +30,21 @@ mise run deploy stream ### Data models -Model | Description ---- | --- -`SourceItem` | Read from the source table stream (`id`, `name`) -`DestinationItem` | Written to the destination table (`id`, `name`) +#### SourceItem +Read from the source table stream. + +Field | Type | Description +--- | --- | --- +`id` | string | Unique item identifier (1-50 chars) +`name` | string | Human-readable item name (optional, 1-100 chars) + +#### DestinationItem +Written to the destination table. + +Field | Type | Description +--- | --- | --- +`id` | string | Unique item identifier (1-50 chars) +`name` | string | Human-readable item name (optional, 1-100 chars) ### Environment variables