aws-lambda-powertools 3.13.1a6__py3-none-any.whl → 3.14.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aws_lambda_powertools/event_handler/__init__.py +6 -0
- aws_lambda_powertools/event_handler/bedrock_agent_function.py +248 -0
- aws_lambda_powertools/shared/version.py +1 -1
- aws_lambda_powertools/utilities/data_classes/__init__.py +2 -0
- aws_lambda_powertools/utilities/data_classes/bedrock_agent_function_event.py +81 -0
- aws_lambda_powertools/utilities/parser/envelopes/__init__.py +2 -1
- aws_lambda_powertools/utilities/parser/envelopes/bedrock_agent.py +25 -1
- aws_lambda_powertools/utilities/parser/models/__init__.py +2 -0
- aws_lambda_powertools/utilities/parser/models/bedrock_agent.py +18 -0
- {aws_lambda_powertools-3.13.1a6.dist-info → aws_lambda_powertools-3.14.0.dist-info}/METADATA +1 -1
- {aws_lambda_powertools-3.13.1a6.dist-info → aws_lambda_powertools-3.14.0.dist-info}/RECORD +13 -11
- {aws_lambda_powertools-3.13.1a6.dist-info → aws_lambda_powertools-3.14.0.dist-info}/LICENSE +0 -0
- {aws_lambda_powertools-3.13.1a6.dist-info → aws_lambda_powertools-3.14.0.dist-info}/WHEEL +0 -0
@@ -12,6 +12,10 @@ from aws_lambda_powertools.event_handler.api_gateway import (
|
|
12
12
|
)
|
13
13
|
from aws_lambda_powertools.event_handler.appsync import AppSyncResolver
|
14
14
|
from aws_lambda_powertools.event_handler.bedrock_agent import BedrockAgentResolver, BedrockResponse
|
15
|
+
from aws_lambda_powertools.event_handler.bedrock_agent_function import (
|
16
|
+
BedrockAgentFunctionResolver,
|
17
|
+
BedrockFunctionResponse,
|
18
|
+
)
|
15
19
|
from aws_lambda_powertools.event_handler.events_appsync.appsync_events import AppSyncEventsResolver
|
16
20
|
from aws_lambda_powertools.event_handler.lambda_function_url import (
|
17
21
|
LambdaFunctionUrlResolver,
|
@@ -26,7 +30,9 @@ __all__ = [
|
|
26
30
|
"ALBResolver",
|
27
31
|
"ApiGatewayResolver",
|
28
32
|
"BedrockAgentResolver",
|
33
|
+
"BedrockAgentFunctionResolver",
|
29
34
|
"BedrockResponse",
|
35
|
+
"BedrockFunctionResponse",
|
30
36
|
"CORSConfig",
|
31
37
|
"LambdaFunctionUrlResolver",
|
32
38
|
"Response",
|
@@ -0,0 +1,248 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
3
|
+
import inspect
|
4
|
+
import json
|
5
|
+
import logging
|
6
|
+
import warnings
|
7
|
+
from collections.abc import Callable
|
8
|
+
from typing import Any, Literal, TypeVar
|
9
|
+
|
10
|
+
from aws_lambda_powertools.utilities.data_classes import BedrockAgentFunctionEvent
|
11
|
+
from aws_lambda_powertools.warnings import PowertoolsUserWarning
|
12
|
+
|
13
|
+
# Define a generic type for the function
|
14
|
+
T = TypeVar("T", bound=Callable[..., Any])
|
15
|
+
|
16
|
+
logger = logging.getLogger(__name__)
|
17
|
+
|
18
|
+
|
19
|
+
class BedrockFunctionResponse:
|
20
|
+
"""Response class for Bedrock Agent Functions.
|
21
|
+
|
22
|
+
Parameters
|
23
|
+
----------
|
24
|
+
body : Any, optional
|
25
|
+
Response body to be returned to the caller.
|
26
|
+
session_attributes : dict[str, str] or None, optional
|
27
|
+
Session attributes to include in the response for maintaining state.
|
28
|
+
prompt_session_attributes : dict[str, str] or None, optional
|
29
|
+
Prompt session attributes to include in the response.
|
30
|
+
knowledge_bases : list[dict[str, Any]] or None, optional
|
31
|
+
Knowledge bases to include in the response.
|
32
|
+
response_state : {"FAILURE", "REPROMPT"} or None, optional
|
33
|
+
Response state indicating if the function failed or needs reprompting.
|
34
|
+
|
35
|
+
Examples
|
36
|
+
--------
|
37
|
+
>>> @app.tool(description="Function that uses session attributes")
|
38
|
+
>>> def test_function():
|
39
|
+
... return BedrockFunctionResponse(
|
40
|
+
... body="Hello",
|
41
|
+
... session_attributes={"userId": "123"},
|
42
|
+
... prompt_session_attributes={"lastAction": "login"}
|
43
|
+
... )
|
44
|
+
|
45
|
+
Notes
|
46
|
+
-----
|
47
|
+
The `response_state` parameter can only be set to "FAILURE" or "REPROMPT".
|
48
|
+
"""
|
49
|
+
|
50
|
+
def __init__(
|
51
|
+
self,
|
52
|
+
body: Any = None,
|
53
|
+
session_attributes: dict[str, str] | None = None,
|
54
|
+
prompt_session_attributes: dict[str, str] | None = None,
|
55
|
+
knowledge_bases: list[dict[str, Any]] | None = None,
|
56
|
+
response_state: Literal["FAILURE", "REPROMPT"] | None = None,
|
57
|
+
) -> None:
|
58
|
+
if response_state and response_state not in ["FAILURE", "REPROMPT"]:
|
59
|
+
raise ValueError("responseState must be 'FAILURE' or 'REPROMPT'")
|
60
|
+
|
61
|
+
self.body = body
|
62
|
+
self.session_attributes = session_attributes
|
63
|
+
self.prompt_session_attributes = prompt_session_attributes
|
64
|
+
self.knowledge_bases = knowledge_bases
|
65
|
+
self.response_state = response_state
|
66
|
+
|
67
|
+
|
68
|
+
class BedrockFunctionsResponseBuilder:
|
69
|
+
"""
|
70
|
+
Bedrock Functions Response Builder. This builds the response dict to be returned by Lambda
|
71
|
+
when using Bedrock Agent Functions.
|
72
|
+
"""
|
73
|
+
|
74
|
+
def __init__(self, result: BedrockFunctionResponse | Any) -> None:
|
75
|
+
self.result = result
|
76
|
+
|
77
|
+
def build(self, event: BedrockAgentFunctionEvent, serializer: Callable) -> dict[str, Any]:
|
78
|
+
result_obj = self.result
|
79
|
+
|
80
|
+
# Extract attributes from BedrockFunctionResponse or use defaults
|
81
|
+
body = getattr(result_obj, "body", result_obj)
|
82
|
+
session_attributes = getattr(result_obj, "session_attributes", None)
|
83
|
+
prompt_session_attributes = getattr(result_obj, "prompt_session_attributes", None)
|
84
|
+
knowledge_bases = getattr(result_obj, "knowledge_bases", None)
|
85
|
+
response_state = getattr(result_obj, "response_state", None)
|
86
|
+
|
87
|
+
# Build base response structure
|
88
|
+
# Per AWS Bedrock documentation, currently only "TEXT" is supported as the responseBody content type
|
89
|
+
# https://docs.aws.amazon.com/bedrock/latest/userguide/agents-lambda.html
|
90
|
+
response: dict[str, Any] = {
|
91
|
+
"messageVersion": "1.0",
|
92
|
+
"response": {
|
93
|
+
"actionGroup": event.action_group,
|
94
|
+
"function": event.function,
|
95
|
+
"functionResponse": {
|
96
|
+
"responseBody": {"TEXT": {"body": serializer(body if body is not None else "")}},
|
97
|
+
},
|
98
|
+
},
|
99
|
+
"sessionAttributes": session_attributes or event.session_attributes or {},
|
100
|
+
"promptSessionAttributes": prompt_session_attributes or event.prompt_session_attributes or {},
|
101
|
+
}
|
102
|
+
|
103
|
+
# Add optional fields when present
|
104
|
+
if response_state:
|
105
|
+
response["response"]["functionResponse"]["responseState"] = response_state
|
106
|
+
|
107
|
+
if knowledge_bases:
|
108
|
+
response["knowledgeBasesConfiguration"] = knowledge_bases
|
109
|
+
|
110
|
+
return response
|
111
|
+
|
112
|
+
|
113
|
+
class BedrockAgentFunctionResolver:
|
114
|
+
"""Bedrock Agent Function resolver that handles function definitions
|
115
|
+
|
116
|
+
Examples
|
117
|
+
--------
|
118
|
+
```python
|
119
|
+
from aws_lambda_powertools.event_handler import BedrockAgentFunctionResolver
|
120
|
+
|
121
|
+
app = BedrockAgentFunctionResolver()
|
122
|
+
|
123
|
+
@app.tool(name="get_current_time", description="Gets the current UTC time")
|
124
|
+
def get_current_time():
|
125
|
+
from datetime import datetime
|
126
|
+
return datetime.utcnow().isoformat()
|
127
|
+
|
128
|
+
def lambda_handler(event, context):
|
129
|
+
return app.resolve(event, context)
|
130
|
+
```
|
131
|
+
"""
|
132
|
+
|
133
|
+
context: dict
|
134
|
+
|
135
|
+
def __init__(self, serializer: Callable | None = None) -> None:
|
136
|
+
self._tools: dict[str, dict[str, Any]] = {}
|
137
|
+
self.current_event: BedrockAgentFunctionEvent | None = None
|
138
|
+
self.context = {}
|
139
|
+
self._response_builder_class = BedrockFunctionsResponseBuilder
|
140
|
+
self.serializer = serializer or json.dumps
|
141
|
+
|
142
|
+
def tool(
|
143
|
+
self,
|
144
|
+
name: str | None = None,
|
145
|
+
description: str | None = None,
|
146
|
+
) -> Callable[[T], T]:
|
147
|
+
"""Decorator to register a tool function
|
148
|
+
|
149
|
+
Parameters
|
150
|
+
----------
|
151
|
+
name : str | None
|
152
|
+
Custom name for the tool. If not provided, uses the function name
|
153
|
+
description : str | None
|
154
|
+
Description of what the tool does
|
155
|
+
|
156
|
+
Returns
|
157
|
+
-------
|
158
|
+
Callable
|
159
|
+
Decorator function that registers and returns the original function
|
160
|
+
"""
|
161
|
+
|
162
|
+
def decorator(func: T) -> T:
|
163
|
+
function_name = name or func.__name__
|
164
|
+
|
165
|
+
logger.debug(f"Registering {function_name} tool")
|
166
|
+
|
167
|
+
if function_name in self._tools:
|
168
|
+
warnings.warn(
|
169
|
+
f"Tool '{function_name}' already registered. Overwriting with new definition.",
|
170
|
+
PowertoolsUserWarning,
|
171
|
+
stacklevel=2,
|
172
|
+
)
|
173
|
+
|
174
|
+
self._tools[function_name] = {
|
175
|
+
"function": func,
|
176
|
+
"description": description,
|
177
|
+
}
|
178
|
+
return func
|
179
|
+
|
180
|
+
return decorator
|
181
|
+
|
182
|
+
def resolve(self, event: dict[str, Any], context: Any) -> dict[str, Any]:
|
183
|
+
"""Resolves the function call from Bedrock Agent event"""
|
184
|
+
try:
|
185
|
+
self.current_event = BedrockAgentFunctionEvent(event)
|
186
|
+
return self._resolve()
|
187
|
+
except KeyError as e:
|
188
|
+
raise ValueError(f"Missing required field: {str(e)}") from e
|
189
|
+
|
190
|
+
def _resolve(self) -> dict[str, Any]:
|
191
|
+
"""Internal resolution logic"""
|
192
|
+
if self.current_event is None:
|
193
|
+
raise ValueError("No event to process")
|
194
|
+
|
195
|
+
function_name = self.current_event.function
|
196
|
+
|
197
|
+
logger.debug(f"Resolving {function_name} tool")
|
198
|
+
|
199
|
+
try:
|
200
|
+
parameters: dict[str, Any] = {}
|
201
|
+
# Extract parameters from the event
|
202
|
+
for param in getattr(self.current_event, "parameters", []):
|
203
|
+
param_type = getattr(param, "type", None)
|
204
|
+
if param_type == "string":
|
205
|
+
parameters[param.name] = str(param.value)
|
206
|
+
elif param_type == "integer":
|
207
|
+
try:
|
208
|
+
parameters[param.name] = int(param.value)
|
209
|
+
except (ValueError, TypeError):
|
210
|
+
parameters[param.name] = param.value
|
211
|
+
elif param_type == "number":
|
212
|
+
try:
|
213
|
+
parameters[param.name] = float(param.value)
|
214
|
+
except (ValueError, TypeError):
|
215
|
+
parameters[param.name] = param.value
|
216
|
+
elif param_type == "boolean":
|
217
|
+
if isinstance(param.value, str):
|
218
|
+
parameters[param.name] = param.value.lower() == "true"
|
219
|
+
else:
|
220
|
+
parameters[param.name] = bool(param.value)
|
221
|
+
else: # "array" or any other type
|
222
|
+
parameters[param.name] = param.value
|
223
|
+
|
224
|
+
func = self._tools[function_name]["function"]
|
225
|
+
# Filter parameters to only include those expected by the function
|
226
|
+
sig = inspect.signature(func)
|
227
|
+
valid_params = {name: value for name, value in parameters.items() if name in sig.parameters}
|
228
|
+
|
229
|
+
# Call the function with the filtered parameters
|
230
|
+
result = func(**valid_params)
|
231
|
+
|
232
|
+
self.clear_context()
|
233
|
+
|
234
|
+
# Build and return the response
|
235
|
+
return BedrockFunctionsResponseBuilder(result).build(self.current_event, serializer=self.serializer)
|
236
|
+
except Exception as error:
|
237
|
+
# Return a formatted error response
|
238
|
+
logger.error(f"Error processing function: {function_name}", exc_info=True)
|
239
|
+
error_response = BedrockFunctionResponse(body=f"Error: {error.__class__.__name__}: {str(error)}")
|
240
|
+
return BedrockFunctionsResponseBuilder(error_response).build(self.current_event, serializer=self.serializer)
|
241
|
+
|
242
|
+
def append_context(self, **additional_context):
|
243
|
+
"""Append key=value data as routing context"""
|
244
|
+
self.context.update(**additional_context)
|
245
|
+
|
246
|
+
def clear_context(self):
|
247
|
+
"""Resets routing context"""
|
248
|
+
self.context.clear()
|
@@ -9,6 +9,7 @@ from .appsync_resolver_event import AppSyncResolverEvent
|
|
9
9
|
from .appsync_resolver_events_event import AppSyncResolverEventsEvent
|
10
10
|
from .aws_config_rule_event import AWSConfigRuleEvent
|
11
11
|
from .bedrock_agent_event import BedrockAgentEvent
|
12
|
+
from .bedrock_agent_function_event import BedrockAgentFunctionEvent
|
12
13
|
from .cloud_watch_alarm_event import (
|
13
14
|
CloudWatchAlarmConfiguration,
|
14
15
|
CloudWatchAlarmData,
|
@@ -59,6 +60,7 @@ __all__ = [
|
|
59
60
|
"AppSyncResolverEventsEvent",
|
60
61
|
"ALBEvent",
|
61
62
|
"BedrockAgentEvent",
|
63
|
+
"BedrockAgentFunctionEvent",
|
62
64
|
"CloudWatchAlarmData",
|
63
65
|
"CloudWatchAlarmEvent",
|
64
66
|
"CloudWatchAlarmMetric",
|
@@ -0,0 +1,81 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
3
|
+
from aws_lambda_powertools.utilities.data_classes.common import DictWrapper
|
4
|
+
|
5
|
+
|
6
|
+
class BedrockAgentInfo(DictWrapper):
|
7
|
+
@property
|
8
|
+
def name(self) -> str:
|
9
|
+
return self["name"]
|
10
|
+
|
11
|
+
@property
|
12
|
+
def id(self) -> str: # noqa: A003
|
13
|
+
return self["id"]
|
14
|
+
|
15
|
+
@property
|
16
|
+
def alias(self) -> str:
|
17
|
+
return self["alias"]
|
18
|
+
|
19
|
+
@property
|
20
|
+
def version(self) -> str:
|
21
|
+
return self["version"]
|
22
|
+
|
23
|
+
|
24
|
+
class BedrockAgentFunctionParameter(DictWrapper):
|
25
|
+
@property
|
26
|
+
def name(self) -> str:
|
27
|
+
return self["name"]
|
28
|
+
|
29
|
+
@property
|
30
|
+
def type(self) -> str: # noqa: A003
|
31
|
+
return self["type"]
|
32
|
+
|
33
|
+
@property
|
34
|
+
def value(self) -> str:
|
35
|
+
return self["value"]
|
36
|
+
|
37
|
+
|
38
|
+
class BedrockAgentFunctionEvent(DictWrapper):
|
39
|
+
"""
|
40
|
+
Bedrock Agent Function input event
|
41
|
+
|
42
|
+
Documentation:
|
43
|
+
https://docs.aws.amazon.com/bedrock/latest/userguide/agents-lambda.html
|
44
|
+
"""
|
45
|
+
|
46
|
+
@property
|
47
|
+
def message_version(self) -> str:
|
48
|
+
return self["messageVersion"]
|
49
|
+
|
50
|
+
@property
|
51
|
+
def input_text(self) -> str:
|
52
|
+
return self["inputText"]
|
53
|
+
|
54
|
+
@property
|
55
|
+
def session_id(self) -> str:
|
56
|
+
return self["sessionId"]
|
57
|
+
|
58
|
+
@property
|
59
|
+
def action_group(self) -> str:
|
60
|
+
return self["actionGroup"]
|
61
|
+
|
62
|
+
@property
|
63
|
+
def function(self) -> str:
|
64
|
+
return self["function"]
|
65
|
+
|
66
|
+
@property
|
67
|
+
def parameters(self) -> list[BedrockAgentFunctionParameter]:
|
68
|
+
parameters = self.get("parameters") or []
|
69
|
+
return [BedrockAgentFunctionParameter(x) for x in parameters]
|
70
|
+
|
71
|
+
@property
|
72
|
+
def agent(self) -> BedrockAgentInfo:
|
73
|
+
return BedrockAgentInfo(self["agent"])
|
74
|
+
|
75
|
+
@property
|
76
|
+
def session_attributes(self) -> dict[str, str]:
|
77
|
+
return self.get("sessionAttributes", {}) or {}
|
78
|
+
|
79
|
+
@property
|
80
|
+
def prompt_session_attributes(self) -> dict[str, str]:
|
81
|
+
return self.get("promptSessionAttributes", {}) or {}
|
@@ -2,7 +2,7 @@ from .apigw import ApiGatewayEnvelope
|
|
2
2
|
from .apigw_websocket import ApiGatewayWebSocketEnvelope
|
3
3
|
from .apigwv2 import ApiGatewayV2Envelope
|
4
4
|
from .base import BaseEnvelope
|
5
|
-
from .bedrock_agent import BedrockAgentEnvelope
|
5
|
+
from .bedrock_agent import BedrockAgentEnvelope, BedrockAgentFunctionEnvelope
|
6
6
|
from .cloudwatch import CloudWatchLogsEnvelope
|
7
7
|
from .dynamodb import DynamoDBStreamEnvelope
|
8
8
|
from .event_bridge import EventBridgeEnvelope
|
@@ -20,6 +20,7 @@ __all__ = [
|
|
20
20
|
"ApiGatewayV2Envelope",
|
21
21
|
"ApiGatewayWebSocketEnvelope",
|
22
22
|
"BedrockAgentEnvelope",
|
23
|
+
"BedrockAgentFunctionEnvelope",
|
23
24
|
"CloudWatchLogsEnvelope",
|
24
25
|
"DynamoDBStreamEnvelope",
|
25
26
|
"EventBridgeEnvelope",
|
@@ -4,7 +4,7 @@ import logging
|
|
4
4
|
from typing import TYPE_CHECKING, Any
|
5
5
|
|
6
6
|
from aws_lambda_powertools.utilities.parser.envelopes.base import BaseEnvelope
|
7
|
-
from aws_lambda_powertools.utilities.parser.models import BedrockAgentEventModel
|
7
|
+
from aws_lambda_powertools.utilities.parser.models import BedrockAgentEventModel, BedrockAgentFunctionEventModel
|
8
8
|
|
9
9
|
if TYPE_CHECKING:
|
10
10
|
from aws_lambda_powertools.utilities.parser.types import Model
|
@@ -34,3 +34,27 @@ class BedrockAgentEnvelope(BaseEnvelope):
|
|
34
34
|
parsed_envelope: BedrockAgentEventModel = BedrockAgentEventModel.model_validate(data)
|
35
35
|
logger.debug(f"Parsing event payload in `input_text` with {model}")
|
36
36
|
return self._parse(data=parsed_envelope.input_text, model=model)
|
37
|
+
|
38
|
+
|
39
|
+
class BedrockAgentFunctionEnvelope(BaseEnvelope):
|
40
|
+
"""Bedrock Agent Function envelope to extract data within input_text key"""
|
41
|
+
|
42
|
+
def parse(self, data: dict[str, Any] | Any | None, model: type[Model]) -> Model | None:
|
43
|
+
"""Parses data found with model provided
|
44
|
+
|
45
|
+
Parameters
|
46
|
+
----------
|
47
|
+
data : dict
|
48
|
+
Lambda event to be parsed
|
49
|
+
model : type[Model]
|
50
|
+
Data model provided to parse after extracting data using envelope
|
51
|
+
|
52
|
+
Returns
|
53
|
+
-------
|
54
|
+
Model | None
|
55
|
+
Parsed detail payload with model provided
|
56
|
+
"""
|
57
|
+
logger.debug(f"Parsing incoming data with Bedrock Agent Function model {BedrockAgentFunctionEventModel}")
|
58
|
+
parsed_envelope: BedrockAgentFunctionEventModel = BedrockAgentFunctionEventModel.model_validate(data)
|
59
|
+
logger.debug(f"Parsing event payload in `input_text` with {model}")
|
60
|
+
return self._parse(data=parsed_envelope.input_text, model=model)
|
@@ -32,6 +32,7 @@ from .appsync import (
|
|
32
32
|
)
|
33
33
|
from .bedrock_agent import (
|
34
34
|
BedrockAgentEventModel,
|
35
|
+
BedrockAgentFunctionEventModel,
|
35
36
|
BedrockAgentModel,
|
36
37
|
BedrockAgentPropertyModel,
|
37
38
|
BedrockAgentRequestBodyModel,
|
@@ -208,6 +209,7 @@ __all__ = [
|
|
208
209
|
"BedrockAgentEventModel",
|
209
210
|
"BedrockAgentRequestBodyModel",
|
210
211
|
"BedrockAgentRequestMediaModel",
|
212
|
+
"BedrockAgentFunctionEventModel",
|
211
213
|
"S3BatchOperationJobModel",
|
212
214
|
"S3BatchOperationModel",
|
213
215
|
"S3BatchOperationTaskModel",
|
@@ -36,3 +36,21 @@ class BedrockAgentEventModel(BaseModel):
|
|
36
36
|
agent: BedrockAgentModel
|
37
37
|
parameters: Optional[List[BedrockAgentPropertyModel]] = None
|
38
38
|
request_body: Optional[BedrockAgentRequestBodyModel] = Field(None, alias="requestBody")
|
39
|
+
|
40
|
+
|
41
|
+
class BedrockAgentFunctionEventModel(BaseModel):
|
42
|
+
"""Bedrock Agent Function event model
|
43
|
+
|
44
|
+
Documentation:
|
45
|
+
https://docs.aws.amazon.com/bedrock/latest/userguide/agents-lambda.html
|
46
|
+
"""
|
47
|
+
|
48
|
+
message_version: str = Field(..., alias="messageVersion")
|
49
|
+
agent: BedrockAgentModel
|
50
|
+
input_text: str = Field(..., alias="inputText")
|
51
|
+
session_id: str = Field(..., alias="sessionId")
|
52
|
+
action_group: str = Field(..., alias="actionGroup")
|
53
|
+
function: str
|
54
|
+
parameters: Optional[List[BedrockAgentPropertyModel]] = None
|
55
|
+
session_attributes: Dict[str, str] = Field({}, alias="sessionAttributes")
|
56
|
+
prompt_session_attributes: Dict[str, str] = Field({}, alias="promptSessionAttributes")
|
{aws_lambda_powertools-3.13.1a6.dist-info → aws_lambda_powertools-3.14.0.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: aws_lambda_powertools
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.14.0
|
4
4
|
Summary: Powertools for AWS Lambda (Python) is a developer toolkit to implement Serverless best practices and increase developer velocity.
|
5
5
|
License: MIT
|
6
6
|
Keywords: aws_lambda_powertools,aws,tracing,logging,lambda,powertools,feature_flags,idempotency,middleware
|
@@ -1,8 +1,9 @@
|
|
1
1
|
aws_lambda_powertools/__init__.py,sha256=o4iEHU0MfWC0_TfVmisxi0VOAUw5uQfqLQWr0t29ZaE,676
|
2
|
-
aws_lambda_powertools/event_handler/__init__.py,sha256=
|
2
|
+
aws_lambda_powertools/event_handler/__init__.py,sha256=HWTBEIrd2Znes31qT9h8k9PEfmWwepWyh9bxed2ES-0,1275
|
3
3
|
aws_lambda_powertools/event_handler/api_gateway.py,sha256=XD51QGNfdq8ihkCu7YX-OAa6-Ny2Mr2j_-SXwBfLa7g,121997
|
4
4
|
aws_lambda_powertools/event_handler/appsync.py,sha256=MNUlaM-4Ioaejei4L5hoW_DuDgOkQWAtMmKZU_Jwce4,18530
|
5
5
|
aws_lambda_powertools/event_handler/bedrock_agent.py,sha256=j3pKSDUmfb5MNcanqm78s9THh7bvh40LKKgnov95JcU,15146
|
6
|
+
aws_lambda_powertools/event_handler/bedrock_agent_function.py,sha256=7EXeF-mOVAaFiw5Lu872NQVDexzPkgAFNj5nvE9KU4I,9441
|
6
7
|
aws_lambda_powertools/event_handler/content_types.py,sha256=0MKsKNu-SSrxbULVKnUjwgK-lVXhVD7BBjZ4Js0kEsI,163
|
7
8
|
aws_lambda_powertools/event_handler/events_appsync/__init__.py,sha256=_SkA-qYoSdpDhPFHLxpFz8RacjMRMY6R8FFElQ3Otzs,144
|
8
9
|
aws_lambda_powertools/event_handler/events_appsync/_registry.py,sha256=pzFQfv662Y0DPZQXCgJgabYZq-1gfasV5Mdl_aC9FBc,3071
|
@@ -97,7 +98,7 @@ aws_lambda_powertools/shared/json_encoder.py,sha256=JQeWNu-4M7_xI_hqYExrxsb3OcEH
|
|
97
98
|
aws_lambda_powertools/shared/lazy_import.py,sha256=TbXQm2bcwXdZrYdBaJJXIswyLlumM85RJ_A_0w-h-GU,2019
|
98
99
|
aws_lambda_powertools/shared/types.py,sha256=EZ_tbX3F98LA4Zcra1hTEjzRacpZAtggK957Zcv1oKg,135
|
99
100
|
aws_lambda_powertools/shared/user_agent.py,sha256=DrCMFQuT4a4iIrpcWpAIjY37EFqR9-QxlxDGD-Nn9Gg,7081
|
100
|
-
aws_lambda_powertools/shared/version.py,sha256=
|
101
|
+
aws_lambda_powertools/shared/version.py,sha256=zmxzxv5o9Go6QQPOHBOWC9y9X54n1sr_x1HlVW-kiSE,83
|
101
102
|
aws_lambda_powertools/tracing/__init__.py,sha256=f4bMThOPBPWTPVcYqcAIErAJPerMsf3H_Z4gCXCsK9I,141
|
102
103
|
aws_lambda_powertools/tracing/base.py,sha256=WSO986XGBOe9K0F2SnG6ustJokIrtO0m0mcL8N7mfno,4544
|
103
104
|
aws_lambda_powertools/tracing/extensions.py,sha256=APOfXOq-hRBKaK5WyfIyrd_6M1_9SWJZ3zxLA9jDZzU,492
|
@@ -109,7 +110,7 @@ aws_lambda_powertools/utilities/batch/decorators.py,sha256=HK0DzPd9UWoyvIcH7feFY
|
|
109
110
|
aws_lambda_powertools/utilities/batch/exceptions.py,sha256=ZbWgItDimiSXmrDlejIpGc-4mez8XKgl3MB5bAPlrCo,1765
|
110
111
|
aws_lambda_powertools/utilities/batch/sqs_fifo_partial_processor.py,sha256=MPE87ZithqQOcwzoZdYReOajc4mrbiKOsIXcXicznZE,4236
|
111
112
|
aws_lambda_powertools/utilities/batch/types.py,sha256=XgUSbOIfzY4d2z3cFntQHAe6hcmxt6fbvSpa2KaMLeU,1112
|
112
|
-
aws_lambda_powertools/utilities/data_classes/__init__.py,sha256=
|
113
|
+
aws_lambda_powertools/utilities/data_classes/__init__.py,sha256=SnFFI9vGM_28ZBWF9egbHYhQpcn9ib_G8uFuT3Grr58,3578
|
113
114
|
aws_lambda_powertools/utilities/data_classes/active_mq_event.py,sha256=-AdONdHS6soJ9secO6sJ5EgiamiIUJRlgyymCe7z1io,4438
|
114
115
|
aws_lambda_powertools/utilities/data_classes/alb_event.py,sha256=cHfLaAWwhSuIk-H52xIA4Mq1nx8b0tDxN0slPy0ZamQ,1836
|
115
116
|
aws_lambda_powertools/utilities/data_classes/api_gateway_authorizer_event.py,sha256=dmoR9aIbhqRIrFKX__BFxvbkYl3fr72RbLct7hG5f04,27034
|
@@ -122,6 +123,7 @@ aws_lambda_powertools/utilities/data_classes/appsync_resolver_event.py,sha256=y8
|
|
122
123
|
aws_lambda_powertools/utilities/data_classes/appsync_resolver_events_event.py,sha256=znawUERcOzW-m2puEhvc-g3oLu9Hco8F9qdckuLYWiU,1718
|
123
124
|
aws_lambda_powertools/utilities/data_classes/aws_config_rule_event.py,sha256=BwSG8R96yGLlYRgY0qe2Y49k2gGvkXkfsglvMuES38s,12228
|
124
125
|
aws_lambda_powertools/utilities/data_classes/bedrock_agent_event.py,sha256=PHavf1gILqkUNa2_eUo-q-gXNFF8lPK1CSqjAI9LAvU,3599
|
126
|
+
aws_lambda_powertools/utilities/data_classes/bedrock_agent_function_event.py,sha256=2aY44rzUklcqqg1HzB3rN49Z-_CyvJoNiRJsdI9sCzo,1900
|
125
127
|
aws_lambda_powertools/utilities/data_classes/cloud_watch_alarm_event.py,sha256=_5IOvCWhyQvbmmzV4Xg6Yee1LKyLe4oBeYmAMxoRlEA,6398
|
126
128
|
aws_lambda_powertools/utilities/data_classes/cloud_watch_custom_widget_event.py,sha256=jOosilW8xBxD69LxssrYZhiUwqnTbtknJIVhg5FA9a8,4215
|
127
129
|
aws_lambda_powertools/utilities/data_classes/cloud_watch_logs_event.py,sha256=uuGqErwHw0gTyGKEV5Q92W4yGAEjzUULsb33Egd723M,3470
|
@@ -198,12 +200,12 @@ aws_lambda_powertools/utilities/parameters/secrets.py,sha256=ai4Id4a40TWXWQipl1z
|
|
198
200
|
aws_lambda_powertools/utilities/parameters/ssm.py,sha256=PyJ6CaV49TrmhLirKUJGfXwIrFIze2-4BJoscKxUXoo,42895
|
199
201
|
aws_lambda_powertools/utilities/parameters/types.py,sha256=O7GLEwPZtb2bePvaqbOeQz2eAOY8uWENmAEjc-tmVVU,87
|
200
202
|
aws_lambda_powertools/utilities/parser/__init__.py,sha256=l0ydEYRUtxjS7bS3vKWbCGUqvIvmaH7wLiBTD1E5VqM,524
|
201
|
-
aws_lambda_powertools/utilities/parser/envelopes/__init__.py,sha256=
|
203
|
+
aws_lambda_powertools/utilities/parser/envelopes/__init__.py,sha256=EkqF-r8E3MiSSph2a0yaqJhRk04zdeYw6QWAEFqmMB0,1250
|
202
204
|
aws_lambda_powertools/utilities/parser/envelopes/apigw.py,sha256=RqOmf4FUKAEUK3boY3dSlHhgIHBv8WkrQ2nFeOyKqjo,1275
|
203
205
|
aws_lambda_powertools/utilities/parser/envelopes/apigw_websocket.py,sha256=BfRdzzXlH-UXZIpV4qbqP4O3miDz5b2vGApSNjHYVQA,1447
|
204
206
|
aws_lambda_powertools/utilities/parser/envelopes/apigwv2.py,sha256=E3Rc3ketdakcoQ8aeeHghETwhsDXvhS2s9h1vCpf-Ik,1291
|
205
207
|
aws_lambda_powertools/utilities/parser/envelopes/base.py,sha256=LmuRJB3Ydd0A6E_tOWvgqLCkDNhGVd45zzO5uZUfFMo,2072
|
206
|
-
aws_lambda_powertools/utilities/parser/envelopes/bedrock_agent.py,sha256=
|
208
|
+
aws_lambda_powertools/utilities/parser/envelopes/bedrock_agent.py,sha256=fixghz1jMWzGoNGT0o0AOoagCjzs3ZBBqC_2NVfzEDg,2296
|
207
209
|
aws_lambda_powertools/utilities/parser/envelopes/cloudwatch.py,sha256=xERcckRMA_7RaQS3bP-QSHqxmdU9Tr7o1fVPsbswbPg,1598
|
208
210
|
aws_lambda_powertools/utilities/parser/envelopes/dynamodb.py,sha256=fJyqT7i5dgzwuLkpK3tdvKPo_7g3VuVvKsqFYri3pJA,1731
|
209
211
|
aws_lambda_powertools/utilities/parser/envelopes/event_bridge.py,sha256=JpstsMZsd5abf4oJvMUdo-K7x-gxHf91eR2BB9Z3rVA,1244
|
@@ -217,13 +219,13 @@ aws_lambda_powertools/utilities/parser/envelopes/vpc_lattice.py,sha256=RIwj1CQJ_
|
|
217
219
|
aws_lambda_powertools/utilities/parser/envelopes/vpc_latticev2.py,sha256=DGLibAGblJPPe1wC-9gvNWR8LusAzTeTLxwc3cizHzY,1264
|
218
220
|
aws_lambda_powertools/utilities/parser/exceptions.py,sha256=y6DXKUg48xgvswqMAxOYaUGRAqJgg8sm_F8JORgCa1U,207
|
219
221
|
aws_lambda_powertools/utilities/parser/functions.py,sha256=OOcp9xFPrS4e1U8-zHP8bcJ4iTUNmEVYf1EN2yqaCiY,2497
|
220
|
-
aws_lambda_powertools/utilities/parser/models/__init__.py,sha256=
|
222
|
+
aws_lambda_powertools/utilities/parser/models/__init__.py,sha256=keFEiK3MoUzRLFOh3L14ONrp8MCr7K5t-iNjW4uDQS4,6431
|
221
223
|
aws_lambda_powertools/utilities/parser/models/alb.py,sha256=lJPWPjz0_4Hz9Pkpap3NRvScSI3RWC7o4dFYt4F7LLM,439
|
222
224
|
aws_lambda_powertools/utilities/parser/models/apigw.py,sha256=_UbZXcfdcz7U-MrixXor4sc-VkNIuJAj9uwqjJTlhKg,3494
|
223
225
|
aws_lambda_powertools/utilities/parser/models/apigw_websocket.py,sha256=Pi3R9qFudSrujGz_s3m7BfpX_r7FebcYtbomDAetIrA,3004
|
224
226
|
aws_lambda_powertools/utilities/parser/models/apigwv2.py,sha256=x-v1vwVFwf2pGrkZfRri6ZmhHazeVPr1mHyD3R_vH30,2134
|
225
227
|
aws_lambda_powertools/utilities/parser/models/appsync.py,sha256=mFzfTZgQ98zxwPKQoNRTTx9tQknumJ0J4PaiGaNzHu8,1554
|
226
|
-
aws_lambda_powertools/utilities/parser/models/bedrock_agent.py,sha256=
|
228
|
+
aws_lambda_powertools/utilities/parser/models/bedrock_agent.py,sha256=tuu8rsykPAZYSKMshOdl6Xf6vMaqy0wlkFP0Qts2-2s,1942
|
227
229
|
aws_lambda_powertools/utilities/parser/models/cloudformation_custom_resource.py,sha256=DySFMeZ50qOZ1FkwSzM70IlcCmjKkoynmmKqLYfTL6E,1465
|
228
230
|
aws_lambda_powertools/utilities/parser/models/cloudwatch.py,sha256=1y2WmgBbIo6GkEtw75YzNaz9qREHl_-ThT0Iz7Ntd_k,1291
|
229
231
|
aws_lambda_powertools/utilities/parser/models/dynamodb.py,sha256=ktjvd5L7LLvitgi1yPFbtc_TK8J_3yzqIHmaZ4UfTt8,2197
|
@@ -269,7 +271,7 @@ aws_lambda_powertools/utilities/validation/envelopes.py,sha256=YD5HOFx6IClQgii0n
|
|
269
271
|
aws_lambda_powertools/utilities/validation/exceptions.py,sha256=PKy_19zQMBJGCMMFl-sMkcm-cc0v3zZBn_bhGE4wKNo,2084
|
270
272
|
aws_lambda_powertools/utilities/validation/validator.py,sha256=khCqFhACSdn0nKyYRRPiC5Exht956hTfSfhlV3IRmpg,10099
|
271
273
|
aws_lambda_powertools/warnings/__init__.py,sha256=vqDVeZz8wGtD8WGYNSkQE7AHwqtIrPGRxuoJR_BBnSs,1193
|
272
|
-
aws_lambda_powertools-3.
|
273
|
-
aws_lambda_powertools-3.
|
274
|
-
aws_lambda_powertools-3.
|
275
|
-
aws_lambda_powertools-3.
|
274
|
+
aws_lambda_powertools-3.14.0.dist-info/LICENSE,sha256=vMHS2eBgmwPUIMPb7LQ4p7ib_FPVQXarVjAasflrTwo,951
|
275
|
+
aws_lambda_powertools-3.14.0.dist-info/METADATA,sha256=hVaflxLiuyYfM3afhhiEzrQuI-jvXW6A7pnLEkFl9N0,11271
|
276
|
+
aws_lambda_powertools-3.14.0.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
277
|
+
aws_lambda_powertools-3.14.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|