Skip to content

Magnum adapter issue in the lambda functions #5

@existme

Description

@existme

Hi,

When I try to call the lambda function deployed by the stack (as explained in the readme)

curl -X POST "https://replace-with-your-api-gw-url/prod/api/v1/llm/rag" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{\"q\":\"Which versions of XGBoost does SageMaker support?\"}"

I always get a 500 with the following log lines in the cloud watch:

{
  "errorMessage": "'requestContext'",
  "errorType": "KeyError",
  "requestId": "889fc5a4-07df-40f1-9c69-3725cca2046e",
  "stackTrace": [
    "  File \"/var/task/mangum/adapter.py\", line 110, in __call__\n    return self.handler(event, context)\n",
    "  File \"/var/task/mangum/adapter.py\", line 130, in handler\n    if \"eventType\" in event[\"requestContext\"]:\n"
  ]
}

It's pointed out here that it can be related to the magnum adapter. Can this be fixed in the repo?

Thanks in advance.
/Reza

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions