1
1
import logging
2
- from typing import Any , Dict , Optional
2
+ from typing import Any , Dict
3
3
4
4
from typing_extensions import override
5
5
6
6
from aws_lambda_powertools .event_handler import ApiGatewayResolver
7
- from aws_lambda_powertools .event_handler .api_gateway import CORSConfig , ProxyEventType , ResponseBuilder
7
+ from aws_lambda_powertools .event_handler .api_gateway import ProxyEventType , ResponseBuilder
8
8
from aws_lambda_powertools .utilities .data_classes import BedrockAgentEvent
9
9
10
10
logger = logging .getLogger (__name__ )
@@ -18,9 +18,9 @@ class BedrockResponseBuilder(ResponseBuilder):
18
18
"""
19
19
20
20
@override
21
- def build (self , event : BedrockAgentEvent , cors : Optional [ CORSConfig ] = None ) -> Dict [str , Any ]:
21
+ def build (self , event : BedrockAgentEvent , * args ) -> Dict [str , Any ]:
22
22
"""Build the full response dict to be returned by the lambda"""
23
- self ._route (event , cors )
23
+ self ._route (event , None )
24
24
25
25
return {
26
26
"messageVersion" : "1.0" ,
@@ -67,11 +67,11 @@ def lambda_handler(event, context):
67
67
68
68
def __init__ (self , debug : bool = False , enable_validation : bool = True ):
69
69
super ().__init__ (
70
- ProxyEventType .BedrockAgentEvent ,
71
- None ,
72
- debug ,
73
- None ,
74
- None ,
75
- enable_validation ,
70
+ proxy_type = ProxyEventType .BedrockAgentEvent ,
71
+ cors = None ,
72
+ debug = debug ,
73
+ serializer = None ,
74
+ strip_prefixes = None ,
75
+ enable_validation = enable_validation ,
76
76
)
77
77
self ._response_builder_class = BedrockResponseBuilder
0 commit comments