I am following <this tutorial> on building a simpl...
# general
m
I am following this tutorial on building a simple Serverless function in Azure (everything works). I downloaded the zip file that contains a hello world in python to my local machine and put the path in line 69. The appfunction does not work anymore. It deploys but curl returns nothing and Log stream has strange message.
Copy code
Connected!
2023-11-10T21:11:46Z   [Verbose]   Received request to drain the host
2023-11-10T21:11:46Z   [Verbose]   Received request to drain the host
2023-11-10T21:11:46Z   [Information]   DrainMode mode enabled
2023-11-10T21:11:46Z   [Information]   Calling StopAsync on the registered listeners
2023-11-10T21:11:46Z   [Information]   Call to StopAsync complete, registered listeners are now stopped
2023-11-10T21:12:16Z   [Information]   Host lock lease acquired by instance ID '0000000000000000000000008095D9B6'.
Any idea why this would happen? It's the same zip file, just on my machine instead of on github. I also tried to upload the zip file as blob and pass
blob.url
in line 69 but I get the same problem again. Thanks!
b
Hi Rahul, Kat (owner of that repo) doesn’t work for Pulumi anymore. You could get in touch with her to ask her to fix it, or you could take a look at this template and start from there: https://www.pulumi.com/templates/serverless-application/azure/
m
Hi Piers, Thanks for the response. This example does work - are all the components in it needed? It's quite different from AWS Lambda and CloudFunction on GCP. Would you have something that just returns helloworld? No html etc. Just a simple
Copy code
def hello():
    return "Hello world@!
Thanks :)
I can also keep all of that and move on but it's a lot of bloat for something so simple. Should serverless run a frontend. I thought it is small and simple meant for running small pieces of code 🤔.
b
So it looks like there are two things happening there - one is a static website (the first few resources) and then the serverless function is from line 72 onwards