Skip to content
Draft
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
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions docs/template/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docs/template/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 9 additions & 1 deletion docs/template/eventbridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions docs/template/graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions docs/template/s3.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)

Expand Down
20 changes: 16 additions & 4 deletions docs/template/sqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
19 changes: 15 additions & 4 deletions docs/template/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down