Hello I have been trying to deploy python django u...
# general
g
Hello I have been trying to deploy python django using pants and serverless. Encounting errors for
sls wsgi manage --command "migrate -v2" --stage dev
wsgi commands. Details in thread and thank you.
I have this in my build file.
Copy code
python_awslambda(
    name="lambda",
    runtime="python3.10",
    handler="dir/wsgi.py:application.wsgi.handler",
    # pants 2.18 is needed to skip using the complete_platforms <https://pantsbuild.slack.com/archives/C046T6T9U/p1693513364369389?thread_ts=1693503601.858329&cid=C046T6T9U>
    #     complete_platforms=[":aws-lambda-py310"],
    dependencies=[
        ":src"
        ]
)
And in serverless file. Not sure why getting .
Copy code
functions:
  app:
    handler: wsgi_function.handler
    package:
      artifact: lambda.zip
Getting errors while deploying with sls wsgi manage migrate
Copy code
'No functions were found with handler: wsgi_handler.handler'
3 deprecations found: run 'serverless doctor' for more details
c
do we have any one with aws lambda experience that recognize this in the community? 😉
b
Is that error from the Serverless CLI or from AWS or from something else? I don’t know much about sls, so I personally cannot help too much there. That said the handler functions specifications are a bit surprising to me, and might be the cause: I’m not sure `.`s work in the bit after a
:
in the pants definition; and the handler reference in the serverless file doesn’t match the pants definition
g
The error is from serverless when the pipelines run
sls wsgi manage --command "migrate -v2" --stage dev