Skip to content

Commit 36f743e

Browse files
committed
feat!: Migrate from aws-lambda-typing to aws-lambda-powertools for Lambda types
1 parent d21e45c commit 36f743e

10 files changed

+19
-15
lines changed

src/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies = [
2424
"anyio>=4.10.0",
2525
"aiobotocore>=2.23.2",
2626
"mcp>=1.12.3",
27-
"aws-lambda-typing>=2.20.0"
27+
"aws-lambda-powertools>=3.19.0"
2828
]
2929

3030
[project.urls]

src/python/src/mcp_lambda/handlers/api_gateway_proxy_event_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Dict, Optional, TypedDict
22

3-
from aws_lambda_typing.events import APIGatewayProxyEventV1 as APIGatewayProxyEvent
3+
from aws_lambda_powertools.utilities.data_classes import APIGatewayProxyEvent
44

55
from .request_handler import RequestHandler
66
from .streamable_http_handler import (

src/python/src/mcp_lambda/handlers/api_gateway_proxy_event_v2_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Dict, Optional, TypedDict
22

3-
from aws_lambda_typing.events import APIGatewayProxyEventV2
3+
from aws_lambda_powertools.utilities.data_classes import APIGatewayProxyEventV2
44

55
from .request_handler import RequestHandler
66
from .streamable_http_handler import (

src/python/src/mcp_lambda/handlers/lambda_function_url_event_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Dict, Optional, TypedDict
22

3-
from aws_lambda_typing.events import APIGatewayProxyEventV2
3+
from aws_lambda_powertools.utilities.data_classes import APIGatewayProxyEventV2
44

55
from .request_handler import RequestHandler
66
from .streamable_http_handler import (

src/python/src/mcp_lambda/handlers/request_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from abc import ABC, abstractmethod
22
from typing import Union
33

4-
from aws_lambda_typing.context import Context as LambdaContext
4+
from aws_lambda_powertools.utilities.typing import LambdaContext
55
from mcp.types import JSONRPCError, JSONRPCRequest, JSONRPCResponse
66

77

src/python/src/mcp_lambda/handlers/streamable_http_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from abc import ABC, abstractmethod
2020
from typing import Any, Dict, Generic, List, Optional, TypeVar, Union
2121

22-
from aws_lambda_typing.context import Context as LambdaContext
22+
from aws_lambda_powertools.utilities.typing import LambdaContext
2323
from mcp.types import (
2424
CONNECTION_CLOSED,
2525
INTERNAL_ERROR,

src/python/src/mcp_lambda/server_adapter/stdio_server_adapter_request_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33
from typing import Union
44

5-
from aws_lambda_typing.context import Context as LambdaContext
5+
from aws_lambda_powertools.utilities.typing import LambdaContext
66
from mcp.client.stdio import StdioServerParameters
77
from mcp.types import (
88
INTERNAL_ERROR,

src/python/tests/server_adapter/test_stdio_server_adapter_request_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from unittest.mock import Mock, patch
66

77
import pytest
8-
from aws_lambda_typing.context import Context as LambdaContext
8+
from aws_lambda_powertools.utilities.typing import LambdaContext
99
from mcp.client.stdio import StdioServerParameters
1010
from mcp.types import INTERNAL_ERROR, JSONRPCError, JSONRPCRequest, JSONRPCResponse
1111

src/python/tests/test_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from unittest.mock import Mock
88

99
import pytest
10-
from aws_lambda_typing.context import Context as LambdaContext
10+
from aws_lambda_powertools.utilities.typing import LambdaContext
1111
from mcp.types import (
1212
INTERNAL_ERROR,
1313
METHOD_NOT_FOUND,

src/python/uv.lock

Lines changed: 10 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)