Problem
The test Lambda function (src/lambda/mcp_servers/test/lambda_function.py) uses inconsistent response formats:
Error responses return HTTP-style objects:
return {"statusCode": 400, "body": json.dumps({"error": "message parameter is required"})}
return {"statusCode": 404, "body": json.dumps({"error": f"Unknown tool: {tool_name}", ...})}
Success responses return plain dicts:
return {"message": f"Hello, {name}!", ...}
Other MCP Lambda functions (athena, cost_explorer, cur_analyst) consistently return plain dicts for both success and error:
return {"error": str(e)} # errors
return {"results": [...]} # success
Expected Behavior
The test Lambda should follow the same pattern as other MCP Lambda functions — return plain dicts without HTTP status codes wrapping.
Scope
- Update error returns in
src/lambda/mcp_servers/test/lambda_function.py to use {"error": "..."} format
- Remove
statusCode and body wrapping from error responses
- Keep success response format as-is (already plain dict)
Problem
The test Lambda function (
src/lambda/mcp_servers/test/lambda_function.py) uses inconsistent response formats:Error responses return HTTP-style objects:
Success responses return plain dicts:
Other MCP Lambda functions (
athena,cost_explorer,cur_analyst) consistently return plain dicts for both success and error:Expected Behavior
The test Lambda should follow the same pattern as other MCP Lambda functions — return plain dicts without HTTP status codes wrapping.
Scope
src/lambda/mcp_servers/test/lambda_function.pyto use{"error": "..."}formatstatusCodeandbodywrapping from error responses