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
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
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 36 37 38 39 | |
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
65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |
Item
Bases: Entity
Model representing an item managed by the agent.
Source code in templates/agent/models.py
6 7 8 9 10 | |
Settings
Bases: CommonSettings
Configuration settings for the Bedrock Agent Lambda function.
Source code in templates/agent/settings.py
6 7 8 9 10 11 | |