Skip to content

Commit 5d5ce0a

Browse files
committed
fix: example
1 parent a7eb9e2 commit 5d5ce0a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

examples/event_sources/src/bedrock_agent_event.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@
88
@event_source(data_class=BedrockAgentEvent)
99
def lambda_handler(event: BedrockAgentEvent, context: LambdaContext) -> dict:
1010
input_text = event.input_text
11-
action = event.action_groups[0]
1211

13-
logger.info(f"Bedrock Agent {action.action_group} invoked with input", input_text=input_text)
12+
logger.info(f"Bedrock Agent {event.action_group} invoked with input", input_text=input_text)
1413

1514
return {
1615
"message_version": "1.0",
1716
"responses": [
1817
{
19-
"action_group": action.action_group,
20-
"api_path": action.api_path,
21-
"http_method": action.http_method,
18+
"action_group": event.action_group,
19+
"api_path": event.api_path,
20+
"http_method": event.http_method,
2221
"http_status_code": 200,
2322
"response_body": {"application/json": {"body": "This is the response"}},
2423
},

0 commit comments

Comments
 (0)