Bedrock Agent
create_item(item_id, name, description=None)
Create a new item.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item_id
|
str
|
Unique identifier for the item. |
required |
name
|
str
|
Name of the item. |
required |
description
|
str | None
|
Optional description of the item. |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
The created item details. |
Source code in templates/agent/handler.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
get_item(item_id)
Retrieve an item by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item_id
|
str
|
The unique identifier of the item. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
The item details or an error message. |
Source code in templates/agent/handler.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | |
main(event, context)
Lambda entry point for the Bedrock Agent handler.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event
|
dict | BedrockAgentEvent
|
The Bedrock Agent event. |
required |
context
|
LambdaContext
|
The Lambda execution context. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
The Bedrock Agent function response. |
Source code in templates/agent/handler.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |