Skip to content

Commit 9421691

Browse files
committed
fix: use correct template variable casing and switch to http_app() for Lambda compatibility
1 parent fc4ce65 commit 9421691

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ if __name__ == "__main__":
635635
`;
636636
637637
exports[`Assets Directory Snapshots > MCP assets > mcp/mcp/python-fastmcp-lambda/README.md should match snapshot 1`] = `
638-
"# {{ name }}
638+
"# {{ Name }}
639639
640640
FastMCP server running on AWS Lambda with a function URL, generated by the AgentCore CLI.
641641
@@ -687,7 +687,7 @@ from mcp.server.fastmcp import FastMCP
687687
logging.basicConfig(level=logging.INFO, format="%(levelname)s - %(message)s")
688688
logger = logging.getLogger(__name__)
689689
690-
mcp = FastMCP("tools")
690+
mcp = FastMCP("{{ Name }}")
691691
692692
HTTP_TIMEOUT = 10.0
693693
MAX_RETRIES = 2
@@ -779,7 +779,7 @@ async def fetch_post(post_id: int) -> str:
779779
780780
781781
# Create ASGI app from FastMCP server and wrap with Mangum for Lambda
782-
lambda_handler = Mangum(mcp.sse_app(), lifespan="off")
782+
lambda_handler = Mangum(mcp.http_app(), lifespan="off")
783783
"
784784
`;
785785
@@ -789,7 +789,7 @@ requires = ["hatchling"]
789789
build-backend = "hatchling.build"
790790
791791
[project]
792-
name = "{{ name }}"
792+
name = "{{ Name }}"
793793
version = "0.1.0"
794794
description = "FastMCP Server on AWS Lambda"
795795
readme = "README.md"

src/assets/mcp/python-fastmcp-lambda/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# {{ name }}
1+
# {{ Name }}
22

33
FastMCP server running on AWS Lambda with a function URL, generated by the AgentCore CLI.
44

src/assets/mcp/python-fastmcp-lambda/handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
logging.basicConfig(level=logging.INFO, format="%(levelname)s - %(message)s")
2020
logger = logging.getLogger(__name__)
2121

22-
mcp = FastMCP("tools")
22+
mcp = FastMCP("{{ Name }}")
2323

2424
HTTP_TIMEOUT = 10.0
2525
MAX_RETRIES = 2
@@ -111,4 +111,4 @@ async def fetch_post(post_id: int) -> str:
111111

112112

113113
# Create ASGI app from FastMCP server and wrap with Mangum for Lambda
114-
lambda_handler = Mangum(mcp.sse_app(), lifespan="off")
114+
lambda_handler = Mangum(mcp.http_app(), lifespan="off")

src/assets/mcp/python-fastmcp-lambda/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["hatchling"]
33
build-backend = "hatchling.build"
44

55
[project]
6-
name = "{{ name }}"
6+
name = "{{ Name }}"
77
version = "0.1.0"
88
description = "FastMCP Server on AWS Lambda"
99
readme = "README.md"

0 commit comments

Comments
 (0)